Dolphin, the GameCube and Wii emulator - Forums

Full Version: Compilation error (memarena) on Gentoo Linux
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
During compilation of today's dolphin revision, I run into the following error:

[ 56%] Building CXX object Source/Core/Common/CMakeFiles/common.dir/Src/MemArena.cpp.o
In file included from /usr/src/dolphin-emu/Source/Core/Common/Src/MemArena.cpp:20:0:
/usr/src/dolphin-emu/Source/Core/Common/Src/MemArena.h:36:57: error: ânullptrâ was not declared in this scope
/usr/src/dolphin-emu/Source/Core/Common/Src/MemArena.cpp: In member function âvoid* MemArena::CreateView(s64, size_t, void*)â:
/usr/src/dolphin-emu/Source/Core/Common/Src/MemArena.cpp:69:26: error: ânullptrâ was not declared in this scope
/usr/src/dolphin-emu/Source/Core/Common/Src/MemArena.cpp: In function âbool Memory_TryBase(u8*, const MemoryView*, int, u32, MemArena*)â:
/usr/src/dolphin-emu/Source/Core/Common/Src/MemArena.cpp:162:76: error: the default argument for parameter 2 of âvoid* MemArena::CreateView(s64, size_t, void*)â has not yet been parsed
/usr/src/dolphin-emu/Source/Core/Common/Src/MemArena.cpp: In member function âvoid* MemArena::CreateView(s64, size_t, void*)â:
/usr/src/dolphin-emu/Source/Core/Common/Src/MemArena.cpp:82:1: warning: control reaches end of non-void function
make[2]: *** [Source/Core/Common/CMakeFiles/common.dir/Src/MemArena.cpp.o] Error 1
make[1]: *** [Source/Core/Common/CMakeFiles/common.dir/all] Error 2

is this related to the fix on this issue?

http://code.google.com/p/dolphin-emu/iss...il?id=5507

Running on a gentoo amd64 bit (multilib) install, most dependencies installed by emerge.

Which information do I need to provide to solve this problem?

How can I try an older revision? (before the above mentioned patch was applied)

Thanks a lot in advance!

Martin
Your compiler is too old. Update your gcc version.
(07-16-2012, 04:45 AM)delroth Wrote: [ -> ]Your compiler is too old. Update your gcc version.

Thanks, that did solve the problem!

(gcc 4.5.3 to 'testing' gcc 4.6.3)

rufus

Hello there,

I´ve got the same problem:


[ 56%] Building CXX object Source/Core/Common/CMakeFiles/common.dir/Src/MemArena.cpp.o
In file included from /usr/games/dolphin/Source/Core/Common/Src/MemArena.cpp:20:0:
/usr/games/dolphin/Source/Core/Common/Src/MemArena.h:36:57: error: ânullptrâ was not declared in this scope
/usr/games/dolphin/Source/Core/Common/Src/MemArena.cpp: In member function âvoid* MemArena::CreateView(s64, size_t, void*)â:
/usr/games/dolphin/Source/Core/Common/Src/MemArena.cpp:71:26: error: ânullptrâ was not declared in this scope
/usr/games/dolphin/Source/Core/Common/Src/MemArena.cpp: In function âbool Memory_TryBase(u8*, const MemoryView*, int, u32, MemArena*)â:
/usr/games/dolphin/Source/Core/Common/Src/MemArena.cpp:164:76: error: the default argument for parameter 2 of âvoid* MemArena::CreateView(s64, size_t, void*)â has not yet been parsed
/usr/games/dolphin/Source/Core/Common/Src/MemArena.cpp: In member function âvoid* MemArena::CreateView(s64, size_t, void*)â:
/usr/games/dolphin/Source/Core/Common/Src/MemArena.cpp:84:1: warning: control reaches end of non-void function
make[2]: *** [Source/Core/Common/CMakeFiles/common.dir/Src/MemArena.cpp.o] Error 1
make[1]: *** [Source/Core/Common/CMakeFiles/common.dir/all] Error 2
make: *** [all] Error 2

installed Version GCC 4.6.3

I´m installing from git.
Use a C++11 compiler.

rufus

No I´ve got GCC 4.8 alpha and it does...

until this Error:


Linking CXX executable ../../../Binaries/dolphin-emu
`.text._ZN19wxNavigationEnabledI14wxBookCtrlBaseED2Ev' referenced in section `.t ext._ZN19wxNavigationEnabledI14wxBookCtrlBaseED1Ev[_ZThn388_N19wxNavigationEnabl edI14wxBookCtrlBaseED1Ev]' of ../../../Externals/wxWidgets3/libwx.a(auibook.cpp. o): defined in discarded section `.text._ZN19wxNavigationEnabledI14wxBookCtrlBas eED2Ev[_ZN19wxNavigationEnabledI14wxBookCtrlBaseED5Ev]' of ../../../Externals/wx Widgets3/libwx.a(auibook.cpp.o)
`.text._ZN14wxBookCtrlBaseD2Ev' referenced in section `.text._ZN14wxBookCtrlBase D1Ev[_ZThn388_N14wxBookCtrlBaseD1Ev]' of ../../../Externals/wxWidgets3/libwx.a(b ookctrl.cpp.o): defined in discarded section `.text._ZN14wxBookCtrlBaseD2Ev[_ZN1 4wxBookCtrlBaseD5Ev]' of ../../../Externals/wxWidgets3/libwx.a(bookctrl.cpp.o)
`.text._ZN17wxWindowWithItemsI9wxControl15wxItemContainerED2Ev' referenced in se ction `.text._ZN17wxWindowWithItemsI9wxControl15wxItemContainerED1Ev[_ZThn388_N1 7wxWindowWithItemsI9wxControl15wxItemContainerED1Ev]' of ../../../Externals/wxWi dgets3/libwx.a(choiccmn.cpp.o): defined in discarded section `.text._ZN17wxWindo wWithItemsI9wxControl15wxItemContainerED2Ev[_ZN17wxWindowWithItemsI9wxControl15w xItemContainerED5Ev]' of ../../../Externals/wxWidgets3/libwx.a(choiccmn.cpp.o)
`.text._ZN22wxControlWithItemsBaseD2Ev' referenced in section `.text._ZN22wxCont rolWithItemsBaseD1Ev[_ZThn388_N22wxControlWithItemsBaseD1Ev]' of ../../../Extern als/wxWidgets3/libwx.a(choiccmn.cpp.o): defined in discarded section `.text._ZN2 2wxControlWithItemsBaseD2Ev[_ZN22wxControlWithItemsBaseD5Ev]' of ../../../Extern als/wxWidgets3/libwx.a(choiccmn.cpp.o)
`.text._ZN10wxScrolledI7wxPanelED2Ev' referenced in section `.text._ZN10wxScroll edI7wxPanelED1Ev[_ZThn380_N10wxScrolledI7wxPanelED1Ev]' of ../../../Externals/wx Widgets3/libwx.a(dlgcmn.cpp.o): defined in discarded section `.text._ZN10wxScrol ledI7wxPanelED2Ev[_ZN10wxScrolledI7wxPanelED5Ev]' of ../../../Externals/wxWidget s3/libwx.a(dlgcmn.cpp.o)
`.text._ZN14wxGridCellAttrD2Ev' referenced in section `.text._ZN14wxGridCellAttr D1Ev[_ZThn12_N14wxGridCellAttrD1Ev]' of ../../../Externals/wxWidgets3/libwx.a(gr id.cpp.o): defined in discarded section `.text._ZN14wxGridCellAttrD2Ev[_ZN14wxGr idCellAttrD5Ev]' of ../../../Externals/wxWidgets3/libwx.a(grid.cpp.o)
collect2: error: ld returned 1 exit status
make[2]: *** [Binaries/dolphin-emu] Error 1
make[1]: *** [Source/Core/DolphinWX/CMakeFiles/dolphin-emu.dir/all] Error 2
make: *** [all] Error 2
I am getting this exact same error and I have lib disc++ and the latest Gcc. Did anyone figure this one out or do I need to keep looking for a solution?
A cheap solution is to just replace every instance of nullptr in the source code with NULL. Only a handful of files (5 iirc) need to be edited in this way. Grep it, or compile it and wait to see which file throws an error and then change it.

A real solution would be to use a C++ compiler with C++11 support. Make sure you've updated G++ (and/or GCC?)
Yeah that's the thing, gentoo doesn't have an enuild for g++ that I can find, but does have a library that does c++. I will try compiling g++ but from bash it still says g++ not found...

Update: it turns out my system did not compile g++ do to some type of issue I don't understand but was resolved by consistently rebuiling. still getting the error.

Btw I have the last error and not the first one. The error with wxwidgets.

Checked and you can get g++ with gentoo, but not installed on my machine for some reason and can't find the enuild... Might be in dev.
It wasn't clear which error you were getting, so I assumed it was the initial one as mentioned in the OP. The issue seems similar to this one. Since the problem occurs when compiling wxWidgets from Dolphin's Externals, why not try getting wxWidgets from however Gentoo builds it. CMake will see that you have wxWidgets installed and thus will not build it from Externals. It should just link up to the libs you installed yourself. This might bypass the issue you're getting altogether.
Pages: 1 2