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

Alpine musl libc build issue #1558

Closed
jpe42 opened this issue Oct 18, 2016 · 17 comments
Closed

Alpine musl libc build issue #1558

jpe42 opened this issue Oct 18, 2016 · 17 comments
Assignees
Labels
Milestone

Comments

@jpe42
Copy link

@jpe42 jpe42 commented Oct 18, 2016

Because of the build flag -Werror in zcutil/build.sh which causes warnings to be treated as errors, the build fails on alpine linux because:

  • #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h>
  • #warning redirecting incorrect #include <sys/poll.h> to <poll.h>

I'm not sure what the best way to resolve this issue is, just hoping it might be obvious to someone else.

I've started a docker file at github.com/jamespedwards42/alpine-zcash/blob/master/Dockerfile if anyone wants to give it a go.

tail of the failed build logs: pastebin.com/raw/0irE64dt

@daira daira self-assigned this Oct 18, 2016
@daira
Copy link
Contributor

@daira daira commented Oct 18, 2016

Testing a fix now.

@daira daira added the A-build label Oct 18, 2016
@daira
Copy link
Contributor

@daira daira commented Oct 18, 2016

Please test using a new checkout with this git clone command (instead of the git clone/checkout in the Beta Guide):

git clone -b 1558.alpine-linux-fixes https://github.com/daira/zcash.git
@jpe42
Copy link
Author

@jpe42 jpe42 commented Oct 18, 2016

One more straggler, but it looks like that is going to get it.

build logs: pastebin.com/BV09fHTc

@daira
Copy link
Contributor

@daira daira commented Oct 18, 2016

I'm a bit confused because the fix should already have caught that one. What is at line 61 of /usr/src/zcash/depends/x86_64-unknown-linux-gnu/include/boost/asio/detail/socket_types.hpp? Also, did you perform the clone in a new directory? (Just switching to that branch in an existing checkout may not work.)

@jpe42
Copy link
Author

@jpe42 jpe42 commented Oct 18, 2016

It is from a docker build, so it is always a completely fresh filesystem.

@jpe42
Copy link
Author

@jpe42 jpe42 commented Oct 18, 2016

Heres is what I ran:

RUN mkdir -p /usr/src \
  && cd /usr/src \
  && git clone -b 1558.alpine-linux-fixes https://github.com/daira/zcash.git \
  && cd zcash \ 
  && /bin/bash ./zcutil/fetch-params.sh

RUN cd /usr/src/zcash \
  && /bin/bash ./zcutil/build.sh -j4
@jpe42
Copy link
Author

@jpe42 jpe42 commented Oct 18, 2016

Running again without any previous layer caching just to double check.

@jpe42
Copy link
Author

@jpe42 jpe42 commented Oct 18, 2016

no luck, same warning/error.

@daira
Copy link
Contributor

@daira daira commented Oct 18, 2016

And what is at line 61 of /usr/src/zcash/depends/x86_64-unknown-linux-gnu/include/boost/asio/detail/socket_types.hpp after the failed build?

If it still says #include <sys/poll.h>, can you link the full build output?

@jpe42
Copy link
Author

@jpe42 jpe42 commented Oct 18, 2016

Unfortunately, I cannot mount to my local filesystem to see the files inside the docker build image. See related docker issues:

  1. moby/moby/issues/17745: Feature request: Mount volume when run docker build
  2. moby/moby/issues/14080: build time only -v option

I will run through the build on an Ubuntu server sometime tonight (+12-16 hours) to check it out.

Here is a complete build log. The page might take a bit to load:
hub.docker.com/r/jamespedwards42/alpine-zcash

@daira
Copy link
Contributor

@daira daira commented Oct 19, 2016

The build copies include_poll.patch to the right place, and then doesn't apply it, even though it does apply deprecated_auto_ptr.patch. (Search for Preprocessing boost in the build log.) I'm flummoxed. Can anyone see why this isn't working?

@daira
Copy link
Contributor

@daira daira commented Oct 19, 2016

@jamespedwards42 Please try again now. (Not sure this will work; I changed the include_poll.patch format to match the other patch, but I don't see why it would make a difference.)

@daira daira added the M-has-pr label Oct 19, 2016
@str4d
Copy link
Contributor

@str4d str4d commented Oct 19, 2016

@daira oh, you need to manually add the patch commands. See the existing patch command in define $(package)_preprocess_cmds.

@jpe42
Copy link
Author

@jpe42 jpe42 commented Oct 19, 2016

@daira
Copy link
Contributor

@daira daira commented Oct 19, 2016

Should be fixed now, please try again.

@jpe42
Copy link
Author

@jpe42 jpe42 commented Oct 20, 2016

Thank you @daira! The build succeeded, I'm working through the missing runtime dependencies that need to be installed. Hopefully, I will have this wrapped up after tomorrow night. Once everything is stable I will have it default to the latest release tag instead of your repo/branch. Started a readme for how to use it here: github.com/jamespedwards42/alpine-zcash

@daira
Copy link
Contributor

@daira daira commented Oct 20, 2016

Assuming fixed by #1559. Please reopen if that's not the case.

@daira daira closed this Oct 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.