Docker-ce link errors

Hi;

arch x86_64
docker-c version: trunk

Trying to compile docker-ce. Getting link errors:

---> Making bundle: binary (in bundles/binary)
Building: bundles/binary-daemon/dockerd-19.03.5
GOOS="linux" GOARCH="amd64" GOARM=""
# github.com/docker/docker/cmd/dockerd

/home/rossb/OpenWrt/x86_64/r10508/openwrt/staging_dir/toolchain-x86_64_gcc-7.4.0_glibc/lib/gcc/x86_64-openwrt-linux-gnu/7.4.0/../../../../x86_64-openwrt-linux-gnu/bin/ld: /home/rossb/OpenWrt/x86_64/r10508/openwrt/staging_dir/toolchain-x86_64_gcc-7.4.0_glibc/lib/gcc/x86_64-openwrt-linux-gnu/7.4.0/../../../../x86_64-openwrt-linux-gnu/lib/libpthread.a(unwind.o): in function `unwind_stop':
unwind.c:(.text+0x59): undefined reference to `_Unwind_GetCFA'

also: _Unwind_ForcedUnwind, _Unwind_Resume

tried:
TARGET_CFLAGS += -lstdc++ -lgcc_pic

any hints?
Thanks;
Bill
www.rossco.org

This is a default build from master braches?

Buildbots seems to not have a problem to build docker-ce.

yes; all default. Packages (docker-ce, containerd, libnetwork, tini, runc) from trunk today.

main openwrt
[rossb@localhost openwrt]$ git show
commit 1b937cb14184b5ff9a7a75fbc5d226032f931c35
Author: Rafał Miłecki rafal@milecki.pl
Date: Wed Jul 3 11:16:22 2019 +0200

with many new/updated packages

...B

I KNOW that mixing package versions / openwrt version places me in uncharted ABI / API version mismatch hell. Still, forced into it by all the extra / custom packages I am using (www.rossco.org).

Clearly (since no issues building on pristine trunk); This is a toolchain / dependency / version issue causing link failure.

I chose to deal with this by addressing / fixing the failure, as opposed to updating to trunk and breaking all my custom packages....

So;

define Build/Configure
...
    ++sed -i 's/EXTLDFLAGS_STATIC=/#EXTLDFLAGS_STATIC=/g' $(PKG_BUILD_DIR)/engine/hack/make.sh
endef
...
++EXTLDFLAGS_STATIC = "-static -lc -lgcc_s_pic -L$(STAGING_DIR)/root-x86/lib -Wl,-rpath-link=$(STAGING_DIR)/root-x86/lib"
...
define Build/Compile
        ( \
           	export GOPATH=$(GO_PKG_BUILD_DIR) \
                        GOCACHE=$(GO_PKG_CACHE_DIR) \
                        GOTMPDIR=$(GO_PKG_TMP_DIR) \
                        GOROOT_FINAL=$(GO_TARGET_ROOT) \
                        CC=$(TARGET_CC) \
                        CXX=$(TARGET_CXX) \
                        $(call GoPackage/Environment) \
                        GITCOMMIT=$(PKG_SOURCE_VERSION) \
                        DOCKER_GITCOMMIT=$(PKG_SOURCE_VERSION) \
                        DOCKER_BUILDTAGS='$(BUILDTAGS)' \
                        VERSION=$(PKG_VERSION) \
                        ++EXTLDFLAGS_STATIC=$(EXTLDFLAGS_STATIC) \
...

Hope this helps someone else...
Regards;
Bill

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.