Page 1 of 1

Trying to build develop branch

Posted: 22 Sep 2017, 15:35
by Belmakor
I've managed to successfully build master / 103.0

Trying to build the current develop, I get the following error when trying to link the spring executable:

Code: Select all

[ 98%] Linking CXX executable ../../../spring
Undefined symbols for architecture x86_64:
  "spring::synced_hash<unsigned long>::operator()(unsigned long const&) const", referenced from:
      LuaOpenGLUtils::ParseTextureImage(lua_State*, LuaMatTexture&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) in LuaOpenGLUtils.cpp.o
      Shader::GLSLProgramObject::Reload(bool, bool) in Shader.cpp.o
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
make[3]: *** [spring] Error 1
make[2]: *** [rts/builds/legacy/CMakeFiles/engine-legacy.dir/all] Error 2
make[1]: *** [rts/builds/CMakeFiles/spring.dir/rule] Error 2
make: *** [spring] Error 2

Re: Trying to build develop branch

Posted: 22 Sep 2017, 16:36
by hokomoko
I've made a small commit that might fix this. Try to pull latest (0654af6)

Re: Trying to build develop branch

Posted: 23 Sep 2017, 00:26
by Belmakor
Pulled. Cleaned. Re-made. Same error.

Re: Trying to build develop branch

Posted: 23 Sep 2017, 20:43
by hokomoko
Belmakor wrote:Pulled. Cleaned. Re-made. Same error.
ok, 2nd attempt, try with latest (7a4aad7)

Re: Trying to build develop branch

Posted: 24 Sep 2017, 07:51
by Belmakor
hokomoko wrote:ok, 2nd attempt, try with latest (7a4aad7)
Awesome, you did it!

Code: Select all

[100%] Built target engine-legacy
Scanning dependencies of target spring-legacy
[100%] Built target spring-legacy
Scanning dependencies of target spring
[100%] Built target spring

Re: Trying to build develop branch

Posted: 26 Sep 2017, 16:26
by MaDDoX
Hey Belmakor, great news! Can you share a dependency list and/or any tricks that you had to use to make it work?

Re: Trying to build develop branch

Posted: 27 Sep 2017, 14:14
by Belmakor
MaDDoX wrote:Hey Belmakor, great news! Can you share a dependency list and/or any tricks that you had to use to make it work?
Ah… I took the script Dark Lord posted as my starting point and worked outwards from there. I remember having to patch a header file in libSDL to get things to compile…

I've got 104.0 building… just need to package into a .app bundle now…

Re: Trying to build develop branch

Posted: 27 Sep 2017, 14:49
by Belmakor
MaDDoX wrote:Hey Belmakor, great news! Can you share a dependency list and/or any tricks that you had to use to make it work?
Not so great news, I'm afraid.

I had built it, but I hadn't tried to run it.

Tried to run it just now. SDL2 can't create the OpenGL 3.0 context, so the launch fails. Investigating…

Code: Select all

============== <User System> ==============
  Spring 104.0
    Build Environment: boost-105800, GNU libstdc++ version 20160726
     Compiler Version: gcc-4.9.4
     Operating System: Darwin 16.7.0 Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-3789.70.16~2/RELEASE_X86_64 x86_64
     Binary Word Size: 64-bit (native)
     Deque Chunk Size: 384
        Process Clock: std::chrono::high_resolution_clock
   Physical CPU Cores: 1
    Logical CPU Cores: 8
============== </User System> ==============
[good_fpu_init] CPU SSE mask: 127, flags:
	SSE 1.0:  1,  SSE 2.0:  1
	SSE 3.0:  1, SSSE 3.0:  1
	SSE 4.1:  1,  SSE 4.2:  1
	SSE 4.0A: 0,  SSE 5.0A: 0
	using streflop SSE FP-math mode, CPU supports SSE instructions
[WatchDogInstall] Installed (HangTimeout: 10sec)
[WatchDog::RegisterThread] registering controls for thread [main]
[GL::CheckAvailableVideoModes] desktop={2560x1440x32bpp@60Hz} current={2560x1440x32bpp@60Hz}
	display=1 modes=12 bounds={x=0, y=0, w=2560, h=1440}
		[ 1] 2560x1440x32bpp@60Hz
		[ 2] 2048x1152x32bpp@60Hz
		[ 4] 1600x900x32bpp@60Hz
		[ 6] 1344x756x32bpp@60Hz
		[ 8] 1280x720x32bpp@60Hz
		[10] 1024x576x32bpp@60Hz
2017-09-27 22:46:28.599 spring[3265:1091770] ApplePersistenceIgnoreState: Existing state will not be touched. New state will be written to /var/folders/jw/rnh_53jn3fn5frkzkly_5lc00000gn/T/com.springrts.Spring.savedState
[GR::CreateSDLWindow] using 0x anti-aliasing and 24-bit depth-buffer (PF="SDL_PIXELFORMAT_ARGB8888")
Warning: [GR::CreateGLContext] created GL2.0 core-context
Warning: [GR::CreateGLContext] created GL2.0 compatibility-context
Warning: [GR::CreateGLContext] created GL2.1 core-context
Warning: [GR::CreateGLContext] created GL2.1 compatibility-context
Warning: [GR::CreateGLContext] created GL3.0 core-context
Warning: [GR::CreateGLContext] error ("Failed creating OpenGL context at version requested") creating GL3.0 compatibility-context
Warning: [GR::CreateGLContext] created GL3.1 core-context
Warning: [GR::CreateGLContext] error ("Failed creating OpenGL context at version requested") creating GL3.1 compatibility-context
Warning: [GR::CreateGLContext] created GL3.2 core-context
Warning: [GR::CreateGLContext] error ("Failed creating OpenGL context at version requested") creating GL3.2 compatibility-context
Warning: [GR::CreateGLContext] created GL3.3 core-context
Warning: [GR::CreateGLContext] error ("Failed creating OpenGL context at version requested") creating GL3.3 compatibility-context
Warning: [GR::CreateGLContext] created GL4.0 core-context
Warning: [GR::CreateGLContext] error ("Failed creating OpenGL context at version requested") creating GL4.0 compatibility-context
Warning: [GR::CreateGLContext] created GL4.1 core-context
Warning: [GR::CreateGLContext] error ("Failed creating OpenGL context at version requested") creating GL4.1 compatibility-context
Warning: [GR::CreateGLContext] error ("Failed creating OpenGL context at version requested") creating GL4.2 core-context
Warning: [GR::CreateGLContext] error ("Failed creating OpenGL context at version requested") creating GL4.2 compatibility-context
Warning: [GR::CreateGLContext] error ("Failed creating OpenGL context at version requested") creating GL4.3 core-context
Warning: [GR::CreateGLContext] error ("Failed creating OpenGL context at version requested") creating GL4.3 compatibility-context
Warning: [GR::CreateGLContext] error ("Failed creating OpenGL context at version requested") creating GL4.4 core-context
Warning: [GR::CreateGLContext] error ("Failed creating OpenGL context at version requested") creating GL4.4 compatibility-context
Warning: [GR::CreateGLContext] error ("Failed creating OpenGL context at version requested") creating GL4.5 core-context
Warning: [GR::CreateGLContext] error ("Failed creating OpenGL context at version requested") creating GL4.5 compatibility-context
Warning: [GR::CreateGLContext] error ("Failed creating OpenGL context at version requested") creating GL4.6 core-context
Warning: [GR::CreateGLContext] error ("Failed creating OpenGL context at version requested") creating GL4.6 compatibility-context
[WatchDog::DeregisterThread] deregistering controls for thread [main]
Error: [ExitSpringProcess] errorMsg="[GR::CreateGLContext] error ("Failed creating OpenGL context at version requested") creating GL3.0 compatibility-context" msgCaption="ERROR" mainThread=1

Re: Trying to build develop branch

Posted: 27 Sep 2017, 16:01
by Belmakor
I've posted over in the development forum, but just a quick summary here:

Mac OS doesn't support creating the required Open GL compatibility context.

If you try to force the code to create the appropriate core context, it creates a context that is the latest version of Open GL on your system - for me, this is Open GL 4.1 (on my 2012 iMac)

This then results in an error "Needed OpenGL extension(s) not found: GL_ARB_texture_env_combine"

So, basically, right now Mac OS users are left in the cold on this release unless there is some kind of solution forthcoming…

Re: Trying to build develop branch

Posted: 27 Sep 2017, 16:43
by Silentwings
That sounds to me like someone ought to improve MacOS.

Re: Trying to build develop branch

Posted: 28 Sep 2017, 04:32
by Belmakor
Silentwings wrote:That sounds to me like someone ought to improve MacOS.
MacOS is excellent. However, it seems Apple has decided that they are better served with developing their Metal APIs rather than continuing to support OpenGL. Annoying for us, though.

Re: Trying to build develop branch

Posted: 28 Sep 2017, 04:53
by MasterBel2
Forced use of OpenGL 2.1, disabled check for minimum context, Spring starts with this error:

Code: Select all

[f=-000001] [Sound]   Devices:
[f=-000001] [Sound]     [Built-in Output]
[f=-000001] [CrashHandler] Error: Segmentation fault: 11 (SIGSEGV) in spring 104.0
[f=-000001] [CrashHandler] Error: Halted Stacktrace for Spring 104.0 using libunwind:
[f=-000001] [Sound] [ISound::Initialize] spawning sound-thread (100.0ms)
[f=-000001] [Sound] [ISound::Initialize] spawning sound-thread (200.4ms)
[f=-000001] [Sound] [ISound::Initialize] spawning sound-thread (300.5ms)
[f=-000001] [Sound] [ISound::Initialize] spawning sound-thread (400.6ms)
[f=-000001] [Sound] [ISound::Initialize] spawning sound-thread (500.7ms)
[f=-000001] [Sound] [ISound::Initialize] spawning sound-thread (600.8ms)
[f=-000001] [Sound] [ISound::Initialize] spawning sound-thread (700.9ms)
[f=-000001] [CrashHandler] Error: [00]   CrashHandler::HaltedStacktrace(std::string const&, __siginfo*, __darwin_ucontext*) (in spring) + 94
[f=-000001] [CrashHandler] Error: [01]   CrashHandler::HandleSignal(int, __siginfo*, void*) (in spring) + 323
[f=-000001] [CrashHandler] Error: [02]   2   libsystem_platform.dylib            0x00007fffc3499b3a _sigtramp + 26
[f=-000001] [CrashHandler] Error: [03]   CSound::GetMaxMonoSources(ALCdevice_struct*, int) (in spring) + 100
[f=-000001] [CrashHandler] Error: [04]   CSound::InitThread(int) (in spring) + 1097
[f=-000001] [CrashHandler] Error: [05]   CSound::UpdateThread(int) (in spring) + 143
[f=-000001] [CrashHandler] Error: [06]   Threading::ThreadStart(std::function<void ()>, std::shared_ptr<Threading::ThreadControls>*, Threading::ThreadControls*) (in spring) + 145
[f=-000001] [CrashHandler] Error: [07]   std::thread::_Impl<std::_Bind_simple<std::_Bind<void (* (std::function<void ()>, std::shared_ptr<Threading::ThreadControls>*, Threading::ThreadControls*))(std::function<void ()>, std::shared_ptr<Threading::ThreadControls>*, Threading::ThreadControls*)> ()> >::_M_run() (in spring) + 48
[f=-000001] [CrashHandler] Error: [08]   0x0001cdab (in libstdc++.6.dylib) + 48
[f=-000001] [CrashHandler] Error: [09]   9   libsystem_pthread.dylib             0x00007fffc34a393b _pthread_body + 180
[f=-000001] [CrashHandler] Error: [10]   10  libsystem_pthread.dylib             0x00007fffc34a3887 _pthread_body + 0
[f=-000001] [WatchDog::DeregisterThread] deregistering controls for thread [audio]
[f=-000001] Error: [ExitSpringProcess] errorMsg="Spring has crashed:
Segmentation fault: 11 (SIGSEGV).
What would it take to get Spring working in a core context rather than a compatability context?

Re: Trying to build develop branch

Posted: 28 Sep 2017, 12:59
by Silentwings
Please avoid using two threads for the same issue, viewtopic.php?f=12&t=36438#p583761. Locked.