[Ohrrpgce] SVN: teeemcee/8451 Link in stdc++compat.cpp on Unix. We appear to be compatible with gcc si

James Paige Bob at hamsterrepublic.com
Mon Feb 27 07:52:57 PST 2017


I tried with the most recent fixes on my Ubuntu 14.04 box, and it is still
failing to compile

james at ghostorchid:~/Dropbox/src/ohr/wip$ scons
scons: Reading SConscript files ...
Using target: linux  arch: x86  gcc: gcc  gcctarget: x86_64-linux-gnu
fbcversion: 1050
scons: done reading SConscript files.
scons: Building targets ...
Generating ver.txt
g++ -o build/lib/stdc++compat.o -c -O3 -DFBCVERSION=1050 -m32
-mpreferred-stack-boundary=2 -mno-sse --std=c++0x -g -Wall
-Wno-non-virtual-dtor -D_GLIBCXX_USE_CXX11_ABI=0 lib/stdc++compat.cpp
lib/stdc++compat.cpp:195:5: error: 'runtime_error' does not name a type
     runtime_error::runtime_error(char const* s)
     ^
scons: *** [build/lib/stdc++compat.o] Error 1
scons: building terminated because of errors.



On Sun, Feb 26, 2017 at 8:50 PM, Ralph Versteegen <teeemcee at gmail.com>
wrote:

>
>
> On 27 February 2017 at 17:29, Ralph Versteegen <teeemcee at gmail.com> wrote:
>
>>
>>
>> On 27 February 2017 at 16:45, James Paige <Bob at hamsterrepublic.com>
>> wrote:
>>
>>> On Sun, Feb 26, 2017 at 6:58 PM, Ralph Versteegen <teeemcee at gmail.com>
>>> wrote:
>>>
>>>> What gcc version do you have?
>>>>
>>>> I looked up the runtime_error error on ixrat and found that it was
>>>> because that constructor was only introduced in gcc 5.0 while jessie
>>>> apparently has 4.9, but I don't understand why you got this error on ubuntu
>>>> 16.04. It looks like that ubuntu version might default to gcc 5.3, but it's
>>>> quite easy to install a different version. I'm using gcc 5.4 myself without
>>>> trouble, and don't know why 5.3 would have a problem.
>>>>
>>>
>>> ixrat is indeed running gcc 4.9.2
>>> My Ubuntu 16.04 box (palsink) is running gcc 5.4.0
>>> I can try installing a different version of gcc and see what happens,
>>> but I have run out of time for this weekend, so I'll have to try that
>>> later.
>>>
>>
>> I worked it out, this is due to a difference in ABI which apparently
>> depends on how the distro maintainers configured gcc. There was a bug on
>> Mozilla bugzilla which has the explanation and fix:
>> https://bugzilla.mozilla.org/show_bug.cgi?id=1153109
>> https://gcc.gnu.org/onlinedocs/libstdc%2B%2B/manual/using_dual_abi.html
>>
>
> Turns out it's actually Ubuntu that goes with the default setting, and
> Slackware which configs gcc with --with-default-libstdcxx-abi=g
> cc4-compatible
>
> It occurs to me that setting _GLIBCXX_USE_CXX11_ABI=0 could cause crashes
> if its not the system default and if linking to any C++ library, such as
> audiere. Basically this means that if we wanted to distribute a
> music_native linux build either we couldn't be compatible with gcc < 5, or
> we have to include libaudiere.so... but we would have to do that anyway
> because audiere isn't really available anywhere.
>
>
>>
>>
>>
>>
>>>
>>>
>>>
>>>> stdc++compat.cpp doesn't need to be linked in when not using portable=1
>>>> anyway, but I'd like to see if I can fix this problem before taking the
>>>> easy way out.
>>>>
>>>>
>>>> On 27 February 2017 at 14:28, James Paige <Bob at hamsterrepublic.com>
>>>> wrote:
>>>>
>>>>> Starting with this revision, I cannot compile at all on my Ubuntu
>>>>> 16.04 box:
>>>>>
>>>>> james at breq:~/Dropbox/src/ohr/wip$ scons arch=64
>>>>> scons: Reading SConscript files ...
>>>>> Using target: linux  arch: x86_64  gcc: gcc  gcctarget:
>>>>> x86_64-linux-gnu  fbcversion: 1050
>>>>> scons: done reading SConscript files.
>>>>> scons: Building targets ...
>>>>> Generating ver.txt
>>>>> fbc -c build/savegame.rbas.bas -o build/savegame.rbas.o -mt -exx -g -O
>>>>> 2 -target linux -arch x86_64 -gen gcc -Wc -Wno-maybe-uninitialized,-fno-omit-frame-pointer
>>>>> -d DATAFILES='"/usr/share/games/ohrrpgce"' -d IS_GAME -m game
>>>>> fbc -c build/common.rbas.bas -o build/game-common.rbas.o -mt -exx -g
>>>>> -O 2 -target linux -arch x86_64 -gen gcc -Wc -Wno-maybe-uninitialized,-fno-omit-frame-pointer
>>>>> -d DATAFILES='"/usr/share/games/ohrrpgce"' -d IS_GAME -m game
>>>>> fbc -c build/loading.rbas.bas -o build/game-loading.rbas.o -mt -exx -g
>>>>> -O 2 -target linux -arch x86_64 -gen gcc -Wc -Wno-maybe-uninitialized,-fno-omit-frame-pointer
>>>>> -d DATAFILES='"/usr/share/games/ohrrpgce"' -d IS_GAME -m game
>>>>> g++ -o build/lib/stdc++compat.o -c -O3 -DFBCVERSION=1050 -m64
>>>>> --std=c++0x -g -Wall -Wno-non-virtual-dtor lib/stdc++compat.cpp
>>>>> lib/stdc++compat.cpp:46:86: error: no member function
>>>>> '_S_construct_aux_2' declared in 'std::__cxx11::basic_string<char>'
>>>>>      template char *string::_S_construct_aux_2(size_type, char,
>>>>> allocator<char> const&);
>>>>>
>>>>> ^
>>>>> lib/stdc++compat.cpp:48:96: error: no member function
>>>>> '_S_construct_aux_2' declared in 'std::__cxx11::basic_string<wchar_t>'
>>>>>      template wchar_t *wstring::_S_construct_aux_2(size_type,
>>>>> wchar_t, allocator<wchar_t> const&);
>>>>>
>>>>>                                     ^
>>>>> scons: *** [build/lib/stdc++compat.o] Error 1
>>>>> scons: building terminated because of errors.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Sun, Feb 26, 2017 at 6:08 AM, <subversion at hamsterrepublic.com>
>>>>> wrote:
>>>>>
>>>>>> teeemcee
>>>>>> 2017-02-26 06:08:11 -0800 (Sun, 26 Feb 2017)
>>>>>> 94
>>>>>> Link in stdc++compat.cpp on Unix. We appear to be compatible with gcc
>>>>>> since 3.4 now... really?
>>>>>> ---
>>>>>> U   wip/SConscript
>>>>>> U   wip/lib/stdc++compat.cpp
>>>>>> U   wip/ohrbuild.py
>>>>>> _______________________________________________
>>>>>> Ohrrpgce mailing list
>>>>>> ohrrpgce at lists.motherhamster.org
>>>>>> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherh
>>>>>> amster.org
>>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Ohrrpgce mailing list
>>>>> ohrrpgce at lists.motherhamster.org
>>>>> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
>>>>>
>>>>>
>>>>
>>>> _______________________________________________
>>>> Ohrrpgce mailing list
>>>> ohrrpgce at lists.motherhamster.org
>>>> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
>>>>
>>>>
>>>
>>> _______________________________________________
>>> Ohrrpgce mailing list
>>> ohrrpgce at lists.motherhamster.org
>>> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
>>>
>>>
>>
>
> _______________________________________________
> Ohrrpgce mailing list
> ohrrpgce at lists.motherhamster.org
> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.motherhamster.org/pipermail/ohrrpgce-motherhamster.org/attachments/20170227/8f1bbe24/attachment-0001.htm>


More information about the Ohrrpgce mailing list