Hi Rich,
I tried your little test on my own fedora system and it worked fine, no
link error.
I don't know if this is helpful, but you could try running "nm -D
/usr/lib64/libudev.so". I see the following along with everything else:
0000003dc6203370 T udev_new
Sounds like you are already on top of the obvious stuff, but digging back
through past experiences -- could the .so itself be corrupted or copied
over with something else? Does the "nm" output look plausible? Even
though the lib is in the /usr/lib64/ directory could there be a 32bit vs.
64bit issue going on here? udev is a C library I believe, but could there
be some sort of name mangling discrepancy?
Usually when things are there, they are there and work, but if they don't
work, then I start trying to match up names with nm, consider 32 vs. 64 bit
incompatibilities, C++ name mangling, etc.
Curt.
On Wed, Oct 10, 2012 at 12:59 PM, Cook, Rich <coo...@llnl.gov> wrote:
> Resending as first was rejected for being too long, sigh. Am I on the
> right mailing list? Is this a developer topic?
>
> On Oct 10, 2012, at 10:31 AM, Curtis Olson wrote:
>
> Hopefully one of our cmake gurus can jump in and comment at this point.
> I get clean builds on Fedora, so if I ran into something like this on my
> system, I'd probably wipe my build try and start from scratch.
>
>
> yep, building clean
>
> I may look at making sure simgear was built at the same time and from
> the same vintage and under the same conditions as flightgear.
>
>
> yep, freshly built from a matching version
>
> I'd double check I didn't update or change or add packages to this
> system in mid build (or after building simgear, but before building
> flightgear, etc.)
>
>
> Nope, no changes
>
> It could be as simple as something being out of sync because the system
> (libs or compiler) was updated midway through the build. It maybe that the
> udev check failed to locate the library (but still somehow passed the check
> or didn't abort the build) so that the build continued and found the
> header, but the library was never included in the link line (thus those
> functions are not found.)
>
>
> Unlikely in the extreme :-) I repeatedly get the same error every
> time.
>
> The real question to me is how it is that I'm getting "undefined
> reference to udev_new()" when I'm clearly linking against
> /lib64/libudev.so.0.5.1.
> I think there is something wrong with our libudev, but I don't know what.
> I wrote a test program:
>
> #include <libudev.h>
>
> int main(int, char **) {
> struct udev * udev = udev_new();
> return 0;
> }
>
> I then did this:
>
> rcook@rzgpu2 (FlightGear): g++ -I/usr/include test.C
> /usr/lib64/libudev.so
> /var/tmp/rcook/ccF1vmxU.o: In function `main':
> test.C:(.text+0x10): undefined reference to `udev_new()'
> collect2: ld returned 1 exit status
>
> Huh. HElp?
>
>
>
> Curt.
>
>
> On Wed, Oct 10, 2012 at 12:23 PM, Cook, Rich <coo...@llnl.gov> wrote:
>
>> Hi, we do have libudev-devel installed...
>>
>> rcook@rzgpu52 (flightgear-2.8.0-build): rpm -qf /lib64/libudev.so.0
>> libudev-147-2.40.el6.x86_64
>> rcook@rzgpu52 (flightgear-2.8.0-build): ls /usr/include/libudev.h
>> /usr/include/libudev.h
>> rcook@rzgpu52 (flightgear-2.8.0-build): rpm -qf !$
>> rpm -qf /usr/include/libudev.h
>> libudev-devel-147-2.40.el6.x86_64
>>
>> If not, I assume
>> that CMakeFiles/fgfs.dir/__/Input/FGLinuxEventInput.cxx.o would not have
>> compiled at all.
>>
>> On Oct 10, 2012, at 10:07 AM, Curtis Olson wrote:
>>
>> Hi Rich,
>>
>> One quick thing to try to would be to make sure you have the -devel
>> version of the library installed. That usually provides .h / include files
>> and also static versions of the libs. I don't know how this is
>> specifically checked for in cmake, but often you look for the correct .h
>> file (or the existance of a .a file) to know the development version of a
>> package is installed and usable by the compiler.
>>
>> Curt.
>>
>>
>> On Wed, Oct 10, 2012 at 11:57 AM, Cook, Rich wrote:
>>
>>> Hi, I'm so close to getting this working on our cluster. Believe it or
>>> not, I have a deadline. LOL
>>> Can someone help me figure out what is wrong? I would so much
>>> appreciate it!
>>> Thanks
>>>
>>> I do this:
>>> cmake -D CMAKE_BUILD_TYPE="Release" CMAKE_CXX_FLAGS="-O3
>>> -D__STDC_CONSTANT_MACROS" -D CMAKE_C_FLAGS="-O3" -D
>>> CMAKE_VERBOSE_MAKEFILE:BOOL=ON -D
>>> CMAKE_INSTALL_PREFIX:PATH="/collab/usr/gapps/asciviz/flightgear/" -D
>>> "CMAKE_PREFIX_PATH=/collab/usr/gapps/asciviz/flightgear/"
>>> ../flightgear-2.8.0 && sleep 5 && make -j 24 2>&1 | tee output.log
>>>
>>> I get this (I have snipped a large portion of the link line for
>>> readability)
>>>
>>> [ 31%] Built target JSBSim
>>> make -f src/Main/CMakeFiles/fgfs.dir/build.make
>>> src/Main/CMakeFiles/fgfs.dir/depend
>>> make[2]: Entering directory
>>> `/nfs/tmp2/rcook/FlightGear/flightgear-2.8.0-build'
>>> cd /nfs/tmp2/rcook/FlightGear/flightgear-2.8.0-build &&
>>> /usr/local/tools/cmake-2.8.7/bin/cmake -E cmake_depends "Unix Makefiles"
>>> /nfs/tmp2/rcook/FlightGear/flightgear-2.8.0
>>> /nfs/tmp2/rcook/FlightGear/flightgear-2.8.0/src/Main
>>> /nfs/tmp2/rcook/FlightGear/flightgear-2.8.0-build
>>> /nfs/tmp2/rcook/FlightGear/flightgear-2.8.0-build/src/Main
>>> /nfs/tmp2/rcook/FlightGear/flightgear-2.8.0-build/src/Main/CMakeFiles/fgfs.dir/DependInfo.cmake
>>> --color=
>>> make[2]: Leaving directory
>>> `/nfs/tmp2/rcook/FlightGear/flightgear-2.8.0-build'
>>> make -f src/Main/CMakeFiles/fgfs.dir/build.make
>>> src/Main/CMakeFiles/fgfs.dir/build
>>> make[2]: Entering directory
>>> `/nfs/tmp2/rcook/FlightGear/flightgear-2.8.0-build'
>>> Linking CXX executable fgfs
>>> cd /nfs/tmp2/rcook/FlightGear/flightgear-2.8.0-build/src/Main &&
>>> /usr/local/tools/cmake-2.8.7/bin/cmake -E cmake_link_script
>>> CMakeFiles/fgfs.dir/link.txt --verbose=1
>>> /usr/bin/c++ -I/collab/usr/gapps/asciviz/flightgear/include -Wall
>>> -D_REENTRANT -DBOOST_MULTI_INDEX_DISABLE_SERIALIZATION
>>> -DBOOST_BIMAP_DISABLE_SERIALIZATION -O3 -DNDEBUG
>>> -I/collab/usr/gapps/asciviz/flightgear/lib
>>> -L/collab/usr/gapps/asciviz/flightgear/lib64
>>> CMakeFiles/fgfs.dir/bootstrap.cxx.o CMakeFiles/fgfs.dir/fg_commands.cxx.o
>>> CMakeFiles/fgfs.dir/fg_init.cxx.o CMakeFiles/fgfs.dir/fg_io.cxx.o
>>> CMakeFiles/fgfs.dir/fg_os_common.cxx.o CMakeFiles/fgfs.dir/fg_props.cxx.o
>>> CMakeFiles/fgfs.dir/globals.cxx.o CMakeFiles/fgfs.dir/locale.cxx.o
>>> CMakeFiles/fgfs.dir/logger.cxx.o CMakeFile ... etc ... full text below
>>> ... a /collab/usr/gapps/asciviz/flightgear/lib/libplibsg.a
>>> /collab/usr/gapps/asciviz/flightgear/lib/libplibpu.a
>>> /collab/usr/gapps/asciviz/flightgear/lib/libplibul.a -ludev -lpthread -lz
>>> -lapr-1 -lsvn_client-1 -lsvn_subr-1 -lsvn_ra-1 -lrt
>>> /collab/usr/gapps/asciviz/flightgear/lib/libalut.so
>>> /collab/usr/gapps/asciviz/flightgear/lib/libopenal.so
>>> ../Canvas/ShivaVG/src/libShivaVG.a -lGLU -lGL
>>> -Wl,-rpath,/collab/usr/gapps/asciviz/flightgear/lib64:/collab/usr/gapps/asciviz/flightgear/lib:
>>> CMakeFiles/fgfs.dir/__/Input/FGLinuxEventInput.cxx.o: In function
>>> `FGLinuxEventInput::postinit()':
>>> FGLinuxEventInput.cxx:(.text+0x4d9): undefined reference to `udev_new()'
>>> etc.
>>
>>
> collect2: ld returned 1 exit status
>>> make[2]: *** [src/Main/fgfs] Error 1
>>> make[2]: Leaving directory
>>> `/nfs/tmp2/rcook/FlightGear/flightgear-2.8.0-build'
>>> make[1]: *** [src/Main/CMakeFiles/fgfs.dir/all] Error 2
>>> make[1]: Leaving directory
>>> `/nfs/tmp2/rcook/FlightGear/flightgear-2.8.0-build'
>>> make: *** [all] Error 2
>>>
>>
> --
> ✐Richard Cook
> ✇ Lawrence Livermore National Laboratory
> Bldg-453 Rm-4024, Mail Stop L-557
> 7000 East Avenue, Livermore, CA, 94550, USA
> ☎ (office) (925) 423-9605
> ☎ (fax) (925) 423-6961
> ---
> Information Management & Graphics Grp., Services & Development Div.,
> Integrated Computing & Communications Dept.
> (opinions expressed herein are mine and not those of LLNL)
>
>
>
>
>
> ------------------------------------------------------------------------------
> Don't let slow site performance ruin your business. Deploy New Relic APM
> Deploy New Relic app performance management and know exactly
> what is happening inside your Ruby, Python, PHP, Java, and .NET app
> Try New Relic at no cost today and get our sweet Data Nerd shirt too!
> http://p.sf.net/sfu/newrelic-dev2dev
> _______________________________________________
> Flightgear-users mailing list
> Flightgear-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/flightgear-users
>
>
--
Curtis Olson:
http://www.atiak.com - http://aem.umn.edu/~uav/
http://www.flightgear.org - http://gallinazo.flightgear.org
------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
Flightgear-users mailing list
Flightgear-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-users