Author Topic: <Solved> Dependency Hell Updating libglew-devel to 1.5.5  (Read 1169 times)

Offline Chomp

  • Full Member
  • ***
  • Posts: 173
<Solved> Dependency Hell Updating libglew-devel to 1.5.5
« on: July 22, 2010, 01:51:23 PM »
So I've been trying to package VDrift per user request, which has ended up sidetracking me with updating compilers, libraries, and devel packages just to get VDrift to compile. It was suggested on the VDrift forums that I needed to update my glew libs/headers. Since the version of glew in the repos is 1.5.1, and a cursory glance at the changelogs up to the latest stable version(1.5.5), all seem to indicate that may be true.

So I have updated glew from 1.5.1 to 1.5.5. Packaging glew(which you can see from the .spec file at the bottom of this post) also creates libglew1.5-1.5.5-1pclos2010.i586.rpm and libglew-devel-1.5.5-1pclos2010.i586.rpm.

Both glew-1.5.5-1pclos2010.i586.rpm and libglew1.5-1.5.5-1pclos2010.i586.rpm install fine. However, when I go to install libglew-devel-1.5.5-1pclos2010.i586.rpm(with right-click >> Install RPM via apt-get) I get the following output:

Code: [Select]
Reading Package Lists... Done
Building Dependency Tree... Done
Selecting libglew-devel for '/home/chomp/src/rpm/RPMS/i586/libglew-devel-1.5.5-1pclos2010.i586.rpm'
Some packages could not be installed. This may mean that you have
requested an impossible situation or that some of the repositories
in use are in an inconsistent state at the moment.

Since you only requested a single operation it is extremely likely that
the package is simply not installable and a bug report against
that package should be filed.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
  libglew-devel: Depends: devel(libGLcore) but it is not installable
                 Depends: devel(libnvidia-tls) but it is not installable
E: Broken packages

At this point things are getting too complicated for me, so I need help. I can't find libGLcore or libnividia-tls in the repos, nor can I determine if they are packaged under different names. Some research on Google reveals that trying to even wrap my head around what I would need to package/update/change to obtain these dependencies is beyond my current skill set. So, my questions:

1) How do/can I resolve the dependency issue with libGLcore and libnvidia-tls?
2) If the above question is solvable, what(if any) changes would I need to make to the .spec file?
3) When packaging glew 1.5.5 I got an "installed but unpackaged" output for glew.pc. In the .spec file I placed glew.pc under %files -n %{develname}. Is this the correct place to put this?

Thanks in advance. Here's my .spec file:

Code: [Select]
%define major 1.5
%define libname %mklibname %{name} %{major}
%define develname %mklibname %{name} -d

%define _requires_exceptions devel(/lib/libNoVersion)

Summary: The OpenGL Extension Wrangler Library
Name: glew
Version: 1.5.5
Release: %mkrel 1
Group: Development/C
License: BSD
URL: http://glew.sourceforge.net
Source0: %{name}-%{version}.tgz
BuildRequires: libxorg-x11-devel
BuildRequires: libmesaglu1-devel
BuildRequires: file
BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot

%description
The goal of the OpenGL Extension Wrangler Library (GLEW) is to assist C/C++
OpenGL developers with two tedious tasks: initializing and using extensions
and writing portable applications. GLEW provides an efficient run-time
mechanism to determine whether a certain extension is supported by the
driver or not. OpenGL core and extension functionality is exposed via a
single header file. GLEW currently supports a variety of platforms and
operating systems, including Windows, Linux, Darwin, Irix, and Solaris.

%package -n %{libname}
Summary: GLEW library
Group: System/Libraries

%description -n %{libname}
The goal of the OpenGL Extension Wrangler Library (GLEW) is to assist C/C++
OpenGL developers with two tedious tasks: initializing and using extensions
and writing portable applications. GLEW provides an efficient run-time
mechanism to determine whether a certain extension is supported by the
driver or not. OpenGL core and extension functionality is exposed via a
single header file. GLEW currently supports a variety of platforms and
operating systems, including Windows, Linux, Darwin, Irix, and Solaris.

%package -n %{develname}
Summary: Development files for using the %{name} library
Group: Development/C
Requires: %{libname} = %{version}-%{release}
Provides: %{name}-devel = %{version}-%{release}
Provides: lib%{name}-devel = %{version}-%{release}
Obsoletes: %mklibname %{name} 1.3 -d
Provides: %mklibname %{name} 1.3 -d

%description -n %{develname}
Development files for using the %{name} library.

%prep

%setup -q

# strip away annoying ^M
find . -type f|xargs file|grep 'CRLF'|cut -d: -f1|xargs perl -p -i -e 's/\r//'
find . -type f|xargs file|grep 'text'|cut -d: -f1|xargs perl -p -i -e 's/\r//'

perl -pi -e "s#-shared -soname#-shared -lc -soname#g" config/Makefile.linux

#fix txt/doc files permissions
chmod 0755 doc
chmod 0644 doc/* README.txt

%build
%make CFLAGS.EXTRA="%{optflags} -fPIC"

%install
rm -rf %{buildroot}
%makeinstall_std BINDIR=%{buildroot}%{_bindir} LIBDIR=%{buildroot}%{_libdir} INCDIR=%{buildroot}%{_includedir}/GL

%post -n %{libname} -p /sbin/ldconfig

%postun -n %{libname} -p /sbin/ldconfig

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root)
%doc README.txt doc
%{_bindir}/glewinfo
%{_bindir}/visualinfo

%files -n %{libname}
%defattr(-,root,root)
%{_libdir}/libGLEW.so.%{major}*

%files -n %{develname}
%defattr(-,root,root)
%{_includedir}/GL/*.h
%{_libdir}/libGLEW.a
%{_libdir}/libGLEW.so
%{_libdir}/pkgconfig/glew.pc

%changelog
* Thu Jul 22 2010 Chomp <chomptheman@gmail.com> 1.5.5-1pclos2010
- update
- dropped p0, fixed upstream since 1.5.2
- update build requirements
- added fix for txt/doc file permissions

* Sun Aug 16 2009 Texstar <texstar@gmail.com> 1.5.1-1pclos2009
- update
« Last Edit: July 22, 2010, 04:36:28 PM by Chomp »

Offline Texstar

  • Administrator
  • Super Villain
  • *****
  • Posts: 12655
Re: Dependency Hell Updating libglew-devel to 1.5.5
« Reply #1 on: July 22, 2010, 04:09:01 PM »
That is because you are using nvidia drivers. Switch back to the xorg nv driver and those strange dependencies will go away. glew.pc goes in the development package.
« Last Edit: July 22, 2010, 04:10:34 PM by Texstar »

Thanks to everyone who donates. You keep the servers running.
Follow me on Twitter for the latest development info.

Offline Chomp

  • Full Member
  • ***
  • Posts: 173
Re: Dependency Hell Updating libglew-devel to 1.5.5
« Reply #2 on: July 22, 2010, 04:36:09 PM »
Excellent, worked like a charm, thanks so much Tex.

Offline menotu

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 15506
  • ┌∩┐(◕_◕)┌∩┐
Re: <Solved> Dependency Hell Updating libglew-devel to 1.5.5
« Reply #3 on: July 23, 2010, 05:51:47 AM »
Many thanks for adding this to the repo - and apols that it wasn't straight forward.
PCLinuxOS 32bit KDE 4.10.4; kernel-3.4.11-pclos1.bfs & 64bit 3.4.38bfs; NVidia GeForce 8400GS 1GB 310.19 driver

Sony Vaio SVE1513A4ESI Laptop, Intel Core i5, 2.6GHz, 6GB RAM, 750GB, 15.6" Intel HD Graphics 4000

Offline Chomp

  • Full Member
  • ***
  • Posts: 173
Re: <Solved> Dependency Hell Updating libglew-devel to 1.5.5
« Reply #4 on: July 23, 2010, 11:32:05 AM »
You're welcome Menotu, and no need to apologize, part of the reason I package is because I enjoy a challenge and I learn a few things in the process  ;)