• Login
  • Register
  • Dolphin Forums
  • Home
  • FAQ
  • Download
  • Wiki
  • Code


Dolphin, the GameCube and Wii emulator - Forums › Dolphin Emulator Discussion and Support › Support v
« Previous 1 ... 276 277 278 279 280 ... 1177 Next »

Unable to build from source [linux]
View New Posts | View Today's Posts

Pages (2): 1 2 Next »
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Thread Modes
Unable to build from source [linux]
10-16-2017, 11:50 PM
#1
LeGoat Offline
Trying to get it to work!
**
Posts: 8
Threads: 1
Joined: Oct 2017
Hey all, my first post-- please excuse any mistakes.

I'm on OpenSUSE Linux whose repositories do not have a dolphin package, so I have to build from source using cmake and make.
I was able to use cmake and have now gotten the make file. But, make fails to..., well, make.

This is the last step it gets to before aborting:
Code:
[ 60%] Built target audiocommon
[ 60%] Building CXX object Source/Core/Common/CMakeFiles/common.dir/GL/GLInterface/GLInterface.cpp.o
/home/[redacted]/Desktop/DOLPHIN/dolphin-emu/Source/Core/Common/GL/GLInterface/GLInterface.cpp: In function ‘std::unique_ptr<cInterfaceBase> HostGL_CreateGLInterface()’:
/home/[redacted]/Desktop/DOLPHIN/dolphin-emu/Source/Core/Common/GL/GLInterface/GLInterface.cpp:39:10: error: ‘make_unique’ is not a member of ‘std’
  return std::make_unique<cInterfaceGLX>();
         ^
/home/[redacted]/Desktop/DOLPHIN/dolphin-emu/Source/Core/Common/GL/GLInterface/GLInterface.cpp:39:40: error: expected primary-expression before ‘>’ token
  return std::make_unique<cInterfaceGLX>();
                                       ^
/home/[redacted]/Desktop/DOLPHIN/dolphin-emu/Source/Core/Common/GL/GLInterface/GLInterface.cpp:39:42: error: expected primary-expression before ‘)’ token
  return std::make_unique<cInterfaceGLX>();
                                         ^
/home/[redacted]/Desktop/DOLPHIN/dolphin-emu/Source/Core/Common/GL/GLInterface/GLInterface.cpp:46:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
Source/Core/Common/CMakeFiles/common.dir/build.make:1088: recipe for target 'Source/Core/Common/CMakeFiles/common.dir/GL/GLInterface/GLInterface.cpp.o' failed
make[2]: *** [Source/Core/Common/CMakeFiles/common.dir/GL/GLInterface/GLInterface.cpp.o] Error 1
CMakeFiles/Makefile2:1088: recipe for target 'Source/Core/Common/CMakeFiles/common.dir/all' failed
make[1]: *** [Source/Core/Common/CMakeFiles/common.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2


So, from my understanding, all the errors stem from the compiler not understanding what make_unique is supposed to be. I found that it's a newer (c++14?) feature. But, no matter what I do: adding compiler flags to the Makefile instructions for "common" to set the standard to c++14, c++11, "c++0x", or setting the compiler to specifically use gcc-5 instead of gcc, a combination of two, and invoking all this on the command line, it makes no difference.

Any help would be appreciated!

Thanks.
Find
Reply
10-17-2017, 12:52 AM
#2
Neui Offline
Quiet
***
Posts: 173
Threads: 1
Joined: Apr 2015
Try appending "-std=c++14" (without ") to CMAKE_CXX_FLAGS in the CMakeCache.txt files instead in the makefiles directly.

(I can't find any mention of CXX_STANDARD or CMAKE_CXX_STANDARD that should set those flags.. I'll look if I do an PR about it)
Find
Reply
10-17-2017, 01:36 AM
#3
LeGoat Offline
Trying to get it to work!
**
Posts: 8
Threads: 1
Joined: Oct 2017
(10-17-2017, 12:52 AM)Neui Wrote: Try appending "-std=c++14" (without ") to CMAKE_CXX_FLAGS in the CMakeCache.txt files instead in the makefiles directly.

(I can't find any mention of CXX_STANDARD or CMAKE_CXX_STANDARD that should set those flags.. I'll look if I do an PR about it)

Hey, thanks for the response. For whatever reason it's saying it's an invalid option. This doesn't happen when I tell it to use c++11, so my guess is it might be a gcc issue. Must I explicitly tell it to use gcc-5 and not just gcc? Where would I do this if it's the case?
Find
Reply
10-17-2017, 01:42 AM
#4
Jack Frost Offline
aka. BhaaL
**********
Developers (Some Administrators and Super Moderators)
Posts: 506
Threads: 3
Joined: Oct 2009
Sounds a little like your GCC/G++ packages are really outdated. And yes, you should potentially tell it to use gcc-5 instead (which is the minimum we require)
Find
Reply
10-17-2017, 01:48 AM (This post was last modified: 10-17-2017, 01:49 AM by LeGoat. Edit Reason: used too and as well in the same phrase lol )
#5
LeGoat Offline
Trying to get it to work!
**
Posts: 8
Threads: 1
Joined: Oct 2017
(10-17-2017, 01:42 AM)Jack Frost Wrote: Sounds a little like your GCC/G++ packages are really outdated. And yes, you should potentially tell it to use gcc-5 instead (which is the minimum we require)

Thanks to you as well. My distro came with 4.8.1. I did install gcc-5 but they are currently happily co existing on my computer. How do I instruct make to use gcc-5?
Find
Reply
10-17-2017, 01:54 AM
#6
Neui Offline
Quiet
***
Posts: 173
Threads: 1
Joined: Apr 2015
In the very same CMakeCache.txt file, change the value of CMAKE_CXX_COMPILER to g++-5 and CMAKE_C_COMPILER to gcc-5.
Find
Reply
10-17-2017, 02:25 AM
#7
Jack Frost Offline
aka. BhaaL
**********
Developers (Some Administrators and Super Moderators)
Posts: 506
Threads: 3
Joined: Oct 2009
You should just use -D or set CC/CXX instead: https://cmake.org/Wiki/CMake_FAQ#How_do_I_use_a_different_compiler.3F
Find
Reply
10-17-2017, 02:33 AM (This post was last modified: 10-17-2017, 02:45 AM by LeGoat. Edit Reason: updated after doing more research on problem )
#8
LeGoat Offline
Trying to get it to work!
**
Posts: 8
Threads: 1
Joined: Oct 2017
(10-17-2017, 01:42 AM)Jack Frost Wrote: Sounds a little like your GCC/G++ packages are really outdated. And yes, you should potentially tell it to use gcc-5 instead (which is the minimum we require)

(10-17-2017, 01:54 AM)Neui Wrote: In the very same CMakeCache.txt file, change the value of CMAKE_CXX_COMPILER to g++-5 and CMAKE_C_COMPILER to gcc-5.

Awesome! Thanks, this worked and I have successfully built the program however I'm now bugged by a seemingly related issue when i try to run it:
Code:
Fatal Error: Mismatch between the program and library build versions detected.
The library used 3.0 (wchar_t,compiler with C++ ABI 1002,STL containers,compatible with 2.8),
and your program used 3.0 (wchar_t,compiler with C++ ABI 1009,STL containers,compatible with 2.8).
Aborted (core dumped)

Thoughts??

Thanks for your time thus far: Greatly appreciated.

Upon further research it seems this is wxWidgets fault. Can I give it instructions to set the version in the Makefile or one of the other files?
Find
Reply
10-17-2017, 02:32 PM
#9
JonnyH Offline
Shameless AMD shill
**********
Developers (Some Administrators and Super Moderators)
Posts: 701
Threads: 0
Joined: May 2017
(10-17-2017, 02:33 AM)LeGoat Wrote: Awesome! Thanks, this worked and I have successfully built the program however I'm now bugged by a seemingly related issue when i try to run it:

Code:
Fatal Error: Mismatch between the program and library build versions detected.
The library used 3.0 (wchar_t,compiler with C++ ABI 1002,STL containers,compatible with 2.8),
and your program used 3.0 (wchar_t,compiler with C++ ABI 1009,STL containers,compatible with 2.8).
Aborted (core dumped)

Thoughts??

Thanks for your time thus far: Greatly appreciated.

Upon further research it seems this is wxWidgets fault. Can I give it instructions to set the version in the Makefile or one of the other files?

For c++11 (and beyond) GCC had to change the interface ("ABI") it uses for c++, so I assume that the wxwidgets library on your system was build by the system version of 4.8, which was before that change.

It effectively means that *all* C++ libraries and objects must be build using the same abi - so either you need to rebuild versions of all the dependencies that use c++ with gcc-5 and use those, or update your distro so it was build by a newer compiler in the first place.
Find
Reply
10-17-2017, 02:45 PM
#10
LeGoat Offline
Trying to get it to work!
**
Posts: 8
Threads: 1
Joined: Oct 2017
(10-17-2017, 02:32 PM)JonnyH Wrote: For c++11 (and beyond) GCC had to change the interface ("ABI") it uses for c++, so I assume that the wxwidgets library on your system was build by the system version of 4.8, which was before that change.

It effectively means that *all* C++ libraries and objects must be build using the same abi - so either you need to rebuild versions of all the dependencies that use c++ with gcc-5 and use those, or update your distro so it was build by a newer compiler in the first place.

Thanks for the response. 
My distro has had only one update since I installed it and from what I can tell it ships with the same version of gcc, but I will try upgrading it. 
When I installed gcc-5, the package description said it included the gcc-5 versions of all the libraries, so shouldn't it be using them by default when I tell it to make using gcc-5? Is there a way I can do so if it is not the case? Or, shall I have to rebuild all the libraries?
As a side note, I tried installing wxWidgets again from the Zypper/YaST repo. Did not help. 
Find
Reply
« Next Oldest | Next Newest »
Pages (2): 1 2 Next »


  • View a Printable Version
  • Subscribe to this thread
Forum Jump:


Users browsing this thread: 1 Guest(s)



Powered By MyBB | Theme by Fragma

Linear Mode
Threaded Mode