[omniORB] omniORB-4.3.2 linker errors on RHEL with GCC during static linkage
Jayapradeep_Mohan at amat.com
Jayapradeep_Mohan at amat.com
Thu Dec 5 09:31:15 UTC 2024
Hi Team,
We are trying to build OmniORB4.3.2 on RHEL 82 which has got gcc (GCC) 8.3.1 20191121 (Red Hat 8.3.1-5).
The version of python installed on the machine is Python 3.6.8.
We were able to build the omniORB4.3.2 without errors. When we integrate it within our workspace, we see errors while linking the OmniORB4.3.2 on RHEL 8 with gcc compiler version mentioned above.
Example errors:
/opt/rh/gcc-toolset-12/root/usr/bin/ld: /disks/rhel82-austin1/checkpoints/64/head/dev/lib/rhel82/libddv_omni-o-release-gcc12.a(CorbaOmniServer.o): in function `ddv::omni::CorbaOmniServer::run()':
CorbaOmniServer.cxx:(.text+0x4ac5): undefined reference to `CORBA::ORB_init(int&, char**, char const*, char const* (*) [2])'
/opt/rh/gcc-toolset-12/root/usr/bin/ld: CorbaOmniServer.cxx:(.text+0x4ae6): undefined reference to `CORBA::Object::_nil()'
/opt/rh/gcc-toolset-12/root/usr/bin/ld: CorbaOmniServer.cxx:(.text+0x4b1d): undefined reference to `omni::releaseObjRef(omniObjRef*)'
/opt/rh/gcc-toolset-12/root/usr/bin/ld: CorbaOmniServer.cxx:(.text+0x4b22): undefined reference to `PortableServer::POA::_nil()'
/opt/rh/gcc-toolset-12/root/usr/bin/ld: /disks/rhel82-austin1/checkpoints/64/head/dev/lib/rhel82/libddv_omni-o-release-gcc12.a(CorbaOmniServer.o):CorbaOmniServer.cxx:(.text+0x55bc): more undefined references to `omni::releaseObjRef(omniObjRef*)' follow
/opt/rh/gcc-toolset-12/root/usr/bin/ld: /disks/rhel82-austin1/checkpoints/64/head/dev/lib/rhel82/libddv_omni-o-release-gcc12.a(CorbaOmniServer.o): in function `dsrv::omni::CorbaOmniServer::run()':
CorbaOmniServer.cxx:(.text+0x5621): undefined reference to `_CORBA_bound_check_error()'
/opt/rh/gcc-toolset-12/root/usr/bin/ld: CorbaOmniServer.cxx:(.text.startup+0x1f): undefined reference to `omni_thread::init_t::~init_t()'
/opt/rh/gcc-toolset-12/root/usr/bin/ld: CorbaOmniServer.cxx:(.text.startup+0x39): undefined reference to `_omniFinalCleanup::_omniFinalCleanup()'
/opt/rh/gcc-toolset-12/root/usr/bin/ld: CorbaOmniServer.cxx:(.text.startup+0x40): undefined reference to `_omniFinalCleanup::~_omniFinalCleanup()'
/opt/rh/gcc-toolset-12/root/usr/bin/ld: OmniRTDSMWrapper.cxx:(.text+0x439): undefined reference to `omni::ucheckFail(char const*, int, char const*)'
/opt/rh/gcc-toolset-12/root/usr/bin/ld: OmniRTDSMWrapper.cxx:(.text+0x469): undefined reference to `omni::ucheckFail(char const*, int, char const*)'
/opt/rh/gcc-toolset-12/root/usr/bin/ld: OmniRTDSMWrapper.cxx:(.text+0x499): undefined reference to `omni::ucheckFail(char const*, int, char const*)'
/opt/rh/gcc-toolset-12/root/usr/bin/ld: OmniRTDSMWrapper.cxx:(.text+0x12f5): undefined reference to `CORBA::Any::Any()'
/opt/rh/gcc-toolset-12/root/usr/bin/ld: OmniRTDSMWrapper.cxx:(.text+0x131a): undefined reference to `CORBA::Any::~Any()'
/opt/rh/gcc-toolset-12/root/usr/bin/ld: OmniRTDSMWrapper.cxx:(.text+0x15b5): undefined reference to `_CORBA_bad_param_freebuf()'
/opt/rh/gcc-toolset-12/root/usr/bin/ld: OmniRTDSMWrapper.cxx:(.text+0x15c9): undefined reference to `_CORBA_bad_param_freebuf()'
/opt/rh/gcc-toolset-12/root/usr/bin/ld: OmniRTDSMWrapper.cxx:(.text+0x15d9): undefined reference to `_CORBA_bad_param_freebuf()'
There were many errors, but am not listing all those here.
The flags used during compilation were:
scl enable gcc-toolset-12 -- g++ -ansi -m64 -pthread -Wl,-export-dynamic -std=c++23 -o ./ddv.bin.optimise-release-gcc12.rhel82
.obj/rhel82/o-release-gcc12/main.o
.obj/rhel82/o-release-gcc12/version.o
-s
-L/disks/rhel82-austin1/checkpoints/64/head/dev/lib/rhel82
-L""/usr/local/dev/HEAD/gcc-12-rhel82-amd64""/lib
-L""/usr/local/dev/HEAD/gcc-12-rhel82-amd64-dev""/lib
-L"/usr/local/apfdev"/HEAD/gcc-12-rhel82-amd64/lib
-lomniCodeSets4 -lomniConnectionMgmt4 -lomniDynamic4 -lomniORB4 -lomnithread -lomniZIOP4 -lomniZIOPDynamic4
-lddv-o-release-gcc12 -lddv_omni-o-release-gcc12 -lddv_common-o-release-gcc12
-lssl -lcrypto -lssh2 -lz -ldl -lcrypt -lm
Please note that we had the below libs in the install (/usr/local/apfdev/HEAD/gcc-12-rhel82-amd64/lib) directory. We had removed the .so files generated to avoid default linking (as we know .so hs got priority than .a).
debug libgd.a libomniCodeSets4.a libomniORB4.a libomniZIOPDynamic4.a libssh2.a libxerces-c.a
libCOS4.a libgd.la libomniConnectionMgmt4.a libomnithread.a libpng16.a libxalan-c.a pkgconfig
libCOSDynamic4.a libgd.lai libomniDynamic4.a libomniZIOP4.a libpng.a libxalanMsg.a python3.9
We have included the libs in the below order in the Makefile (also we swapped the order as well to see if we can get through).
EXTRA_LDFLAGS += -lomniCodeSets4
EXTRA_LDFLAGS += -lomniConnectionMgmt4
EXTRA_LDFLAGS += -lomniDynamic4
EXTRA_LDFLAGS += -lomniORB4
EXTRA_LDFLAGS += -lomnithread
EXTRA_LDFLAGS += -lomniZIOP4
EXTRA_LDFLAGS += -lomniZIOPDynamic4
The fact is that, when we keep the .so files in the libs (/usr/local/apfdev/HEAD/gcc-12-rhel82-amd64/lib) directory, we were not seeing any errors and the binary generation was successful.
debug libCOSDynamic4.so.3.2 libomniConnectionMgmt4.a libomniORB4.a libomniZIOP4.a libpng16.a
libCOS4.a libgd.a libomniConnectionMgmt4.so libomniORB4.so libomniZIOP4.so libpng.a
libCOS4.so libgd.la libomniConnectionMgmt4.so.3 libomniORB4.so.3 libomniZIOP4.so.3 libssh2.a
libCOS4.so.3 libgd.lai libomniConnectionMgmt4.so.3.2 libomniORB4.so.3.2 libomniZIOP4.so.3.2 libxalan-c.a
libCOS4.so.3.2 libomniCodeSets4.a libomniDynamic4.a libomnithread.a libomniZIOPDynamic4.a libxalanMsg.a
libCOSDynamic4.a libomniCodeSets4.so libomniDynamic4.so libomnithread.so libomniZIOPDynamic4.so libxerces-c.a
libCOSDynamic4.so libomniCodeSets4.so.3 libomniDynamic4.so.3 libomnithread.so.4 libomniZIOPDynamic4.so.3 pkgconfig
libCOSDynamic4.so.3 libomniCodeSets4.so.3.2 libomniDynamic4.so.3.2 libomnithread.so.4.3 libomniZIOPDynamic4.so.3.2 python3.9
We wanted to have the binary generation with static linkage (without the .so files) on RHEL. Is it possible?
Could you help suggesting the order of the libs to generate the integrated binary?
Note:
We had set up omniORB-4.2.0 on AIX XLC and GCC long back with the static linkage (without .so) files and there were no linker errors.
We did see this linker errors only on RHEL.
Thanks.
Regards,
Jayapradeep Mohan.
The content of this message is APPLIED MATERIALS CONFIDENTIAL. If you are not the intended recipient, please notify me, delete this email and do not use or distribute this email.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.omniorb-support.com/pipermail/omniorb-list/attachments/20241205/102ba746/attachment-0001.htm>
More information about the omniORB-list
mailing list