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

Support Building on OpenBSD #1910

Merged
merged 1 commit into from
Aug 22, 2019

Conversation

crypto-ape
Copy link
Contributor

@crypto-ape crypto-ape commented Aug 14, 2019

Hey Monkeys!

I had some interest in being able to run a BitShares node on OpenBSD.

This PR with this bitshares-fc PR contains changes allowing to successfully build the code base under OpenBSD.

The work is not done yet, because, at least for me, the compiled executables crash (with a segmentation fault) on calling some boost functions (hastily done some call tracing).

I plan to investigate further. So far, I wanted to share and close the work already done.

Ape out!

tests/performance/performance_tests.cpp Outdated Show resolved Hide resolved
CMakeLists.txt Outdated Show resolved Hide resolved
@crypto-ape crypto-ape force-pushed the support_building_on_open_bsd branch from 8819b80 to 9d0c0c7 Compare August 16, 2019 19:41
@pmconrad
Copy link
Contributor

Interesting. I wonder why these changes are necessary. OpenBSD uses Clang, right? Which boost version?

@abitmore abitmore added this to the 4.1.0 - Feature Release milestone Aug 17, 2019
@crypto-ape
Copy link
Contributor Author

Yes, OpenBSD switched to clang few years ago.
That's why a lot of ifdefs are shared with Mac (Apple), they are actually if clang clauses. I did compile the code on Linux with clang, and as far as I remember, it was okay with the default ifdef branch. I can't explain it right now.

OpenBSD requires some modifications to boost to compile correctly, so I finally used the upstream version, 1.66.0p4 if I'm not mistaken.

@@ -34,9 +34,22 @@ using boost::multiprecision::uint256_t;

static fc::uint128_t to_capped_128( const uint256_t& t )
{
#if defined(__OpenBSD__)
const fc::uint128_t max = std::numeric_limits<fc::uint128_t>::max();
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this is not an OpenBSD problem but a Clang problem. @nathanhourt ran into it as well. He said it can be fixed by enabling compiler extensions in CMakeLists.txt.

Copy link
Member

Choose a reason for hiding this comment

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

See #1941

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Exactly. The change is now gone.

@crypto-ape crypto-ape force-pushed the support_building_on_open_bsd branch from 9d0c0c7 to 26cebe7 Compare August 21, 2019 15:16
Copy link
Contributor

@pmconrad pmconrad left a comment

Choose a reason for hiding this comment

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

Looks good. Haven't tested on OpenBSD.
Thanks!

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.

3 participants