Errors while compiling DAOS on ARM64 platform


Wu Huijun
 

Hi all, 

I am trying to compile DAOS on ARM64 platform (little endian). I am working with the branch'tanabarr/control-no-ipmctl-May2020' to avoid the ipmctl dependency. 

However, I got errors below with go build github.com/daos-stack/daos/src/control/lib/netdetect
Any clue about this? I checked the GOPATH and it seems the go compiler and indeed find the code but just could not compile. 

ar rc build/dev/gcc/src/control/lib/spdk/libnvme_control.a build/dev/gcc/src/control/lib/spdk/src/nvme_control.o build/dev/gcc/src/control/lib/spdk/src/nvme_control_common.o
gcc -c -Isrc/cart/src/include -Isrc/cart/src/cart -I/root/daos/install/include -I/root/daos/install/include/na -E -P src/cart/src/cart/crt_swim.c | cat > build/dev/gcc/src/cart/src/cart/crt_swim_pp.c
ranlib build/dev/gcc/src/control/lib/spdk/libnvme_control.a
cd /root/daos/src/control; /usr/lib/go-1.13/bin/go build -mod vendor -v -ldflags "-X github.com/daos-stack/daos/src/control/build.DaosVersion=1.1.0 -X github.com/daos-stack/daos/src/control/build.ConfigDir=/root/daos/install/etc -B 0x91d6cda8b03b8b86157723c893b049e89e83e1d6" -o /root/daos/build/dev/gcc/src/control/bin/daos_admin github.com/daos-stack/daos/src/control/cmd/daos_admin
github.com/daos-stack/daos/src/control/lib/netdetect
go build github.com/daos-stack/daos/src/control/lib/netdetect: build constraints exclude all Go files in /root/daos/src/control/lib/netdetect
gcc -c -Isrc/cart/src/include -Isrc/cart/src/cart -I/root/daos/install/include -I/root/daos/install/include/na -E -P src/cart/src/cart/crt_tree.c | cat > build/dev/gcc/src/cart/src/cart/crt_tree_pp.c
scons: *** [build/dev/gcc/src/control/bin/daos_agent] Error 1
gcc -c -Isrc/cart/src/include -Isrc/cart/src/cart -I/root/daos/install/include -I/root/daos/install/include/na -E -P src/cart/src/cart/crt_tree_flat.c | cat > build/dev/gcc/src/cart/src/cart/crt_tree_flat_pp.c
gcc -c -Isrc/cart/src/include -Isrc/cart/src/cart -I/root/daos/install/include -I/root/daos/install/include/na -E -P src/cart/src/cart/crt_tree_kary.c | cat > build/dev/gcc/src/cart/src/cart/crt_tree_kary_pp.c
gcc -c -Isrc/cart/src/include -Isrc/cart/src/cart -I/root/daos/install/include -I/root/daos/install/include/na -E -P src/cart/src/cart/crt_tree_knomial.c | cat > build/dev/gcc/src/cart/src/cart/crt_tree_knomial_pp.c
gcc -c -Isrc/cart/src/include -Isrc/cart/src/cart -I/root/daos/install/include -I/root/daos/install/include/na -E -P src/cart/src/cart/crt_hlc.c | cat > build/dev/gcc/src/cart/src/cart/crt_hlc_pp.c
scons: building terminated because of errors.

Cheers,
Huijun
 


Rosenzweig, Joel B
 

Hi Huijun,

 

At one point in time, we added “// +build linux,amd64” to the netdetect.go file to enable it to build under ARM.  Does your version of netdetect.go have the following at the end of the copyright header before “Package netdetect”?  If it does not, go ahead and patch your file accordingly and try again. 

 

//

// +build linux,amd64

//

 

Package netdetect

 

Regards,

Joel

 

From: daos@daos.groups.io <daos@daos.groups.io> On Behalf Of Wu Huijun
Sent: Friday, March 19, 2021 11:11 PM
To: daos@daos.groups.io
Subject: [daos] Errors while compiling DAOS on ARM64 platform

 

Hi all, 

I am trying to compile DAOS on ARM64 platform (little endian). I am working with the branch'tanabarr/control-no-ipmctl-May2020' to avoid the ipmctl dependency. 

However, I got errors below with go build github.com/daos-stack/daos/src/control/lib/netdetect
Any clue about this? I checked the GOPATH and it seems the go compiler and indeed find the code but just could not compile. 

ar rc build/dev/gcc/src/control/lib/spdk/libnvme_control.a build/dev/gcc/src/control/lib/spdk/src/nvme_control.o build/dev/gcc/src/control/lib/spdk/src/nvme_control_common.o

gcc -c -Isrc/cart/src/include -Isrc/cart/src/cart -I/root/daos/install/include -I/root/daos/install/include/na -E -P src/cart/src/cart/crt_swim.c | cat > build/dev/gcc/src/cart/src/cart/crt_swim_pp.c

ranlib build/dev/gcc/src/control/lib/spdk/libnvme_control.a

cd /root/daos/src/control; /usr/lib/go-1.13/bin/go build -mod vendor -v -ldflags "-X github.com/daos-stack/daos/src/control/build.DaosVersion=1.1.0 -X github.com/daos-stack/daos/src/control/build.ConfigDir=/root/daos/install/etc -B 0x91d6cda8b03b8b86157723c893b049e89e83e1d6" -o /root/daos/build/dev/gcc/src/control/bin/daos_admin github.com/daos-stack/daos/src/control/cmd/daos_admin

github.com/daos-stack/daos/src/control/lib/netdetect

go build github.com/daos-stack/daos/src/control/lib/netdetect: build constraints exclude all Go files in /root/daos/src/control/lib/netdetect

gcc -c -Isrc/cart/src/include -Isrc/cart/src/cart -I/root/daos/install/include -I/root/daos/install/include/na -E -P src/cart/src/cart/crt_tree.c | cat > build/dev/gcc/src/cart/src/cart/crt_tree_pp.c

scons: *** [build/dev/gcc/src/control/bin/daos_agent] Error 1

gcc -c -Isrc/cart/src/include -Isrc/cart/src/cart -I/root/daos/install/include -I/root/daos/install/include/na -E -P src/cart/src/cart/crt_tree_flat.c | cat > build/dev/gcc/src/cart/src/cart/crt_tree_flat_pp.c

gcc -c -Isrc/cart/src/include -Isrc/cart/src/cart -I/root/daos/install/include -I/root/daos/install/include/na -E -P src/cart/src/cart/crt_tree_kary.c | cat > build/dev/gcc/src/cart/src/cart/crt_tree_kary_pp.c

gcc -c -Isrc/cart/src/include -Isrc/cart/src/cart -I/root/daos/install/include -I/root/daos/install/include/na -E -P src/cart/src/cart/crt_tree_knomial.c | cat > build/dev/gcc/src/cart/src/cart/crt_tree_knomial_pp.c

gcc -c -Isrc/cart/src/include -Isrc/cart/src/cart -I/root/daos/install/include -I/root/daos/install/include/na -E -P src/cart/src/cart/crt_hlc.c | cat > build/dev/gcc/src/cart/src/cart/crt_hlc_pp.c

scons: building terminated because of errors.

Cheers,
Huijun