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

minikube ISO fails to build because of glibc <-> e2fsprogs mismatch #2853

Closed
ansiwen opened this issue May 29, 2018 · 5 comments
Closed

minikube ISO fails to build because of glibc <-> e2fsprogs mismatch #2853

ansiwen opened this issue May 29, 2018 · 5 comments

Comments

@ansiwen
Copy link
Contributor

ansiwen commented May 29, 2018

BUG REPORT

Environment: Fedora 28

Minikube version: git repo master branch

What happened:
make out/minikube.iso fails while buildroot is building debugfs of e2fsprogs with:

./../misc/create_inode.c:399:18: error: conflicting types for ‘copy_file_range’
 static errcode_t copy_file_range(ext2_filsys fs, int fd, ext2_file_t e2_file,
                  ^~~~~~~~~~~~~~~
In file included from ./../misc/create_inode.c:19:0:
/usr/include/unistd.h:1110:9: note: previous declaration of ‘copy_file_range’ was here
 ssize_t copy_file_range (int __infd, __off64_t *__pinoff,
         ^~~~~~~~~~~~~~~
make[5]: *** [create_inode.o] Error 1

What you expected to happen:
make out/minikube.iso successfully builds a local minikube ISO.

Analysis
The Ubuntu version that is now used in the docker build-image (18.04) uses glibc 2.27. The e2fsprogs version of the currently used buildroot version (2017.11) is 1.43.7, which is incompatible with glibc 2.27. e2fsprogs has been fixed for glibc 2.27 starting from version 1.44.0. For reference see here.

Possible solutions
In order to solve this issue now I see following possibilities:

  • downgrade ubuntu to 17.10
  • add a patch file for e2fsprogs 1.43.7 to the buildroot environment of minikube-iso
  • using the master branch of buildroot
@ansiwen ansiwen changed the title minikube ISO fails to build because of glibc<->e2fsprogs mismatch minikube ISO fails to build because of glibc <-> e2fsprogs mismatch May 29, 2018
@ijl
Copy link
Contributor

ijl commented May 29, 2018

buildroot should release 2018.05 in a day or two (http://lists.busybox.net/pipermail/buildroot/2018-May/222379.html). I'll open a pull request for it.

@ansiwen
Copy link
Contributor Author

ansiwen commented May 31, 2018

With buildroot "next" branch it still doesn't compile. It fails when building cri-tools:

>>> cri-tools v1.0.0-beta.0 Configuring
mkdir -p /mnt/out/buildroot/output/build/cri-tools-v1.0.0-beta.0/_output/src/github.com/kubernetes-incubator
ln -sf /mnt/out/buildroot/output/build/cri-tools-v1.0.0-beta.0 /mnt/out/buildroot/output/build/cri-tools-v1.0.0-beta.0/_output/src/github.com/kubernetes-incubator/cri-tools
>>> cri-tools v1.0.0-beta.0 Building
CGO_ENABLED=1 GOPATH="/mnt/out/buildroot/output/build/cri-tools-v1.0.0-beta.0/_output" PATH=/mnt/out/buildroot/output/build/cri-tools-v1.0.0-beta.0/_output/bin:"/mnt/out/buildroot/output/host/bin:/mnt/out/buildroot/output/host/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" /usr/bin/make -j5 PATH="/mnt/out/buildroot/output/host/bin:/mnt/out/buildroot/output/host/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" AR="/mnt/out/buildroot/output/host/bin/x86_64-minikube-linux-gnu-ar" AS="/mnt/out/buildroot/output/host/bin/x86_64-minikube-linux-gnu-as" LD="/mnt/out/buildroot/output/host/bin/x86_64-minikube-linux-gnu-ld" NM="/mnt/out/buildroot/output/host/bin/x86_64-minikube-linux-gnu-nm" CC="/mnt/out/buildroot/output/host/bin/x86_64-minikube-linux-gnu-gcc" GCC="/mnt/out/buildroot/output/host/bin/x86_64-minikube-linux-gnu-gcc" CPP="/mnt/out/buildroot/output/host/bin/x86_64-minikube-linux-gnu-cpp" CXX="/mnt/out/buildroot/output/host/bin/x86_64-minikube-linux-gnu-g++" FC="/mnt/out/buildroot/output/host/bin/x86_64-minikube-linux-gnu-gfortran" F77="/mnt/out/buildroot/output/host/bin/x86_64-minikube-linux-gnu-gfortran" RANLIB="/mnt/out/buildroot/output/host/bin/x86_64-minikube-linux-gnu-ranlib" READELF="/mnt/out/buildroot/output/host/bin/x86_64-minikube-linux-gnu-readelf" STRIP="/mnt/out/buildroot/output/host/bin/x86_64-minikube-linux-gnu-strip" OBJCOPY="/mnt/out/buildroot/output/host/bin/x86_64-minikube-linux-gnu-objcopy" OBJDUMP="/mnt/out/buildroot/output/host/bin/x86_64-minikube-linux-gnu-objdump" AR_FOR_BUILD="/usr/bin/ar" AS_FOR_BUILD="/usr/bin/as" CC_FOR_BUILD="/mnt/out/buildroot/output/host/bin/ccache /usr/bin/gcc" GCC_FOR_BUILD="/mnt/out/buildroot/output/host/bin/ccache /usr/bin/gcc" CXX_FOR_BUILD="/mnt/out/buildroot/output/host/bin/ccache /usr/bin/g++" LD_FOR_BUILD="/usr/bin/ld" CPPFLAGS_FOR_BUILD="-I/mnt/out/buildroot/output/host/include" CFLAGS_FOR_BUILD="-O2 -I/mnt/out/buildroot/output/host/include" CXXFLAGS_FOR_BUILD="-O2 -I/mnt/out/buildroot/output/host/include" LDFLAGS_FOR_BUILD="-L/mnt/out/buildroot/output/host/lib -Wl,-rpath,/mnt/out/buildroot/output/host/lib" FCFLAGS_FOR_BUILD="" DEFAULT_ASSEMBLER="/mnt/out/buildroot/output/host/bin/x86_64-minikube-linux-gnu-as" DEFAULT_LINKER="/mnt/out/buildroot/output/host/bin/x86_64-minikube-linux-gnu-ld" CPPFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" CFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -O2 " CXXFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -O2 " LDFLAGS="" FCFLAGS=" -O2 " FFLAGS=" -O2 " PKG_CONFIG="/mnt/out/buildroot/output/host/bin/pkg-config" STAGING_DIR="/mnt/out/buildroot/output/host/x86_64-minikube-linux-gnu/sysroot" INTLTOOL_PERL=/usr/bin/perl -C /mnt/out/buildroot/output/build/cri-tools-v1.0.0-beta.0 crictl
make[3]: Entering directory '/mnt/out/buildroot/output/build/cri-tools-v1.0.0-beta.0'
go install \
	github.com/kubernetes-incubator/cri-tools/cmd/crictl
# runtime/cgo
x86_64-minikube-linux-gnu-gcc: ERROR: unsafe header/library path used in cross-compilation: '-I' '/usr/lib/go-1.10/src/runtime/cgo'

Setting BR2_COMPILER_PARANOID_UNSAFE_PATH=n in deploy/iso/minikube-iso/configs/minikube_defconfig lets it get a bit further, but then it still fails:

CGO_ENABLED=1 GOPATH="/mnt/out/buildroot/output/build/crio-bin-v1.10.0/_output" PATH=/mnt/out/buildroot/output/build/crio-bin-v1.10.0/_output/bin:"/mnt/out/buildroot/output/host/bin:/mnt/out/buildroot/output/host/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" /usr/bin/make -j5 PATH="/mnt/out/buildroot/output/host/bin:/mnt/out/buildroot/output/host/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" AR="/mnt/out/buildroot/output/host/bin/x86_64-minikube-linux-gnu-ar" AS="/mnt/out/buildroot/output/host/bin/x86_64-minikube-linux-gnu-as" LD="/mnt/out/buildroot/output/host/bin/x86_64-minikube-linux-gnu-ld" NM="/mnt/out/buildroot/output/host/bin/x86_64-minikube-linux-gnu-nm" CC="/mnt/out/buildroot/output/host/bin/x86_64-minikube-linux-gnu-gcc" GCC="/mnt/out/buildroot/output/host/bin/x86_64-minikube-linux-gnu-gcc" CPP="/mnt/out/buildroot/output/host/bin/x86_64-minikube-linux-gnu-cpp" CXX="/mnt/out/buildroot/output/host/bin/x86_64-minikube-linux-gnu-g++" FC="/mnt/out/buildroot/output/host/bin/x86_64-minikube-linux-gnu-gfortran" F77="/mnt/out/buildroot/output/host/bin/x86_64-minikube-linux-gnu-gfortran" RANLIB="/mnt/out/buildroot/output/host/bin/x86_64-minikube-linux-gnu-ranlib" READELF="/mnt/out/buildroot/output/host/bin/x86_64-minikube-linux-gnu-readelf" STRIP="/mnt/out/buildroot/output/host/bin/x86_64-minikube-linux-gnu-strip" OBJCOPY="/mnt/out/buildroot/output/host/bin/x86_64-minikube-linux-gnu-objcopy" OBJDUMP="/mnt/out/buildroot/output/host/bin/x86_64-minikube-linux-gnu-objdump" AR_FOR_BUILD="/usr/bin/ar" AS_FOR_BUILD="/usr/bin/as" CC_FOR_BUILD="/mnt/out/buildroot/output/host/bin/ccache /usr/bin/gcc" GCC_FOR_BUILD="/mnt/out/buildroot/output/host/bin/ccache /usr/bin/gcc" CXX_FOR_BUILD="/mnt/out/buildroot/output/host/bin/ccache /usr/bin/g++" LD_FOR_BUILD="/usr/bin/ld" CPPFLAGS_FOR_BUILD="-I/mnt/out/buildroot/output/host/include" CFLAGS_FOR_BUILD="-O2 -I/mnt/out/buildroot/output/host/include" CXXFLAGS_FOR_BUILD="-O2 -I/mnt/out/buildroot/output/host/include" LDFLAGS_FOR_BUILD="-L/mnt/out/buildroot/output/host/lib -Wl,-rpath,/mnt/out/buildroot/output/host/lib" FCFLAGS_FOR_BUILD="" DEFAULT_ASSEMBLER="/mnt/out/buildroot/output/host/bin/x86_64-minikube-linux-gnu-as" DEFAULT_LINKER="/mnt/out/buildroot/output/host/bin/x86_64-minikube-linux-gnu-ld" CPPFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" CFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -O2 " CXXFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -O2 " LDFLAGS="" FCFLAGS=" -O2 " FFLAGS=" -O2 " PKG_CONFIG="/mnt/out/buildroot/output/host/bin/pkg-config" STAGING_DIR="/mnt/out/buildroot/output/host/x86_64-minikube-linux-gnu/sysroot" INTLTOOL_PERL=/usr/bin/perl -C /mnt/out/buildroot/output/build/crio-bin-v1.10.0 PREFIX=/usr crio
make[3]: Entering directory '/mnt/out/buildroot/output/build/crio-bin-v1.10.0'
go build -i  -tags "btrfs_noversion exclude_graphdriver_devicemapper libdm_no_deferred_remove exclude_graphdriver_btrfs containers_image_ostree_stub seccomp  containers_image_ostree_stub" -o bin/crio github.com/kubernetes-incubator/cri-o/cmd/crio
# runtime/cgo
x86_64-minikube-linux-gnu-gcc: WARNING: unsafe header/library path used in cross-compilation: '-I' '/usr/lib/go-1.10/src/runtime/cgo'
[...]
go build runtime/cgo: open /usr/lib/go-1.10/pkg/linux_amd64/runtime/cgo.a: permission denied
Makefile:88: recipe for target 'crio' failed

@ghandim
Copy link

ghandim commented Jun 11, 2018

Can confirm this. I can build v0.26.1 but not v0.27.0 locally on my machine at the moment because of this incompatibility.

@ijl
Copy link
Contributor

ijl commented Jun 13, 2018

This was resolved in v0.28.0.

@aaron-prindle
Copy link
Contributor

this should be fixed now, closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants