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

CI for Mac is broken #21

Open
TarCV opened this issue May 3, 2020 · 5 comments
Open

CI for Mac is broken #21

TarCV opened this issue May 3, 2020 · 5 comments
Labels
good first issue Good for newcomers

Comments

@TarCV
Copy link
Owner

TarCV commented May 3, 2020

The current build script for Mac doesn't work in CI:

set -ex

#touch Brewfile
#echo 'brew "cmake"' >> Brewfile
#echo 'brew "llvm"' >> Brewfile
#brew bundle
brew install cmake || true
brew install llvm || true

export CC=$(brew --prefix llvm)/bin/clang
export CXX=$(brew --prefix llvm)/bin/clang++
export LD_LIBRARY_PATH=$(brew --prefix llvm)/lib

cmake -DCMAKE_POLICY_DEFAULT_CMP0056=NEW -DCMAKE_CXX_FLAGS="-v -stdlib=libc++ -I$(brew --prefix llvm)/include -Wl,-rpath,$LD_LIBRARY_PATH -L$LD_LIBRARY_PATH" .
make

https://dev.azure.com/tarcv/botc/_build/results?buildId=81&view=logs&j=a4f1cc8a-0ccb-5e90-36f4-f06f41d0ce59&t=ca6b548a-c0fd-5f27-176c-c59ec27fafde

@TarCV TarCV added the good first issue Good for newcomers label May 3, 2020
@ghost
Copy link

ghost commented May 3, 2020

Apparently that -lc++fs flag I removed a few commits back fixes this issue, according to this question on Stack Overflow

@TarCV
Copy link
Owner Author

TarCV commented May 3, 2020

Mac OS is a weird platform in terms of building C/C++ programs. CLang/LLVM that comes with Mac OS/XCode is old, so I install a newer one with homebrew. Probably it's just CLang picking wrong standard library implementation or may be CLang package in homebrew is just old.

@ghost
Copy link

ghost commented May 3, 2020

It uses version 9 (Ubuntu has version 10 and compiles normally), it just isn't shipped with the standard libraries apparently.

Edit: just compiled with clang 9 on Ubuntu. Mac OS' clang definitely doesn't come with the entire standards library.

@TarCV
Copy link
Owner Author

TarCV commented May 3, 2020

From https://formulae.brew.sh/formula/llvm it looks like LDFLAGS were changed. So may be updating them will fix CI, I'll try it later.

@TarCV
Copy link
Owner Author

TarCV commented May 6, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant