FreeOrion

Forums for the FreeOrion project
It is currently Thu Nov 23, 2017 7:40 am

All times are UTC




Post new topic Reply to topic  [ 21 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: Tue Aug 15, 2017 8:57 pm 
Offline
AI Lead, Programmer
User avatar

Joined: Sat Sep 22, 2012 6:25 pm
Posts: 4377
mandarina wrote:
I'm using Ubuntu Gnome, it is Ubuntu but with Gnome instead of Unity.
Code:
$ nm  -DC /usr/lib/x86_64-linux-gnu/libboost_log.so | grep   text_file_backend::consume
000000000007ed80 T boost::log::v2_mt_posix::sinks::text_file_backend::consume(boost::log::v2_mt_posix::record_view const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)

That's pretty interesting to me, because it's the same result I have, but it works fine for my compile/linker whereas your compiler/linker appears to be insisting on having the last parameter as a plain std::string const& instead of accepting the c++11 version. What versions of gcc and ld are you using? Mine are
Code:
$gcc --version
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
Code:
$ ld --version
GNU ld (GNU Binutils for Ubuntu) 2.26.1
Perhaps you need to upgrade your gcc or set a compiler flag (either via ccmake as discussed above or as discussed in this thread)

_________________
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: Wed Aug 16, 2017 7:33 pm 
Offline
Space Krill

Joined: Thu Aug 10, 2017 1:06 pm
Posts: 9
Hello,

Code:
$ gcc --version
gcc (Ubuntu 4.9.4-2ubuntu1~16.04) 4.9.4

Code:
$ ld --version
GNU ld (GNU Binutils for Ubuntu) 2.26.1


I tried compiling with the flag "--std=c++0x" but problem persists :(


Top
 Profile  
 
PostPosted: Thu Aug 17, 2017 2:19 am 
Offline
AI Lead, Programmer
User avatar

Joined: Sat Sep 22, 2012 6:25 pm
Posts: 4377
mandarina wrote:
Code:
$ gcc --version
gcc (Ubuntu 4.9.4-2ubuntu1~16.04) 4.9.4


Although the gnu.org docs state that gcc began "fully supporting" c++11 beginning with gcc 4.8.1, it is not until gcc 5.1 that they cite libstdc++ as having full support for c++11. It looks to me like the current version of gcc for Ubuntu 16.04 is >= 5.3.1, so could you update gcc (and probably best all the packages needed by FO) and then try compiling again? (and perhaps double check that you don't for some reason have 'gcc' aliased to an older version, perhaps try running 'gcc-5 --version' to see if you already have a newer gcc installed?)

_________________
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: Thu Aug 17, 2017 5:44 pm 
Offline
Space Krill

Joined: Thu Aug 10, 2017 1:06 pm
Posts: 9
Hello, it seems I already have 5.4 :shock:

Code:
$ gcc-5 --version
gcc-5 (Ubuntu 5.4.1-2ubuntu1~16.04) 5.4.1 20160904


Top
 Profile  
 
PostPosted: Thu Aug 17, 2017 6:16 pm 
Offline
AI Lead, Programmer
User avatar

Joined: Sat Sep 22, 2012 6:25 pm
Posts: 4377
OK well I think we have probably more clearly identified the source of your problem, though I'm still not sure about the full scope of it or just the best way to fix it. if you run
Code:
ls -l /usr/bin/gcc*
I expect that it will probably show that your gcc command is symlinked to the older gcc version, and it could be that the fix might be as simple as
Code:
sudo ln -s /usr/bin/gcc-5 /usr/bin/gcc


But it also seems conceivable that some of your libraries might be symlinked to older versions also, if you don't know of any particular reason to keep the old gcc on your system it might be that the best approach would be to go into your package-manager/software-center (or just use apt) and uninstall the older gcc and then reinstall/repair the newer gcc. But I really don't know.

_________________
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: Sat Aug 19, 2017 7:21 pm 
Offline
Space Krill

Joined: Thu Aug 10, 2017 1:06 pm
Posts: 9
Hello,

Before:
Code:
$ ls -l /usr/bin/gcc*
lrwxrwxrwx 1 root root     21 ago  1 22:17 /usr/bin/gcc -> /etc/alternatives/gcc
-rwxr-xr-x 1 root root 838008 sep  5  2016 /usr/bin/gcc-4.9
-rwxr-xr-x 1 root root 915736 sep  4  2016 /usr/bin/gcc-5

$ ls -l /usr/bin/g++*
lrwxrwxrwx 1 root root     21 ago  1 22:17 /usr/bin/g++ -> /etc/alternatives/g++
-rwxr-xr-x 1 root root 842104 sep  5  2016 /usr/bin/g++-4.9
-rwxr-xr-x 1 root root 919832 sep  4  2016 /usr/bin/g++-5


After:
Code:
$ ls -l /usr/bin/gcc*
lrwxrwxrwx 1 root root     14 ago 19 12:49 /usr/bin/gcc -> /usr/bin/gcc-5
-rwxr-xr-x 1 root root 838008 sep  5  2016 /usr/bin/gcc-4.9
-rwxr-xr-x 1 root root 915736 sep  4  2016 /usr/bin/gcc-5

$ ls -l /usr/bin/g++*
lrwxrwxrwx 1 root root     14 ago 19 12:52 /usr/bin/g++ -> /usr/bin/g++-5
-rwxr-xr-x 1 root root 842104 sep  5  2016 /usr/bin/g++-4.9
-rwxr-xr-x 1 root root 919832 sep  4  2016 /usr/bin/g++-5


And..... PROBLEM SOLVED!!!!

Thank you very much!!!!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 21 posts ]  Go to page Previous  1, 2

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