Alpine musl libc build issue #1558

Closed
jamespedwards42 opened this Issue Oct 18, 2016 · 17 comments

Comments

Projects
None yet
3 participants
@jamespedwards42

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

This comment has been minimized.

Show comment
Hide comment
@daira

daira Oct 18, 2016

Contributor

Testing a fix now.

Contributor

daira commented Oct 18, 2016

Testing a fix now.

@daira daira added the build label Oct 18, 2016

@daira

This comment has been minimized.

Show comment
Hide comment
@daira

daira Oct 18, 2016

Contributor

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
Contributor

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
@jamespedwards42

This comment has been minimized.

Show comment
Hide comment
@jamespedwards42

jamespedwards42 Oct 18, 2016

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

build logs: pastebin.com/BV09fHTc

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

build logs: pastebin.com/BV09fHTc

@daira

This comment has been minimized.

Show comment
Hide comment
@daira

daira Oct 18, 2016

Contributor

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.)

Contributor

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.)

@jamespedwards42

This comment has been minimized.

Show comment
Hide comment
@jamespedwards42

jamespedwards42 Oct 18, 2016

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

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

@jamespedwards42

This comment has been minimized.

Show comment
Hide comment
@jamespedwards42

jamespedwards42 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

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
@jamespedwards42

This comment has been minimized.

Show comment
Hide comment
@jamespedwards42

jamespedwards42 Oct 18, 2016

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

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

@jamespedwards42

This comment has been minimized.

Show comment
Hide comment
@jamespedwards42

jamespedwards42 Oct 18, 2016

no luck, same warning/error.

jamespedwards42 commented Oct 18, 2016

no luck, same warning/error.

@daira

This comment has been minimized.

Show comment
Hide comment
@daira

daira Oct 18, 2016

Contributor

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?

Contributor

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?

@jamespedwards42

This comment has been minimized.

Show comment
Hide comment
@jamespedwards42

jamespedwards42 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#17745: Feature request: Mount volume when run docker build
  2. moby/moby#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

jamespedwards42 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#17745: Feature request: Mount volume when run docker build
  2. moby/moby#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

This comment has been minimized.

Show comment
Hide comment
@daira

daira Oct 19, 2016

Contributor

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?

Contributor

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

This comment has been minimized.

Show comment
Hide comment
@daira

daira Oct 19, 2016

Contributor

@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.)

Contributor

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 has PR label Oct 19, 2016

@str4d

This comment has been minimized.

Show comment
Hide comment
@str4d

str4d Oct 19, 2016

Contributor

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

Contributor

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.

@jamespedwards42

This comment has been minimized.

Show comment
Hide comment
@daira

This comment has been minimized.

Show comment
Hide comment
@daira

daira Oct 19, 2016

Contributor

Should be fixed now, please try again.

Contributor

daira commented Oct 19, 2016

Should be fixed now, please try again.

@jamespedwards42

This comment has been minimized.

Show comment
Hide comment
@jamespedwards42

jamespedwards42 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

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

This comment has been minimized.

Show comment
Hide comment
@daira

daira Oct 20, 2016

Contributor

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

Contributor

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