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

Added FreeBSD build instructions #690

Merged
merged 2 commits into from
Jul 19, 2022
Merged

Conversation

vladtr
Copy link
Contributor

@vladtr vladtr commented Jul 18, 2022

Added FreeBSD build instruction into docs. Its officially not supported, however it builds/runs/passes tests perfectly and instructions can be a useful for BSD users.

llvm11 \
pkgconf
```
and perform the build (please note that FreeBSD 13.1 comes with llvm13 by default so you should provide clang11 options to cmake):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LLVM should actually not be required on freebsd; it's only required on Linux. The code that uses LLVM in mandel isn't clutched in on anything but Linux

mandel/CMakeLists.txt

Lines 72 to 76 in b5132e5

if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux" AND "${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64")
list(APPEND EOSIO_WASM_RUNTIMES eos-vm-oc)
# EOS VM OC requires LLVM, but move the check up here to a central location so that the EosioTester.cmakes
# can be created with the exact version found
find_package(LLVM REQUIRED CONFIG)

Did you try just using the latest default clang that comes with freebsd? Historically clang12+ w/ GNU's libstdc++ (how typically configured on Linux) breaks due to still unfixed defect in EOS VM:

macOS seems to build fine with the latest Xcode which makes me wonder if latest clang may work with LLVM's libc++ on freebsd?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By default vanilla installation of FreeBSD 13.1 comes with clang 13 and compilation fails with exact issue you pointed out :) So unfortunately clang needs to be rolled back there. FreeBSD port "llvm11" is just the easiest and most trouble-free way to install working clang11...

@spoonincode spoonincode merged commit 919aa87 into main Jul 19, 2022
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