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

Boost fiber fix #47537 #47540

Closed
wants to merge 2 commits into from
Closed

Boost fiber fix #47537 #47540

wants to merge 2 commits into from

Conversation

tex
Copy link
Contributor

@tex tex commented Sep 29, 2018

include/boost/fiber/detail/context_spmc_queue.hpp:1:1: error: stray ‘\357’ in program

Motivation for this change

Fix #47537

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

include/boost/fiber/detail/context_spmc_queue.hpp:1:1: error: stray ‘\357’ in program
@xeji
Copy link
Contributor

xeji commented Sep 30, 2018

Thank you for spotting this bug. However, a first analysis (see #47537 (comment)) indicates that the header file is broken during the build process, which may be a result of a more general bug.

So instead of fixing the symptom in postFixup like you do here, let's find and fix the underlying issue causing it. A purely symptomatic fix should only be a last resort.

I advise against merging this unless we really understand the cause of the problem.

Copy link
Contributor

@xeji xeji left a comment

Choose a reason for hiding this comment

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

Find and try to fix underlying issue first.
(not really a requested change but a marker not to merge this for now)

Copy link
Contributor

@xeji xeji left a comment

Choose a reason for hiding this comment

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

Thank you, after looking at the issue I can confirm this is the appropriate fix, and there seems to be no more general underlying issue.

@@ -171,7 +171,7 @@ stdenv.mkDerivation {
postFixup = ''
# Make boost header paths relative so that they are not runtime dependencies
cd "$dev" && find include \( -name '*.hpp' -or -name '*.h' -or -name '*.ipp' \) \
-exec sed '1i#line 1 "{}"' -i '{}' \;
-exec sed 's/^\xef\xbb\xbf//;1i#line 1 "{}"' -i '{}' \;
Copy link
Contributor

Choose a reason for hiding this comment

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

Nitpick just to be safe: can you please change this into 1s/^\xef\xbb\xbf//; to make sure it only applies to line 1, as the BOM can only be in line 1.

@xeji
Copy link
Contributor

xeji commented Oct 1, 2018

@GrahamcOfBorg build boost

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: boost

Partial log (click to expand)

shrinking /nix/store/f1b4cmb9qdypkj0j5gxai3lpa8znd93p-boost-1.67_0/lib/libboost_atomic.so.1.67.0
strip is /nix/store/y4ymnvgxygpq05h03kyzbj572zmh6zla-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/f1b4cmb9qdypkj0j5gxai3lpa8znd93p-boost-1.67_0/lib
patching script interpreter paths in /nix/store/f1b4cmb9qdypkj0j5gxai3lpa8znd93p-boost-1.67_0
checking for references to /build in /nix/store/f1b4cmb9qdypkj0j5gxai3lpa8znd93p-boost-1.67_0...
shrinking RPATHs of ELF executables and libraries in /nix/store/d64vw3ij6cwmlzgcz1h01djq6ka0yy2r-boost-1.67_0-dev
strip is /nix/store/y4ymnvgxygpq05h03kyzbj572zmh6zla-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/d64vw3ij6cwmlzgcz1h01djq6ka0yy2r-boost-1.67_0-dev
checking for references to /build in /nix/store/d64vw3ij6cwmlzgcz1h01djq6ka0yy2r-boost-1.67_0-dev...
/nix/store/f1b4cmb9qdypkj0j5gxai3lpa8znd93p-boost-1.67_0

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: boost

Partial log (click to expand)

/nix/store/ri5hqj06idnl0ag80bbbmxv0p27yvag5-boost-1.67_0/lib/libboost_system.dylib: fixing dylib
/nix/store/ri5hqj06idnl0ag80bbbmxv0p27yvag5-boost-1.67_0/lib/libboost_thread.dylib: fixing dylib
/nix/store/ri5hqj06idnl0ag80bbbmxv0p27yvag5-boost-1.67_0/lib/libboost_timer.dylib: fixing dylib
/nix/store/ri5hqj06idnl0ag80bbbmxv0p27yvag5-boost-1.67_0/lib/libboost_type_erasure.dylib: fixing dylib
/nix/store/ri5hqj06idnl0ag80bbbmxv0p27yvag5-boost-1.67_0/lib/libboost_unit_test_framework.dylib: fixing dylib
/nix/store/ri5hqj06idnl0ag80bbbmxv0p27yvag5-boost-1.67_0/lib/libboost_wave.dylib: fixing dylib
/nix/store/ri5hqj06idnl0ag80bbbmxv0p27yvag5-boost-1.67_0/lib/libboost_wserialization.dylib: fixing dylib
strip is /nix/store/4w56qihlrddav67p7d1vy5qkyayaqw11-cctools-binutils-darwin/bin/strip
patching script interpreter paths in /nix/store/5kwcacm5qz4ya0l5m4j6qkwgjcrd9xk0-boost-1.67_0-dev
/nix/store/ri5hqj06idnl0ag80bbbmxv0p27yvag5-boost-1.67_0

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: boost

Partial log (click to expand)

shrinking /nix/store/c93iiccfki12bl3pz2dzi687mwq41757-boost-1.67_0/lib/libboost_iostreams.so.1.67.0
strip is /nix/store/h0lbngpv6ln56hjj59i6l77vxq25flbz-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/c93iiccfki12bl3pz2dzi687mwq41757-boost-1.67_0/lib
patching script interpreter paths in /nix/store/c93iiccfki12bl3pz2dzi687mwq41757-boost-1.67_0
checking for references to /build in /nix/store/c93iiccfki12bl3pz2dzi687mwq41757-boost-1.67_0...
shrinking RPATHs of ELF executables and libraries in /nix/store/hqgnf81zq9hmxwbb8acl2vpi1s4pn7cc-boost-1.67_0-dev
strip is /nix/store/h0lbngpv6ln56hjj59i6l77vxq25flbz-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/hqgnf81zq9hmxwbb8acl2vpi1s4pn7cc-boost-1.67_0-dev
checking for references to /build in /nix/store/hqgnf81zq9hmxwbb8acl2vpi1s4pn7cc-boost-1.67_0-dev...
/nix/store/c93iiccfki12bl3pz2dzi687mwq41757-boost-1.67_0

xeji pushed a commit that referenced this pull request Oct 1, 2018
include/boost/fiber/detail/context_spmc_queue.hpp:1:1: error: stray ‘\357’ in program
caused by a leftover UTF-8 Byte Order Mark
@xeji
Copy link
Contributor

xeji commented Oct 1, 2018

Thank you!
Since this PR causes a mass rebuild it should go to the staging branch first.
I have picked your fix to staging and squashed the two commits into one: da48130.
It will end up in master in about 1-2 weeks with the next staging iteration.

@xeji xeji closed this Oct 1, 2018
dtzWill pushed a commit to dtzWill/nixpkgs that referenced this pull request Oct 11, 2018
include/boost/fiber/detail/context_spmc_queue.hpp:1:1: error: stray ‘\357’ in program
caused by a leftover UTF-8 Byte Order Mark
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants