[omniORB] omniORB build w/cygwin

Lee, Robert C. rc.lee at ngc.com
Mon Aug 18 16:37:42 BST 2003


I'm having problems building omniORB 4 on w2k with cygwin.  I specified the
cygwin supplied python in the configuration process. During the build, I get
all the cc files in src/tools/omniidl/cxx compiled. But when it's time to
link, I get the following:


+ g++ -shared -Wl,-soname,_omniidlmodule.so.1 -o _omniidlmodule.so.1.0
-L../../../../lib -L../../../
../../lib y.tab.o lex.yy.o idlerr.o idlutil.o idltype.o idlrepoId.o
idlscope.o idlexpr.o idlast.o id
lvalidate.o idldump.o idlconfig.o idlfixed.o idlpython.o
idlpython.o(.text+0x91):idlpython.cc: undefined reference to
`_PyImport_ImportModule'
idlpython.o(.text+0xa0):idlpython.cc: undefined reference to
`_PyImport_ImportModule'
idlpython.o(.text+0xbd):idlpython.cc: undefined reference to `_PyErr_Print'
idlpython.o(.text+0xf1):idlpython.cc: undefined reference to `_PyErr_Print'
idlpython.o(.text+0x161):idlpython.cc: undefined reference to
`_PyImport_ImportModule'
idlpython.o(.text+0x170):idlpython.cc: undefined reference to
`_PyImport_ImportModule'
idlpython.o(.text+0x18d):idlpython.cc: undefined reference to `_PyErr_Print'
idlpython.o(.text+0x1c1):idlpython.cc: undefined reference to `_PyErr_Print'
idlpython.o(.text+0x38d):idlpython.cc: undefined reference to `_PyList_New'
idlpython.o(.text+0x3a7):idlpython.cc: undefined reference to
`_PyString_FromString'
idlpython.o(.text+0x3b8):idlpython.cc: undefined reference to
`_PyList_SetItem'
......

collect2: ld returned 1 exit status
make[4]: *** [_omniidlmodule.so.1.0] Error 1
make[4]: Leaving directory
`/cygdrive/c/corba/build_from_src/omniORB-4.0.0/build/src/tool/omniidl/cx
x'
make[3]: *** [export] Error 2
....

I compared the build process on Solaris using gcc, where the build succeeds,
and noted the link process was very similar to the above, except in place of
-soname, I have a -h.

So I compared the compilation process. On the w2k/cygwin, the compilation of
src/tools/omniidl/cxx was as follows:

g++ -c -O2 -Wall -Wno-unused -fexceptions -DIDLMODULE_VERSION="\"0x2420\""
-I/usr/include 
-DPYTHON_INCLUDE="<python2.3/Python.h>" -fPIC -I.
-I../../../../../src/tool/omniidl/cxx -I../../../../include
-I../../../../../include -D__OSVERSION__= -D__x86__ -o idlpython.o
../../../../../src/tool/omniidl/cxx/idlpython.cc

On the Solaris:

g++ -c -O2 -Wall -Wno-unused -fexceptions -DIDLMODULE_VERSION="\"0x2420\""
-I/usr/local/include -DPYTHON_INCLUDE="<python2.2/Python.h>" -fPIC -I.
-I../../../../../src/tool/omniidl/cxx -I../../../../include
-I../../../../../include 
-D__OSVERSION__=5 -D__sunos__ -D__sparc__ -o idlpython.o
../../../../../src/tool/omniidl/cxx/idlpython.cc

They both produced .o files, but the link succeeds on Solaris but fails on
w2k/cygwin.  Am I'm compiling or linking incorrectly on w2k/cygwin? Are the
defines correct for w2k/cygwin?

My configuration was simple: --prefix blahblah --disable-static
--eanble-threads --enable-shared CC=gcc GCC=g++ PYTHON=/usr/bin/python.  

Are there anyone out there who has successfully build omniORB using
cygwin/gcc?  Please share your process if you were successful.

Thanks,

Robert Lee






More information about the omniORB-list mailing list