Discussion:
[omniORB] Compiling under Windows with MinGW
Matias Guijarro
2008-01-14 13:56:14 UTC
Permalink
Hello,

I am trying to compile omniORB 4.1.0 under Windows in a
MinGW environment, without any success for the moment.

I changed the platform in config/config.mk to "x86_win32_mingw",
then I started the configure script and it runs fine :

checking build system type... i686-pc-mingw32
checking host system type... i686-pc-mingw32
checking for gcc... gcc
[...]

But anyway when doing "make" I get the following error :

making export in src/tool/omkdepend...
make[3]: Entering directory
`/home/GUIJARRO/omniORB-4.1.0/src/tool/omkdepend'
gcc -c -O -DDEBUG -I. -I. -I../../../include -I../../../include
-D__OSVERSION__=0 -D__x86__ -o include.o include.c
gcc -c -O -DDEBUG -I. -I. -I../../../include -I../../../include
-D__OSVERSION__=0 -D__x86__ -o main.o main.c
gcc -c -O -DDEBUG -I. -I. -I../../../include -I../../../include
-D__OSVERSION__=0 -D__x86__ -o parse.o parse.c
gcc -c -O -DDEBUG -I. -I. -I../../../include -I../../../include
-D__OSVERSION__=0 -D__x86__ -o pr.o pr.c
pr.c: In function `pr':
pr.c:102: warning: initialization makes pointer from integer without a cast
gcc -c -O -DDEBUG -I. -I. -I../../../include -I../../../include
-D__OSVERSION__=0 -D__x86__ -o cppsetup.o cppsetup.c
gcc -c -O -DDEBUG -I. -I. -I../../../include -I../../../include
-D__OSVERSION__=0 -D__x86__ -o ifparser.o ifparser.c
+ rm -f omkdepend
+ gcc -o omkdepend -O -L../../../lib -L../../../lib include.o main.o
parse.o pr.o cppsetup.o ifparser.o
main.o:main.c:(.text+0xa0): undefined reference to `GetMounts'
main.o:main.c:(.text+0xb5): undefined reference to `GetMounts'
main.o:main.c:(.text+0x2c2): undefined reference to `TranslateFileNameU2D'
main.o:main.c:(.text+0x3bb): undefined reference to `TranslateFileNameU2D'
pr.o:pr.c:(.text+0x1aa): undefined reference to `TranslateFileNameD2U'
collect2: ld returned 1 exit status
make[3]: *** [omkdepend] Error 1

I wonder if __OSVERSION__=0 is normal ?

This is the same problem as in this post :
http://www.omniorb-support.com/pipermail/omniorb-list/2006-June/027813.html

I tried what has been answered :
http://www.omniorb-support.com/pipermail/omniorb-list/2006-July/027818.html

So now I don't build omkdepend, but I still get errors :

make[3]: Entering directory
`/home/GUIJARRO/omniORB-4.1.0/src/lib/omnithread'
../../../bin/omkdepend -D__cplusplus -D__GNUG__ -D__GNUC__ -I. -I.
-I../../../include -I../../../include -D__OSVERSION__=0 -D__x86__ posix.cc
/bin/sh.exe: ../../../bin/omkdepend: No such file or directory
g++ -c -O2 -Wall -Wno-unused -fexceptions -I. -I. -I../../../include
-I../../../include -D__OSVERSION__=0 -D__x86__ -o static/posix.o posix.cc
posix.cc: In constructor `omni_mutex::omni_mutex()':
posix.cc:129: error: `posix_mutex' was not declared in this scope
posix.cc:129: error: `pthread_mutex_init' was not declared in this scope
posix.cc: In destructor `omni_mutex::~omni_mutex()':
[...]
make[3]: *** [static/posix.o] Error 1
make[3]: Leaving directory `/home/GUIJARRO/omniORB-4.1.0/src/lib/omnithread'

For me it seems the platform I specified in config/config.mk is ignored ?

Can somebody gives some hint ?

Please help!!!

Thanks in advance.
Duncan Grisby
2008-01-17 16:10:48 UTC
Permalink
Post by Matias Guijarro
I am trying to compile omniORB 4.1.0 under Windows in a
MinGW environment, without any success for the moment.
I changed the platform in config/config.mk to "x86_win32_mingw",
If you're using the configure script, you don't need to edit config.mk.
It doesn't hurt if you do, though.
Post by Matias Guijarro
checking build system type... i686-pc-mingw32
checking host system type... i686-pc-mingw32
checking for gcc... gcc
[...]
The autoconf configuration doesn't have any entries for MinGW, so it
falls back to some guesses. If you look in configure.ac and
mk/beforeauto.mk.in, you'll see a whole load of things about specific
platforms. If you copy the ones for Cygwin, that will probably be a good
starting point.

Cheers,

Duncan.
--
-- Duncan Grisby --
-- ***@grisby.org --
-- http://www.grisby.org --
Matias Guijarro
2008-01-17 18:10:37 UTC
Permalink
Hello,
Post by Duncan Grisby
The autoconf configuration doesn't have any entries for MinGW, so it
falls back to some guesses. If you look in configure.ac and
mk/beforeauto.mk.in, you'll see a whole load of things about specific
platforms. If you copy the ones for Cygwin, that will probably be a good
starting point.
I only noticed after I sent the email to the list that everything
to compile with MinGW is already available, but it works
without the configure script.

One has to change config/config.mk to select the right
platform (x86_win32_mingw) and edit mk/platforms/x86_win32_mingw.mk
to reflect Python's installation, then it is possible to make
everything going to the src directory and doing "make export".

Maybe it would be good to add the explanations above to
a README file ?

By the way : I discovered something wrong when building
with MinGW, I had to change EXTRA_LIBS in src/lib/omniORB/connections/dir.mk
to be -ladvapi32 instead of advapi32.lib.

And also at the end it tries to execute "rebase.exe" on the
compiled DLLs, this is not necessary with MinGW ; I had to
edit the makefile manually to prevent this step.

Cheers,
Matias.

Continue reading on narkive:
Loading...