[omniORB] FreeBSD and omniORBpy

Brad Chapman chapmanb@arches.uga.edu
Tue, 14 Dec 1999 14:37:02 -0500


Thanks for getting back with me regarding this!

Duncan Grisby wrote:
>> 1. I uncommented the relevant parts at the end to get static linking
>> (I didn't want to do this, but I couldn't get it to build
>> otherwise).
>
>What problems did you have with dynamic linking?  I'd be surprised if
>you can successfully build omniORBpy without working dynamic linking.
>

The lines at the end of the x86_freebsd_3.2.mk makefile, according to the
comments, cause "utils and examples build in this tree to [be] statically
linked with the omniORB libraries." So if I leave these four lines
commented, the compile will proceed okay until I get to the omniNames
directory, when I will get the following error:

-----------------------------------------------------------------------
gmake[2]: Entering directory `/usr/local/omniORB/src/appl/omniNames'
+ rm -f omniNames
+ g++295 -pthread -s -o omniNames -O2 -Wall -Wno-unused
-L../../../lib/x86_freebsd_3.2 omniNames.o NamingContext_i.o log.o
omniNames.o: In function `main':
omniNames.o(.text+0x433): undefined reference to `CORBA::ORB_init(int &,
char **, char const *)'
omniNames.o(.text+0x44a): undefined reference to `CORBA::ORB::BOA_init(int
&, char **, char const *)'
omniNames.o(.text+0x45d): undefined reference to
`CORBA::BOA::impl_is_ready(CORBA::ImplementationDef *, bool)'
omniNames.o(.text+0x4bb): undefined reference to `omni_mutex::omni_mutex(void)'
[...snip a whole lot of pages of this sort of complaining...]
-------------------------------------------------------------------------

However, when the 4 lines at the bottom of the makefile are uncommented,
everything proceeds without a problem.

>
>Why did you manually build the stubs rather than letting the makefiles
>do it?
>

The makefiles didn't build the stubs first. If I don't manually run
omniidl2, the compile with complain about missing echo.hh files.

>
>The link line doesn't link with echoSK.o, which is why you got lots of
>errors about undefined references. I don't know why the make files
>aren't doing the right thing.

I updated to the most recent gmake I could (3.78.1) but still had the same
issues. Any suggestions about anything I could try? :)

>
>You need to edit cccp/config.h to add a FreeBSD configuration file. It
>will probably be the same as config-linux.h.
>

That was exactly the problem. I added config-freebsd.h (just a copy of
config_linux.h) and edited the config.h main file and everything built
without a problem. The catch--I'm having problems once again dealing with
the examples. When I try to run omniidl on the echo_example.idl to generate
the stubs I get the following:

$ omniidl echo.idl
Traceback (innermost last):
  File "/usr/local/omniORB/bin/scripts/omniidl", line 30, in ?
    import omniidl.main
  File "/usr/local/omniORB/lib/python/omniidl/main.py", line 66, in ?
    import _omniidl
ImportError: No module named _omniidl

Similary, if I just try to start up the server without generating stubs:

$ ./echo_example_srv.py &
[2] 29419
insomniac# Traceback (innermost last):
  File "./echo_example_srv.py", line 4, in ?
    from omniORB import CORBA, PortableServer
  File "/usr/local/omniORB/lib/python/omniORB/__init__.py", line 88, in ?
    import _omnipy
ImportError: No module named _omnipy

I have PYTHONPATH, LD_LIBRARY_PATH and regular ol' PATH set according to
the omniORBpy readme and the README.unix.
	Sorry for the continual problems. Any advice anyone could give
would be greatly appreciated. Meanwhile I'm keep messing around!

Brad
chapmanb@arches.uga.edu