Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 574696 - add test to portage - check undefined functions in packages
Summary: add test to portage - check undefined functions in packages
Status: RESOLVED WONTFIX
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-14 14:17 UTC by Lagu
Modified: 2016-03-16 20:54 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lagu 2016-02-14 14:17:02 UTC
Hi, well actually one of the problems i normaly have in portage and about develop in gentoo its some libraries have "undefined symbols" (ldd -r "some lib or exe"), its posible add a test in portage to recognize it?
Comment 1 SpanKY gentoo-dev 2016-02-17 06:40:41 UTC
undefined symbols are not a problem by themselves, so it's hard to differentiate between "bad" undefined and expected ones.
Comment 2 Paul Varner (RETIRED) gentoo-dev 2016-02-17 18:00:44 UTC
I really need more context for what you are trying to do.  With that said ldd -r reports two different errors.

1. Symbol %s not defined
2. Undefined symbol: %s

The first one is normally a problem that can be fixed by recompiling the affected software

The second one tends to be a false positives and are typically not a problem

The revdep-rebuild.sh script in gentoolkit-0.3.1 does detect and act upon the first message.  

However, this functionality is not in the python version yet which is the default revdep-rebuild that is installed.  So you need to call revdep-rebuild.sh explicitly.
Comment 3 Lagu 2016-02-17 18:35:34 UTC
i think an example can do a context, compile tesseract with opencl use flag, now ldd -r

ldd -r /usr/lib64/libtesseract.so
	linux-vdso.so.1 (0x00007ffcf73ce000)
	liblept.so.4 => /usr/lib64/liblept.so.4 (0x00007fa17fb1f000)
	libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fa17f903000)
	libstdc++.so.6 => /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/libstdc++.so.6 (0x00007fa17f5f2000)
	libm.so.6 => /lib64/libm.so.6 (0x00007fa17f2f6000)
	libc.so.6 => /lib64/libc.so.6 (0x00007fa17ef5b000)
	libgcc_s.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/libgcc_s.so.1 (0x00007fa17ed43000)
	libz.so.1 => /lib64/libz.so.1 (0x00007fa17eb2d000)
	libpng16.so.16 => /usr/lib64/libpng16.so.16 (0x00007fa17e8f8000)
	libjpeg.so.62 => /usr/lib64/libjpeg.so.62 (0x00007fa17e69e000)
	libgif.so.4 => /usr/lib64/libgif.so.4 (0x00007fa17e494000)
	libtiff.so.5 => /usr/lib64/libtiff.so.5 (0x00007fa17e220000)
	libwebp.so.5 => /usr/lib64/libwebp.so.5 (0x00007fa17dfc4000)
	/lib64/ld-linux-x86-64.so.2 (0x0000563feab0a000)
	libX11.so.6 => /usr/lib64/libX11.so.6 (0x00007fa17dc82000)
	libxcb.so.1 => /usr/lib64/libxcb.so.1 (0x00007fa17da5e000)
	libdl.so.2 => /lib64/libdl.so.2 (0x00007fa17d85a000)
	libXau.so.6 => /usr/lib64/libXau.so.6 (0x00007fa17d656000)
	libXdmcp.so.6 => /usr/lib64/libXdmcp.so.6 (0x00007fa17d44f000)
	libbsd.so.0 => /usr/lib64/libbsd.so.0 (0x00007fa17d239000)
undefined symbol: clBuildProgram	(/usr/lib64/libtesseract.so)
undefined symbol: clEnqueueNDRangeKernel	(/usr/lib64/libtesseract.so)
undefined symbol: clSetKernelArg	(/usr/lib64/libtesseract.so)
undefined symbol: clReleaseMemObject	(/usr/lib64/libtesseract.so)
undefined symbol: clFinish	(/usr/lib64/libtesseract.so)
undefined symbol: clEnqueueUnmapMemObject	(/usr/lib64/libtesseract.so)
undefined symbol: clCreateContextFromType	(/usr/lib64/libtesseract.so)
undefined symbol: clGetCommandQueueInfo	(/usr/lib64/libtesseract.so)
undefined symbol: clReleaseContext	(/usr/lib64/libtesseract.so)
undefined symbol: clEnqueueCopyBuffer	(/usr/lib64/libtesseract.so)
undefined symbol: clGetProgramBuildInfo	(/usr/lib64/libtesseract.so)
undefined symbol: clCreateContext	(/usr/lib64/libtesseract.so)
undefined symbol: clEnqueueMapBuffer	(/usr/lib64/libtesseract.so)
undefined symbol: clGetDeviceIDs	(/usr/lib64/libtesseract.so)
undefined symbol: clGetContextInfo	(/usr/lib64/libtesseract.so)
undefined symbol: clGetDeviceInfo	(/usr/lib64/libtesseract.so)
undefined symbol: clReleaseCommandQueue	(/usr/lib64/libtesseract.so)
undefined symbol: clGetPlatformIDs	(/usr/lib64/libtesseract.so)
undefined symbol: clGetPlatformInfo	(/usr/lib64/libtesseract.so)
undefined symbol: clCreateProgramWithBinary	(/usr/lib64/libtesseract.so)
undefined symbol: clCreateCommandQueue	(/usr/lib64/libtesseract.so)
undefined symbol: clReleaseProgram	(/usr/lib64/libtesseract.so)
undefined symbol: clGetProgramInfo	(/usr/lib64/libtesseract.so)
undefined symbol: clCreateKernel	(/usr/lib64/libtesseract.so)
undefined symbol: clCreateBuffer	(/usr/lib64/libtesseract.so)
undefined symbol: clCreateProgramWithSource	(/usr/lib64/libtesseract.so)


now when you try compile some app with tesseract will fail.
Comment 4 Lagu 2016-03-13 01:42:01 UTC
other example:

ldd -r /usr/lib64/python2.7/site-packages/libtorrent.so
	linux-vdso.so.1 (0x00007ffddd54f000)
	libtorrent-rasterbar.so.8 => /usr/lib64/libtorrent-rasterbar.so.8 (0x00007fc97a931000)
	libboost_system.so.1.57.0 => /usr/lib64/libboost_system.so.1.57.0 (0x00007fc97a72c000)
	libboost_python-3.4.so.1.57.0 => /usr/lib64/libboost_python-3.4.so.1.57.0 (0x00007fc97a4dc000)
	libpython2.7.so.1.0 => /usr/lib64/libpython2.7.so.1.0 (0x00007fc97a10d000)
	libstdc++.so.6 => /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/libstdc++.so.6 (0x00007fc979dfc000)
	libgcc_s.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/libgcc_s.so.1 (0x00007fc979be5000)
	libc.so.6 => /lib64/libc.so.6 (0x00007fc97984a000)
	libssl.so.1.0.0 => /usr/lib64/libssl.so.1.0.0 (0x00007fc9795d3000)
	libcrypto.so.1.0.0 => /usr/lib64/libcrypto.so.1.0.0 (0x00007fc979192000)
	libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fc978f76000)
	/lib64/ld-linux-x86-64.so.2 (0x00005653e242a000)
	librt.so.1 => /lib64/librt.so.1 (0x00007fc978d6d000)
	libutil.so.1 => /lib64/libutil.so.1 (0x00007fc978b6a000)
	libpython3.4.so.1.0 => /usr/lib64/libpython3.4.so.1.0 (0x00007fc9786d5000)
	libdl.so.2 => /lib64/libdl.so.2 (0x00007fc9784d0000)
	libm.so.6 => /lib64/libm.so.6 (0x00007fc9781d4000)
	libz.so.1 => /lib64/libz.so.1 (0x00007fc977fbd000)
undefined symbol: _ZN5boost6python6detail11init_moduleEPKcPFvvE	(/usr/lib64/python2.7/site-packages/libtorrent.so)

now all apps with libtorrent.so of dpend will fail to execute
Comment 5 Paul Varner (RETIRED) gentoo-dev 2016-03-16 20:54:58 UTC
Use revdep-rebuild.sh -u to detect these potential problems on your system.  There are way to many false positives on a good system to make this a default check though.

revdep-rebuild.sh will not go away until the new python version has all of the functionality.