Dolphin, the GameCube and Wii emulator - Forums

Full Version: Looking for help compiling on Ubuntu 12.04 x86
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

jrodder

Hello. So, I haven't been able to find a precompiled binary for the newest version of Dolphin on my platform. I have been trying to compile it, and now have an issue I believe with the linking. I had to compile the newest version of cmake for it to even configure, and then on my first compile attempt it got halfway before telling me my GCC was too old. I then upgraded to GCC version 4.8, and it compiles almost to the end before it fails with this:

[ 98%] Building CXX object Source/Core/DolphinWX/CMakeFiles/dolphin-emu.dir/X11Utils.cpp.o
Linking CXX executable ../../../Binaries/dolphin-emu
`.text._ZN19wxNavigationEnabledI14wxBookCtrlBaseED2Ev' referenced in section `.text._ZN19wxNavigationEnabledI14wxBookCtrlBaseED1Ev[_ZN19wxNavigationEnabledI14wxBookCtrlBaseED1Ev]' of ../../../Externals/wxWidgets3/libwx.a(auibook.cpp.o): defined in discarded section `.text._ZN19wxNavigationEnabledI14wxBookCtrlBaseED2Ev[_ZN19wxNavigationEnabledI14wxBookCtrlBaseED5Ev]' of ../../../Externals/wxWidgets3/libwx.a(auibook.cpp.o)
`.text._ZN17wxWindowWithItemsI9wxControl15wxItemContainerED2Ev' referenced in section `.text._ZN17wxWindowWithItemsI9wxControl15wxItemContainerED1Ev[_ZN17wxWindowWithItemsI9wxControl15wxItemContainerED1Ev]' of ../../../Externals/wxWidgets3/libwx.a(choiccmn.cpp.o): defined in discarded section `.text._ZN17wxWindowWithItemsI9wxControl15wxItemContainerED2Ev[_ZN17wxWindowWithItemsI9wxControl15wxItemContainerED5Ev]' of ../../../Externals/wxWidgets3/libwx.a(choiccmn.cpp.o)
`.text._ZN22wxControlWithItemsBaseD2Ev' referenced in section `.text._ZN22wxControlWithItemsBaseD1Ev[_ZN22wxControlWithItemsBaseD1Ev]' of ../../../Externals/wxWidgets3/libwx.a(choiccmn.cpp.o): defined in discarded section `.text._ZN22wxControlWithItemsBaseD2Ev[_ZN22wxControlWithItemsBaseD5Ev]' of ../../../Externals/wxWidgets3/libwx.a(choiccmn.cpp.o)
`.text._ZN10wxScrolledI7wxPanelED2Ev' referenced in section `.text._ZN10wxScrolledI7wxPanelED1Ev[_ZN10wxScrolledI7wxPanelED1Ev]' of ../../../Externals/wxWidgets3/libwx.a(dlgcmn.cpp.o): defined in discarded section `.text._ZN10wxScrolledI7wxPanelED2Ev[_ZN10wxScrolledI7wxPanelED5Ev]' of ../../../Externals/wxWidgets3/libwx.a(dlgcmn.cpp.o)
`.text._ZN14wxGridCellAttrD2Ev' referenced in section `.text._ZN14wxGridCellAttrD1Ev[_ZN14wxGridCellAttrD1Ev]' of ../../../Externals/wxWidgets3/libwx.a(grid.cpp.o): defined in discarded section `.text._ZN14wxGridCellAttrD2Ev[_ZN14wxGridCellAttrD5Ev]' 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

Can anyone help me out with this? Or maybe there's a compiled version out there I missed?
Have you tried running make clean before recompiling (or downloading the git repo again with a clean slate)? I think I ran across similar linking issues a while ago.
I don't think CMake makes a "make clean" target. git clean -qdf is what you'd want to use anyway, as it gets rid of all the CMake-generated files that also need to be regenerated with certain environment changes (e.g. any freshly-installed system packages for stuff in Externals).

jrodder

(04-08-2014, 07:55 AM)pauldacheez Wrote: [ -> ]I don't think CMake makes a "make clean" target. git clean -qdf is what you'd want to use anyway, as it gets rid of all the CMake-generated files that also need to be regenerated with certain environment changes (e.g. any freshly-installed system packages for stuff in Externals).

Ok I might still need some help, thanks so much for the quick replies. I tried to git clean -qdf, executed without error. Ran cmake-gui and created the new makefile, and tried a new compile. I ended up with the same final error. I will try blowing everything out, and download a fresh git and compile directory, see if I can get it to roll that way.

**edit**

Comment by jgsww...@gmail.com, Apr 1 (5 days ago)

Update the dependencies required; I kept getting it failing on wXwidgets because although the wiki says you need 2.8, you really need 3.x.

-----

Looks like that's where I am failing too, I'll try to update that as well. (from the comments here: http://code.google.com/p/dolphin-emu/wiki/Linux_Build)

****EDIT 2****

Ok, blew away the old git and redid, this time compiled without error. Now Zelda completey crashes, but seemed to be running faster. Now at least it looks like a matter of tweaking and playing, at least. Thanks!
@pauldacheez - Pretty sure I've run make clean several times when compiling Dolphin. Pretty sure I've done it on Gekko too way back when. This is not for removing CMake generated files (which is not what I was suggesting in the above post btw), but the actual files made by make. It does remove all of the binary files, which seemed to be where I was getting linker errors (at the very end, literally the last step when compiling). Stopping make forcibly or by encountering an error required make to start all over again some months ago, but upgrading some stuff on my end changed that. Still, for a time make clean was the only thing that could get things compiling for me if make stopped or hit an error during compilation.
jrodder: I keep forgetting that I'm the only one that doesn't do the mkdir Build && cd Build thing – I just cd ~/dolphin-emu/ && cmake . && make -j4. :P I should've said to rm -rf Build/*, sorry.

shonumi: Ah, well, I guess make clean does do something. I've never used it, I've always lazily done git clean -qdf (on OS X where I don't use a separate Build folder) or rm -rf Build/* (on Linux where I did use a separate Build folder). I've never felt any need to preserve cmake's generated files – I just edit CMakeLists.txt if I need to change some compile-time options.
If I want to start clean, I usually just rm -rf build/ myself too, but in the case I described above, GCC/G++ were pretty outdated and the source of my issue, so when it started borking out I saw no reason to mess with CMake's files.