-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Dockerfile: switch golang image to "buster" variant #39880
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
Conversation
Remaining failure is cross-compiling the windows container utility ; https://ci.docker.com/public/blue/rest/organizations/jenkins/pipelines/moby/branches/PR-39880/runs/2/nodes/248/log/?start=0
|
1607114
to
ef75635
Compare
ef75635
to
12fe4a5
Compare
The compile error looks to be coming from this file; https://github.com/git-for-windows/git-sdk-32/blob/6e3f4d823b1aaf6f41ad30425e3e45168374412f/usr/include/w32api/winnt.h#L1554 (not sure if that's the source repo or a copy) |
On debian stretch:
On debian buster:
and without the
|
Ah! Think I found the culprit: https://github.com/docker/windows-container-utility/blob/e004a1415a433447369e315b9d7df357102be0d2/Makefile#L3 CFLAGS=-nostdinc -fno-exceptions -I/usr/x86_64-w64-mingw32/include -I/usr/lib/gcc/x86_64-w64-mingw32/6.3-win32/include -std=c++11 -static -DUNICODE -municode The makefile hardcodes gcc 6.3-win32 |
12fe4a5
to
2646633
Compare
hack/make/containerutility
Outdated
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.
I was wondering why these paths have to be specified manually, because these paths should be known already;
x86_64-w64-mingw32-g++ -print-search-dirs
install: /usr/lib/gcc/x86_64-w64-mingw32/8.3-win32/
programs: =/usr/lib/gcc/x86_64-w64-mingw32/8.3-win32/:/usr/lib/gcc/x86_64-w64-mingw32/8.3-win32/:/usr/lib/gcc/x86_64-w64-mingw32/:/usr/lib/gcc/x86_64-w64-mingw32/8.3-win32/:/usr/lib/gcc/x86_64-w64-mingw32/:/usr/lib/gcc/x86_64-w64-mingw32/8.3-win32/../../../../x86_64-w64-mingw32/bin/x86_64-w64-mingw32/8.3-win32/:/usr/lib/gcc/x86_64-w64-mingw32/8.3-win32/../../../../x86_64-w64-mingw32/bin/
libraries: =/usr/lib/gcc/x86_64-w64-mingw32/8.3-win32/:/usr/lib/gcc/x86_64-w64-mingw32/8.3-win32/../../../../x86_64-w64-mingw32/lib/x86_64-w64-mingw32/8.3-win32/:/usr/lib/gcc/x86_64-w64-mingw32/8.3-win32/../../../../x86_64-w64-mingw32/lib/
Looking further, I noticed that the makefile sets -nostdinc
, which disables MinGW searching in the standard paths;
Without specifying any path manually, and with -nostdinc
set;
x86_64-w64-mingw32-g++ -nostdinc -v -fno-exceptions -std=c++11 -static -DUNICODE -municode -O3 -s -o containerutility.exe argumentstream.cpp commands.cpp containerutility.cpp identity.cpp version.cpp
GNU C++11 (GCC) version 8.3-win32 20190406 (x86_64-w64-mingw32)
compiled by GNU C version 8.3.0, GMP version 6.1.2, MPFR version 4.0.2, MPC version 1.1.0, isl version isl-0.20-GMP
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
#include "..." search starts here:
#include <...> search starts here:
End of search list.
GNU C++11 (GCC) version 8.3-win32 20190406 (x86_64-w64-mingw32)
compiled by GNU C version 8.3.0, GMP version 6.1.2, MPFR version 4.0.2, MPC version 1.1.0, isl version isl-0.20-GMP
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: ae7a3589826a0028176d9a8a3489295b
In file included from identity.cpp:1:
containerutility.h:3:21: error: no include path in which to search for windows.h
#include <windows.h>
^
Removing that option makes compilation succeed without any manual path specified;
x86_64-w64-mingw32-g++ -fno-exceptions -std=c++11 -static -DUNICODE -municode -O3 -s -o containerutility.exe argumentstream.cpp commands.cpp containerutility.cpp identity.cpp version.cpp
echo $?
0
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.
So, the only path not included in the defaults is /usr/x86_64-w64-mingw32/include
. That one looks to be containing symlinks to /usr/share/mingw-w64/include/
ls -la /usr/x86_64-w64-mingw32/include | more
total 136
drwxr-xr-x 10 root root 69632 Jan 7 11:40 .
drwxr-xr-x 5 root root 4096 Jan 7 11:40 ..
drwxr-xr-x 2 root root 4096 Jan 7 11:40 GL
lrwxrwxrwx 1 root root 42 Nov 11 2018 _bsd_types.h -> ../../share/mingw-w64/include/_bsd_types.h
lrwxrwxrwx 1 root root 39 Nov 11 2018 _cygwin.h -> ../../share/mingw-w64/include/_cygwin.h
lrwxrwxrwx 1 root root 38 Nov 11 2018 _dbdao.h -> ../../share/mingw-w64/include/_dbdao.h
lrwxrwxrwx 1 root root 38 Nov 11 2018 _mingw.h -> ../../share/mingw-w64/include/_mingw.h
lrwxrwxrwx 1 root root 47 Nov 11 2018 _mingw_dxhelper.h -> ../../share/mingw-w64/include/_mingw_dxhelper.h
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.
Removing the -nostdinc
, but adding that path will make it compile, but looks like the path will be ignored because it overlaps with a system directory;
x86_64-w64-mingw32-g++ -v -fno-exceptions -I/usr/x86_64-w64-mingw32/include -std=c++11 -static -DUNICODE -municode -O3 -s -o containerutility.exe argumentstream.cpp commands.cpp containerutility.cpp identity.cpp version.cpp
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory "/usr/lib/gcc/x86_64-w64-mingw32/8.3-win32/../../../../x86_64-w64-mingw32/sys-include"
ignoring duplicate directory "/usr/x86_64-w64-mingw32/include"
as it is a non-system directory that duplicates a system directory
#include "..." search starts here:
#include <...> search starts here:
/usr/lib/gcc/x86_64-w64-mingw32/8.3-win32/include/c++
/usr/lib/gcc/x86_64-w64-mingw32/8.3-win32/include/c++/x86_64-w64-mingw32
/usr/lib/gcc/x86_64-w64-mingw32/8.3-win32/include/c++/backward
/usr/lib/gcc/x86_64-w64-mingw32/8.3-win32/include
/usr/lib/gcc/x86_64-w64-mingw32/8.3-win32/include-fixed
/usr/lib/gcc/x86_64-w64-mingw32/8.3-win32/../../../../x86_64-w64-mingw32/include
End of search list.
opened |
2646633
to
ce4c3de
Compare
``` ---> Making bundle: .integration-daemon-stop (in bundles/test-integration) ++++ cat bundles/test-integration/docker.pid +++ kill 13137 +++ /etc/init.d/apparmor stop Leaving: AppArmorNo profiles have been unloaded. Unloading profiles will leave already running processes permanently unconfined, which can lead to unexpected situations. To set a process to complain mode, use the command line tool 'aa-complain'. To really tear down all profiles, run 'aa-teardown'." script returned exit code 255 ``` Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
… packages The btrfs-tools was a transitional package, and no longer exists: > Package btrfs-tools > stretch (oldstable) (admin): transitional dummy package > 4.7.3-1: amd64 arm64 armel armhf i386 mips mips64el mipsel ppc64el s390x It must be replaced either by `btrfs-progs` or `libbtrfs-dev` (which has just the development headers) > Package: libbtrfs-dev (4.20.1-2) > Checksumming Copy on Write Filesystem utilities (development headers) Note that the `libbtrfs-dev` package is not available on Debian stretch (only in stretch-backports) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
CI runs on Ubuntu 16.04 machines, which use iptables (legacy), but Debian buster uses nftables. Because of this, DNS resolution does not work if the daemon configures iptables. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
The makefile for this binary has version 6.3 hardcoded, which causes compilation on 8.3 to fail: ``` Building: bundles/cross/windows/amd64/containerutility.exe In file included from /usr/x86_64-w64-mingw32/include/minwindef.h:163, from /usr/x86_64-w64-mingw32/include/windef.h:8, from /usr/x86_64-w64-mingw32/include/windows.h:69, from containerutility.h:3, from argumentstream.cpp:1: /usr/x86_64-w64-mingw32/include/winnt.h:1554:11: fatal error: x86intrin.h: No such file or directory # include <x86intrin.h> ^~~~~~~~~~~~~ compilation terminated. ``` Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
ce4c3de
to
25a1bf5
Compare
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
git checkout -q "$CONTAINER_UTILITY_COMMIT" | ||
|
||
# TODO remove this temporary fix once https://github.com/docker/windows-container-utility/pull/2 is merged | ||
sed -i \ |
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.
nit: Would it make more sense to create a patch for this file and then apply the patch instead? This way if something changes upstream the patch might start failing instead of sed just silently replacing something it's not supposed to, or not changing something it doesn't find.
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.
It'll likely be merged soon; some discussion was still happening, but this should go away soon
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.
Merged the fix in the windows-container-utility repo, and opened a PR to revert this temporary fix: #40526
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 👍
separating from #39549