* [gentoo-devhelp] autotools and as-needed
@ 2009-08-11 22:03 Thomas Kahle
2009-08-12 6:38 ` Justin
` (3 more replies)
0 siblings, 4 replies; 10+ messages in thread
From: Thomas Kahle @ 2009-08-11 22:03 UTC (permalink / raw
To: gentoo-devhelp
[-- Attachment #1: Type: text/plain, Size: 1017 bytes --]
Hi,
the following check in configure.ac fails with --as-needed but works
without it. Any hints what is wrong ? Thanks / Thomas
--------------------
if test $BUILD_ntl = no
then AC_LANG(C++)
AC_CHECK_HEADER(NTL/version.h,,BUILD_ntl=yes)
AC_MSG_CHECKING(for ntl library)
FOUND=
SAVELIBS=$LIBS
for lib in "" "-lntl" "-lntl -lgf2x"
do test "$lib" && LIBS="$lib $LIBS"
AC_LINK_IFELSE( [
#include <NTL/tools.h>
int main () { _ntl_GetTime(); }
],
FOUND=yes; break;,
LIBS=$SAVELIBS)
done
if test "$FOUND"
then if test "$lib"
then AC_MSG_RESULT([$lib])
else AC_MSG_RESULT([none needed])
fi
else AC_MSG_RESULT(none found)
BUILD_ntl=yes
fi
fi
--
Thomas Kahle
The fundamental theorem of algebra is open source. Like any other
mathematical theorem it can be applied free of charge and everybody
has access to its proof and can convince himself how it works. Why
should software be any different?
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 261 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-devhelp] autotools and as-needed
2009-08-11 22:03 [gentoo-devhelp] autotools and as-needed Thomas Kahle
@ 2009-08-12 6:38 ` Justin
2009-08-13 19:24 ` Mike Frysinger
` (2 subsequent siblings)
3 siblings, 0 replies; 10+ messages in thread
From: Justin @ 2009-08-12 6:38 UTC (permalink / raw
To: gentoo-devhelp
[-- Attachment #1: Type: text/plain, Size: 991 bytes --]
Thomas Kahle schrieb:
> Hi,
> the following check in configure.ac fails with --as-needed but works
> without it. Any hints what is wrong ? Thanks / Thomas
>
> --------------------
>
> if test $BUILD_ntl = no
> then AC_LANG(C++)
> AC_CHECK_HEADER(NTL/version.h,,BUILD_ntl=yes)
> AC_MSG_CHECKING(for ntl library)
> FOUND=
> SAVELIBS=$LIBS
> for lib in "" "-lntl" "-lntl -lgf2x"
> do test "$lib" && LIBS="$lib $LIBS"
> AC_LINK_IFELSE( [
> #include <NTL/tools.h>
> int main () { _ntl_GetTime(); }
> ],
> FOUND=yes; break;,
> LIBS=$SAVELIBS)
> done
> if test "$FOUND"
> then if test "$lib"
> then AC_MSG_RESULT([$lib])
> else AC_MSG_RESULT([none needed])
> fi
> else AC_MSG_RESULT(none found)
> BUILD_ntl=yes
> fi
> fi
>
>
Perhaps you will find a hint in Diego's blog. I think he wrote about
configure checks which fail with as-needed and how to fix them.
justin
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-devhelp] autotools and as-needed
2009-08-11 22:03 [gentoo-devhelp] autotools and as-needed Thomas Kahle
2009-08-12 6:38 ` Justin
@ 2009-08-13 19:24 ` Mike Frysinger
2009-08-19 21:03 ` Thomas Kahle
2009-08-13 19:38 ` Justin
2009-08-16 19:02 ` Peter Volkov
3 siblings, 1 reply; 10+ messages in thread
From: Mike Frysinger @ 2009-08-13 19:24 UTC (permalink / raw
To: gentoo-devhelp
[-- Attachment #1: Type: text/plain, Size: 230 bytes --]
On Tuesday 11 August 2009 18:03:24 Thomas Kahle wrote:
> the following check in configure.ac fails with --as-needed but works
> without it. Any hints what is wrong ?
the config.log snippets for these tests would be helpful
-mike
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-devhelp] autotools and as-needed
2009-08-11 22:03 [gentoo-devhelp] autotools and as-needed Thomas Kahle
2009-08-12 6:38 ` Justin
2009-08-13 19:24 ` Mike Frysinger
@ 2009-08-13 19:38 ` Justin
2009-08-16 19:02 ` Peter Volkov
3 siblings, 0 replies; 10+ messages in thread
From: Justin @ 2009-08-13 19:38 UTC (permalink / raw
To: gentoo-devhelp
[-- Attachment #1: Type: text/plain, Size: 118 bytes --]
there is also this thread from Betelgeuse:
http://www.opensubscriber.com/message/libtool@gnu.org/8701479.html
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-devhelp] autotools and as-needed
2009-08-11 22:03 [gentoo-devhelp] autotools and as-needed Thomas Kahle
` (2 preceding siblings ...)
2009-08-13 19:38 ` Justin
@ 2009-08-16 19:02 ` Peter Volkov
2009-08-19 21:01 ` Thomas Kahle
3 siblings, 1 reply; 10+ messages in thread
From: Peter Volkov @ 2009-08-16 19:02 UTC (permalink / raw
To: Thomas Kahle; +Cc: gentoo-devhelp
В Срд, 12/08/2009 в 00:03 +0200, Thomas Kahle пишет:
> the following check in configure.ac fails with --as-needed but works
> without it. Any hints what is wrong ? Thanks / Thomas
Common reason for failure with --as-needed is the order of libraries. In
you previous mail you wrote that with
sed "s/\"-lntl\"/\"-lntl\" \"-lgf2x -lntl\"/" -i "${S}/configure.ac"
it works but here:
> for lib in "" "-lntl" "-lntl -lgf2x"
I see different order. Try to change order of -lgf2x and -lntl inside
ebuild. Also
sed 's/"-lntl"/"-lntl" "-lgf2x -lntl"/' -i "${S}/configure.ac"
is shorter and easier to read.
--
Peter.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-devhelp] autotools and as-needed
2009-08-16 19:02 ` Peter Volkov
@ 2009-08-19 21:01 ` Thomas Kahle
2009-08-21 1:57 ` Mike Frysinger
0 siblings, 1 reply; 10+ messages in thread
From: Thomas Kahle @ 2009-08-19 21:01 UTC (permalink / raw
To: gentoo-devhelp
[-- Attachment #1: Type: text/plain, Size: 1834 bytes --]
Peter Volkov wrote:
> В Срд, 12/08/2009 в 00:03 +0200, Thomas Kahle пишет:
>> the following check in configure.ac fails with --as-needed but works
>> without it. Any hints what is wrong ? Thanks / Thomas
>
> Common reason for failure with --as-needed is the order of libraries. In
> you previous mail you wrote that with
>
> sed "s/\"-lntl\"/\"-lntl\" \"-lgf2x -lntl\"/" -i "${S}/configure.ac"
>
> it works but here:
>
>> for lib in "" "-lntl" "-lntl -lgf2x"
>
> I see different order. Try to change order of -lgf2x and -lntl inside
> ebuild. Also
This change of order is actually since I tried what you suggested. I
find that this check fails just because the compile fails. It has
nothing to do with configure. So here is my problem stripped down:
$cat ntlcheck.c
#include <NTL/tools.h>
int main () { _ntl_GetTime(); }
g++ ntlcheck.c -lntl -lgf2x
works
$g++ -Wl,--as-needed ntlcheck.c -lntl -lgf2x
/usr/lib/gcc/i686-pc-linux-gnu/4.3.2/../../../libntl.so: undefined
reference to `gf2x_mul'
collect2: ld returned 1 exit status
$ g++ -Wl,--as-needed ntlcheck.c -lgf2x -lntl
/usr/lib/gcc/i686-pc-linux-gnu/4.3.2/../../../libntl.so: undefined
reference to `gf2x_mul'
collect2: ld returned 1 exit status
BTW, installing ntl without gf2x support makes
$g++ -Wl,--as-needed ntlcheck.c -lntl
work !
It feels like it has something to do with ntl-headers having gf2x includes.
> sed 's/"-lntl"/"-lntl" "-lgf2x -lntl"/' -i "${S}/configure.ac"
good point. No need to escape the ' " ' :)
thanks
Thomas
--
Thomas Kahle
The fundamental theorem of algebra is open source. Like any other
mathematical theorem it can be applied free of charge and everybody
has access to its proof and can convince himself how it works. Why
should software be any different?
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 261 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-devhelp] autotools and as-needed
2009-08-13 19:24 ` Mike Frysinger
@ 2009-08-19 21:03 ` Thomas Kahle
0 siblings, 0 replies; 10+ messages in thread
From: Thomas Kahle @ 2009-08-19 21:03 UTC (permalink / raw
To: gentoo-devhelp
[-- Attachment #1: Type: text/plain, Size: 644 bytes --]
Mike Frysinger wrote:
> On Tuesday 11 August 2009 18:03:24 Thomas Kahle wrote:
>> the following check in configure.ac fails with --as-needed but works
>> without it. Any hints what is wrong ?
>
> the config.log snippets for these tests would be helpful
linking of the small test file fails. Please see my reply to peter
volkovs mail.
thanks
Thomas
> -mike
--
Thomas Kahle
The fundamental theorem of algebra is open source. Like any other
mathematical theorem it can be applied free of charge and everybody
has access to its proof and can convince himself how it works. Why
should software be any different?
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 261 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-devhelp] autotools and as-needed
2009-08-19 21:01 ` Thomas Kahle
@ 2009-08-21 1:57 ` Mike Frysinger
2009-08-21 7:48 ` Thomas Kahle
0 siblings, 1 reply; 10+ messages in thread
From: Mike Frysinger @ 2009-08-21 1:57 UTC (permalink / raw
To: gentoo-devhelp; +Cc: Thomas Kahle
[-- Attachment #1: Type: Text/Plain, Size: 1154 bytes --]
On Wednesday 19 August 2009 17:01:27 Thomas Kahle wrote:
> Peter Volkov wrote:
> > В Срд, 12/08/2009 в 00:03 +0200, Thomas Kahle пишет:
> >> the following check in configure.ac fails with --as-needed but works
> >> without it. Any hints what is wrong ? Thanks / Thomas
> >
> > Common reason for failure with --as-needed is the order of libraries. In
> > you previous mail you wrote that with
> >
> > sed "s/\"-lntl\"/\"-lntl\" \"-lgf2x -lntl\"/" -i "${S}/configure.ac"
> >
> > it works but here:
> >> for lib in "" "-lntl" "-lntl -lgf2x"
> >
> > I see different order. Try to change order of -lgf2x and -lntl inside
> > ebuild. Also
>
> This change of order is actually since I tried what you suggested. I
> find that this check fails just because the compile fails. It has
> nothing to do with configure. So here is my problem stripped down:
>
> $cat ntlcheck.c
> #include <NTL/tools.h>
> int main () { _ntl_GetTime(); }
>
> g++ ntlcheck.c -lntl -lgf2x
> works
this is a bug in libntl.so. it uses gf2x symbols but doesnt link against it
in libntl.so. you shouldnt have to also link against libgf2x.so.
-mike
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-devhelp] autotools and as-needed
2009-08-21 1:57 ` Mike Frysinger
@ 2009-08-21 7:48 ` Thomas Kahle
2009-08-21 8:43 ` Mike Frysinger
0 siblings, 1 reply; 10+ messages in thread
From: Thomas Kahle @ 2009-08-21 7:48 UTC (permalink / raw
To: gentoo-devhelp
[-- Attachment #1: Type: text/plain, Size: 1490 bytes --]
Mike Frysinger wrote:
> On Wednesday 19 August 2009 17:01:27 Thomas Kahle wrote:
>> Peter Volkov wrote:
>>> В Срд, 12/08/2009 в 00:03 +0200, Thomas Kahle пишет:
>>>> the following check in configure.ac fails with --as-needed but works
>>>> without it. Any hints what is wrong ? Thanks / Thomas
>>> Common reason for failure with --as-needed is the order of libraries. In
>>> you previous mail you wrote that with
>>>
>>> sed "s/\"-lntl\"/\"-lntl\" \"-lgf2x -lntl\"/" -i "${S}/configure.ac"
>>>
>>> it works but here:
>>>> for lib in "" "-lntl" "-lntl -lgf2x"
>>> I see different order. Try to change order of -lgf2x and -lntl inside
>>> ebuild. Also
>> This change of order is actually since I tried what you suggested. I
>> find that this check fails just because the compile fails. It has
>> nothing to do with configure. So here is my problem stripped down:
>>
>> $cat ntlcheck.c
>> #include <NTL/tools.h>
>> int main () { _ntl_GetTime(); }
>>
>> g++ ntlcheck.c -lntl -lgf2x
>> works
>
> this is a bug in libntl.so. it uses gf2x symbols but doesnt link against it
> in libntl.so. you shouldnt have to also link against libgf2x.so.
> -mike
Thanks => bug #282174
Thomas
--
Thomas Kahle
The fundamental theorem of algebra is open source. Like any other
mathematical theorem it can be applied free of charge and everybody
has access to its proof and can convince himself how it works. Why
should software be any different?
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 261 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-devhelp] autotools and as-needed
2009-08-21 7:48 ` Thomas Kahle
@ 2009-08-21 8:43 ` Mike Frysinger
0 siblings, 0 replies; 10+ messages in thread
From: Mike Frysinger @ 2009-08-21 8:43 UTC (permalink / raw
To: gentoo-devhelp
[-- Attachment #1: Type: Text/Plain, Size: 1448 bytes --]
On Friday 21 August 2009 03:48:27 Thomas Kahle wrote:
> Mike Frysinger wrote:
> > On Wednesday 19 August 2009 17:01:27 Thomas Kahle wrote:
> >> Peter Volkov wrote:
> >>> В Срд, 12/08/2009 в 00:03 +0200, Thomas Kahle пишет:
> >>>> the following check in configure.ac fails with --as-needed but works
> >>>> without it. Any hints what is wrong ? Thanks / Thomas
> >>>
> >>> Common reason for failure with --as-needed is the order of libraries.
> >>> In you previous mail you wrote that with
> >>>
> >>> sed "s/\"-lntl\"/\"-lntl\" \"-lgf2x -lntl\"/" -i "${S}/configure.ac"
> >>>
> >>> it works but here:
> >>>> for lib in "" "-lntl" "-lntl -lgf2x"
> >>>
> >>> I see different order. Try to change order of -lgf2x and -lntl inside
> >>> ebuild. Also
> >>
> >> This change of order is actually since I tried what you suggested. I
> >> find that this check fails just because the compile fails. It has
> >> nothing to do with configure. So here is my problem stripped down:
> >>
> >> $cat ntlcheck.c
> >> #include <NTL/tools.h>
> >> int main () { _ntl_GetTime(); }
> >>
> >> g++ ntlcheck.c -lntl -lgf2x
> >> works
> >
> > this is a bug in libntl.so. it uses gf2x symbols but doesnt link against
> > it in libntl.so. you shouldnt have to also link against libgf2x.so.
>
> Thanks => bug #282174
i'm not suggesting this will fix your original problem btw. you might want to
test to see if it does.
-mike
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2009-08-21 8:43 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-11 22:03 [gentoo-devhelp] autotools and as-needed Thomas Kahle
2009-08-12 6:38 ` Justin
2009-08-13 19:24 ` Mike Frysinger
2009-08-19 21:03 ` Thomas Kahle
2009-08-13 19:38 ` Justin
2009-08-16 19:02 ` Peter Volkov
2009-08-19 21:01 ` Thomas Kahle
2009-08-21 1:57 ` Mike Frysinger
2009-08-21 7:48 ` Thomas Kahle
2009-08-21 8:43 ` Mike Frysinger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox