[omniORB] Errors when compiling omniORB (4.0.6) on Mac OS X Tiger (10.4.1)

Arjan Wekking a.wekking at synantics.nl
Sat May 21 17:13:16 BST 2005


Hi,

I would like to confirm whether anyone else has tried to compile  
omniORB 4.0.6 on Max OS X Tiger (10.4.1) and has encountered the same  
issues I have.

1. It seems usleep() and gettimeofday are not defined (included) in  
omnithread/posix.cc:

> posix.cc: In static member function `static void omni_thread::sleep 
> (long unsigned int, long unsigned int)':
> posix.cc:852: error: '::sleep' has not been declared
> posix.cc:853: error: 'usleep' was not declared in this scope
> posix.cc: In static member function `static void  
> omni_thread::get_time(long unsigned int*, long unsigned int*, long  
> unsigned int, long unsigned int)':
> posix.cc:882: error: 'gettimeofday' was not declared in this scope
> make[3]: *** [static/posix.o] Error 1
> make[2]: *** [export] Error 1
> make[1]: *** [export] Error 1
> make: *** [all] Error 1

When I look at the #include's at the top of omnithread/posix.cc, it  
seems that Tiger does not pass the following #if declaration because  
if I move the enclosed #include's outside of the #if, the errors  
disappear when trying to compile again:

> #if (defined(__GLIBC__) && __GLIBC__ >= 2) || defined 
> (__SCO_VERSION__) || defined(__aix__) || defined (__cygwin__)
> // typedef of struct timeval and gettimeofday();
> #include <sys/time.h>
> #include <unistd.h>
> #endif

2. Compiling everything else seems to succeed, until I get to appl/ 
utils/catior/catior.cc, which bails out with a rather cryptic:

> catior.cc: In function `int main(int, char**)':
> catior.cc:451: error: expected unqualified-id before '(' token
> catior.cc:451: error: expected primary-expression before ')' token
> catior.cc:451: error: expected primary-expression before ')' token

Which seems odd to me, since I can see nothing wrong with the  
offending line (451):

> cerr << "(CORBA::MARSHAL: minor = 0x" << hex << ex.minor() << ")"
>        << endl;

3. I encountered the same error in convertior.cc at line 306:

> cerr << "(Minor = " << ex.minor() << ")" << endl;

Both of which I temporarily 'fixed' by removing the call to ex.minor 
() from them. Everything else seems to compile just fine and the  
bundled examples I tried (echo) work as well.

It should be noted that I used the default gcc that comes with the  
Tiger development tools, which is gcc 4.0.0. I have a feeling the  
ex.minor() errors might have something to do with the fact that I am  
using gcc 4 instead of 3.

I would like to know whether I am barking up the wrong tree here  
(there might be something off with my setup) or whether there is any  
way I can help to confirm and fix these 'bugs'?

Regards,
-Arjan



More information about the omniORB-list mailing list