Summary: | media-gfx/gphoto2-2.5.28-r1 fails to link: x86_64-pc-linux-gnu/bin/ld: cannot find -lcdkw (dev-libs/cdk needs to be re-emerged to avoid the issue) | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Miroslav Šulc <fordfrog> |
Component: | Current packages | Assignee: | Gentoo Linux Gnome Desktop Team <gnome> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | ago, eschwartz, josef64, luke, mail, maintainer-needed, mgorny, o.freyermuth, sam, titanofold, volkov, zhixu.liu |
Priority: | Normal | Keywords: | PullRequest |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: |
https://bugs.gentoo.org/show_bug.cgi?id=790773 https://bugs.gentoo.org/show_bug.cgi?id=862642 https://github.com/gentoo/gentoo/pull/39795 |
||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
build.log
cdk-5.0.20240619.log gphoto2-2.5.28-r2.log |
Description
Miroslav Šulc
![]() for some odd reason the /usr/lib64/libcdkw.so simlink points to a non existing file (libcdkw.so.6.3.4 in this case ) ls -l /usr/lib64/libcdkw* lrwxrwxrwx 1 root root 16 Jan 12 21:13 /usr/lib64/libcdkw.so -> libcdkw.so.6.3.4 lrwxrwxrwx 1 root root 14 Jan 12 21:13 /usr/lib64/libcdkw.so.6.3.4 -> libcdkw.so.5.0 equery b /usr/lib64/libcdkw.so * Searching for /usr/lib64/libcdkw.so ... dev-libs/cdk-5.0.20211216 (/usr/lib64/libcdkw.so -> libcdkw.so.6.3.4) think the probleme is with dev-libs/cdk $ equery files cdk | grep -v man | grep -v include | grep -v doc /usr /usr/bin /usr/bin/cdk5-config /usr/lib64 /usr/lib64/libcdkw.so /usr/lib64/libcdkw.so.6.3.4 /usr/share oh well, reemerged cdk (ebuild /usr/portage/dev-libs/cdk/cdk-5.0.20211216.ebuild merge) lo and behold, problem is gone .... Had this problem. Traced it back to emerge -1 dev-libs/cdk-5.0.20211216 having created files in /var/tmp/portage/dev-libs/cdk-5.0.20211216/image/usr/lib64 but not installing them in /usr/lib64. Ran ebuild /usr/portage/dev-libs/cdk/cdk-5.0.20211216.ebuild fetch Ran ebuild /usr/portage/dev-libs/cdk/cdk-5.0.20211216.ebuild configure Ran ebuild /usr/portage/dev-libs/cdk/cdk-5.0.20211216.ebuild compile Copied /var/tmp/portage/dev-libs/cdk-5.0.20211216/image/usr/lib64/libcdkw.so.5.0 into /usr/lib64 entered /usr/lib64 and created symlinks: libcdkw.so -> libcdkw.so.6.3.4 libcdkw.so.6.3.4 -> libcdkw.so.5.0 emerge -1 gphoto2 libgphoto2 then ran successfully. Was going to try to find the problem in dev-lib/cdk; removed the libcdkw file and symlinks from /usr/lib64, ran: emerge -C dev-libs/cdk gphoto2 libgphoto2 , then ran: emerge -C dev-libs/cdk gphoto2 libgphoto2 ; to my surprise the problem did not manifest itself. re-emerging cdk really helped, thanks! keeping the bug open as there might be something wrong with cdk and it might need a revbump. Yes, rebuild [ebuild R ] dev-libs/cdk-5.0.20211216:0/6::gentoo USE="unicode -examples" 0 KiB helped here too. Thanks! I too encountered this issue on both amd64 and x86 systems. Looking at the emerge log for dev-libs/cdk I noticed that libcdkw.so.5.0 gets deleted right near the end as shown below: [ebuild U ] dev-libs/cdk-5.0.20221025:0/6::gentoo [5.0.20210324-r2:0/6::gentoo] USE="unicode -examples -verify-sig%" 529 KiB . . . >>> Emerging (12 of 158) dev-libs/cdk-5.0.20221025::gentoo . . . linking libcdkw.so.5.0 . . . ln -s -f libcdkw.so.5.0 libcdkw.so.6.3.4 ln -s -f libcdkw.so.6.3.4 libcdkw.so >>> Source compiled. >>> Test phase [not enabled]: dev-libs/cdk-5.0.20221025 >>> Installing (12 of 158) dev-libs/cdk-5.0.20221025::gentoo >>> /usr/lib/libcdkw.so.5.0 >>> /usr/lib/libcdkw.so.6.3.4 -> libcdkw.so.5.0 . . . >>> /usr/lib/libcdkw.so -> libcdkw.so.6.3.4 >>> needed obj /usr/lib/libcdkw.so.5.0 >>> needed sym /usr/lib/libcdkw.so.6.2.4 >>> Safely unmerging already-installed instance... . . . --- replaced sym /usr/lib/libcdkw.so.6.2.4 --- replaced obj /usr/lib/libcdkw.so.5.0 --- replaced sym /usr/lib/libcdkw.so . . . >>> Regenerating /etc/ld.so.cache... >>> Original instance of package unmerged safely. >>> dev-libs/cdk-5.0.20221025 merged. >>> Regenerating /etc/ld.so.cache... <<< !needed obj /usr/lib/libcdkw.so.5.0 <<< !needed sym /usr/lib/libcdkw.so.6.2.4 * GNU info directory index is up-to-date. Note the two !needed lines. When emerge is run again to re-install the package everything looks the same as above, except those !needed lines aren't then. That is, the log ended like this: >>> Regenerating /etc/ld.so.cache... >>> Original instance of package unmerged safely. >>> dev-libs/cdk-5.0.20221025 merged. >>> Regenerating /etc/ld.so.cache... * GNU info directory index is up-to-date. The problem is something to do with the upgrade and the .so links. If I down grade the package (ie run: emerge -1v =dev-libs/cdk-5.0.20210324-r2), there is no problem (ie libcdkw.so.5.0 is not removed). However, if follow that with an upgrade (ie run: emerge -1v dev-libs/cdk), the .so file is removed as described above. I tried looking through the portage code to find the problem and did notice a comment in /usr/lib/python3.10/site-packages/portage/util/env_update.py regarding ldconfig (ie the code related to "Regenerating /etc/ld.so.cache...") that downgrades are treated differently than upgrades. Although, I'm not sure that is completely relevant as I have not yet found what bit of code is actually generating the !needed lines and deleting those files. Lastly, the log output shown above is for a x86 system. The ouput from an amd64 system is basically identical except /usr/lib/ is /usr/lib64/. Same issue here. Just ran today revdep-rebuild, it started to built gphoto2 and build failed. Rebuilt libcdk fixed symlinks. (In reply to cono from comment #7) > Same issue here. Just ran today revdep-rebuild, it started to built gphoto2 > and build failed. Rebuilt libcdk fixed symlinks. I've run into this today with dev-libs/cdk-5.0.20230201 and media-gfx/gphoto2-2.5.28-r1. Remerging dev-libs/cdk-5.0.20230201 was the only step I performed to fix. Given the above, this sounds a lot like the libmilter bug (bug 862642) where symlink order was broken. *** Bug 944904 has been marked as a duplicate of this bug. *** gcc15_tinderbox has reproduced this issue with version 2.5.28-r1 - Updating summary. (In reply to Agostino Sarubbo from comment #11) > gcc15_tinderbox has reproduced this issue with version 2.5.28-r1 - Updating > summary. can you post the build.log of cdw if exist? I tried different kinds of combination mentioned, but was unable to reproduce the problem yet. ci has reproduced this issue with version 2.5.28-r2 - Updating summary. (In reply to Agostino Sarubbo from comment #13) > ci has reproduced this issue with version 2.5.28-r2 - Updating summary. can we have the complete log of cdw & gphoto2 for further analysis? I'm pretty sure ago is wrong and CI hit another problem that I've also hit. I'll file a bug in a minute. (In reply to Michał Górny from comment #15) > I'm pretty sure ago is wrong and CI hit another problem that I've also hit. That's the truth :) https://bugs.gentoo.org/946688#c2 (In reply to Agostino Sarubbo from comment #13) > ci has reproduced this issue with version 2.5.28-r2 - Updating summary. that's wrong. I hit: /usr/lib/gcc/x86_64-pc-linux-gnu/14/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lcdk: No such file or directory I'm restoring back the summary *** Bug 946688 has been marked as a duplicate of this bug. *** Created attachment 914466 [details]
cdk-5.0.20240619.log
cdk-5.0.20240619.log
Created attachment 914467 [details]
gphoto2-2.5.28-r2.log
gphoto2-2.5.28-r2.log
(In reply to Agostino Sarubbo from comment #19) > Created attachment 914466 [details] > cdk-5.0.20240619.log > > cdk-5.0.20240619.log linking /var/tmp/portage/dev-libs/cdk-5.0.20240619/image/usr/lib64/libcdkw.so.5.0 ... cd /var/tmp/portage/dev-libs/cdk-5.0.20240619/image/usr/lib64 && (ln -s -f libcdkw.so.5.0 libcdkw.so.6.3.4; ln -s -f libcdkw.so.6.3.4 libcdkw.so; ) from the build.log above, the .so should be created correctly as following: lrwxrwxrwx 1 root root 16 Dec 20 18:24 libcdkw.so -> libcdkw.so.6.3.4 -rwxr-xr-x 1 root root 301096 Dec 20 18:25 libcdkw.so.5.0 lrwxrwxrwx 1 root root 14 Dec 20 18:24 libcdkw.so.6.3.4 -> libcdkw.so.5.0 Please help check: 1. do we have binary package saved on ci? If so, please post the output of command `tar tvf /var/cache/binpkgs/dev-libs/cdk-5.0.20240619.tbz2 |grep lib64/libcdk` 2. post the output of `ls -l /usr/lib64/libcdk*.so*` from cdk build.log, libcdkw.so.* are built but from gphoto2 build.log, it try to link cdk: -L/usr/lib64 -lcdk -lncursesw -ltinfow it's determined by `cdk5-config --libs`, should output "-lcdkw", ... so please post the output of command `cdk5-config --libs`. (In reply to Zhixu Liu from comment #21) > Please help check: > 1. do we have binary package saved on ci? If so, please post the output of > command `tar tvf /var/cache/binpkgs/dev-libs/cdk-5.0.20240619.tbz2 |grep > lib64/libcdk` > 2. post the output of `ls -l /usr/lib64/libcdk*.so*` ~ $ qlist -e cdk | grep lib64/libcdk /usr/lib64/libcdkw.so.5.0 /usr/lib64/libcdkw.so.6.3.4 /usr/lib64/libcdkw.so ~ $ ls -l /usr/lib64/libcdk*.so* lrwxrwxrwx 1 root root 16 Dec 20 11:02 /usr/lib64/libcdkw.so -> libcdkw.so.6.3.4 -rwxr-xr-x 1 root root 300984 Dec 20 11:02 /usr/lib64/libcdkw.so.5.0 lrwxrwxrwx 1 root root 14 Dec 20 11:02 /usr/lib64/libcdkw.so.6.3.4 -> libcdkw.so.5.0 (In reply to Zhixu Liu from comment #22) > so please post the output of command `cdk5-config --libs`. ~ $ cdk5-config --libs -L/usr/lib64 -Wl,--defsym=__gentoo_check_ldflags__=0 -lcdk -lncursesw -ltinfow The PR fix the bug found in cdk-5.0.20240619 at least. For older bug reported, I check the older release and dodn't find the same problem (reemerge won't fix the bug if they are same), since the ebuild isn't in the tree now and lack of log(s), I'll stop for now and will continue if problem still exist. The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=723ef79cdb271b6b0e0d90610f3c1ac824d85558 commit 723ef79cdb271b6b0e0d90610f3c1ac824d85558 Author: Z. Liu <zhixu.liu@gmail.com> AuthorDate: 2024-12-20 14:36:48 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2024-12-21 02:54:01 +0000 dev-libs/cdk: fix handling of -lcdk or -lcdkw lib name is depend on USE flag 'unicode', but for unknown reason, upstream remove XLIB in release 5.0.20240619 (always -lcdk instead of -lcdkw if unicode is enabled), which cause link failed if USE="unicode". Closes: https://bugs.gentoo.org/831226 Signed-off-by: Z. Liu <zhixu.liu@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/39795 Signed-off-by: Sam James <sam@gentoo.org> ....20240619.ebuild => cdk-5.0.20240619-r1.ebuild} | 4 ++++ dev-libs/cdk/files/cdk-5.0.20240619-xlib.patch | 28 ++++++++++++++++++++++ dev-libs/cdk/metadata.xml | 9 ++++++- 3 files changed, 40 insertions(+), 1 deletion(-) |