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

Enable ARC support for apple/NSURLClient.mm #34

Merged
merged 2 commits into from
Sep 4, 2024
Merged

Conversation

seanmadden
Copy link
Contributor

When trying to build this on an M1 Macbook pro, I encountered the error:

~/I/lua-https ❮❮❮ cmake --build build --target install
-- Configuring done (0.0s)
-- Generating done (0.0s)
-- Build files have been written to: /Users/sean/IdeaProjects/lua-https/build
[  9%] Building CXX object src/CMakeFiles/https-nsurl.dir/apple/NSURLClient.mm.o
/Users/sean/IdeaProjects/lua-https/src/apple/NSURLClient.mm:8:2: error: "ARC is off"
#error "ARC is off"
 ^
1 error generated.
make[2]: *** [src/CMakeFiles/https-nsurl.dir/apple/NSURLClient.mm.o] Error 1
make[1]: *** [src/CMakeFiles/https-nsurl.dir/all] Error 2
make: *** [all] Error 2

After adding ARC support:

~/I/lua-https ❮❮❮ cmake --build build --target install
-- Configuring done (0.0s)
-- Generating done (0.0s)
-- Build files have been written to: /Users/sean/IdeaProjects/lua-https/build
[  9%] Building CXX object src/CMakeFiles/https-nsurl.dir/apple/NSURLClient.mm.o
[ 18%] Linking CXX static library libhttps-nsurl.a
[ 18%] Built target https-nsurl
[ 27%] Building CXX object src/CMakeFiles/https-common.dir/common/HTTPS.cpp.o
[ 36%] Building CXX object src/CMakeFiles/https-common.dir/common/HTTPRequest.cpp.o
[ 45%] Building CXX object src/CMakeFiles/https-common.dir/common/HTTPSClient.cpp.o
[ 54%] Building CXX object src/CMakeFiles/https-common.dir/common/PlaintextConnection.cpp.o
[ 63%] Linking CXX static library libhttps-common.a
[ 63%] Built target https-common
[ 72%] Building CXX object src/CMakeFiles/https-unix-libraryloader.dir/generic/UnixLibraryLoader.cpp.o
[ 81%] Linking CXX static library libhttps-unix-libraryloader.a
[ 81%] Built target https-unix-libraryloader
[ 90%] Building CXX object src/CMakeFiles/https.dir/lua/main.cpp.o
[100%] Linking CXX shared module https.so
[100%] Built target https

@slime73
Copy link
Member

slime73 commented Sep 4, 2024

I'll merge this, but I don't think we'll be guaranteeing any level of support for macOS builds that don't use an xcode project. You can also download prebuilt binaries for each platform via Github Actions.

@slime73 slime73 merged commit 678018b into love2d:main Sep 4, 2024
6 checks passed
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.

2 participants