Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 669728 - gnome-extra/libgda: USE=ldap broken on 17.1 profiles due to /usr/lib symlink assumption
Summary: gnome-extra/libgda: USE=ldap broken on 17.1 profiles due to /usr/lib symlink ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-27 01:32 UTC by OKUMURA N. Shin-ya
Modified: 2018-12-31 21:49 UTC (History)
0 users

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


Attachments
build.log (build.log,509.41 KB, text/x-log)
2018-10-27 01:35 UTC, OKUMURA N. Shin-ya
Details
emerge --info (emerge-info.log,6.70 KB, text/x-log)
2018-10-27 01:35 UTC, OKUMURA N. Shin-ya
Details

Note You need to log in before you can comment on or make changes to this bug.
Description OKUMURA N. Shin-ya 2018-10-27 01:32:44 UTC
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
Comment 1 OKUMURA N. Shin-ya 2018-10-27 01:35:36 UTC
Created attachment 553248 [details]
build.log
Comment 2 OKUMURA N. Shin-ya 2018-10-27 01:35:59 UTC
Created attachment 553250 [details]
emerge --info
Comment 3 Mart Raudsepp gentoo-dev 2018-12-28 16:31:30 UTC
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?
Comment 4 OKUMURA N. Shin-ya 2018-12-29 15:44:06 UTC
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.
Comment 5 Mart Raudsepp gentoo-dev 2018-12-29 17:08:51 UTC
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 :)
Comment 6 OKUMURA N. Shin-ya 2018-12-31 05:24:08 UTC
O.K, it works fine as follows;
EXTRA_ECONF='--with-ldap-libdir-name=lib64' USE=ldap emerge =gnome-extra/libgda-5.2.8
Comment 7 Larry the Git Cow gentoo-dev 2018-12-31 21:49:37 UTC
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(+)