Discussion:
[omniORB] Omniorb 4.1.4 PowerPC compilation problems
Jens Villadsen
2009-08-19 20:33:23 UTC
Permalink
I've just downloaded the omniOrb 4.14 and have tried to cross compile
it for a PowerPC 405 with linux installed. I succeeded one time,
however by mistake, I accidently deleted the <platform-config>.mk file
that I used. So far i haven't had any luck deploying it on the
PowerPC. I am using the following script:

#
#

Linux = 1
PowerPCProcessor = 1
EmbeddedSystem = 1

#
# Python set-up
#
# You must set a path to a Python 1.5.2 interpreter.

PYTHON = /usr/local/bin/python


#
# Include general unix things
#

include $(THIS_IMPORT_TREE)/mk/unix.mk


#
# Standard programs
#


AS = /opt/gnutools/powerpc-440-linux-gnu/bin/powerpc-440-linux-gnu-as
CC = /opt/gnutools/powerpc-440-linux-gnu/bin/powerpc-440-linux-gnu-gcc
LD = /opt/gnutools/powerpc-440-linux-gnu/bin/powerpc-440-linux-gnu-ld
OD = /opt/gnutools/powerpc-440-linux-gnu/bin/powerpc-440-linux-gnu-
objdump
OC = /opt/gnutools/powerpc-440-linux-gnu/bin/powerpc-440-linux-gnu-
objcopy

AR = /opt/gnutools/powerpc-440-linux-gnu/bin/powerpc-440-linux-gnu-ar
cq

CPP = /opt/gnutools/powerpc-440-linux-gnu/bin/powerpc-440-linux-gnu-
cpp

CXX = /opt/gnutools/powerpc-440-linux-gnu/bin/powerpc-440-linux-gnu-g+
+
CXXMAKEDEPEND = -D__cplusplus -D__GNUG__ -D__GNUC__
CXXDEBUGFLAGS =
CXXOPTIONS = -Wall -Wno-unused

CXXLINK = $(CXX)
CXXLINKOPTIONS = $(CXXDEBUGFLAGS) $(CXXOPTIONS) \
$(patsubst
%,-Wl$(comma)-rpath$(comma)%,$(IMPORT_LIBRARY_DIRS))

CC = /opt/gnutools/powerpc-440-linux-gnu/bin/powerpc-440-
linux-gnu-gcc
CMAKEDEPEND += -D__GNUC__
CDEBUGFLAGS = -O

CLINK = $(CC)
CLINKOPTIONS = $(CDEBUGFLAGS) $(COPTIONS) \
$(patsubst %,-Wl$(comma)-rpath$(comma)%,$
(IMPORT_LIBRARY_DIRS))

INSTALL = install -c

IMPORT_CPPFLAGS += -D__powerpc__ -D__linux__ -D__OSVERSION__=2


#
# CORBA stuff
#

CorbaImplementation = OMNIORB

#
# OMNI thread stuff
#

ThreadSystem = Posix
OMNITHREAD_POSIX_CPPFLAGS = -DNoNanoSleep
OMNITHREAD_CPPFLAGS = -D_REENTRANT
OMNITHREAD_LIB = $(patsubst %,$(LibSearchPattern),omnithread)

ifndef UseMITthreads
OMNITHREAD_POSIX_CPPFLAGS += -DPthreadDraftVersion=10
OMNITHREAD_LIB += -lpthread
else
OMNITHREAD_POSIX_CPPFLAGS += -DPthreadDraftVersion=8
OMNITHREAD_CPPFLAGS += -D_MIT_POSIX_THREADS
OMNITHREAD_LIB += -lpthreads
endif

lib_depend := $(patsubst %,$(LibPattern),omnithread)
OMNITHREAD_LIB_DEPEND := $(GENERATE_LIB_DEPEND)

# Default location of the omniORB configuration file [falls back to
this if
# the environment variable OMNIORB_CONFIG is not set] :

OMNIORB_CONFIG_DEFAULT_LOCATION = /etc/omniORB.cfg

# Default directory for the omniNames log files.
OMNINAMES_LOG_DEFAULT_LOCATION = /var/omninames

#####################

# The HOSTBINDIR variable is used to locate the HOST IDL compiler.
BASE_OMNI_TREE = /opt/omniorb4/native
HOSTBINDIR = bin/i586_linux_2.0_glibc2.1
TBINDIR = $(HOSTBINDIR)

HOST_IDL_FLAGS = -h .hh -s SK.cc
OMNIORB_IDL_ONLY = $(BASE_OMNI_TREE)/$(TBINDIR)/omniidl -bcxx
OMNIORB_IDL_ANY_FLAGS = -Wba
OMNIORB_IDL = $(OMNIORB_IDL_ONLY) $(OMNIORB_IDL_ANY_FLAGS)
OMNIORB_IDL_OUTPUTDIR_PATTERN = -C%
OMNIORB_IDL_LC_FLAGS = -l

OMKDEPEND = $(BASE_OMNI_TREE)/$(HOSTBINDIR)/omkdepend
CXXMAKEDEPEND = $(OMKDEPEND) -D__cplusplus -D__GNUG__ -D__GNUC__
CMAKEDEPEND = $(OMKDEPEND) -D__GNUC__

#
# everything else is default from unix.mk
# Add the location of the Open SSL library

As you can see, I use a cross compiler located in the /opt/...
directory. It compiles the libs fine without complaint, and I am able
to compile the "echo" example, however not e.g. "anyExample". When I
transfer the files from the "echo" example, all I get on the PowerPC
is "Segmentation Fault". I wonder if there is some variable that I
have overseen?
I can easily compile and execute a "Hello World"-app on the PowerPC,
but the omniOrb-echo files cannot? I compile the "Hello World" with
the same path used in the CXX variable. What am I doing wrong?!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20090819/812f8bab/attachment-0001.htm
Duncan Grisby
2009-08-28 15:42:28 UTC
Permalink
Post by Jens Villadsen
I've just downloaded the omniOrb 4.14 and have tried to cross compile
it for a PowerPC 405 with linux installed. I succeeded one time,
however by mistake, I accidently deleted the <platform-config>.mk file
that I used. So far i haven't had any luck deploying it on the
[...]
Post by Jens Villadsen
As you can see, I use a cross compiler located in the /opt/...
directory. It compiles the libs fine without complaint, and I am able
to compile the "echo" example, however not e.g. "anyExample". When I
transfer the files from the "echo" example, all I get on the PowerPC
is "Segmentation Fault". I wonder if there is some variable that I
have overseen?
Are you able to get a core file from it and look at it?

Can you run the example with command line -ORBtraceLevel 25 ? Do you
get any output?

Duncan.
--
-- Duncan Grisby --
-- ***@grisby.org --
-- http://www.grisby.org --
Jens Villadsen
2009-09-02 23:53:40 UTC
Permalink
I made a total rookie mistake. As I am used to develop in the MS Windows
environment I forgot all about transfering files in linux without a
file-extension. The reason why I got segmentation fault was because when I
ftp'ed files with filezilla, filezilla does ASCII based transfering by
default when the files does not have an extension. After doing binary
transport on binary files there was no problems. So problem is solved :)

However, I have stumbled upon another problem with omniORB. My development
machine is runnning Windows 7 Professional x64 (not cracked, not Release
Candidate, just a regular plain Windows 7 Professional - I am a master's
student so I get MS stuff for free through MSDNAA) and I am using Visual
Studio 2008. I have had success compiling and running most of the examples
except the ones that uses the omniNames service. I have verified that the
binarys (eg3_impl.exe from examples) and the omniNames run without errors
under XP so it must be either a security issue or a registration-database
issue in Windows 7. I have tried to run it in a console as administrator but
without luck. Do you have any suggestions?

By the way, may I suggest that the README.win32.txt is updated on line 205,
206 and line 209 where it states that one should use the lib-files from what
I believe is omniORB 4.1.0. Doing a search-and-replace with "410" to "414"
would probably correct it.

Regards Jens
Post by Duncan Grisby
Post by Jens Villadsen
I've just downloaded the omniOrb 4.14 and have tried to cross compile
it for a PowerPC 405 with linux installed. I succeeded one time,
however by mistake, I accidently deleted the <platform-config>.mk file
that I used. So far i haven't had any luck deploying it on the
[...]
Post by Jens Villadsen
As you can see, I use a cross compiler located in the /opt/...
directory. It compiles the libs fine without complaint, and I am able
to compile the "echo" example, however not e.g. "anyExample". When I
transfer the files from the "echo" example, all I get on the PowerPC
is "Segmentation Fault". I wonder if there is some variable that I
have overseen?
Are you able to get a core file from it and look at it?
Can you run the example with command line -ORBtraceLevel 25 ? Do you
get any output?
Duncan.
--
-- Duncan Grisby --
-- http://www.grisby.org --
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20090902/84395193/attachment-0001.htm
Loading...