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

devenv with non default apple SDK #1641

Open
vkravets opened this issue Dec 13, 2024 · 1 comment
Open

devenv with non default apple SDK #1641

vkravets opened this issue Dec 13, 2024 · 1 comment
Labels
question Further information is requested

Comments

@vkravets
Copy link

vkravets commented Dec 13, 2024

Trying to write devenv configuration to be able to compile project at macOS and it seems need to use latest and non default SDK

I want to switch and try to compile but always use the default one 10.12

How I can swith to to use non default apple SDK

Using the following devenv.nix

{
  pkgs,
  lib,
  config,
  inputs,
  ...
}:

{
  # https://devenv.sh/basics/
  env.GREET = "devenv";

  # https://devenv.sh/packages/
  packages = with pkgs; [
    git
    cmake
    SDL1
    SDL_mixer
    SDL_image
    SDL_gfx
    yaml-cpp
    zlib

    apple-sdk_15
  ];

  enterShell = ''
    hello
    git --version
  '';
}

And after trying to configure the application build via devenv getting this output:

(devenv) bash-5.2$ cmake -DCMAKE_BUILD_TYPE=Debug -B build .
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.5 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.


-- The C compiler identification is Clang 16.0.6
-- The CXX compiler identification is Clang 16.0.6
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /nix/store/raqax5qp65an4jcwj1bzd5lq589ywpg0-clang-wrapper-16.0.6/bin/clang - 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: /nix/store/raqax5qp65an4jcwj1bzd5lq589ywpg0-clang-wrapper-16.0.6/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test COMPILER_SUPPORTS_CXX17
-- Performing Test COMPILER_SUPPORTS_CXX17 - Success
-- Performing Test COMPILER_SUPPORTS_CXX1Z
-- Performing Test COMPILER_SUPPORTS_CXX1Z - Success
-- Found OpenGL: /nix/store/6fb3yzhx0dlhzjk8s1mwkmn505yqbmmb-apple-sdk-10.12.2/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenGL.framework
-- OpenGL libraries: /nix/store/6fb3yzhx0dlhzjk8s1mwkmn505yqbmmb-apple-sdk-10.12.2/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenGL.framework;/nix/store/6fb3yzhx0dlhzjk8s1mwkmn505yqbmmb-apple-sdk-10.12.2/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenGL.framework
-- Found PkgConfig: /nix/store/d6facgfz0viwyd8r0z2iwmzqvcj4v2fp-pkg-config-wrapper-0.29.2/bin/pkg-config (found version "0.29.2")
-- Checking for module 'sdl'
--   Found sdl, version 1.2.15
-- Checking for module 'zlib'
--   Found zlib, version 1.3.1
-- Checking for module 'SDL_image'
--   Found SDL_image, version 1.2.12
-- Checking for module 'SDL_gfx'
--   Found SDL_gfx, version 2.0.25
-- Checking for module 'SDL_mixer'
--   Found SDL_mixer, version 1.2.12
-- Checking for module 'yaml-cpp'
--   Found yaml-cpp, version 0.8.0
-- PKG_DEPS_LDFLAGS: -L/nix/store/smixpvc34q3cnyxa60g3i5pwm6msakb9-SDL-1.2.15/lib;-lSDLmain;-lSDL;-Wl,-framework,Cocoa;-L/nix/store/m1ycgljx741xjscr110pl022qb181gzd-zlib-1.3.1/lib;-lz;-L/nix/store/smixpvc34q3cnyxa60g3i5pwm6msakb9-SDL-1.2.15/lib;-L/nix/store/l2gc5p08mayg7zwisnj8xydfh1cwxwma-SDL_image-1.2.12/lib;-lSDL_image;-lSDLmain;-lSDL;-Wl,-framework,Cocoa;-L/nix/store/smixpvc34q3cnyxa60g3i5pwm6msakb9-SDL-1.2.15/lib;-L/nix/store/fmn840j9s493331cgd94i1fgqk03gikd-SDL_gfx-2.0.27/lib;-lSDL_gfx;-lSDLmain;-lSDL;-Wl,-framework,Cocoa;-L/nix/store/smixpvc34q3cnyxa60g3i5pwm6msakb9-SDL-1.2.15/lib;-L/nix/store/4bx9g380rnnfya9pqmyk9a1wd8gxsh1s-SDL_mixer-1.2.12/lib;-lSDL_mixer;-lSDLmain;-lSDL;-Wl,-framework,Cocoa;-L/nix/store/zv12qpzvdqb24b5q9x564hmyh49n16k7-yaml-cpp-0.8.0/lib;-lyaml-cpp;/nix/store/6fb3yzhx0dlhzjk8s1mwkmn505yqbmmb-apple-sdk-10.12.2/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenGL.framework;/nix/store/6fb3yzhx0dlhzjk8s1mwkmn505yqbmmb-apple-sdk-10.12.2/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenGL.framework;dl
-- Found Git: /nix/store/y161xdvlji6nxcfx6xs049w3kasgjgcz-git-2.47.0/bin/git (found version "2.47.0")
-- OpenXcom version: 7.15.0-293e5d5e6-2024-12-12-dirty
CMake Warning at docs/CMakeLists.txt:38 (message):
  Doxygen not found.  API documentation generation disabled.


-- Configuring done (12.1s)
-- Generating done (0.2s)

If using the native build witout devenv and nix, getting the latest SDK at the system - 15.2

Any suggestion how to select needed SDK?

@vkravets vkravets added the question Further information is requested label Dec 13, 2024
@vkravets
Copy link
Author

BTW this command works as expected:

$> nix-shell -p SDL1 -p SDL_mixer -p SDL_gfx -p yaml-cpp -p SDL_image -p cmake -p zlib -p apple-sdk_15
$> cmake -DCMAKE_BUILD_TYPE=Debug -B build .
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.5 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.


-- The C compiler identification is Clang 16.0.6
-- The CXX compiler identification is Clang 16.0.6
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /nix/store/raqax5qp65an4jcwj1bzd5lq589ywpg0-clang-wrapper-16.0.6/bin/clang - 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: /nix/store/raqax5qp65an4jcwj1bzd5lq589ywpg0-clang-wrapper-16.0.6/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test COMPILER_SUPPORTS_CXX17
-- Performing Test COMPILER_SUPPORTS_CXX17 - Success
-- Performing Test COMPILER_SUPPORTS_CXX1Z
-- Performing Test COMPILER_SUPPORTS_CXX1Z - Success
-- Found OpenGL: /nix/store/qf890abqzlx0bj1g3sfl5lq0mpsplx5y-apple-sdk-15.0/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenGL.framework
-- OpenGL libraries: /nix/store/qf890abqzlx0bj1g3sfl5lq0mpsplx5y-apple-sdk-15.0/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenGL.framework;/nix/store/qf890abqzlx0bj1g3sfl5lq0mpsplx5y-apple-sdk-15.0/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenGL.framework
-- Found PkgConfig: /nix/store/d6facgfz0viwyd8r0z2iwmzqvcj4v2fp-pkg-config-wrapper-0.29.2/bin/pkg-config (found version "0.29.2")
-- Checking for module 'sdl'
--   Found sdl, version 1.2.15
-- Checking for module 'zlib'
--   Found zlib, version 1.3.1
-- Checking for module 'SDL_image'
--   Found SDL_image, version 1.2.12
-- Checking for module 'SDL_gfx'
--   Found SDL_gfx, version 2.0.25
-- Checking for module 'SDL_mixer'
--   Found SDL_mixer, version 1.2.12
-- Checking for module 'yaml-cpp'
--   Found yaml-cpp, version 0.8.0
-- PKG_DEPS_LDFLAGS: -L/nix/store/smixpvc34q3cnyxa60g3i5pwm6msakb9-SDL-1.2.15/lib;-lSDLmain;-lSDL;-Wl,-framework,Cocoa;-L/nix/store/m1ycgljx741xjscr110pl022qb181gzd-zlib-1.3.1/lib;-lz;-L/nix/store/smixpvc34q3cnyxa60g3i5pwm6msakb9-SDL-1.2.15/lib;-L/nix/store/l2gc5p08mayg7zwisnj8xydfh1cwxwma-SDL_image-1.2.12/lib;-lSDL_image;-lSDLmain;-lSDL;-Wl,-framework,Cocoa;-L/nix/store/smixpvc34q3cnyxa60g3i5pwm6msakb9-SDL-1.2.15/lib;-L/nix/store/fmn840j9s493331cgd94i1fgqk03gikd-SDL_gfx-2.0.27/lib;-lSDL_gfx;-lSDLmain;-lSDL;-Wl,-framework,Cocoa;-L/nix/store/smixpvc34q3cnyxa60g3i5pwm6msakb9-SDL-1.2.15/lib;-L/nix/store/4bx9g380rnnfya9pqmyk9a1wd8gxsh1s-SDL_mixer-1.2.12/lib;-lSDL_mixer;-lSDLmain;-lSDL;-Wl,-framework,Cocoa;-L/nix/store/zv12qpzvdqb24b5q9x564hmyh49n16k7-yaml-cpp-0.8.0/lib;-lyaml-cpp;/nix/store/qf890abqzlx0bj1g3sfl5lq0mpsplx5y-apple-sdk-15.0/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenGL.framework;/nix/store/qf890abqzlx0bj1g3sfl5lq0mpsplx5y-apple-sdk-15.0/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenGL.framework;dl
-- Found Git: /nix/store/y161xdvlji6nxcfx6xs049w3kasgjgcz-git-2.47.0/bin/git (found version "2.47.0")
-- OpenXcom version: 7.15.0-d7d960493-2024-12-04
CMake Warning at docs/CMakeLists.txt:38 (message):
  Doxygen not found.  API documentation generation disabled.


-- Configuring done (14.9s)
-- Generating done (0.2s)

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

No branches or pull requests

1 participant