[omniORB] omniORB-4.3.2 linker errors on RHEL with GCC during static linkage

Duncan Grisby duncan at grisby.org
Sat Dec 7 13:56:40 UTC 2024


On Thu, 2024-12-05 at 09:31 +0000, Jayapradeep Mohan via omniORB-list
wrote:


> 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).

[...]
> /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])'

It clearly has not found any of omniORB at all. It works for me when I
statically link by removing the .so files as you have done, although I
do not have an RHEL 8 system, so I did it on an RHEL 9 derivative.

What happens if you completely remove libomniORB4.a from the directory
it is in?  I'm wondering if perhaps it is picking up a completely
different version from somewhere, that has the wrong contents.

You could try checking the symbols defined in libomniORB4.a like this:

nm -C libomniORB4.a | grep ORB_init

I see two lines like this:

00000000000012a0 T CORBA::ORB_init(int&, char**, char const*, char const* (*) [2])
0000000000000012 t CORBA::ORB_init(int&, char**, char const*, char const* (*) [2]) [clone .cold]


You could try building the omniORB echo example (from
src/examples/echo) with static linkage by removing the .so files from
the lib directory within omniORB's build tree. Does that work?


Duncan.

-- 
Duncan Grisby <duncan at grisby.org>



More information about the omniORB-list mailing list