[arch-general] sane - 'sane-config --libs' returns NON library information causing some CMake builds to fail - bug or feature?
Guys, Ran into a big problem with sane 1.0.22-6 causing builds to fail due to the return of 'sane-config --libs' returning non-library flags which results in CMake botching the link config. From the sane-config man page: --libs Print the additional libraries that are necessary to link a SANE frontend to libsane. Currently, on arch, 'sane-config --libs' returns: 10:51 providence:~/bld/david> sane-config --libs -lsane -Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu -L/usr/lib -lnetsnmp -lcrypto -lm -ldl -lv4l1 -lm -ltiff -ljpeg -lgphoto2 -lgphoto2_port -lm -lexif -lusb -lavahi-common -lavahi-client -lusb I don't know exactly why (I presume it has to do with the interpretation of the '--' information by CMake), but it results in run-together link strings: <snip> CMakeFiles/kscan-shared.dir/imgscaninfo.cpp.o -L/opt/trinity/lib -L/opt/tqt3/lib /opt/trinity/lib/libkio.so.4.2.0 -lsane-Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu-L/usr/lib -lnetsnmp -lcrypto -lm -ldl -lv4l1 -ltiff -ljpeg -lgphoto2 -lgphoto2_port -lexif -lusb -lavahi-common -lavahi-client /opt/trinity/lib/libtdeui.so.4.2.0 -lfreetype -lfontconfig /opt/trinity/lib/libtdesu.so.4.2.0 -lutil /opt/trinity/lib/libkwalletclient.so.1.0.1 /opt/trinity/lib/libtdecore.so.4.2.0 /opt/trinity/lib/libDCOP.so.4.2.0 /opt/trinity/lib/libtdefx.so.4.2.0 -ltqt -ltqt-mt -lXrender -lX11 -lz -lidn -lXcomposite -lICE -lSM -Wl,-rpath,/opt/trinity/lib:/opt/tqt3/lib: /usr/bin/ld: cannot find -lsane-Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu-L/usr/lib collect2: ld returned 1 exit status Here the problem is the run-together: '-lsane-Wl'. What I need to know is this a "bug --or-- feature" on arch? Looking at the current sane in extra, this behavior isn't something that arch is configuring or patching. However, the string returned by sane-config --libs is the makepkg.conf string for $LDFLAGS plus the lib information for sane... What say the experts? -- David C. Rankin, J.D.,P.E.
On 03/07/2012 09:52 PM, David C. Rankin wrote:
Guys,
Ran into a big problem with sane 1.0.22-6 causing builds to fail due to the return of 'sane-config --libs' returning non-library flags which results in CMake botching the link config. From the sane-config man page:
--libs Print the additional libraries that are necessary to link a SANE frontend to libsane.
Currently, on arch, 'sane-config --libs' returns:
10:51 providence:~/bld/david> sane-config --libs -lsane -Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu -L/usr/lib -lnetsnmp -lcrypto -lm -ldl -lv4l1 -lm -ltiff -ljpeg -lgphoto2 -lgphoto2_port -lm -lexif -lusb -lavahi-common -lavahi-client -lusb
You should open a bug report than sending this on mailing list. -- Ionuț
On 03/07/2012 10:16 PM, Ionut Biru wrote:
On 03/07/2012 09:52 PM, David C. Rankin wrote:
Guys,
Ran into a big problem with sane 1.0.22-6 causing builds to fail due to the return of 'sane-config --libs' returning non-library flags which results in CMake botching the link config. From the sane-config man page:
--libs Print the additional libraries that are necessary to link a SANE frontend to libsane.
Currently, on arch, 'sane-config --libs' returns:
10:51 providence:~/bld/david> sane-config --libs -lsane -Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu -L/usr/lib -lnetsnmp -lcrypto -lm -ldl -lv4l1 -lm -ltiff -ljpeg -lgphoto2 -lgphoto2_port -lm -lexif -lusb -lavahi-common -lavahi-client -lusb
You should open a bug report than sending this on mailing list.
the idea is that net-snmp includes wrong stuff into libs and that's why they ended up in sane $ net-snmp-config --libs -Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu -L/usr/lib -lnetsnmp -lcrypto -lm -- Ionuț
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 03/07/2012 02:20 PM, Ionut Biru wrote:
You should open a bug report than sending this on mailing list.
the idea is that net-snmp includes wrong stuff into libs and that's why they ended up in sane
$ net-snmp-config --libs
-Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu -L/usr/lib -lnetsnmp -lcrypto -lm
Thanks Biru, Before I filed the bug I needed to confirm if it was really a bug, or if I was messing something up :) Filed: https://bugs.archlinux.org/task/28817 - -- David C. Rankin, J.D.,P.E.
On Wed, Mar 7, 2012 at 2:20 PM, Ionut Biru <ibiru@archlinux.org> wrote:
On 03/07/2012 10:16 PM, Ionut Biru wrote:
On 03/07/2012 09:52 PM, David C. Rankin wrote:
Guys,
Ran into a big problem with sane 1.0.22-6 causing builds to fail due to the return of 'sane-config --libs' returning non-library flags which results in CMake botching the link config. From the sane-config man page:
--libs Print the additional libraries that are necessary to link a SANE frontend to libsane.
Currently, on arch, 'sane-config --libs' returns:
10:51 providence:~/bld/david> sane-config --libs -lsane -Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu -L/usr/lib -lnetsnmp -lcrypto -lm -ldl -lv4l1 -lm -ltiff -ljpeg -lgphoto2 -lgphoto2_port -lm -lexif -lusb -lavahi-common -lavahi-client -lusb
You should open a bug report than sending this on mailing list.
the idea is that net-snmp includes wrong stuff into libs and that's why they ended up in sane
$ net-snmp-config --libs
-Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu -L/usr/lib -lnetsnmp -lcrypto -lm
These are all linker flags and should be ok to use in --libs. The issue is the incorrect concatenation in the final link line.
On 03/07/2012 02:42 PM, Sander Jansen wrote:
On Wed, Mar 7, 2012 at 2:20 PM, Ionut Biru <ibiru@archlinux.org> wrote:
On 03/07/2012 10:16 PM, Ionut Biru wrote:
On 03/07/2012 09:52 PM, David C. Rankin wrote:
Guys,
Ran into a big problem with sane 1.0.22-6 causing builds to fail due to the return of 'sane-config --libs' returning non-library flags which results in CMake botching the link config. From the sane-config man page:
--libs Print the additional libraries that are necessary to link a SANE frontend to libsane.
Currently, on arch, 'sane-config --libs' returns:
10:51 providence:~/bld/david> sane-config --libs -lsane -Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu -L/usr/lib -lnetsnmp -lcrypto -lm -ldl -lv4l1 -lm -ltiff -ljpeg -lgphoto2 -lgphoto2_port -lm -lexif -lusb -lavahi-common -lavahi-client -lusb
You should open a bug report than sending this on mailing list.
the idea is that net-snmp includes wrong stuff into libs and that's why they ended up in sane
$ net-snmp-config --libs
-Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu -L/usr/lib -lnetsnmp -lcrypto -lm
These are all linker flags and should be ok to use in --libs. The issue is the incorrect concatenation in the final link line.
Sander, I want to make sure I understand what you are saying? When I tried to build a package that required sane, I experienced the following failure: /usr/bin/ld: cannot find -lsane-Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu-L/usr/lib collect2: ld returned 1 exit status The '-lsane-Wl' is improperly concatenated, but are you referring to some additional problem? -- David C. Rankin, J.D.,P.E.
participants (3)
-
David C. Rankin
-
Ionut Biru
-
Sander Jansen