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

Unable to build Dockerfile on M2 OSX #7812

Open
s373nZ opened this issue Nov 13, 2024 · 1 comment
Open

Unable to build Dockerfile on M2 OSX #7812

s373nZ opened this issue Nov 13, 2024 · 1 comment
Labels

Comments

@s373nZ
Copy link
Contributor

s373nZ commented Nov 13, 2024

I was starting to take a look at #7649, but I'm currently unable to build the Dockerfile from an M2 on OSX. Getting the following error:

------                                                                           
 > [builder 10/16] RUN ./configure --enable-static && make && poetry run make install:
0.153 CSANFLAGS =
0.307 Compiling ccan/tools/configurator/configurator...done
0.916 ./configure: 368: ccan/tools/configurator/configurator: not found
------
Dockerfile:202
--------------------
 200 |     RUN poetry lock --no-update && poetry install
 201 |     
 202 | >>> RUN ./configure --enable-static && make && poetry run make install
 203 |     
 204 |     # Export the requirements for the plugins so we can install them in builder-python stage
--------------------
ERROR: failed to solve: process "/bin/sh -c ./configure --prefix=/tmp/lightning_install --enable-static && poetry run make install" did not complete successfully: exit code: 127

Fails on both master and v24.08.2. Tried out a bunch of local hacks to /configure and Makefile to play around with paths and prefixes for the configurator, but no luck so far.

@s373nZ
Copy link
Contributor Author

s373nZ commented Nov 16, 2024

Two things (possibly) going on here:

  1. I wasn't building using buildx. Tried that by creating a builder and passing a --platform flag, but encountered a segmentation fault building zlib:
ERROR: failed to solve: process "/dev/.buildkit_qemu_emulator /bin/sh -c mkdir zlib && tar xvf zlib.tar.gz -C zlib --strip-components=1     && cd zlib     && ./configure ${ZLIB_CONFIG}     && make     && make install && cd .. &&     rm zlib.tar.gz &&     rm -rf zlib" did not complete successfully: exit code: 2

Possibly I'm missing QEMU -- needs more testing and research on my end.

  1. The DEFAULT_TARGETPLATFORM is set to linux/amd64 here. So the $ARCH variable set in the ./configure is set to x86_64. Not sure if this would cause the above error exactly, but it could be playing a role in not being able to just check out the repo on an M2 machine and run docker build .

I guess that leads to a question of whether the workflow of checking out the repo and just building the Dockerfile is supported. Will continue looking at it later.

@cdecker cdecker added the mac label Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants