cginternals/glbinding

Possible overlinkage

Closed this issue · 2 comments

The following warning were raised by the Debian packaging utility responsible for calculating the package dependencies:

dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/glbinding-tools/usr/bin/glmeta debian/glbinding-tools/usr/bin/glfunctions debian/glbinding-tools/usr/bin/glqueries debian/glbinding-tools/usr/bin/glcontexts were not linked against libGL.so.1 (they use none of the library's symbols)
dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/glbinding-tools/usr/bin/glmeta debian/glbinding-tools/usr/bin/glfunctions debian/glbinding-tools/usr/bin/glqueries debian/glbinding-tools/usr/bin/glcontexts were not linked against libpthread.so.0 (they use none of the library's symbols)

which usually suggests that the corresponding targets are overlinked. These may also be false positives. Please let me know.

Cheers,

Thanks for reporting.

Linking pthread:
Indeed, linking against pthread is only required for multi-threaded googlemock tests on some systems.
Maybe we can investigate further to eliminate this dependency.

Linking libGL:
Our current implementation of symbol address loading doesn't use dlopen on self to extract the addresses but relies on the GLX interface. I'm pretty sure we want to support other window toolkit APIs in the future and I'm not sure if we will use dlopen. Until then, this dependency seems unnecessary.
However, if we omit the linking of the libGL we have to test first what happens if glbinding is used in an application without the libGL (e.g., if an application programmer forgets to link or relies on its dependencies).

I will discuss the dependency removal with the other maintainers.

I tested several executables with dpkg-shlibdeps and got the following results:

$ dpkg-shlibdeps glcontexts 
dpkg-shlibdeps: error: no dependency information found for /home/scheibel/dev/glfw/lib/libglfw.so.3 (used by glcontexts)
Hint: check if the library actually comes from a package.
$ dpkg-shlibdeps cubescape
dpkg-shlibdeps: error: no dependency information found for /home/scheibel/dev/glfw/lib/libglfw.so.3 (used by cubescape)
Hint: check if the library actually comes from a package.
$ dpkg-shlibdeps glinfo 
dpkg-shlibdeps: error: no dependency information found for /home/scheibel/dev/glfw/lib/libglfw.so.3 (used by glinfo)
Hint: check if the library actually comes from a package.
$ dpkg-shlibdeps glmeta 
dpkg-shlibdeps: error: no dependency information found for /home/scheibel/dev/glbinding/build/libglbinding-aux.so.3 (used by glmeta)
Hint: check if the library actually comes from a package.

Thus, I could not reproduce this issue anymore. Is this still a problem? If so, please reopen this issue and provide more information.