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

docs: add missing prerequisites: brotli, boost, libseccomp #2569

Merged
merged 2 commits into from Dec 13, 2018
Merged

docs: add missing prerequisites: brotli, boost, libseccomp #2569

merged 2 commits into from Dec 13, 2018

Conversation

veprbl
Copy link
Member

@veprbl veprbl commented Dec 10, 2018

The list of prerequisites is incomplete. This should add the missing ones. The minimal supported version of "boost" is determined by trying different versions until nix compiled successfully.

This would need a backport to the maintenance branch.

Fixes: #2568

@veprbl veprbl changed the title docs: add missing prerequisites: brotli, boost docs: add missing prerequisites: brotli, boost, libseccomp Dec 10, 2018
@endgame
Copy link
Contributor

endgame commented Dec 11, 2018

Great work. If you want to be specific about which parts of boost nix needs to build, it's only the context library, everything else is header-only. (build boost with --wtih-libraries=context).

@@ -77,6 +87,15 @@
modify the parser or when you are building from the Git
repository.</para></listitem>

<listitem><para>The <literal>libseccomp</literal> is used to provide
Copy link
Contributor

Choose a reason for hiding this comment

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

I didn't realise this was optional. I just assumed it was required because configure bombs out if you don't have it.

@veprbl
Copy link
Member Author

veprbl commented Dec 11, 2018

@endgame
For me, it builds with boost that was built --with-libraries="", so it seems like context2 library is header-only. I don't think it's worth to go to such details and describe this in the manual because this might get outdated because of the changes either in nix or in boost.

@endgame
Copy link
Contributor

endgame commented Dec 11, 2018

Interesting. I had a link failure on aarch64. I agree with your point, regardless.

@veprbl
Copy link
Member Author

veprbl commented Dec 11, 2018

@endgame
Copy link
Contributor

endgame commented Dec 12, 2018

Strange. AFAICT it's unconditionally linking against -lboost_context at

libutil_LDFLAGS = $(LIBLZMA_LIBS) -lbz2 -pthread $(OPENSSL_LIBS) $(LIBBROTLI_LIBS) -lboost_context

Do you want that script run on amd64 or aarch64?

@veprbl
Copy link
Member Author

veprbl commented Dec 12, 2018

@endgame
I found this line too, but somehow that didn't look suspicious to me at the time. Turns out --with-libraries="" builds all boost libraries... So this is why my build didn't fail. I poked it a bit more and it seems like the minimal working boost configuration currently is --with-libraries=context.

@@ -52,6 +58,10 @@
pass the flag <option>--enable-gc</option> to
<command>configure</command>.</para></listitem>

<listitem><para>The <literal>boost</literal> library of version
1.61.0 or higher. It can be obtained from the official web site
Copy link
Member

Choose a reason for hiding this comment

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

I believe it should be higher due to some boost::coroutine2 bug in previous releases. Maybe 1.65 but I'm not sure.

Copy link
Member Author

Choose a reason for hiding this comment

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

@edolstra
I guess you are referring to

#if BOOST_VERSION >= 106300 && BOOST_VERSION < 106600
#error Coroutines are broken in this version of Boost!
#endif

It singles out 1.63.x, 1.64.x, 1.65.x to exclude specifically. A test can be done a following way:

with import <nixpkgs> {};

map (boost: nix.override { inherit boost; })
[
  #boost155
  #boost159
  #boost160 ld: symbol(s) not found for architecture x86_64
  #boost161 not in nixpkgs, but works if you add it
  boost162
  #boost163 assert fails in serialise.cc
  #boost164 assert fails in serialise.cc
  #boost165 assert fails in serialise.cc
  boost166
  boost167
  boost168
]

All four build for me (including installCheckPhase) just fine. I can change the minimum version to 1.66, if you think that is needed.

Copy link
Member

Choose a reason for hiding this comment

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

Thanks for investigating :-)

@endgame
Copy link
Contributor

endgame commented Dec 12, 2018

@veprbl Well, that explains it. Do you still need me to run that script, and if so, on which arch?

@veprbl
Copy link
Member Author

veprbl commented Dec 12, 2018

@endgame I think we are good. You were right about boost_context being a dependency, thanks for pointing that out. Also I learn that coroutine2 used to be a shared library in older versions of boost.

@edolstra edolstra merged commit c37e6d7 into NixOS:master Dec 13, 2018
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.

None yet

3 participants