cross compling openssh-3.5p1 for ppc

John Zavgren john at zavgren.com
Wed Jan 14 04:31:24 EST 2004


Greetings:
------------ BACKGROUND --------------------------
I am using the Monta Vista development kit on an Intel RedHat Linux 
platform... the target is PPC_405.

The configure utility that comes with the openssh-3.5p1 code will not 
support cross compilation. It gives an error message about not being able 
to test its results and then exits before it creates a Makefile. To get 
around this bug, I edited the configure shell script so that whenever it 
performs the cross compilation test it now prints a warning message and 
continues.

This is how I generated my Makefile.

I obtained and built the latest zlib and openssl code, as per the 
directions that came with openssh-3.5p1. I set the Library and Include 
paths in the Makefile to refer these packages, and I verified (by 
temporarily renaming the old packages so that references to them would 
fail.) that the openssh-3.5p1 actually refers to the new packages.

------------ THE PROBLEM -----------------------------

The openssh-3.5p1 code will create all object files successfully. But, when 
it tries to create program executables, it fails with the following error 
message:
[root at sparky openssh-3.5p1]# ppc_405-ld -o ssh ssh.o sshconnect.o 
sshconnect1.o sshconnect2.o sshtty.o readconf.o clientloop.o -L. 
-Lopenbsd-compat/ -L ../../lib  -lssh -lopenbsd-compat -lutil -lz 
-lnsl  -lcrypto -lcrypt
ppc_405-ld: warning: cannot find entry symbol _start; defaulting to 100028a0
/mnt/hardhat//devkit/ppc/405/bin//../target/lib/libc.so.6: undefined 
reference to `atexit'

------------- AN ATTEMPTED SOLUTION 
--------------------------------------------
In an attempt to resolve the reference to _start, I searched through all 
the libraries that came with the development kit and found that this symbol 
is either defined or referenced in the following shared object files:
/mnt/hardhat/devkit/ppc/405/target/lib/libc-2.2.3.so
/mnt/hardhat/devkit/ppc/405/target/lib/libc.so.6
/mnt/hardhat/devkit/ppc/405/target/lib/libdb-3.2.so
/mnt/hardhat/devkit/ppc/405/target/lib/libdb-3.so
/mnt/hardhat/devkit/ppc/405/target/lib/libdb.so
/mnt/hardhat/devkit/ppc/405/target/lib/libm-2.2.3.so
/mnt/hardhat/devkit/ppc/405/target/lib/libm.so.6
/mnt/hardhat/devkit/ppc/405/target/lib/libncurses.so.5
/mnt/hardhat/devkit/ppc/405/target/lib/libncurses.so.5.2
/mnt/hardhat/devkit/ppc/405/target/lib/libnss_wins.so
/mnt/hardhat/devkit/ppc/405/target/lib/libnss_wins.so.2
/mnt/hardhat/devkit/ppc/405/target/lib/libpam.so.0
/mnt/hardhat/devkit/ppc/405/target/lib/libpam.so.0.72
/mnt/hardhat/devkit/ppc/405/target/lib/libproc.so.2.0.7
/mnt/hardhat/devkit/ppc/405/target/lib/libwrap.so.0.7.6

I tried to link against each one of these object files in order to resolve 
the reference to _start. This didn't work.

Then, in an act of final but defiant desperation, I changed my Makefile to 
that it referred to the old ssl and zlib modules. (I wanted to be sure that 
I hadn't made an error when I built them.)

This didn't help.

Any suggestions?





John Zavgren
603-654-5557 (home)
603-801-2094 (mobile)
-- 




More information about the openssh-unix-dev mailing list