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

build failed in macOS #4880

Open
yoonjin67 opened this issue Dec 13, 2024 · 2 comments
Open

build failed in macOS #4880

yoonjin67 opened this issue Dec 13, 2024 · 2 comments

Comments

@yoonjin67
Copy link

yoonjin67 commented Dec 13, 2024

Describe your bug report or feature request here

Hello, I am trying to bulid asprite in macOS(M1).

Build command was:

cmake -DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk \ -DLAF_BACKEND=skia \ -DSKIA_DIR=$ASEPRITE_HOME/skia \ -DSKIA_LIBRARY_DIR=$ASEPRITE_HOME/skia/out/Release-arm64 \ -DSKIA_LIBRARY=$ASEPRITE_HOME/skia/out/Release-arm64/libskia.a \ -DPNG_ARM_NEON:STRING=on \ -DCMAKE_OSX_ARCHITECTURES=arm64 \ -G Ninja \ ..

and dir structure:
ASPRITE_HOME
-> asprite
-> build (tried to build in this location(
...
-> skia
...

But this shows error like this:

-----log

CMake Warning at /opt/homebrew/share/cmake/Modules/Platform/Darwin-Initialize.cmake:311 (message):
Ignoring CMAKE_OSX_SYSROOT value:

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk

because the directory does not exist.
Call Stack (most recent call first):
/opt/homebrew/share/cmake/Modules/CMakeSystemSpecificInitialize.cmake:34 (include)
CMakeLists.txt:23 (project)

-- The C compiler identification is AppleClang 16.0.0.16000026
-- The CXX compiler identification is AppleClang 16.0.0.16000026
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - broken
CMake Error at /opt/homebrew/share/cmake/Modules/CMakeTestCCompiler.cmake:67 (message):
The C compiler

"/Library/Developer/CommandLineTools/usr/bin/cc"

is not able to compile a simple test program.

It fails with the following output:

Change Dir: '/Users/leeyunjin/Documents/Aseprite/aseprite/build/CMakeFiles/CMakeScratch/TryCompile-6pvlxv'

Run Build Command(s): /opt/homebrew/bin/ninja -v cmTC_6c688
[1/2] /Library/Developer/CommandLineTools/usr/bin/cc   -arch arm64 -MD -MT CMakeFiles/cmTC_6c688.dir/testCCompiler.c.o -MF CMakeFiles/cmTC_6c688.dir/testCCompiler.c.o.d -o CMakeFiles/cmTC_6c688.dir/testCCompiler.c.o -c /Users/leeyunjin/Documents/Aseprite/aseprite/build/CMakeFiles/CMakeScratch/TryCompile-6pvlxv/testCCompiler.c
[2/2] : && /Library/Developer/CommandLineTools/usr/bin/cc -arch arm64 -Wl,-search_paths_first -Wl,-headerpad_max_install_names  CMakeFiles/cmTC_6c688.dir/testCCompiler.c.o -o cmTC_6c688   && :
FAILED: cmTC_6c688 
: && /Library/Developer/CommandLineTools/usr/bin/cc -arch arm64 -Wl,-search_paths_first -Wl,-headerpad_max_install_names  CMakeFiles/cmTC_6c688.dir/testCCompiler.c.o -o cmTC_6c688   && :
ld: library 'System' not found
cc: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.

CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:23 (project)

-- Configuring incomplete, errors occurred!


Aseprite and System version

  • Aseprite version: version number, installer/portable/Steam/beta/dev/commit-hash
  • System: macOS 15.2, main Dec. 14
@yoonjin67
Copy link
Author

yoonjin67 commented Dec 21, 2024

Now CC error has been resolved, with command

cmake \
-DCMAKE_BUILD_TYPE=RelWithDebInfo
-DCMAKE_OSX_ARCHITECTURES=arm64
-DCMAKE_OSX_DEPLOYMENT_TARGET=15.2
-DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.2.sdk
-DLAF_BACKEND=skia
-DSKIA_DIR=$HOME/deps/skia
-DSKIA_LIBRARY_DIR=$HOME/deps/skia/out/Release-arm64
-DSKIA_LIBRARY=$HOME/deps/skia/out/Release-arm64/libskia.a
-G Ninja
..

@yoonjin67
Copy link
Author

yoonjin67 commented Dec 21, 2024

build error:

'CGDisplayCreateImageForRect' is unavailable: obsoleted in macOS 15.0 - Please use ScreenCaptureKit instead. 111 | CGImageRef image = CGDisplayCreateImageForRect( | ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.2.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h:391:33: note: 'CGDisplayCreateImageForRect' has been explicitly marked unavailable here 391 | CG_EXTERN CGImageRef __nullable CGDisplayCreateImageForRect( | ^ 1 error generated. [280/1553] Building CXX object laf/os/CMakeFiles/laf-os.dir/osx/window.mm.o /Users/leeyunjin/aseprite/laf/os/osx/window.mm:111:23: warning: incompatible pointer types sending 'WindowOSXDelegate *' to parameter of type 'id<NSWindowDelegate> _Nullable' [-Wincompatible-pointer-types] 111 | [self setDelegate:m_delegate]; | ^~~~~~~~~~

seems to be an issue related to macOS 15.0 or upper

Dec 18 latest aseprite. skia latest(current time: dec 23 2024)

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

No branches or pull requests

2 participants