borad: RK3576
environment: Ubuntu22.04
toolchain: gcc-11
architecture: aarch64
Does the OpenPLC runtime v3 not support compilation with GCC-11? Could you take a look at this? Thanks!
Compiling OpenPLC Runtime v3 resulted in an error.
Generating C files...
POUS.c
POUS.h
LOCATED_VARIABLES.h
VARIABLES.csv
Config0.c
Config0.h
Res0.c
Including Siemens S7 Protocol via snap7
Moving Files...
Compiling for Linux
Generating object files...
Generating glueVars...
varName: __QW1 varType: UINT
varName: __IW1 varType: UINT
Compiling main program...
/usr/bin/ld: /tmp/ccLL8tL2.o: in function `std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release()':
dnp3.cpp
(.text._ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv[_ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv]+0x94): undefined reference to `__aarch64_ldadd4_acq_rel'
/usr/bin/ld: dnp3.cpp
(.text._ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv[_ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv]+0x150): undefined reference to `__aarch64_ldadd4_acq_rel'
/usr/bin/ld: /tmp/ccLL8tL2.o: in function `std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_add_ref_copy()':
dnp3.cpp
(.text._ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE15_M_add_ref_copyEv[_ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE15_M_add_ref_copyEv]+0x84): undefined reference to `__aarch64_ldadd4_acq_rel'
/usr/bin/ld: /usr/local/lib/libasiodnp3.so: undefined reference to `__aarch64_swp4_rel'
/usr/bin/ld: /usr/local/lib/libasiodnp3.so: undefined reference to `__aarch64_swp1_acq_rel'
/usr/bin/ld: /usr/local/lib/libasiodnp3.so: undefined reference to `__aarch64_ldadd8_acq_rel'
/usr/bin/ld: /usr/local/lib/libasiodnp3.so: undefined reference to `__aarch64_swp4_sync'
/usr/bin/ld: /usr/local/lib/libasiodnp3.so: undefined reference to `__aarch64_cas4_acq_rel'
/usr/bin/ld: /usr/local/lib/libasiodnp3.so: undefined reference to `__aarch64_ldset4_relax'
collect2: error: ld returned 1 exit status
Error compiling C files
Compilation finished with errors!
The error investigation was triggered by this Command 'g++-9 -std=gnu++11 *.cpp *.o -o openplc -I ./lib -pthread -fpermissive `pkg-config --cflags --libs libmodbus` -lsnap7 -lasiodnp3 -lasiopal -lopendnp3 -lopenpal -lrt -w $ETHERCAT_INC' from webserver/scripts/compile_program.sh.