Re: Error cross-compiling staff for PowerPC Arch

98 views
Skip to first unread message
Message has been deleted

Dmitry Utkin

unread,
Mar 4, 2014, 6:16:30 AM3/4/14
to wsf-...@googlegroups.com
Hi,

Please show your commands you trying to compile Staff for PowerPC.


вторник, 4 марта 2014 г., 15:03:53 UTC+4 пользователь Arvind Kumar написал:
Hi,

I am trying to cross-compile Axis2C and wsf-staff for powerpc using an x86_64 Linux Box.

Step 1: Cross-compilation of Axis2C is successful and I am getting the desired libraries and binaries of powerpc.

Step 2: Cross-compilation of staff shows error " staff_codegen : cannot execute binary file" (during make).
I think while cross-compiling for PowerPC arch, it tries to run this staff_codegen on my x86_64 Linux Box which actually contains machine instruction of PowerPC arch.(Reason for this error according to me)

Also i cant make this staff on my power machine.
So can u please suggest a way or provide the compiled powerpc package of wsf-staff.
Message has been deleted
Message has been deleted

Dmitry Utkin

unread,
Mar 4, 2014, 6:37:45 AM3/4/14
to wsf-...@googlegroups.com
Please revert any changes in Staff Makefiles and try to compile it with this:

CC=ppcnf-mcp7-gcc CXX=ppcnf-mcp7-g++ make

Passing CC via environment has different behavior than passing it from make arguments.

If you need to pass additional flags like CFLAGS, CXXFLAGS, LFLAGS or LDFLAGS, PATH or LD_LIBRARY_PATH, please use environment too, not the make arguments.


вторник, 4 марта 2014 г., 15:28:47 UTC+4 пользователь Arvind Kumar написал:
make starts with this

make -C staff make
make[1]: Entering directory `/home/arvikumj/webservices/devel/staff-read-only/staff'
make -C core/utils make OS= CC=ppcnf-mcp7-gcc CXX=ppcnf-mcp7-g++ PLATFORM=ppc-ibm-linux-gnu-cross HOSTBUILD=1 MAKEFILE_ENV_INCLUDED= STAFF_HOME=/home/arvikumj/webservices/staff AXIS2C_HOME=/home/arvikumj/webservices/axis2c EXEC_EXT=

and I am getting error as after some lines of verbose output

make -C components/Login make
make[2]: Entering directory `/home/arvikumj/webservices/devel/staff-read-only/staff/components/Login'
cd src/ && STAFF_HOME=/home/arvikumj/webservices/devel/staff-read-only/deploy/ppc-ibm-linux-gnu-cross//home/arvikumj/webservices/staff/ LD_LIBRARY_PATH=/home/arvikumj/webservices/devel/staff-read-only/deploy/ppc-ibm-linux-gnu-cross//home/arvikumj/webservices/staff/lib:/home/db2lin95/sqllib/lib32 /home/arvikumj/webservices/devel/staff-read-only/deploy/ppc-ibm-linux-gnu-cross//home/arvikumj/webservices/staff/bin/staff_codegen -u -tcomponent Login.h
/bin/sh: /home/arvikumj/webservices/devel/staff-read-only/deploy/ppc-ibm-linux-gnu-cross//home/arvikumj/webservices/staff/bin/staff_codegen: cannot execute binary file
make[2]: *** [src/ComponentImpl.h] Error 126
make[2]: Leaving directory `/home/arvikumj/webservices/devel/staff-read-only/staff/components/Login'
make[1]: *** [components/Login.dep] Error 2
make[1]: Leaving directory `/home/arvikumj/webservices/devel/staff-read-only/staff'
make: *** [staff.dep] Error 2
Message has been deleted

Dmitry Utkin

unread,
Mar 4, 2014, 7:01:07 AM3/4/14
to wsf-...@googlegroups.com
Did you forgot to do

make distclean

before building with new command line?

вторник, 4 марта 2014 г., 15:51:54 UTC+4 пользователь Arvind Kumar написал:
HI Sir,

I tried this and reverted the Makefile.env to original Makefile.env
CC=ppcnf-mcp7-gcc CXX=ppcnf-mcp7-g++ make

it shows this in verbose output

make -C staff make
make[1]: Entering directory `/home/arvikumj/webservices/devel/staff-read-only/staff'
make -C core/utils make OS= CC=gcc CXX=g++ PLATFORM=x86_64-redhat-linux-cross HOSTBUILD=1 MAKEFILE_ENV_INCLUDED= STAFF_HOME=/home/arvikumj/webservices/staff AXIS2C_HOME=/home/arvikumj/webservices/axis2c EXEC_EXT=

and Now the error is

/usr/bin/ld: skipping incompatible /home/arvikumj/webservices/devel/staff-read-only/deploy/x86_64-redhat-linux-cross//home/arvikumj/webservices/staff/lib/libstaffutils.so when searching for -lstaffutils
/usr/bin/ld: skipping incompatible /home/arvikumj/webservices/devel/staff-read-only/deploy/x86_64-redhat-linux-cross//home/arvikumj/webservices/staff/lib/libstaffutils.so when searching for -lstaffutils
/usr/bin/ld: cannot find -lstaffutils
collect2: ld returned 1 exit status
make[2]: *** [/home/arvikumj/webservices/devel/staff-read-only/deploy/x86_64-redhat-linux-cross//home/arvikumj/webservices/staff/lib/libstaffcomponent.so.1.99.2] Error 1
make[2]: Leaving directory `/home/arvikumj/webservices/devel/staff-read-only/staff/core/component'
make[1]: *** [core/component.hostdep] Error 2

make[1]: Leaving directory `/home/arvikumj/webservices/devel/staff-read-only/staff'
make: *** [staff.dep] Error 2



The reason behind substituting in Makefile.env these as CCHOST and CXXHOST

is that if I substitute there, then only it takes CC and CXX as ppcnf


make -C staff make
make[1]: Entering directory `/home/arvikumj/webservices/
devel/staff-read-only/staff'
make -C core/utils make OS= CC=ppcnf-mcp7-gcc CXX=ppcnf-mcp7-g++ PLATFORM=ppc-ibm-linux-gnu-cross HOSTBUILD=1 MAKEFILE_ENV_INCLUDED= STAFF_HOME=/home/arvikumj/webservices/staff AXIS2C_HOME=/home/arvikumj/webservices/axis2c EXEC_EXT=


Arvind Kumar

unread,
Mar 4, 2014, 7:06:40 AM3/4/14
to wsf-...@googlegroups.com
I did make distclean

Dmitry Utkin

unread,
Mar 4, 2014, 7:10:14 AM3/4/14
to wsf-...@googlegroups.com
Please attach full log of compilation with commands you enter as file (copy & paste from terminal).

вторник, 4 марта 2014 г., 16:06:40 UTC+4 пользователь Arvind Kumar написал:

Arvind Kumar

unread,
Mar 4, 2014, 7:18:06 AM3/4/14
to wsf-...@googlegroups.com
Hi Sir

Can you please tell me the known steps of cross-compilation of wsf-staff by taking any arch as example.

Dmitry Utkin

unread,
Mar 4, 2014, 7:29:01 AM3/4/14
to wsf-...@googlegroups.com
To cross compile Staff for Android I use commands:

export TOOLCHAIN_PATH=/opt/android-8-toolchain
export PATH=$PATH:$TOOLCHAIN_PATH/bin/
export CC=$TOOLCHAIN_PATH/bin/arm-linux-androideabi-gcc
export CXX=$TOOLCHAIN_PATH/bin/arm-linux-androideabi-g++
export STAFF_HOME=/data/local/staff
export AXIS2C_HOME=/data/local/axis2c
export HOST_AXIS2C_HOME=/usr/local/axis2c

Similar commands to compile it for linux-mips, raspberry-pi or beagle bone.

вторник, 4 марта 2014 г., 16:18:06 UTC+4 пользователь Arvind Kumar написал:
Message has been deleted

Arvind Kumar

unread,
Mar 4, 2014, 9:20:09 AM3/4/14
to wsf-...@googlegroups.com
Hi,

export AXIS2C_HOME=/data/local/axis2c
export HOST_AXIS2C_HOME=/usr/local/axis2c

Can u please explain me what these two different location of axis2c contains? Is it like one will have the src files and one will have the cross-compiled files?


Arvind Kumar

unread,
Mar 4, 2014, 9:34:10 AM3/4/14
to wsf-...@googlegroups.com
Hi Dmitry,

I tried setting AXIS2C_HOME as path of powerpc compiled axis2c files.
and HOST_AXIS2C_HOME as path of host compiled axis2c files.

It worked well and I got the powerpc compiled files.

Thanks for the help.
I am grateful for your support. 
Reply all
Reply to author
Forward
0 new messages