From: Paul O. <new...@ki...> - 2008-08-25 14:38:10
|
Well, it's just Linux, what else can I say? Also I've read in the manual that -ldl must be added whenever dlopen() is used. It's a guess game if current libtool-ltdl implementation is built on dlopen() or not (therefore it may need -ldl or not). Here I'm using libtool-1.5.6 and as we can see it uses -ldl. I know it's ancient version, but I couldn't compile anything newer for this crosscompilation environment. Paul On Mon, 25 Aug 2008, Geoffrey Biggs wrote: > That's going to be fun to identify for special build options... Is there > anything else unique about the system? > > Geoff > > Paul Osmialowski wrote: >> Indeed, this helped alot as HAVE_LIBLTDL now is defined and set to 1. >> >> The system is very customly made cross-compilation environment for >> embedded Linux running on cris/axis CPU (for my Roomba robots). It is >> running on somewhat ancient Linux Fedora Core 3 with cmake 2.6.0 built >> from tarball. The gcc cross-compiler is: >> gcc (GCC) 3.2.1 Axis release R64/1.64 >> Copyright (C) 2002 Free Software Foundation, Inc. >> This is free software; see the source for copying conditions. There is NO >> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR >> PURPOSE. >> >> Paul >> >> On Mon, 25 Aug 2008, gbiggs wrote: >> >>> Try adding this line just before the check on line 44 in >>> SearchForStuff.cmake: >>> >>> SET (CMAKE_REQUIRED_LIBRARIES dl) >>> >>> And just after the check, this line: >>> >>> SET (CMAKE_REQUIRED_LIBRARIES) >>> >>> See if that makes a difference. What system is this for, by the way? >>> >>> Geoff >>> >>> >>> Paul Osmialowski wrote: >>>> Hi Geoff >>>> >>>> I couldn't find anything about ltdl in CMakeFiles/CMakeOutput.log but I >>>> didn't gave up with searching: I've found something like this in other >>>> file, CMakeFiles/CMakeError.log: >>>> >>>> Determining if the function lt_dlopenext exists in the ltdl failed with >>>> the following output: >>>> Change Dir: /root/foxcross/build/CMakeFiles/CMakeTmp >>>> >>>> Run Build Command:/usr/bin/gmake "cmTryCompileExec/fast" >>>> /usr/bin/gmake -f CMakeFiles/cmTryCompileExec.dir/build.make >>>> CMakeFiles/cmTryCompileExec.dir/build >>>> >>>> gmake[1]: Entering directory `/root/foxcross/build/CMakeFiles/CMakeTmp' >>>> /usr/local/bin/cmake -E cmake_progress_report >>>> /root/foxcross/build/CMakeFiles/CMakeTmp/CMakeFiles 1 >>>> >>>> Building C object CMakeFiles/cmTryCompileExec.dir/CheckFunctionExists.c.o >>>> /usr/local/cris/cris-axis-linux-gnu/bin/gcc -fPIC -isystem >>>> /usr/local/cris/etrax/sys-include -I/mnt/flash/usr/include >>>> -DCHECK_FUNCTION_EXISTS=lt_dlopenext -o >>>> CMakeFiles/cmTryCompileExec.dir/CheckFunctionExists.c.o -c >>>> /usr/local/share/cmake-2.6/Modules/CheckFunctionExists.c >>>> >>>> Linking C executable cmTryCompileExec >>>> /usr/local/bin/cmake -E cmake_link_script >>>> CMakeFiles/cmTryCompileExec.dir/link.txt --verbose=1 >>>> /usr/local/cris/cris-axis-linux-gnu/bin/gcc -fPIC -isystem >>>> /usr/local/cris/etrax/sys-include -I/mnt/flash/usr/include >>>> -DCHECK_FUNCTION_EXISTS=lt_dlopenext -fPIC -L/mnt/flash/usr/lib >>>> -lltdl CMakeFiles/cmTryCompileExec.dir/CheckFunctionExists.c.o -o >>>> cmTryCompileExec -rdynamic -lltdl >>>> /mnt/flash/usr/lib/libltdl.a(ltdl.o): In function `sys_dl_open': >>>> ltdl.o(.text+0x626): undefined reference to `dlopen' >>>> /usr/local/cris/lib/gcc-lib/cris-axis-linux-gnu/3.2.1/../../../../cris-axis-linux-gnu/bin/ld: >>>> /mnt/flash/usr/lib/libltdl.a(ltdl.o): No PLT for relocation R_CRIS_32_GOTPLT against symbol >>>> `dlopen' from .text section >>>> /usr/local/cris/lib/gcc-lib/cris-axis-linux-gnu/3.2.1/../../../../cris-axis-linux-gnu/bin/ld: >>>> final link failed: Bad value >>>> collect2: ld returned 1 exit status >>>> gmake[1]: *** [cmTryCompileExec] Error 1 >>>> gmake[1]: Leaving directory `/root/foxcross/build/CMakeFiles/CMakeTmp' >>>> gmake: *** [cmTryCompileExec/fast] Error 2 >>>> >>>> It is strange, as there's no problem with finding dlopen() while normal >>>> building process... I guess this should be linked with -ldl flag. >>>> >>>> Also I noticed that this PLT relocation error pops up all the >>>> (linking) time during building process but it does not cause linking >>>> failure at the end. >>>> >>>> Cheers, >>>> Paul >>>> >>>> On Mon, 25 Aug 2008, gbiggs wrote: >>>> >>>>> There are a couple of reasons why this check might fail: >>>>> >>>>> - The function "lt_dlopenext" doesn't exist in the file libltdl.a (seems >>>>> unlikely if Player compiles fine, since Player uses this funciton). >>>>> - Something extra needs to be linked when linking to libltdl.a which the >>>>> check is missing but the Player build is including. >>>>> >>>>> Have a look in CMakeFiles/CMakeOutput.log under your build directory and >>>>> find the section about ltdl, and paste it here. This will tell us >>>>> exactly why the check failed. >>>>> >>>>> Geoff >>>>> >>>>> Paul Osmialowski wrote: >>>>>> Hi Geoff, >>>>>> >>>>>> Can you say in what circumstances this may fail to find libltdl.a?: >>>>>> CHECK_LIBRARY_EXISTS (ltdl lt_dlopenext "${PLAYER_EXTRA_LIB_DIRS}" >>>>>> HAVE_LIBLTDL) >>>>>> >>>>>> This libltdl.a library is placed in some directory tree, CFLAGS and >>>>>> CXXFLAGS points to include directory in that tree (-I), LIBS and LDFLAGS >>>>>> points to lib directory in that tree (-L). I have also libjpeg and zlib >>>>>> there (both static as .a files), and both are found by cmake properly, >>>>>> while libtool-ltdl isn't! Mystery, isn't it? >>>>>> >>>>>> I'd changed generated playerconfig.h file manually whit #define >>>>>> HAVE_LIBLTDL 1, and Player was built properly, also it was able to load >>>>>> and execute .so plugins. What bothers cmake then? >>>>> ------------------------------------------------------------------------- >>>>> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge >>>>> Build the coolest Linux based applications with Moblin SDK & win great prizes >>>>> Grand prize is a trip for two to an Open Source event anywhere in the world >>>>> http://moblin-contest.org/redirect.php?banner_id=100&url=/ >>>>> _______________________________________________ >>>>> Playerstage-developers mailing list >>>>> Pla...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/playerstage-developers >>>>> >>>> ------------------------------------------------------------------------- >>>> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge >>>> Build the coolest Linux based applications with Moblin SDK & win great prizes >>>> Grand prize is a trip for two to an Open Source event anywhere in the world >>>> http://moblin-contest.org/redirect.php?banner_id=100&url=/ >>>> _______________________________________________ >>>> Playerstage-developers mailing list >>>> Pla...@li... >>>> https://lists.sourceforge.net/lists/listinfo/playerstage-developers >>>> >>> ------------------------------------------------------------------------- >>> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge >>> Build the coolest Linux based applications with Moblin SDK & win great prizes >>> Grand prize is a trip for two to an Open Source event anywhere in the world >>> http://moblin-contest.org/redirect.php?banner_id=100&url=/ >>> _______________________________________________ >>> Playerstage-developers mailing list >>> Pla...@li... >>> https://lists.sourceforge.net/lists/listinfo/playerstage-developers >>> >> >> ------------------------------------------------------------------------- >> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge >> Build the coolest Linux based applications with Moblin SDK & win great prizes >> Grand prize is a trip for two to an Open Source event anywhere in the world >> http://moblin-contest.org/redirect.php?banner_id=100&url=/ >> _______________________________________________ >> Playerstage-developers mailing list >> Pla...@li... >> https://lists.sourceforge.net/lists/listinfo/playerstage-developers >> > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Playerstage-developers mailing list > Pla...@li... > https://lists.sourceforge.net/lists/listinfo/playerstage-developers > |