Open mavam opened 2 years ago
Thanks!
The first error is probably fixable by replacing the line with:
std::cout << " [PASS] " << test.path() << std::endl;
The second error is about a missing boost library.
I don't have a MacOS OS, but I tried to build it using github action here: https://github.com/ArthurSonzogni/Diagon/runs/4610501448?check_suite_focus=true Same errors.
If you want, you can try to make it work, and let me know if you managed to do it. Here is the github action: https://github.com/ArthurSonzogni/Diagon/blob/0d4a89e5139226d3f619b8d1a5d75632f3045f82/.github/workflows/continuous-integration.yaml#L41-L46
The part installing boost on MacOS https://github.com/ArthurSonzogni/Diagon/blob/0d4a89e5139226d3f619b8d1a5d75632f3045f82/.github/workflows/continuous-integration.yaml#L77-L79
The first error is probably fixable by replacing the line with
Yes, I just checked that.
The reason why Boost is not found is because Diagon doesn't use find_package
in the CMakeLists.txt to properly setup the dependencies. If that'd be there, CMake would find my existing Boost installation in /usr/local. Fixing this would probably get us macOS support for free.
Indeed!
If you want to give it a try on MacOS, I would merge the PR. Otherwise, I will try myself this week end.
Any update on this? I tried fixing it to use test.path()
but then got this error. Not a C++ dev so I'm a little stuck.
Consolidate compiler generated dependencies of target input_output_test
[100%] Linking CXX executable diagon
[100%] Linking CXX executable input_output_test
clang: warning: argument unused during compilation: '-static-libstdc++' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-static-libstdc++' [-Wunused-command-line-argument]
ld: library not found for -lc++fs
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [diagon-1.0.127] Error 1
make[1]: *** [CMakeFiles/diagon.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
ld: library not found for -lc++fs
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [input_output_test-1.0.127] Error 1
make[1]: *** [CMakeFiles/input_output_test.dir/all] Error 2
make: *** [all] Error 2
I recently merged @iwahbe PR https://github.com/ArthurSonzogni/Diagon/pull/42
This fixes the test.path()
among other.
Seems there has been some progress š
Were you able to successfully build it for macOS?
My PR was brittle to upgrades in GCC version. See comments https://github.com/ArthurSonzogni/Diagon/pull/42#issuecomment-1227204706 and https://github.com/ArthurSonzogni/Diagon/pull/42#issuecomment-1227207944
That should do it.
I was unable to build with the latest code and saw a link error due to stdc++fs. Removing this from the link targets allowed me to build on a mac m1. My changes are here: https://github.com/ArthurSonzogni/Diagon/pull/48
Update:
I am now able to build on the CI on Linux, Windows, Mac, WebAssembly: https://github.com/ArthurSonzogni/Diagon/actions/runs/3509142920
I still need to tweak it a bit, so that I can extract the binaries produced from Mac and Windows.
It's done: https://github.com/ArthurSonzogni/Diagon/releases/tag/v1.0.139
In the release, there are 3 assets for MacOS:
I don't have a Mac. Could someone try one of them to confirm this is working on Mac?
What are the next step to publish it to homebrew?
Running the binary does not work on my system. Building from source for v1.0.139 does work. So good job there.
Here is what I saw when running the binary.
$ sw_vers
ProductName: macOS
ProductVersion: 12.4
BuildVersion: 21F79
$ shasum -a 1 diagon-1.0.139-Darwin.zip
af623cb2f90872d135510c42907ab72111a34897 diagon-1.0.139-Darwin.zip
$ unzip diagon-1.0.139-Darwin.zip
Archive: diagon-1.0.139-Darwin.zip
creating: diagon-1.0.139-Darwin/bin/
inflating: diagon-1.0.139-Darwin/bin/diagon-1.0.139
linking: diagon-1.0.139-Darwin/bin/diagon -> diagon-1.0.139
finishing deferred symbolic links:
$ xattr -d com.apple.quarantine ./diagon-1.0.139-Darwin/bin/diagon
$ ls /opt/homebrew/opt/boost/lib | grep graph
libboost_graph.dylib
libboost_graph-mt.dylib
libboost_graph-mt.a
libboost_graph.a
$ echo "a -> b: c" | ./diagon-1.0.139-Darwin/bin/diagon Sequence
dyld[86982]: Library not loaded: /usr/local/opt/boost/lib/libboost_graph-mt.dylib
Referenced from: /Users/chriselie/Downloads/diagon-1.0.139-Darwin/bin/diagon-1.0.139
Reason: tried: '/usr/local/opt/libboost_graph-mt.dylib' (no such file), '/usr/local/opt/boost/lib/libboost_graph-mt.dylib' (no such file), '/usr/local/lib/libboost_graph-mt.dylib' (no such file), '/usr/lib/libboost_graph-mt.dylib' (no such file)
[1] 86981 done echo "a -> b: c" |
86982 abort ./diagon-1.0.139-Darwin/bin/diagon Sequence
It could be a problem with my setup, but I have boost installed via homebrew and it seems to work fine when building from source š¤·
One problem I see straight away is that homebrew now installs everything under /opt/homebrew
and the boost
prefix is /opt/homebrew/opt/boost
not /usr/local/opt/boost
.
Thanks @RobertAudi & @celie56
I tried to link against boost statically. Unfortunately, there was a bug in Boost for MacOS: https://github.com/Homebrew/homebrew-core/issues/67427
Instead, I removed the "GraphPlanar" translator from MacOS for the moment.
Does it fix the problem?
New builds:
Those links appear to be broken.
$ wget https://github.com/ArthurSonzogni/Diagon/releases/download/untagged-0910bf0242436e9ed24c/diagon-1.0.139-Darwin.zip
--2022-12-04 16:15:52-- https://github.com/ArthurSonzogni/Diagon/releases/download/untagged-0910bf0242436e9ed24c/diagon-1.0.139-Darwin.zip
Resolving github.com (github.com)... 140.82.114.3
Connecting to github.com (github.com)|140.82.114.3|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2022-12-04 16:15:52 ERROR 404: Not Found.
I removed the previous draft prerelease. It is no more available. However the last links should be working.
@ArthurSonzogni The links to the builds you linked in your previous comment are no longer available, or at least I get a 404 š
Okay. It looks like I need to publish the release to make the link to work.
This is now fixed @RobertAudi and @celie56. See the links from: https://github.com/ArthurSonzogni/Diagon/releases/tag/v1.0.139
@ArthurSonzogni The new binary seems to work perfectly on my M1 š
Yep. Works on my machine too š Thanks for the fix.
Awesome! Thanks for checking!
Double-confirming: same here! š
I think the final swoop would be getting this now into Homebrew, which means writing a PR for https://github.com/Homebrew/homebrew-core.
Looks like it's been a while so I'd also like to lend my upvote to the imminent homebrew
support.
Excuse everyone: how do I run it on Mac (M1) from the .dmg? All I get is something in bin classified as "document" so cannot really run it.
Hey @fakkoweb! I'd guess everyone just copied the executable from the mounted directory to the desired location (and ejecting it, ofc) ā /usr/local/bin
works well for me.
Do you see no binary in the mounted dir?
Great project! It would be really nice if we had support on macOS via Homebrew, allowing users to install Diagon via
brew install diagon
.Is there anything that would prevent a build on OSX in principle? I tried to build it on OSX Big Sur 11.6 with Apple Clang 13, but no success with a first shot: