Board index FlightGear Support Compiling

undefined reference to `logstream:  Topic is solved

Building FlightGear from source, and in the need for help?

undefined reference to `logstream:

Postby Ovazor » Wed Nov 11, 2020 10:33 pm

Hello,

I have recently encountered a problem in building the fg. Simgear builds OK, but attempting to build the fg produces a long list of DWARF errors and the following:

Code: Select all
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: DWARF error: could not find variable specification at offset 2c721
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: DWARF error: could not find variable specification at offset 2c72c
CMakeFiles/fgelev.dir/fgelev.cxx.o: in function `main':
/usr/local/src/flightgear/fg_src/utils/fgelev/fgelev.cxx:189: undefined reference to `logstream::would_log(sgDebugClass, sgDebugPriority) const'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /usr/local/src/flightgear/fg_src/utils/fgelev/fgelev.cxx:189: undefined reference to `logstream::log(sgDebugClass, sgDebugPriority, char const*, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /usr/local/src/flightgear/fg_src/utils/fgelev/fgelev.cxx:133: undefined reference to `logstream::would_log(sgDebugClass, sgDebugPriority) const'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /usr/local/src/flightgear/fg_src/utils/fgelev/fgelev.cxx:133: undefined reference to `logstream::log(sgDebugClass, sgDebugPriority, char const*, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /usr/local/src/flightgear/fg_src/utils/fgelev/fgelev.cxx:151: undefined reference to `logstream::would_log(sgDebugClass, sgDebugPriority) const'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /usr/local/src/flightgear/fg_src/utils/fgelev/fgelev.cxx:151: undefined reference to `logstream::log(sgDebugClass, sgDebugPriority, char const*, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
collect2: error: ld returned 1 exit status
make[2]: *** [utils/fgelev/CMakeFiles/fgelev.dir/build.make:120: utils/fgelev/fgelev] Error 1
make[1]: *** [CMakeFiles/Makefile2:2157: utils/fgelev/CMakeFiles/fgelev.dir/all] Error 2
make: *** [Makefile:180: all] Error 2



I would be grateful for any ideas. I have been successfully building the fg from the sources for years, so something has changed fairly recently.
Flying the Dakota
Ovazor
 
Posts: 76
Joined: Wed Feb 12, 2014 7:53 am
Location: Finland
Callsign: OH-OVA
Version: 2020.4.0
OS: OpenSUSE LEap 15.2

Re: undefined reference to `logstream:  

Postby cgdae » Wed Nov 11, 2020 11:18 pm

It's difficult to be sure, but It looks like your fgelev.cxx may have been compiled with old simgear headers, but is being linked with a newer simgear build.

Logging has changed quite a bit recently. Depending on what branch you're using, the simgear log functions that your build output is failing to find have been modified to take filename+linenumber or, more recently on next, filename+linenumber+functionname.

What branches are you working on?

Are you flightgear and simgear checkouts synchronised (i.e. 'git pull' run on both at roughly the same time)? If so, it's possible that a clean build might fix things.

Hope that's of some use,

- Jules
Last edited by Johan G on Thu Nov 12, 2020 10:21 am, edited 1 time in total.
Reason: Please do not quote the entire preceding post.
cgdae
 
Posts: 117
Joined: Tue May 31, 2016 8:35 pm

Re: undefined reference to `logstream:

Postby Ovazor » Thu Nov 12, 2020 8:31 am

Thanks for the reply. I pulled both SG and FG yesterday evening from the standard sources.

I always pull and build simgear first, then flightgear, but I will try with a clean build tonight.
Flying the Dakota
Ovazor
 
Posts: 76
Joined: Wed Feb 12, 2014 7:53 am
Location: Finland
Callsign: OH-OVA
Version: 2020.4.0
OS: OpenSUSE LEap 15.2

Re: undefined reference to `logstream:

Postby Ovazor » Thu Nov 12, 2020 4:03 pm

Yes, a clean build worked. Thanks for the tip.
Flying the Dakota
Ovazor
 
Posts: 76
Joined: Wed Feb 12, 2014 7:53 am
Location: Finland
Callsign: OH-OVA
Version: 2020.4.0
OS: OpenSUSE LEap 15.2


Return to Compiling

Who is online

Users browsing this forum: No registered users and 3 guests