Closed FelixKLG closed 2 years ago
Looking into this.
It doesn't seem like its currently possible to compile for ARM64 with github actions: https://github.com/actions/runner-images/issues/5631
Unfortunately that means I don't actually have any way to (legally) compile & distribute for MacOS ARM64 architecture since I don't have access to a machine with that architecture. You can compile it yourself on that machine, however.
related: https://www.pantsbuild.org/v2.12/docs/ci-for-macos-on-arm64
I have cloned the repo locally however, I am not too familiar with C++ (and GCC/make) which means I have no real idea how to work around this error.
https://app.warp.dev/block/EgkrtquOeZicqYPl7R1eaO
I CD'd into the repo, and ran make.
The log that you posted mentioned a failure to resolve a symbol from /usr/lib/libstdc++.6.dylib
; that likely means that you're missing the libstdc++6
library. Do you have that installed and in the correct location?
Assuming that your device's commandline is similar to debian linux, run this command (or some variation of it) sudo apt-get install libstdc++6 -y
from a terminal and try it again.
I have cloned the repo locally however, I am not too familiar with C++ (and GCC/make) which means I have no real idea how to work around this error.
https://app.warp.dev/block/EgkrtquOeZicqYPl7R1eaO
I CD'd into the repo, and ran make.
Follow this guide to build from source: https://github.com/radj307/ARRCON/wiki/Building-from-Source Judging by the rest of your log though, I'm going to fix the noted compilation errors in case that doesn't work.
As of https://github.com/radj307/ARRCON/commit/a97abfbd0978ec5136c9d9eefe34641b9644d7fb this should be fixed, with the following changes:
APPLE
is True
, the executable is built using explicit static linking.libstdc++6
not being included by default on newer M1-based macOS systems.libstdc++6
package to build it.Please let me know if you're still having issues.
running make spits out the following errors: https://app.warp.dev/block/8overa0nrOVmK8YxpMzW4Y
I deleted my local clone and re-cloned it so this is on the latest commit.
I've implemented a fix for those errors as well in https://github.com/radj307/ARRCON/commit/efe4feb9982386da85dfee2547fe9f54e83b0890; sorry for the delay.
Let me know if any more issues spring up.
Compilation went further than last time however, I still ran into the same issue and then some other ones. https://app.warp.dev/block/HudSsAadAIN7cGeOqS3N9H
What version of gcc do you have? (Run gcc --version
)
Also, can you confirm that the original bug still occurs when libstdc++6
is installed?
GCC/G++: Apple clang version 14.0.0 (clang-1400.0.29.202) Target: arm64-apple-darwin22.1.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
I also somewhat under the belief that libstdc++6 is installed. (Due to my XCode install)
You aren't actually using GCC, you're using Apple clang (it doesn't have all of the features from C++20 implemented yet).
ARRCON is written using C++20, so you'll need a compiler that supports that (gcc version 10 or newer).
Here's a guide on installing gcc/g++ with xcode: https://www.cyberciti.biz/faq/howto-apple-mac-os-x-install-gcc-compiler/
That guide is for OS X Mountain Lion but hopefully it'll be transferable.
Regarding libstdc++
; Apple clang's implementation uses the libc++
standard library instead of the usual libstdc++
provided by gcc
.
Installing gcc 10 or newer should fix the problem.
I'm sorry I can't be of more help since I don't own a mac to test this on.
I'm unfamiliar with apple's implementation of make
, but that isn't the process that I use to build ARRCON in my build script so I figured I would elaborate on exactly what commands to run:
All of these commands are pulled directly from the CI script that compiles & creates github releases:
https://github.com/radj307/ARRCON/blob/main/.github/workflows/GenerateRelease.yml
The parts that are important for macOS can be summarized as follows:
(Requires cmake v3.22 or newer, ninja, & gcc-10 or newer)
git clone https://github.com/radj307/ARRCON && cd ARRCON
git submodule update --init --recursive
cmake -B "build" -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=g++ -G Ninja
cmake --build "build" ---config Release
The executable is then retrieved from build/ARRCON/ARRCON
I am able to report after installing and linking GCC and G++ manually I was able to compile the code successfully.
A little run-down on the steps I had to take incase anyone else has similar issues:
xcode-select --install
)brew install gcc
)brew install ninja
)brew install cmake
)Glad to hear that you got it working, and many thanks for the step-by-step guide!
The issue of required libraries not being included on new versions of macOS has been continued here: #12
# System Information
# Bug Description
Expectation: Application to run
Occured: Symbol not found error
Terminal Output: https://app.warp.dev/block/gWnBoFiwufKHpgeHIxsPOB
# Reproduction Steps
Download latest release on MacOS (M1 Max) Unzip and run executable Oberseve Error
I feel this error is likely caused by the new Apple M1 Arm64 architecture.