Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try to fix GLEW build #90

Merged
merged 1 commit into from
May 19, 2022
Merged

Try to fix GLEW build #90

merged 1 commit into from
May 19, 2022

Conversation

o01eg
Copy link
Contributor

@o01eg o01eg commented May 17, 2022

Should help with GLEW build issue #67 and #88 (comment) but ensuring pass correct architecture value.

@o01eg o01eg requested a review from geoffthemedio May 17, 2022 11:59
@o01eg o01eg self-assigned this May 17, 2022
@o01eg o01eg mentioned this pull request May 17, 2022
@geoffthemedio
Copy link
Member

No change as far as I can tell. glew.lib is still 740 KB and I get linker errors building GG.

SDK build log attached... GLEW stuff starts at line 1978 Creating directories for 'glew'...
sdk_master_build.txt

@o01eg
Copy link
Contributor Author

o01eg commented May 17, 2022

FreeType chooses compiler:

  Performing configure step for 'freetype'
  CMake Deprecation Warning at CMakeLists.txt:78 (cmake_minimum_required):
    Compatibility with CMake < 2.8.12 will be removed from a future version of
    CMake.
  
    Update the VERSION argument <min> value or use a ...<max> suffix to tell
    CMake that the project does not need compatibility with older versions.
  
  
  -- Selecting Windows SDK version 10.0.22000.0 to target Windows 10.0.19043.
  -- The C compiler identification is MSVC 19.29.30137.0
  -- The CXX compiler identification is MSVC 19.29.30137.0
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x86/cl.exe - skipped
  -- Detecting C compile features
  -- Detecting C compile features - done
  -- Detecting CXX compiler ABI info
  -- Detecting CXX compiler ABI info - done
  -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x86/cl.exe - skipped
  -- Detecting CXX compile features
  -- Detecting CXX compile features - done

GLEW chooses compiler:

  Performing configure step for 'glew'
  -- Selecting Windows SDK version 10.0.22000.0 to target Windows 10.0.19043.
  -- The C compiler identification is MSVC 19.29.30137.0
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
  -- Detecting C compile features
  -- Detecting C compile features - done

@geoffthemedio
Copy link
Member

CMakeCache.txt still has /machine:x64, as does the .sln

@o01eg
Copy link
Contributor Author

o01eg commented May 17, 2022

Could you upload entire CMakeCache.txt?

@geoffthemedio
Copy link
Member

from build\glew-prefix\src\glew-build
CMakeCache.txt

from build
CMakeCache.txt

@o01eg
Copy link
Contributor Author

o01eg commented May 17, 2022

Toolset and platform aren't passed.

//Name of generator.
CMAKE_GENERATOR:INTERNAL=Visual Studio 16 2019
//Generator instance identifier.
CMAKE_GENERATOR_INSTANCE:INTERNAL=C:/Program Files (x86)/Microsoft Visual Studio/2019/Community
//Name of generator platform.
CMAKE_GENERATOR_PLATFORM:INTERNAL=
//Name of generator toolset.
CMAKE_GENERATOR_TOOLSET:INTERNAL=
//Name of generator.
CMAKE_GENERATOR:INTERNAL=Visual Studio 16 2019
//Generator instance identifier.
CMAKE_GENERATOR_INSTANCE:INTERNAL=C:/Program Files (x86)/Microsoft Visual Studio/2019/Community
//Name of generator platform.
CMAKE_GENERATOR_PLATFORM:INTERNAL=Win32
//Name of generator toolset.
CMAKE_GENERATOR_TOOLSET:INTERNAL=v142

Does it have some verbosity settings?

@o01eg
Copy link
Contributor Author

o01eg commented May 17, 2022

I also add commit to set those values differently

@geoffthemedio
Copy link
Member

Does it have some verbosity settings?

Not sure what "it" is.

@geoffthemedio
Copy link
Member

No change in glew.lib size or GG link errors.

@geoffthemedio
Copy link
Member

...
CMakeCache.txt
CMakeCache.txt

@o01eg
Copy link
Contributor Author

o01eg commented May 18, 2022

Raised minimum CMake version to 3.7 and use SOURCE_SUBDIR option for CMake external project. As I seen in build logs it correctly choose compiler https://github.com/o01eg/freeorion-sdk/runs/6485341097?check_suite_focus=true

@o01eg o01eg requested a review from Vezzra May 18, 2022 09:43
@o01eg
Copy link
Contributor Author

o01eg commented May 18, 2022

@Vezzra Does MacOS have CMake 3.7?

@geoffthemedio
Copy link
Member

Looks like CMake 3.7 was released near the end of 2018.

@geoffthemedio
Copy link
Member

geoffthemedio commented May 18, 2022

I maybe wasn't actually using the modified versions you were uploading... I did the clone using the URL from the "Code" drop-button at the top of the page for the branch, but I think that defaults to your master branch, not the modified branch for the pull request (ie. the branch whose URL I was at). So possibly one of the earlier fixes could have worked?

@o01eg
Copy link
Contributor Author

o01eg commented May 18, 2022

I suppose latest solution with SOURCE_SUBDIR is cleaner

Requires 3.7 as GLEW contains CMake project not in root directory
@o01eg
Copy link
Contributor Author

o01eg commented May 18, 2022

Correct compiler now:

2022-05-18T12:09:40.6785810Z   Performing configure step for 'glew'
2022-05-18T12:09:41.9943305Z   -- The C compiler identification is MSVC 19.16.27048.0
2022-05-18T12:09:42.0269121Z   -- Detecting C compiler ABI info
2022-05-18T12:09:42.9053504Z   -- Detecting C compiler ABI info - done
2022-05-18T12:09:42.9076628Z   -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.16.27023/bin/HostX64/x86/cl.exe - skipped

@geoffthemedio
Copy link
Member

FreeOrion builds also work.

@o01eg
Copy link
Contributor Author

o01eg commented May 19, 2022

Oh, FreeOrion itself requires CMake 3.8 so I suppose MacOS definitely build this SDK too.

@o01eg o01eg merged commit 4c0beec into freeorion:master May 19, 2022
@o01eg o01eg deleted the fix-glew-arch branch May 19, 2022 05:58
@Vezzra
Copy link
Member

Vezzra commented May 20, 2022

@o01eg

Does MacOS have CMake 3.7?

$ cmake --version
cmake version 3.14.5

Yes 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants