FreeOrion

Forums for the FreeOrion project
It is currently Fri Nov 17, 2017 9:08 pm

All times are UTC




Post new topic Reply to topic  [ 14 posts ] 
Author Message
PostPosted: Sun Jul 23, 2017 11:34 am 
Offline
Space Kraken

Joined: Thu Apr 23, 2015 11:21 am
Posts: 140
Hi there!

I did a major hardware update and just tried compiling (4fff4c1) on my new Ryzen 1600, Mint 18.2 KDE.
Working fine with -j3, but failed going:
Code:
/usr/bin/ld: CMakeFiles/freeorionca.dir/AI/AIInterface.cpp.o: undefined reference to symbol '_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc@@GLIBCXX_3.4.21'
//usr/lib/x86_64-linux-gnu/libstdc++.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
CMakeFiles/freeorionca.dir/build.make:475: recipe for target 'freeorionca' failed
make[2]: *** [freeorionca] Error 1
CMakeFiles/Makefile2:217: recipe for target 'CMakeFiles/freeorionca.dir/all' failed

and
Code:
/usr/bin/ld: CMakeFiles/freeoriond.dir/universe/UniverseGenerator.cpp.o: undefined reference to symbol 'sqrt@@GLIBC_2.2.5'
//lib/x86_64-linux-gnu/libm.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
CMakeFiles/freeoriond.dir/build.make:475: recipe for target 'freeoriond' failed
make[2]: *** [freeoriond] Error 1
CMakeFiles/Makefile2:142: recipe for target 'CMakeFiles/freeoriond.dir/all' failed
make[1]: *** [CMakeFiles/freeoriond.dir/all] Error 2

Can anybody help me solving this?


Top
 Profile  
 
PostPosted: Sun Jul 23, 2017 4:53 pm 
Offline
AI Lead, Programmer
User avatar

Joined: Sat Sep 22, 2012 6:25 pm
Posts: 4374
Looks to me like Geoff may have fixed the sqrt reference in the commit just after the one you tried compiling. Though I can't say for sure since the commit you had trouble with still just compiled fine for me on Linux (Ubuntu). Just to be sure, have you done a make clean and tried recompiling?

If you look at the commit log for AIInterface.h and AIInterface.cpp there are not a large number of commits in the past 6 months, you could try honing in on which one causes the trouble for you.

_________________
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0


Top
 Profile  
 
PostPosted: Sun Jul 23, 2017 10:40 pm 
Offline
Space Kraken

Joined: Thu Apr 23, 2015 11:21 am
Posts: 140
Hi,
I tried the latest commit, nothing changed. I guess by what you said that the problem is located in the system update and I might be missing some program that isn't mentioned by cmake.


Top
 Profile  
 
PostPosted: Mon Jul 24, 2017 2:13 am 
Offline
AI Lead, Programmer
User avatar

Joined: Sat Sep 22, 2012 6:25 pm
Posts: 4374
were you rebuilding in your old build directory? Perhaps make clean, then delete CMakeCache.txt and rerun cmake and then make

_________________
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0


Top
 Profile  
 
PostPosted: Mon Jul 24, 2017 4:13 am 
Offline
Programmer

Joined: Mon Feb 29, 2016 8:37 pm
Posts: 198
Congratulations on the new machine.

Did you upgrade both the hardware and the software?

As Dilvish asked, is there an older version that compiles successfully on your new hardware?

It would be helpful, if you posted the entire compile log.

Code:
/usr/bin/ld: CMakeFiles/freeorionca.dir/AI/AIInterface.cpp.o: undefined reference to symbol '_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc@@GLIBCXX_3.4.21'
, implies that you are linking with the wrong/non-existent stdlib. C++11 changed the ABI of the stdlib.

Have you made sure that your stdlib is present and C++11 compatible?

I would make a test program that uses at least one C++11 feature and std::string in order to be certain.


Top
 Profile  
 
PostPosted: Mon Jul 24, 2017 11:54 am 
Offline
Space Kraken

Joined: Thu Apr 23, 2015 11:21 am
Posts: 140
Hey,
Dilvish wrote:
were you rebuilding in your old build directory? Perhaps make clean, then delete CMakeCache.txt and rerun cmake and then make

I had a clean install of Linux Mint - KDE - 18.2 on the new system. I tried what you said but it didn't help. I must admit I'm not sure how to clone a older git version, for example from two weeks ago. I usually clone at the beginning and then make pulls to update.
LGM-Doyle wrote:
It would be helpful, if you posted the entire compile log.

I had a look into the CMakeError file and it says there CMAKE_CXX_COMPILER-NOTFOUND. I checked the path /usr/bin/gcc theres a link to gcc-5 in the same directory. You probably see deeper, so I attached the two logs I found.
LGM-Doyle wrote:
implies that you are linking with the wrong/non-existent stdlib. C++11 changed the ABI of the stdlib.

Don't exactly understand sorry, but there seems something missing as mentioned above. I have libstdc++6,libstdc++-5-dev,libstdc++-4.8-dev and g++-5 as compiler installed


Attachments:
CMakeOutput.log [43.4 KiB]
Downloaded 14 times
CMakeError.log [7.97 KiB]
Downloaded 11 times
Top
 Profile  
 
PostPosted: Mon Jul 24, 2017 12:57 pm 
Offline
Space Kraken

Joined: Thu Apr 23, 2015 11:21 am
Posts: 140
LGM-Doyle wrote:
Congratulations on the new machine.

Hehe, thanks! I'm very pleased the speed already so I can't wait to give freeorion a try, that's a core for each AI :D


Top
 Profile  
 
PostPosted: Mon Jul 24, 2017 2:53 pm 
Offline
Release Manager, Design
User avatar

Joined: Wed Nov 16, 2011 12:56 pm
Posts: 4241
Location: Sol III
Scara wrote:
I must admit I'm not sure how to clone a older git version, for example from two weeks ago.
What git client do you use? Some third party graphical UI tool (like SmartGit, SourceTree, etc.)? Or the git shell commands?


Top
 Profile  
 
PostPosted: Mon Jul 24, 2017 3:20 pm 
Offline
Space Kraken

Joined: Thu Apr 23, 2015 11:21 am
Posts: 140
I'm using git shell commands


Top
 Profile  
 
PostPosted: Mon Jul 24, 2017 4:01 pm 
Offline
Release Manager, Design
User avatar

Joined: Wed Nov 16, 2011 12:56 pm
Posts: 4241
Location: Sol III
In this case do a "git checkout <commit sha hash>" to checkout a specific commit. You don't need to type the entire SHA1 hash, an abbreviated one is sufficient (as long as it's not ambigous). This will leave you with a "detached head" (that is a head detached from any branch), so you should do no actual work in your working copy while in this state, but this way you can switch to any commit you want.


Top
 Profile  
 
PostPosted: Mon Jul 24, 2017 5:05 pm 
Offline
Space Kraken

Joined: Thu Apr 23, 2015 11:21 am
Posts: 140
Hmmm, interesting, I made a checkout with 2017-07-03.a5f0edc, a build I know that worked cause it was involved with my last playfeedback post, is indeed compiling now without complains.


Attachments:
CMakeOutput.log [43.63 KiB]
Downloaded 10 times
CMakeError.log [5.41 KiB]
Downloaded 11 times
Top
 Profile  
 
PostPosted: Mon Jul 24, 2017 8:37 pm 
Offline
Programmer

Joined: Mon Feb 29, 2016 8:37 pm
Posts: 198
That's great.

If you could do a bisection and determine which is the first commit that is broken, that might make it obvious how to fix the problem.

You can use git to help with the bisection. Start the bisection by typing:
Code:
git bisect start

git bisect good <hash of good  commit>

git bisect bad <hash of bad commit>
Then git will checkout a commit in between <good hash> and <bad hash>, near the middle. Try to compile it and then type either
Code:
git bisect good
or
Code:
git bisect bad
and git will checkout another commit closer to the commit you are looking for.

When you are done reset git to the commit that you started from by typing:
Code:
git reset


Top
 Profile  
 
PostPosted: Tue Jul 25, 2017 12:33 am 
Offline
Space Kraken

Joined: Thu Apr 23, 2015 11:21 am
Posts: 140
Now this is very confusing. I tried to bisect the commits, but they all worked, even the one I started this posting with. Then I pulled git to the newest version and that worked as well, but only in my extra checkout directory. In my main game dict, the same version won't work with the same message as usual. Here are the differences:

Freeorion dict
git clone 4fff4c1
pulls from there on
update 3de874e
all don't work

Checkout dict
git clone ? from yesterday
git checkout a5f0edc (worked)
git bisects with 4fff4c1
all work
another pull to update 3de874e (works)


Attachments:
File comment: checkout
CMakeOutput.log [65.14 KiB]
Downloaded 13 times
File comment: checkout
CMakeError.log [37.88 KiB]
Downloaded 12 times
File comment: main game
CMakeOutput.log [5.25 KiB]
Downloaded 9 times
File comment: main game
CMakeError.log [37.88 KiB]
Downloaded 12 times
Top
 Profile  
 
PostPosted: Thu Nov 09, 2017 7:17 pm 
Offline
Space Squid

Joined: Mon Aug 27, 2012 7:24 pm
Posts: 56
The problem is that you have a stale build directory. One of the .o or .so files was linked against an old system library and isn't getting rebuilt. You need to run ccmake again and recreate your config files.

_________________
All contributions are submitted under GPL or LGPL v2 or later, or under appropriate Creative Commons licence, consistent with project guidlines.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 14 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group