Something else interesting : ron :~/inceptionv3/test_go$ ldd ./test_go linux-vdso.so.1 (0x0000007f7a3d1000) libstd.so => not found ron :~/inceptionv3/test_go$ ./test_go Illegal instruction ron :~/inceptionv3/test_go$ file ./test_go ./test_go: ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked, Go BuildID=fW09jr3tjA78E5z6UAUz/bPYMiN2NZHGu_lvhfvko/fIPbh6IEkrveNgcnIXTL/VbfOnD9J9BmSEbkH06qe, BuildID[sha1]=c62d3a4e50902a4d21777d41df33a41e5d6df6f6, not stripped
I thinks there are big problem XD Le jeudi 4 février 2021 à 08:42:54 UTC+1, Christophe Valmir a écrit : > I make a test with small program and it's a option " -shared" only into > CGO_LDFLAGS which causes me problem. > If I don't use it of course I can't use dynamic libs. Do you think the > libstd.so program? > ron:~/test_go$ ldd ./test_go > linux-vdso.so.1 (0x0000007f87ebc000) > libstd.so => /home/ron/go-1.5/pkg/linux_arm64_dynlink/libstd.so > (0x0000007f857e9000) > libdl.so.2 => /lib/aarch64-linux-gnu/libdl.so.2 (0x0000007f857c0000) > libpthread.so.0 => /lib/aarch64-linux-gnu/libpthread.so.0 > (0x0000007f85790000) > libc.so.6 => /lib/aarch64-linux-gnu/libc.so.6 (0x0000007f8561d000) > /lib/ld-linux-aarch64.so.1 (0x0000007f87e8c000) > > > Le jeudi 4 février 2021 à 07:40:45 UTC+1, Christophe Valmir a écrit : > >> >> Hello I tried to compile a Go program on ARM with dynamic link. >> Why dynamic? Because the libs I use in C are proprietary and the >> constructor does not want to compile in static. >> >> I build like this: >> >> export PATH=$PATH:/home/ronron/aml_npu_sdk_6.4.3/toolchains/ >> export CGO_ENABLED=1 >> export LIB_DIR=$TOOLCHAIN/../aarch64-linux-gnu/libc/lib >> export ROOTSDK=/home/ronron/aml_npu_sdk_6.4.3/ >> export >> VIVANTE_SDK_INC="/home/ronron/aml_npu_sdk_6.4.3/linux_sdk/linux_sdk_6.4.2.1/build/sdk/include" >> export >> AQROOT="/home/ronron/aml_npu_sdk_6.4.3/linux_sdk/linux_sdk_6.4.3/build" >> export OVXLIB_DIR="$ROOTSDK/linux_sdk/linux_sdk_6.4.3/acuity-ovxlib-dev" >> export >> OPENCV_ROOT="/home/ronron/aml_npu_sdk_6.4.3/linux_sdk/linux_sdk_6.4.0.10/build/sdk/opencv3-3.4.3" >> export CGO_CFLAGS="-I$VIVANTE_SDK_INC -I$VIVANTE_SDK_INC/HAL >> -I$AQROOT/sdk/inc -I./ -I$OVXLIB_DIR/include/utils >> -I$OVXLIB_DIR/include/client -I$OVXLIB_DIR/include/ops >> -I$OVXLIB_DIR/include -I$OVXLIB_DIR/third-party/jpeg-9b -DgcdSTATIC_LINK=0" >> export CGO_CPPFLAGS="-I$VIVANTE_SDK_INC -I$VIVANTE_SDK_INC/HAL >> -I$AQROOT/sdk/inc -I./ -I$OVXLIB_DIR/include/utils >> -I$OVXLIB_DIR/include/client -I$OVXLIB_DIR/include/ops >> -I$OVXLIB_DIR/include -I$OVXLIB_DIR/third-party/jpeg-9b -DgcdSTATIC_LINK=0" >> export CGO_LDFLAGS=" -lpthread -ldl -L$OVXLIB_DIR/lib -L $OPENCV_ROOT/lib >> -L$AQROOT/sdk/lib >> -L/home/ronron/aml_npu_sdk_6.4.3/linux_sdk/linux_sdk_6.4.3/build/sdk/drivers_32 >> >> -ljpeg -lovxlib -L$VIVANTE_SDK_LIB -lOpenVX -lovxlib -shared >> -lopencv_imgproc -lopencv_core -lopencv_videoio -lopencv_imgcodecs >> -lopencv_highgui -lz -lm" >> go build -linkshared -a >> >> when I run program: >> rron:~/test_go$ strace ./test_go te >> execve("./test_go", ["./test_go", "te"], 0x7ff746a528 /* 27 vars */) = 0 >> --- SIGILL {si_signo=SIGILL, si_code=ILL_ILLOPC, si_addr=0x7fadb45000} --- >> +++ killed by SIGILL +++ >> Illegal instruction >> >> I don't make crosscompiling and I don't see my error :( one idea ? >> > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/b390b297-3022-4039-89cf-8cc0f325bf3bn%40googlegroups.com.