[omniORB] Re: Endian problems

Patrick Hartling patrick.hartling at gmail.com
Fri Aug 11 11:03:38 BST 2006


On 8/8/06, Duncan Grisby <duncan at grisby.org> wrote:
> On Thursday 3 August, "Patrick Hartling" wrote:
>
> > Yes, that is certainly possible. AFAICT, omniORB correctly determines
> > the endianness of the little endian machines. I came to that
> > conclusion while tracing through the code executing on the x86_64
> > machine and looking at the state of variables related to byte
> > swapping. I have not done the same sort of examination on the PowerPC
> > machine. The configure script for omniORB 4.0.7 reports the correct
> > endianness, and acconfig.h defines WORDS_BIGENDIAN correctly. Is there
> > anywhere else I should look?
>
> That really ought to be sufficient. Can you run both client and server
> with -ORBtraceLevel 40 between the machines where it fails. That will
> show complete GIOP traces so we can see which machine is confused about
> its endianness.

I tracked down what I was doing wrong, and this (along with my
original message about _narrow() hanging) is a result of operator
error. I forgot that I had coerced the omniORB build to create
universal binaries on Mac OS X. By repeating that process, I saw where
the configure script was reporting that the host computer is not big
endian. What I did when I ran configure was to set the following
environment variables thusly:

CFLAGS="-arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk"
CXXFLAGS="-arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk"

I did not realize at the time that that would interfere with the
build's detection of endianness.

I think that if I do two separate builds for PowerPC and i386 and then
combine the binaries using Apple's lipo tool, I will be able to get
universal binaries without the endian confusion. Certainly my
PowerPC-only build of omniORB 4.0.7 is now behaving correctly. Sorry
for the confusion.

 -Patrick


-- 
Patrick L. Hartling
http://www.137.org/patrick/



More information about the omniORB-list mailing list