Darrell, all,
Ran into another issue with tdegraphics that I can't solve by a dependency review:
[ 31%] Building CXX object libkscan/CMakeFiles/kscan-shared.dir/imgscaninfo.cpp.o Linking CXX shared library libkscan.so /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 make[2]: *** [libkscan/libkscan.so.1.0.0] Error 1 make[1]: *** [libkscan/CMakeFiles/kscan-shared.dir/all] Error 2 make: *** [all] Error 2
Is this a CMake issue? Linker error? What to look for?
Ran into another issue with tdegraphics that I can't solve by a dependency review:
[ 31%] Building CXX object libkscan/CMakeFiles/kscan-shared.dir/imgscaninfo.cpp.o Linking CXX shared library libkscan.so /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 make[2]: *** [libkscan/libkscan.so.1.0.0] Error 1 make[1]: *** [libkscan/CMakeFiles/kscan-shared.dir/all] Error 2 make: *** [all] Error 2
Is this a CMake issue? Linker error? What to look for?
Do you have SANE installed?
Check your build log for the following:
-- checking for 'libkscan' -- ok, activated for build
Check your CMakeCache.txt for this:
//Build libkscan BUILD_LIBKSCAN:BOOL=ON
Darrell
On 03/06/2012 07:09 PM, Darrell Anderson wrote:
Ran into another issue with tdegraphics that I can't solve by a dependency review:
[ 31%] Building CXX object libkscan/CMakeFiles/kscan-shared.dir/imgscaninfo.cpp.o Linking CXX shared library libkscan.so /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 make[2]: *** [libkscan/libkscan.so.1.0.0] Error 1 make[1]: *** [libkscan/CMakeFiles/kscan-shared.dir/all] Error 2 make: *** [all] Error 2
Is this a CMake issue? Linker error? What to look for?
Do you have SANE installed?
Check your build log for the following:
-- checking for 'libkscan' -- ok, activated for build
Check your CMakeCache.txt for this:
//Build libkscan BUILD_LIBKSCAN:BOOL=ON
Darrell
Hmm... yes on both accounts:
-- checking for 'libkscan' -- ok, activated for build
[19:35 providence:/home/david/bld/david/build/src/build] # grep -i libkscan CMakeCache.txt //Build libkscan BUILD_LIBKSCAN:BOOL=ON libksane_BINARY_DIR:STATIC=/build/src/build/libkscan libksane_SOURCE_DIR:STATIC=/build/src/tdegraphics/libkscan
Is this a new gcc issue? I have gcc 4.6.2-7... How would I check?
On 03/06/2012 07:37 PM, David C. Rankin wrote:
On 03/06/2012 07:09 PM, Darrell Anderson wrote:
Ran into another issue with tdegraphics that I can't solve by a dependency review:
[ 31%] Building CXX object libkscan/CMakeFiles/kscan-shared.dir/imgscaninfo.cpp.o Linking CXX shared library libkscan.so /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 make[2]: *** [libkscan/libkscan.so.1.0.0] Error 1 make[1]: *** [libkscan/CMakeFiles/kscan-shared.dir/all] Error 2 make: *** [all] Error 2
Is this a CMake issue? Linker error? What to look for?
Do you have SANE installed?
Check your build log for the following:
-- checking for 'libkscan' -- ok, activated for build
Check your CMakeCache.txt for this:
//Build libkscan BUILD_LIBKSCAN:BOOL=ON
Darrell
Hmm... yes on both accounts:
-- checking for 'libkscan' -- ok, activated for build
[19:35 providence:/home/david/bld/david/build/src/build] # grep -i libkscan CMakeCache.txt //Build libkscan BUILD_LIBKSCAN:BOOL=ON libksane_BINARY_DIR:STATIC=/build/src/build/libkscan libksane_SOURCE_DIR:STATIC=/build/src/tdegraphics/libkscan
Is this a new gcc issue? I have gcc 4.6.2-7... How would I check?
I cannot read cmake very well, but it looks like it gets to about line 584 in libkscan/CMakeFiles/kscan-shared.dir/build.make:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --red --bold "Linking CXX shared library libkscan.so" cd /build/src/build/libkscan && $(CMAKE_COMMAND) -E cmake_link_script CMakeFiles/kscan-shared.dir/link.txt --verbose=$(VERBOSE) cd /build/src/build/libkscan && $(CMAKE_COMMAND) -E cmake_symlink_library libkscan.so.1.0.0 libkscan.so.1 libkscan.so
libkscan/libkscan.so.1: libkscan/libkscan.so.1.0.0
libkscan/libkscan.so: libkscan/libkscan.so.1.0.0
Because it gets to:
[ 31%] Building CXX object libkscan/CMakeFiles/kscan-shared.dir/imgscaninfo.cpp.o
Then dies. Any ideas?
Is this a new gcc issue? I have gcc 4.6.2-7... How
would I check?
I cannot read cmake very well, but it looks like it gets to about line 584 in libkscan/CMakeFiles/kscan-shared.dir/build.make:
@$(CMAKE_COMMAND) -E
cmake_echo_color --switch=$(COLOR) --red --bold "Linking CXX shared library libkscan.so" cd /build/src/build/libkscan && $(CMAKE_COMMAND) -E cmake_link_script CMakeFiles/kscan-shared.dir/link.txt --verbose=$(VERBOSE) cd /build/src/build/libkscan && $(CMAKE_COMMAND) -E cmake_symlink_library libkscan.so.1.0.0 libkscan.so.1 libkscan.so
libkscan/libkscan.so.1: libkscan/libkscan.so.1.0.0
libkscan/libkscan.so: libkscan/libkscan.so.1.0.0
Because it gets to:
[ 31%] Building CXX object libkscan/CMakeFiles/kscan-shared.dir/imgscaninfo.cpp.o
Then dies. Any ideas?
I just built tdegraphics without error. I am using gcc 4.4.4.
Try running without parallel building (NUMJOBS=-j1, or make -j1). Often I do that so the build log is sequential and then I can read the error more easily. With parallel building the but the compiler waits until parallel threads are complete before failing the entire build. Then the user has to hunt for the error sequence.
Darrell
On 03/06/2012 09:33 PM, Darrell Anderson wrote:
I just built tdegraphics without error. I am using gcc 4.4.4.
Try running without parallel building (NUMJOBS=-j1, or make -j1). Often I do that so the build log is sequential and then I can read the error more easily. With parallel building the but the compiler waits until parallel threads are complete before failing the entire build. Then the user has to hunt for the error sequence.
Darrell
will do and report back. What about the flag for turning up the cmake debug?
On 03/06/2012 09:46 PM, David C. Rankin wrote:
On 03/06/2012 09:33 PM, Darrell Anderson wrote:
I just built tdegraphics without error. I am using gcc 4.4.4.
Try running without parallel building (NUMJOBS=-j1, or make -j1). Often I do that so the build log is sequential and then I can read the error more easily. With parallel building the but the compiler waits until parallel threads are complete before failing the entire build. Then the user has to hunt for the error sequence.
Darrell
will do and report back. What about the flag for turning up the cmake debug?
got it: -DCMAKE_VERBOSE_MAKEFILE=ON \
got it: -DCMAKE_VERBOSE_MAKEFILE=ON
Or:
make $NUMJOBS VERBOSE=1
I prefer this method because of the mixed automake/cmake environment. The latter allows me to keep my build scripts consistent.
Darrell
On 03/06/2012 09:57 PM, Darrell Anderson wrote:
got it: -DCMAKE_VERBOSE_MAKEFILE=ON
Or:
make $NUMJOBS VERBOSE=1
I prefer this method because of the mixed automake/cmake environment. The latter allows me to keep my build scripts consistent.
Darrell
OK, I give up....
Something is amiss and I'm not seeing it tonight. The stinking build can't find sane even thought it is right in front of its face :( With CMAKE_VERBOSE_MAKEFILE=ON the error isn't any more apparent than before:
cd /build/src/build/libkscan && /usr/bin/cmake -E cmake_link_script CMakeFiles/kscan-shared.dir/link.txt --verbose=1 /usr/bin/c++ -fPIC -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -DQT_NO_ASCII_CAST -DQT_CLEAN_NAMESPACE -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -DQT_THREAD_SUPPORT -D_REENTRANT -include tqt.h -Wl,--no-undefined -shared -Wl,-soname,libkscan.so.1 -o libkscan.so.1.0.0 CMakeFiles/kscan-shared.dir/kscandevice.cpp.o CMakeFiles/kscan-shared.dir/kscanslider.cpp.o CMakeFiles/kscan-shared.dir/kgammatable.cpp.o CMakeFiles/kscan-shared.dir/kscanoption.cpp.o CMakeFiles/kscan-shared.dir/kscanoptset.cpp.o CMakeFiles/kscan-shared.dir/gammadialog.cpp.o CMakeFiles/kscan-shared.dir/dispgamma.cpp.o CMakeFiles/kscan-shared.dir/scansourcedialog.cpp.o CMakeFiles/kscan-shared.dir/scanparams.cpp.o CMakeFiles/kscan-shared.dir/massscandialog.cpp.o CMakeFiles/kscan-shared.dir/devselector.cpp.o CMakeFiles/kscan-shared.dir/scandialog.cpp.o CMakeFiles/kscan-shared.dir/img_canvas.cpp.o CMakeFiles/kscan-shared.dir/previewer.cpp.o CMakeFiles/kscan-shared.dir/imgscaledialog.cpp.o CMakeFiles/kscan-shared.dir/sizeindicator.cpp.o 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 make[2]: *** [libkscan/libkscan.so.1.0.0] Error 1 make[2]: Leaving directory `/build/src/build' make[1]: *** [libkscan/CMakeFiles/kscan-shared.dir/all] Error 2 make[1]: Leaving directory `/build/src/build' make: *** [all] Error 2
And, just to make sure I'm not in[sane] -- no pun intended....:
23:06 nirvana:/mnt/nv1/home> l chroot/david/usr/lib/libsane* lrwxrwxrwx 1 root root 17 Mar 5 01:51 chroot/david/usr/lib/libsane.so -> libsane.so.1.0.22 lrwxrwxrwx 1 root root 17 Mar 5 01:51 chroot/david/usr/lib/libsane.so.1 -> libsane.so.1.0.22 -rwxr-xr-x 1 root root 155376 Mar 5 01:51 chroot/david/usr/lib/libsane.so.1.0.22
Surely the '-lsane-Wl' isn't blowing up because it isn't looking in /usr/lib for a library -- couldn't be... I'll pick it up with fresh eyes tomorrow. If anybody sees anything, please... Let me know :)
On 03/06/2012 11:13 PM, David C. Rankin wrote:
Surely the '-lsane-Wl' isn't blowing up because it isn't looking in /usr/lib for a library -- couldn't be... I'll pick it up with fresh eyes tomorrow. If anybody sees anything, please... Let me know :)
OK, I cheated and turned KOOKA and LIBKSCAN off and it's working:
cmake ${srcdir}/${pkgname#*-} \ -DCMAKE_VERBOSE_MAKEFILE=ON \ -DCMAKE_LIBRARY_PATH="${CMAKE_LIBRARY_PATH}:/usr/lib:/usr/lib/sane" \ -DCMAKE_INSTALL_PREFIX=${TDEDIR} \ -DWITH_T1LIB=ON \ -DWITH_LIBPAPER=ON \ -DWITH_TIFF=ON \ -DWITH_OPENEXR=ON \ -DWITH_PDF=ON \ -DBUILD_DOC=ON \ -DBUILD_KAMERA=ON \ -DBUILD_KCOLOREDIT=ON \ -DBUILD_KDVI=ON \ -DBUILD_KFAX=ON \ -DBUILD_KFAXVIEW=ON \ -DBUILD_KFILE_PLUGINS=ON \ -DBUILD_KGAMMA=ON \ -DBUILD_KGHOSTVIEW=ON \ -DBUILD_KICONEDIT=ON \ -DBUILD_KMRML=ON \ -DBUILD_KOLOURPAINT=ON \ -DBUILD_KOOKA=OFF \ -DBUILD_KPDF=ON \ -DBUILD_KPOVMODELER=ON \ -DBUILD_KRULER=ON \ -DBUILD_KSNAPSHOT=ON \ -DBUILD_KSVG=ON \ -DBUILD_KUICKSHOW=ON \ -DBUILD_KVIEW=ON \ -DBUILD_KVIEWSHELL=ON \ -DBUILD_LIBKSCAN=OFF
The problem could be in KOOKA instead of LIBKSCAN.
But crapeth...
[ 64%] Building CXX object ksnapshot/CMakeFiles/ksnapshot.dir/ksnapshotwidget.cpp.o cd /build/src/build/ksnapshot && /usr/bin/c++ -DHAVE_CONFIG_H -DKSNAPVERSION="0.7" -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -DQT_NO_ASCII_CAST -DQT_CLEAN_NAMESPACE -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -DQT_THREAD_SUPPORT -D_REENTRANT -include tqt.h -I/build/src/build/ksnapshot -I/build/src/tdegraphics/ksnapshot -I/build/src/build -I/opt/trinity/include -I/opt/tqt3/include -I/opt/trinity/include/tqt -o CMakeFiles/ksnapshot.dir/ksnapshotwidget.cpp.o -c /build/src/build/ksnapshot/ksnapshotwidget.cpp Linking CXX executable ksnapshot cd /build/src/build/ksnapshot && /usr/bin/cmake -E cmake_link_script CMakeFiles/ksnapshot.dir/link.txt --verbose=1 /usr/bin/c++ -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -DQT_NO_ASCII_CAST -DQT_CLEAN_NAMESPACE -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -DQT_THREAD_SUPPORT -D_REENTRANT -include tqt.h -Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu CMakeFiles/ksnapshot.dir/ksnapshotiface_skel.cpp.o CMakeFiles/ksnapshot.dir/main.cpp.o CMakeFiles/ksnapshot.dir/ksnapshot.cpp.o CMakeFiles/ksnapshot.dir/regiongrabber.cpp.o CMakeFiles/ksnapshot.dir/windowgrabber.cpp.o CMakeFiles/ksnapshot.dir/ksnapshotwidget.cpp.o -o ksnapshot -rdynamic -L/opt/trinity/lib -L/opt/tqt3/lib /opt/trinity/lib/libtdeprint.so.4.2.0 /opt/trinity/lib/libkio.so.4.2.0 /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: CMakeFiles/ksnapshot.dir/windowgrabber.cpp.o: undefined reference to symbol 'XShapeQueryExtension' /usr/bin/ld: note: 'XShapeQueryExtension' is defined in DSO /usr/lib/libXext.so.6 so try adding it to the linker command line /usr/lib/libXext.so.6: could not read symbols: Invalid operation collect2: ld returned 1 exit status make[2]: *** [ksnapshot/ksnapshot] Error 1 make[2]: Leaving directory `/build/src/build' make[1]: *** [ksnapshot/CMakeFiles/ksnapshot.dir/all] Error 2 make[1]: Leaving directory `/build/src/build' make: *** [all] Error 2
This looks like a new bug due to gcc :| Gotta love building on the bleeding edge.
On Wednesday 07 March 2012 07:13:39 David C. Rankin wrote: [...]
-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
Actually the error is pretty clear. You have no blank betweer "-lsane" and "-Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu-L/usr/lib"
On 03/07/2012 02:06 AM, Serghei Amelian wrote:
On Wednesday 07 March 2012 07:13:39 David C. Rankin wrote: [...]
-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
Actually the error is pretty clear. You have no blank betweer "-lsane" and "-Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu-L/usr/lib"
Where does that come from? Is that somewhere in the Cmake files or is that a problem with 'sane-config'?
On 03/07/2012 07:30 AM, David C. Rankin wrote:
On 03/07/2012 02:06 AM, Serghei Amelian wrote:
On Wednesday 07 March 2012 07:13:39 David C. Rankin wrote: [...]
-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
Actually the error is pretty clear. You have no blank betweer "-lsane" and "-Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu-L/usr/lib"
Where does that come from? Is that somewhere in the Cmake files or is that a problem with 'sane-config'?
I just checked again and it isn't sane-config:
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
The only other place I can see where the problem could be created is:
tdegraphics/libkscan/configure.in.in
LIBSANE_LDFLAGS="`$SANE_CONFIG --ldflags`"
I'll try patching with:
LIBSANE_LDFLAGS=" `$SANE_CONFIG --ldflags` "
On 03/07/2012 07:38 AM, David C. Rankin wrote:
On 03/07/2012 07:30 AM, David C. Rankin wrote:
On 03/07/2012 02:06 AM, Serghei Amelian wrote:
On Wednesday 07 March 2012 07:13:39 David C. Rankin wrote: [...]
-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
Actually the error is pretty clear. You have no blank betweer "-lsane" and "-Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu-L/usr/lib"
Where does that come from? Is that somewhere in the Cmake files or is that a problem with 'sane-config'?
I just checked again and it isn't sane-config:
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
The only other place I can see where the problem could be created is:
tdegraphics/libkscan/configure.in.in
LIBSANE_LDFLAGS="`$SANE_CONFIG --ldflags`"
I'll try patching with:
LIBSANE_LDFLAGS=" `$SANE_CONFIG --ldflags` "
No Joy,
Still bombs at:
/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 make[2]: *** [libkscan/libkscan.so.1.0.0] Error 1 make[2]: Leaving directory `/build/src/build' make[1]: *** [libkscan/CMakeFiles/kscan-shared.dir/all] Error 2 make[1]: Leaving directory `/build/src/build' make: *** [all] Error 2
I have tested the way arch is returning the 'sane-config' information from libkscan/configure.in.in and it all looks good on my end:
Testing libkscan libsane configuration
LIBSANE_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 '
LIBSANE_LDFLAGS='-L/usr/lib -Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu -Wl,-rpath,/usr/lib'
LIBSANE_INCLUDES=''
I have no idea how '-lsane-Wl' is ending up crammed together. Any thoughts from the gurus?
On Wednesday 07 March 2012 18:55:51 David C. Rankin wrote: [...]
LIBSANE_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 '
LIBSANE_LDFLAGS='-L/usr/lib -Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu -Wl,-rpath,/usr/lib'
LIBSANE_INCLUDES=''
I have no idea how '-lsane-Wl' is ending up crammed together. Any thoughts from the gurus?
cmake expects only a library list from sane-config.
On 03/07/2012 11:08 AM, Serghei Amelian wrote:
On Wednesday 07 March 2012 18:55:51 David C. Rankin wrote: [...]
LIBSANE_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 '
LIBSANE_LDFLAGS='-L/usr/lib -Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu -Wl,-rpath,/usr/lib'
LIBSANE_INCLUDES=''
I have no idea how '-lsane-Wl' is ending up crammed together. Any thoughts from the gurus?
cmake expects only a library list from sane-config.
Well, that could explain it :p
That would also be consistent with the man page for sane-config:
--libs Print the additional libraries that are necessary to link a SANE frontend to libsane.
I'll sed those out and follow up with arch on the behavior of sane. What is the output of your:
sane-config --libs
?
On 03/07/2012 01:04 PM, David C. Rankin wrote:
On 03/07/2012 11:08 AM, Serghei Amelian wrote:
On Wednesday 07 March 2012 18:55:51 David C. Rankin wrote: [...]
LIBSANE_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 '
LIBSANE_LDFLAGS='-L/usr/lib -Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu -Wl,-rpath,/usr/lib'
LIBSANE_INCLUDES=''
I have no idea how '-lsane-Wl' is ending up crammed together. Any thoughts from the gurus?
cmake expects only a library list from sane-config.
Well, that could explain it :p
That would also be consistent with the man page for sane-config:
--libs Print the additional libraries that are necessary to link a SANE
frontend to libsane.
I'll sed those out and follow up with arch on the behavior of sane. What is the output of your:
sane-config --libs
?
Tim, all:
net-snmp-config --libs includes NON library information which causes packages built later that depend on it (eg: sane) to fail to link due to extraneous library information. I opened a bug report with Arch:
https://bugs.archlinux.org/task/28817
On 03/07/2012 02:42 PM, David C. Rankin wrote:
On 03/07/2012 01:04 PM, David C. Rankin wrote:
On 03/07/2012 11:08 AM, Serghei Amelian wrote:
On Wednesday 07 March 2012 18:55:51 David C. Rankin wrote: [...]
LIBSANE_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 '
LIBSANE_LDFLAGS='-L/usr/lib -Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu -Wl,-rpath,/usr/lib'
LIBSANE_INCLUDES=''
I have no idea how '-lsane-Wl' is ending up crammed together. Any thoughts from the gurus?
cmake expects only a library list from sane-config.
Well, that could explain it :p
That would also be consistent with the man page for sane-config:
--libs Print the additional libraries that are necessary to link a SANE
frontend to libsane.
I'll sed those out and follow up with arch on the behavior of sane. What is the output of your:
sane-config --libs
?
Tim, all:
net-snmp-config --libs includes NON library information which causes packages built later that depend on it (eg: sane) to fail to link due to extraneous library information. I opened a bug report with Arch:
Serghei, All,
Looking at the concatenation, even if net-snmp-config included linker flags in the linker --libs string, the build should not have failed.
Linking CXX shared library libkscan.so /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 error above shows that the link would have succeeded if '-lsane' and '-Wl' were not concatenated together. The final part of the error was:
collect2: ld returned 1 exit status make[2]: *** [libkscan/libkscan.so.1.0.0] Error 1 make[1]: *** [libkscan/CMakeFiles/kscan-shared.dir/all] Error 2 make: *** [all] Error 2
I don't know where the actual concatenation takes place after the CMakeLists.txt is read, but it looks like whatever takes place after:
LINK kio-shared ${SANE_LIBRARIES}
is where the concatenation problem arises. Where can I look at this logic?
On Wednesday 07 March 2012 23:51:01 David C. Rankin wrote: [...]
Serghei, All,
Looking at the concatenation, even if net-snmp-config included linker flags in the linker --libs string, the build should not have failed.
Linking CXX shared library libkscan.so /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 error above shows that the link would have succeeded if '-lsane' and '-Wl' were not concatenated together. The final part of the error was:
collect2: ld returned 1 exit status make[2]: *** [libkscan/libkscan.so.1.0.0] Error 1 make[1]: *** [libkscan/CMakeFiles/kscan-shared.dir/all] Error 2 make: *** [all] Error 2
I don't know where the actual concatenation takes place after the CMakeLists.txt is read, but it looks like whatever takes place after:
LINK kio-shared ${SANE_LIBRARIES}
is where the concatenation problem arises. Where can I look at this logic?
kdegraphics/libkscan/ConfigureChecks.cmake
Check these lines:
string( REGEX REPLACE "(^| )-l" ";" SANE_LIBRARIES "${SANE_LIBRARIES}" ) string( REPLACE " " "" SANE_LIBRARIES "${SANE_LIBRARIES}" )
On 03/07/2012 03:55 PM, Serghei Amelian wrote:
On Wednesday 07 March 2012 23:51:01 David C. Rankin wrote: [...]
Serghei, All,
Looking at the concatenation, even if net-snmp-config included linker flags in the linker --libs string, the build should not have failed.
Linking CXX shared library libkscan.so /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 error above shows that the link would have succeeded if '-lsane' and '-Wl' were not concatenated together. The final part of the error was:
collect2: ld returned 1 exit status make[2]: *** [libkscan/libkscan.so.1.0.0] Error 1 make[1]: *** [libkscan/CMakeFiles/kscan-shared.dir/all] Error 2 make: *** [all] Error 2
I don't know where the actual concatenation takes place after the CMakeLists.txt is read, but it looks like whatever takes place after:
LINK kio-shared ${SANE_LIBRARIES}
is where the concatenation problem arises. Where can I look at this logic?
kdegraphics/libkscan/ConfigureChecks.cmake
Check these lines:
string( REGEX REPLACE "(^| )-l" ";" SANE_LIBRARIES "${SANE_LIBRARIES}" ) string( REPLACE " " "" SANE_LIBRARIES "${SANE_LIBRARIES}" )
Hah! Now I see why you did it :)
# cleanup if( SANE_INCLUDE_DIRS ) string( REGEX REPLACE "(^| )-I" ";" SANE_INCLUDE_DIRS "${SANE_INCLUDE_DIRS}" ) endif( ) if( SANE_LIBRARIES ) string( REGEX REPLACE "(^| )-l" ";" SANE_LIBRARIES "${SANE_LIBRARIES}" ) # string( REPLACE " " "" SANE_LIBRARIES "${SANE_LIBRARIES}" ) endif( )
Commenting results in this cmake error.
CMake Error at cmake/modules/TDEMacros.cmake:662 (add_library): Target "kscan-shared" links to item "v4l1 " which has leading or trailing whitespace. This is now an error according to policy CMP0004. Call Stack (most recent call first): libkscan/CMakeLists.txt:38 (tde_add_library)
So the string REPLACE which was meant to get around this CMake error is what is causing the run-together concatenation in the library string. I will play with the regex and see if we can come up wit one that trims leading or trailing whitespace for CMake, but doesn't result in run-together parameters.... :)
On 03/07/2012 11:00 PM, David C. Rankin wrote:
CMake Error at cmake/modules/TDEMacros.cmake:662 (add_library): Target "kscan-shared" links to item "v4l1 " which has leading or trailing whitespace. This is now an error according to policy CMP0004. Call Stack (most recent call first): libkscan/CMakeLists.txt:38 (tde_add_library)
I've looked, policy CMP0004 will not work in this situation. If you are concatenating lib strings, then whitespace at the end of a string is an absolute 'requirement' in order to prevent that same error we see here.
LIBS=" -lm -lattr -lsane " LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu"
If you remove leading/trailing whitespace from ${LIBS} and concatenate ${LDFLAGS}${LIBS}, then yes, it will cause this error every time :)
On 03/06/2012 08:00 PM, David C. Rankin wrote:
On 03/06/2012 07:37 PM, David C. Rankin wrote:
On 03/06/2012 07:09 PM, Darrell Anderson wrote:
Ran into another issue with tdegraphics that I can't solve by a dependency review:
[ 31%] Building CXX object libkscan/CMakeFiles/kscan-shared.dir/imgscaninfo.cpp.o Linking CXX shared library libkscan.so /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 make[2]: *** [libkscan/libkscan.so.1.0.0] Error 1 make[1]: *** [libkscan/CMakeFiles/kscan-shared.dir/all] Error 2 make: *** [all] Error 2
Is this a CMake issue? Linker error? What to look for?
Do you have SANE installed?
Check your build log for the following:
-- checking for 'libkscan' -- ok, activated for build
Check your CMakeCache.txt for this:
//Build libkscan BUILD_LIBKSCAN:BOOL=ON
Darrell
Hmm... yes on both accounts:
-- checking for 'libkscan' -- ok, activated for build
[19:35 providence:/home/david/bld/david/build/src/build] # grep -i libkscan CMakeCache.txt //Build libkscan BUILD_LIBKSCAN:BOOL=ON libksane_BINARY_DIR:STATIC=/build/src/build/libkscan libksane_SOURCE_DIR:STATIC=/build/src/tdegraphics/libkscan
Is this a new gcc issue? I have gcc 4.6.2-7... How would I check?
I cannot read cmake very well, but it looks like it gets to about line 584 in libkscan/CMakeFiles/kscan-shared.dir/build.make:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --red --bold
"Linking CXX shared library libkscan.so" cd /build/src/build/libkscan && $(CMAKE_COMMAND) -E cmake_link_script CMakeFiles/kscan-shared.dir/link.txt --verbose=$(VERBOSE) cd /build/src/build/libkscan && $(CMAKE_COMMAND) -E cmake_symlink_library libkscan.so.1.0.0 libkscan.so.1 libkscan.so
libkscan/libkscan.so.1: libkscan/libkscan.so.1.0.0
libkscan/libkscan.so: libkscan/libkscan.so.1.0.0
Because it gets to:
[ 31%] Building CXX object libkscan/CMakeFiles/kscan-shared.dir/imgscaninfo.cpp.o
Then dies. Any ideas?
I think I'm getting closer to at least finding where things are going wrong. Can someone confirm the order that the build system will go though the files in the libkscan/CMakeFiles/kscan-shared.dir? I don't know how the intricacies work, but it looks like it works something like this:
chroot/david/build/src/build/libkscan> ll CMakeFiles/ total 12 drwxr-xr-x 2 nobody nobody 4096 Mar 6 19:35 kscan-shared.dir -rw-r--r-- 1 nobody nobody 970 Mar 6 19:30 CMakeDirectoryInformation.cmake -rw-r--r-- 1 nobody nobody 2 Mar 6 19:30 progress.marks
Path information is set from CMakeDirectoryInformation.cmake
21:27 nirvana:/mnt/nv1/home/chroot/david/build/src/build/libkscan> cat CMakeFiles/CMakeDirectoryInformation.cmake # CMAKE generated file: DO NOT EDIT! # Generated by "Unix Makefiles" Generator, CMake Version 2.8
# Relative path conversion top directories. SET(CMAKE_RELATIVE_PATH_TOP_SOURCE "/build/src/tdegraphics") SET(CMAKE_RELATIVE_PATH_TOP_BINARY "/build/src/build")
# Force unix paths in dependencies. SET(CMAKE_FORCE_UNIX_PATHS 1)
# The C and CXX include file search paths: SET(CMAKE_C_INCLUDE_PATH "libkscan" "/build/src/tdegraphics/libkscan" "/opt/trinity/include" "/opt/tqt3/include" "/opt/trinity/include/tqt" ) <snip>
Then it drops into the CMakeFiles/kscan-shared.dir
chroot/david/build/src/build/libkscan> ll CMakeFiles/kscan-shared.dir/ total 1616 -rw-r--r-- 1 nobody nobody 50066 Mar 6 19:30 build.make -rw-r--r-- 1 nobody nobody 1420 Mar 6 19:30 cmake_clean.cmake -rw-r--r-- 1 nobody nobody 42307 Mar 6 19:35 CXX.includecache -rw-r--r-- 1 nobody nobody 2830 Mar 6 19:30 DependInfo.cmake -rw-r--r-- 1 nobody nobody 73257 Mar 6 19:35 depend.internal -rw-r--r-- 1 nobody nobody 186988 Mar 6 19:35 depend.make -rw-r--r-- 1 nobody nobody 58224 Mar 6 19:35 devselector.cpp.o -rw-r--r-- 1 nobody nobody 24008 Mar 6 19:35 dispgamma.cpp.o -rw-r--r-- 1 nobody nobody 579 Mar 6 19:30 flags.make -rw-r--r-- 1 nobody nobody 32848 Mar 6 19:35 gammadialog.cpp.o -rw-r--r-- 1 nobody nobody 118000 Mar 6 19:35 img_canvas.cpp.o -rw-r--r-- 1 nobody nobody 38912 Mar 6 19:35 imgscaledialog.cpp.o -rw-r--r-- 1 nobody nobody 3696 Mar 6 19:35 imgscaninfo.cpp.o -rw-r--r-- 1 nobody nobody 22728 Mar 6 19:35 kgammatable.cpp.o -rw-r--r-- 1 nobody nobody 178736 Mar 6 19:35 kscandevice.cpp.o -rw-r--r-- 1 nobody nobody 144720 Mar 6 19:35 kscanoption.cpp.o -rw-r--r-- 1 nobody nobody 47176 Mar 6 19:35 kscanoptset.cpp.o -rw-r--r-- 1 nobody nobody 88552 Mar 6 19:35 kscanslider.cpp.o -rw-r--r-- 1 nobody nobody 1742 Mar 6 19:30 link.txt -rw-r--r-- 1 nobody nobody 33712 Mar 6 19:35 massscandialog.cpp.o -rw-r--r-- 1 nobody nobody 119280 Mar 6 19:35 previewer.cpp.o -rw-r--r-- 1 nobody nobody 668 Mar 6 19:30 progress.make -rw-r--r-- 1 nobody nobody 78328 Mar 6 19:35 scandialog.cpp.o -rw-r--r-- 1 nobody nobody 169960 Mar 6 19:35 scanparams.cpp.o -rw-r--r-- 1 nobody nobody 45992 Mar 6 19:35 scansourcedialog.cpp.o -rw-r--r-- 1 nobody nobody 31688 Mar 6 19:35 sizeindicator.cpp.o
Where it then reads the 'flags.txt, does make for 'build.make' and then uses 'link.txt' for the linker. In this process, 'flags.txt' looks to have the correct include information:
chroot/david/build/src/build/libkscan> cat CMakeFiles/kscan-shared.dir/flags.make # CMAKE generated file: DO NOT EDIT! # Generated by "Unix Makefiles" Generator, CMake Version 2.8
# compile CXX with /usr/bin/c++ CXX_FLAGS = -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -DQT_NO_ASCII_CAST -DQT_CLEAN_NAMESPACE -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -DQT_THREAD_SUPPORT -D_REENTRANT -include tqt.h -fPIC -I/build/src/build/libkscan -I/build/src/tdegraphics/libkscan -I/opt/trinity/include -I/opt/tqt3/include -I/opt/trinity/include/tqt
CXX_DEFINES = -Dkscan_shared_EXPORTS -DHAVE_CONFIG_H
The question is build.make -- is the symlink_library stuff correct? It looks like it, but I don't know. This is where the build craters:
libkscan/libkscan.so.1.0.0: libkscan/CMakeFiles/kscan-shared.dir/link.txt @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --red --bold "Linking CXX shared library libkscan.so" cd /build/src/build/libkscan && $(CMAKE_COMMAND) -E cmake_link_script CMakeFiles/kscan-shared.dir/link.txt --verbose=$(VERBOSE) cd /build/src/build/libkscan && $(CMAKE_COMMAND) -E cmake_symlink_library libkscan.so.1.0.0 libkscan.so.1 libkscan.so
libkscan/libkscan.so.1: libkscan/libkscan.so.1.0.0
libkscan/libkscan.so: libkscan/libkscan.so.1.0.0
Stuck -- How To Fix??