[Xorp-users] Cross-Compilation PPC Architecture patches

Scher, Dave dscher at mitre.org
Thu Nov 29 08:01:59 PST 2007


Thanks for the heads up.  I rechecked out the --prefix and yes it means
something different than what I had previously thought.  I have removed
the --prefix incantation from the configure command line which now
looks something like this: 

./configure --host=$CROSS_ARCH
--with-openssl=/opt/embedded/tools/ppc_85xx/usr

I read section H and did the following.  I am not familiar with the
subtle differences between *export and *setenv, but for some reason the
setenv binary was not present on my system so I used the following:

Export CROSS_ARCH=powerpc-linux
Export CROSS_ROOT=/opt/embedded/tools/ppc_85xx/usr
Export CROSS_LINUX_ROOT=$CROSS_ROOT/$CROSS_ARCH
Export CC=$CROSS_ROOT/bin/$CROSS_ARCH-gcc
Export CXX=$CROSS_ROOT/bin/$CROSS_ARCH-g++
Export LD=$CROSS_ROOT/bin/$CROSS_ARCH-ld
Export RANLIB=$CROSS_ROOT/bin/$CROSS_ARCH-ranlib
Export NM=$CROSS_ROOT/bin/$CROSS_ARCH-nm

Getting farther into compilation, but I now have the following error:

Cc1plus: warnings being treated as errors
Yacc.yy_policy_backend_parser.cc:3 warning: 'yyrcsid' defined but not
used.

Perhaps there is a compiler flag that is only allowing for strict
compilation. 
I seem to have completed compilation of the cli/libtecla library; so
that's a plus.
When I checked the configuration script, it seemed to find the correct
tools without setting env. Var.
But after setting them, the libtecla library compiled.  

Any clue on the next error?

Thanks a lot.
Dave


-----Original Message-----
From: Pavlin Radoslavov [mailto:pavlin at icir.org] 
Sent: Wednesday, November 28, 2007 4:42 PM
To: Scher, Dave
Cc: xorp-users at xorp.org
Subject: Re: [Xorp-users] Cross-Compilation PPC Architecture patches 

Scher, Dave <dscher at mitre.org> wrote:

> I am trying to cross-compile xorp for a ppc platform.  The build
notes
> indicate that there may be a patch required to successfully
> cross-compile; but I cannot find the patch in the release 1.4
archive.
> 
>  
> Also without using the patch I received the following error when
> building the CLI:
>  
> ld: normal_obj/getline.o: Relocations in generic ELF (EM:  20)
> normal_obj/getline.o: could not read symbols: File in wrong format
>  
> I configured xorp using the following: 
> ./configure --host=powerpc-linux
--prefix=$CROSS_LOCATION/usr/include
> --with-openssl=$CROSS_LOCATION/usr
>  
> The issue, I believe, is linking of cross arch. and native specific
> objects.  Not sure if anyone has run into this specific issue.  Since
I
> have not yet applied the patch, I was wondering if this error is
patch
> specific.  
>  
> Any clues?

It looks like that the cli/libtecla library wasn't compiled with the
right compiler (or most likely the linker itself is the wrong one).

There are several environmental variables that should be set before
running ./configure. See file BUILD_NOTES (in the XORP top-level
directory), Section "3.8. Cross-compilation". Pay special attention
to step h) which describes the XORP cross-compilation environment.
Setting variable "LD" for example is needed to point to the right
cross-compilation linker.

Please let me know how it goes.

Regards,
Pavlin

P.S. Option "--prefix=..." when running ./configure is used to
specify the directory to install XORP. I doubt you want to install
it in the "$CROSS_LOCATION/usr/include" header directory.

P.P.S. Which cross-compilation patch are you referring to?
All patches mentioned in the "Cross-compilation" section refer to
installing the cross-compilation environment, and each patch itself
is included inline.



More information about the Xorp-users mailing list