I have an automated build on Docker Hub (wch1/r-debug) for which the Docker build succeeds when I run it locally, but fails when I run it on Docker Hub. I suspect the problem has to do with some architecture differences between my local system and the build machine on Docker Hub. I hope someone out there can shed some light on this issue!
Some details: The Dockerfile builds R (the programming language) five times, each one with different settings. These various builds have different kinds of tooling to help debugging. Locally, all of the builds succeed. On Docker Hub, the first two succeed, and the third one fails. This third one enables AddressSanitizer and UndefinedBehaviorSanitizer when compiling with gcc. With this build, when it runs the configure
script, it fails with:
checking whether we are cross compiling...
configure: error: in `/tmp/r-source':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details
The environment variables it sets before running ./configure
are:
export CXX="g++ -fsanitize=address,undefined,bounds-strict -fno-omit-frame-pointer"
export CFLAGS="${CFLAGS} -pedantic -fsanitize=address"
export FFLAGS="${CFLAGS}"
export FCFLAGS="${CFLAGS}"
export CXXFLAGS="${CFLAGS} -pedantic"
export MAIN_LDFLAGS="-fsanitize=address,undefined"
Is it possible that these flags cause the compiler to error out on Docker Hub, but not on my machine?
Info about my machine:
$ uname -a
Linux userve 4.4.0-96-generic #119-Ubuntu SMP Tue Sep 12 14:59:54 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
$ docker version
Client:
Version: 17.05.0-ce
API version: 1.29
Go version: go1.7.5
Git commit: 89658be
Built: Thu May 4 22:10:54 2017
OS/Arch: linux/amd64
Server:
Version: 17.05.0-ce
API version: 1.29 (minimum version 1.12)
Go version: go1.7.5
Git commit: 89658be
Built: Thu May 4 22:10:54 2017
OS/Arch: linux/amd64
Experimental: false
Info about the build machine on Docker Hub, from the build log:
KernelVersion: 4.4.0-93-generic
Arch: amd64
BuildTime: 2017-08-17T22:50:04.828747906+00:00
ApiVersion: 1.30
Version: 17.06.1-ce
MinAPIVersion: 1.12
GitCommit: 874a737
Os: linux
GoVersion: go1.8.3
Thanks in advance for any help!