[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: (ITS#7763) undefined references during LTO enabled build



Hello,
Thank you.

Markus Trippelsdorf told me in my bug report
(http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59505)
what is the problem cause and how to solve it - it is not existing
support for slim-LTO-model in binutils.

AS=gcc-as AR=gcc-ar NM=gcc-nm RANLIB=gcc-ranlib did it for me for
Openldap package in Gentoo too
.

Best regards, David.

2013/12/13 Howard Chu <hyc@symas.com>:
> nheghathivhistha@gmail.com wrote:
>>
>> Full_Name: David Kredba
>> Version: 2.4.38
>> OS: Linux
>> URL: ftp://ftp.openldap.org/incoming/
>> Submission from: (NULL) (88.101.228.82)
>>
>>
>> I am trying to rebuild my system with LTO enabled gcc.
>>
>> Compilation of Gentoo package /net-nds/openldap-2.4.38-r1 ended with:
>
>
> You cut off the trace just at the crucial line. It should say, e.g.:
>
> ar ru librewrite.a config.o context.o info.o ldapmap.o map.o params.o rule.o
> session.o subst.o var.o xmap.o version.o
> ar: creating librewrite.a
>
> Anyway, I see no build errors here. Closing this ITS. Ask for help on the
> -technical mailing list.
>
>> x86_64-pc-linux-gnu-ar: creating librewrite.a
>> /bin/bash ../../libtool --mode=link x86_64-pc-linux-gnu-gcc  -O2 -ggdb
>> -pipe
>> -march=native -mtune=native -flto=4 -fuse-linker-plugin -D_GNU_SOURCE
>> -Wl,--as-needed -Wl,-O1 -Wl,--hash-style=gnu -Wl,--sort-common -O2 -ggdb
>> -pipe
>> -march=native -mtune=native -flto=4 -fuse-linker-plugin   -o rewrite
>> rewrite.o
>> parse.o librewrite.a ../../libraries/liblutil/liblutil.a
>> ../../libraries/libldap_r/libldap_r.la ../../libraries/liblber/liblber.la
>> -lssl -lcrypto  -lcrypt -lresolv  -pthread
>> libtool: link: x86_64-pc-linux-gnu-gcc -O2 -ggdb -pipe -march=native
>> -mtune=native -flto=4 -fuse-linker-plugin -D_GNU_SOURCE -Wl,-O1
>> -Wl,--hash-style=gnu -Wl,--sort-common -O2 -ggdb -pipe -march=native
>> -mtune=native -flto=4 -fuse-linker-plugin -o .libs/rewrite rewrite.o
>> parse.o
>> -pthread  -Wl,--as-needed librewrite.a ../../libraries/liblutil/liblutil.a
>> ../../libraries/libldap_r/.libs/libldap_r.so
>>
>> /var/tmp/portage/net-nds/openldap-2.4.38-r1/work/openldap-2.4.38/libraries/liblber/.libs/liblber.so
>> ../../libraries/liblber/.libs/liblber.so -lssl -lcrypto -lcrypt -lresolv
>> -pthread
>>
>> /var/tmp/portage/net-nds/openldap-2.4.38-r1/temp/ccTxyjV6.ltrans0.ltrans.o:
>> In
>> function `rewrite_read':
>>
>> /var/tmp/portage/net-nds/openldap-2.4.38-r1/work/openldap-2.4.38/libraries/librewrite/parse.c:112:
>> undefined reference to `rewrite_parse'
>>
>> /var/tmp/portage/net-nds/openldap-2.4.38-r1/temp/ccTxyjV6.ltrans0.ltrans.o:
>> In
>> function `main':
>>
>> /var/tmp/portage/net-nds/openldap-2.4.38-r1/work/openldap-2.4.38/libraries/librewrite/rewrite.c:141:
>> undefined reference to `lutil_atoix'
>>
>> /var/tmp/portage/net-nds/openldap-2.4.38-r1/temp/ccTxyjV6.ltrans0.ltrans.o:
>> In
>> function `apply':
>>
>> /var/tmp/portage/net-nds/openldap-2.4.38-r1/work/openldap-2.4.38/libraries/librewrite/rewrite.c:52:
>> undefined reference to `rewrite_info_init'
>>
>> /var/tmp/portage/net-nds/openldap-2.4.38-r1/work/openldap-2.4.38/libraries/librewrite/rewrite.c:58:
>> undefined reference to `rewrite_param_set'
>>
>> /var/tmp/portage/net-nds/openldap-2.4.38-r1/work/openldap-2.4.38/libraries/librewrite/rewrite.c:60:
>> undefined reference to `rewrite_session_init'
>>
>> /var/tmp/portage/net-nds/openldap-2.4.38-r1/work/openldap-2.4.38/libraries/librewrite/rewrite.c:75:
>> undefined reference to `rewrite_session'
>>
>> /var/tmp/portage/net-nds/openldap-2.4.38-r1/work/openldap-2.4.38/libraries/librewrite/rewrite.c:120:
>> undefined reference to `rewrite_session_delete'
>>
>> /var/tmp/portage/net-nds/openldap-2.4.38-r1/work/openldap-2.4.38/libraries/librewrite/rewrite.c:122:
>> undefined reference to `rewrite_info_delete'
>> collect2: error: ld returned 1 exit status
>> Makefile:290: recipe for target 'rewrite' failed
>> make[2]: *** [rewrite] Error 1
>> make[2]: Leaving directory
>>
>> '/var/tmp/portage/net-nds/openldap-2.4.38-r1/work/openldap-2.4.38/libraries/librewrite'
>> Makefile:296: recipe for target 'all-common' failed
>> make[1]: *** [all-common] Error 1
>> make[1]: Leaving directory
>>
>> '/var/tmp/portage/net-nds/openldap-2.4.38-r1/work/openldap-2.4.38/libraries'
>> Makefile:312: recipe for target 'all-common' failed
>>
>> Coul you kindly please look into it? I think that header(s) can be missing
>> in
>> source files and library(ies) at link time.
>>
>> I uploaded david-kredba-20131213-build.log and
>> david-kredba-20131213-config.log
>> to your ftp server.
>>
>> Thank you in advance.
>>
>>
>
>
> --
>   -- Howard Chu
>   CTO, Symas Corp.           http://www.symas.com
>   Director, Highland Sun     http://highlandsun.com/hyc/
>   Chief Architect, OpenLDAP  http://www.openldap.org/project/