-
Notifications
You must be signed in to change notification settings - Fork 4k
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
THRIFT-5755 Docker image build fail #2937
Conversation
0ec38f4
to
6e04107
Compare
I think the best solution is to remove "old" directory. |
@@ -47,7 +47,7 @@ env: | |||
- SCRIPT="cmake.sh" | |||
- BUILD_ARG="" | |||
- BUILD_ENV="-e CC=gcc -e CXX=g++ -e THRIFT_CROSSTEST_CONCURRENCY=4" | |||
- DISTRO=ubuntu-bionic | |||
- DISTRO=ubuntu-focal |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As i understand thrift does not use travis and use github actions now. Maybe the better way - delete travis?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure i dont mind deleting this. Not sure what the maintainers think :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you will also need to update go to 1.21, as we already dropped support to go 1.20.
coverage. | ||
|
||
### Ubuntu ### | ||
|
||
* focal (stable, current) | ||
* bionic (previous stable) | ||
* jammy (next stable, WIP) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
now jammy is already the current stable and focal is already the previous stable, right? https://ubuntu.com/about/release-cycle
Maybe we can use github actions for build docker images? It will be useful, and we did not miss possible bugs |
I've deleted the old docker directory and updated the go version to 1.21. As for the travis removal, I think this change is slightly off topic from this PR? Perhaps it can be removed in a different PR if others agree. |
I tried to build using the ReleaseManagement.md document, except for focal, like so:
I get this, which seems non-fatal:
and this, which is definitely fatal:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That should be fixed
@Jens-G thanks for testing this.
If that doesnt work could you try adding I did find Haxe and Rust were missing so I added a commit for those. |
@thomasbruggink can you help with updating php part of container. |
Sure, you want me to include the change you made as well with regards to xdebug? |
Yes, please, include my updates in Dockerfile for php. |
Windows: | ||
|
||
thrift$ docker build -t thrift build/docker/ubuntu-jammy | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe tables on line 155 and 174 should be also updated with correct versions of core tools and compiler/languages?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated 👍
would be nice to automate this in the future somehow
That's it. But its much quicker now, at least :-D |
My guess here is that the previous container running as I still get a build error running
I have the idea |
Apache releases are source code releases. |
That was my first thought too, so I removed the whole folder. Same result. Now I basically cloned from scratch and currently the the third attempt to build it runs (the two before stopped with "not enough space", so I also cleaned all docker build caches etc. ). Lets see what that brings ... EDIT:
|
Hmm I cant reproduce this 🤔 I fixed the setup to allow root builds again, this would at least confirm the image has the correct tools installed.
Can you share a bit about your setup? Are you on a Linux distro or wsl on windows? Running docker rootless? Maybe I can repro this in a VM. I'm testing under a pretty standard Ubuntu 22.04 installation (not a VM). |
Mint LDME 6 (the Debian based flavour) and Docker Desktop. |
@ulidtko maybe you can help to figure the problem? |
Ok I figured it out, the difference seems to be in using docker desktop which even on Linux runs another Linux VM inside. So instead the container on Linux with docker desktop should be build like:
and can then be started as:
inside the container all files will be root but on the host they will automatically be set to whatever the host runs.
@Jens-G could you try and see if the above instructions allow you to |
Better, still not perfect. Not sure where this comes from ... mmmh. |
This PR submits fixes to the focal and jammy docker images. * Bionic support was dropped becaused dotnet 8 no longer supports bionic (Ubuntu 18.04). Moved to `old/` like other unmaintained images. * Focal/Jammy used the wrong apt location for dotnet, endpoint was 18.04 instead of 20.04/22.04 * Jammy cannot build Erlang OPT 23 since it depends on OpenSSL 1.1 which was dropped in favor of 3.0. Using Erlang OPT 25 fixes the problem since it depends on OpenSSL 3.0 * Jammy was installing JDK 11 but lib/java requires Java 17 All containers used the `root` used to volume map the local files into the running container. This creates a hard to maintain working directory on Linux and MacOS since files form the local user and root user are mixed. To solve this the new docker files can be build using the UID and GID of the host so the files dont mix. The script uses UID and GID 1000 since these are the default ids for most Linux distros. Change the travis yml to build with 20.04 instead of 18.04. Removed all traces of 18.04 but it cant be tested locally. Updated the README to reflect the new `build/docker/` directory.
cb78349
to
3b387ed
Compare
It seems from local testing that the thrift compiler is required to run
So once I ran Then the job runs till completion and a I think there are 2 options, 1 is to build the thrift compiler first or 2 is to remove the dependencies on running the thrift compiler. The latter probably requires a bunch more commits. |
To my understanding |
Yes and no. It's obviously some automake change. I compared the generated Makefiles and it became rather obvious, because now
but before simply
Note the lack of the $(BUILT_SOURCES) dependency. There's a new option no-dist-built-sources that basically reverts the change as an opt-in feature. |
Thanks for the hint 👍 I have no experience with automake so I've tried to figure out where to apply your solution. Updating So the latest commit manually overrides the Please let me know if this also succeeds for you 🙇 if you happen to know a better solutions then I can redo the last commit. |
Interesting. Yes I did notice, indeed. Obviously I am the first one then that brought the issue up at the right place: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=69908 I'll try your solution tomorrow, thanks for fixing it. |
seems to work now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
LGTM |
This PR submits fixes to the focal and jammy docker images.
old/
like other unmaintained images.All containers used the
root
used to volume map the local files into the running container. This creates a hard to maintain working directory on Linux and MacOS since files form the local user and root user are mixed.To solve this the new docker files can be build using the UID and GID of the host so the files dont mix. The script uses UID and GID 1000 since these are the default ids for most Linux distros.
Change the travis yml to build with 20.04 instead of 18.04. Removed all traces of 18.04 but it cant be tested locally.
Updated the README to reflect the new
build/docker/
directory.Let me know if you prefer to remove the
old/
directory completely instead of movingbionic
into it.