gnome-extra/libgda-5.2.4-r2 fails when building libgda-5.0.so because it search only in /usr/lib but not /usr/lib64. Reproducible: Always Steps to Reproduce: 1. USE=ldap emerge =gnome-extra/libgda-5.2.4-r2 Actual Results: libtool: link: x86_64-pc-linux-gnu-gcc -shared -fPIC -DPIC .libs/gdaprov-data-model-ldap.o .libs/gda-ldap-provider.o .libs/gda-ldap-util.o .libs/libmain.o -Wl,-rpath -Wl,/var/tmp/portage/gnome-extra/libgda-5.2.4-r2/work/libgda-5.2.4/libgda/.libs -Wl,--as-needed ../../libgda/.libs/libgda-5.0.so -lgio-2.0 -lgobject-2.0 -lgthread-2.0 -lgmodule-2.0 -lglib-2.0 -lxml2 -L/usr/lib /usr/lib/libldap.so -lssl -lcrypto /usr/lib/liblber.so -lresolv -march=native -O2 -Wl,--hash-style=gnu -Wl,-O1 -pthread -pthread -pthread -Wl,-soname -Wl,libgda-ldap.so -Wl,-version-script -Wl,.libs/libgda-ldap.ver -o .libs/libgda-ldap.so /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libgio-2.0.so when searching for -lgio-2.0 /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libgio-2.0.a when searching for -lgio-2.0 /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libgobject-2.0.so when searching for -lgobject-2.0 /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libgobject-2.0.a when searching for -lgobject-2.0 /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libgthread-2.0.so when searching for -lgthread-2.0 /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libgthread-2.0.a when searching for -lgthread-2.0 /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libgmodule-2.0.so when searching for -lgmodule-2.0 /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libgmodule-2.0.a when searching for -lgmodule-2.0 /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libglib-2.0.so when searching for -lglib-2.0 /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libglib-2.0.a when searching for -lglib-2.0 /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libxml2.so when searching for -lxml2 /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libxml2.a when searching for -lxml2 /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/libldap.so: error adding symbols: file in wrong format collect2: error: ld returned 1 exit status make[2]: *** [Makefile:618: libgda-ldap.la] Error 1 make[2]: Leaving directory '/var/tmp/portage/gnome-extra/libgda-5.2.4-r2/work/libgda-5.2.4/providers/ldap' Expected Results: emerge finish successfully. Workarround is: LDFLAGS=-L/usr/lib64 USE=ldap emerge =gnome-extra/libgda-5.2.4-r2
Created attachment 553248 [details] build.log
Created attachment 553250 [details] emerge --info
It works fine for me with USE=ldap with 5.2.8, and I can't spot any changes about ldap build there compared to 5.2.4, so that should work fine as well. Maybe this was some temporary issue with some pkg-config file outside libgda that messed this up and hopefully works now? Is this still a problem?
It was unfortunately reproduced with libgda-5.2.8 in my environment (incl. LDFLAGS=-L/usr/lib64 works fine). I agree that it may be something pkg-config (or *.la) issue, outside libgda.
Upon digging into it, I think this is a 17.1 profile specific issue in the m4/ldap.m4 files that libgda uses. It searches from /usr /usr/local and /local prefixes, in that order; and for each it uses a "lib" libdir, which on 17.0 /usr/lib symlinked to /usr/lib64, but not with 17.1 profiles. Please try if EXTRA_ECONF="--with-ldap-libdir-name=lib64" makes it work. I think we can add a --with-ldap-libdir-name=$(get_libdir) option to gnome2_src_configure call in the ebuild then, to have it work for everyone. To be sure, please give it a try (by that EXTRA_ECONF or adding it in the ebuild yourself), as I'm not on 17.1 profiles anywhere, and let me know; if it works, I can add the change in :)
O.K, it works fine as follows; EXTRA_ECONF='--with-ldap-libdir-name=lib64' USE=ldap emerge =gnome-extra/libgda-5.2.8
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=33e0c87a28ce9c90d2f54ec8783b1bb3c76ea7d7 commit 33e0c87a28ce9c90d2f54ec8783b1bb3c76ea7d7 Author: Mart Raudsepp <leio@gentoo.org> AuthorDate: 2018-12-31 21:48:16 +0000 Commit: Mart Raudsepp <leio@gentoo.org> CommitDate: 2018-12-31 21:49:19 +0000 gnome-extra/libgda: fix USE=ldap build on 17.1 profiles Without passing libdir-name to configure it always uses "lib", which will fail on systems where /usr/lib is not a symlink to /usr/lib64, when openldap is installed to lib64, as it is on 17.1 amd64 profiles. Unfortunately openldap still doesn't ship pkgconfig files, but fortunately there's this configure knob with which to teach it where openldap is. Closes: https://bugs.gentoo.org/669728 Package-Manager: Portage-2.3.52, Repoman-2.3.12 Signed-off-by: Mart Raudsepp <leio@gentoo.org> gnome-extra/libgda/libgda-5.2.8.ebuild | 1 + 1 file changed, 1 insertion(+)