LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-03-2013, 10:21 AM   #1
harinathreddy.c
LQ Newbie
 
Registered: Dec 2010
Posts: 26

Rep: Reputation: 1
cross compilation issue with openssh


Hi Folks,

I have compiled openssl with openssl.mk that has been attached. It was compiled successfully.
I am compiling the openssh with openssh.mk that has been also attached.

here :
crosscompiler path:
/opt/toolchains/uclibc-crosstools-gcc-4.4.2-1


I am facing the compilation issue like as fallows.

Quote:
mips-linux-uclibc-ld -o ssh ssh.o readconf.o clientloop.o sshtty.o sshconnect.o sshconnect1.o sshconnect2.o -L. -Lopenbsd-compat/ -L/home/netgear/Projects/APCONTROLLER_MIPS/ngos/Feature_APController/SW/Westell/userapps/APController/Controller/M4/packages/build/openssl-0.9.8l/ -L/home/netgear/Projects/APCONTROLLER_MIPS/ngos/Feature_APController/SW/opensource/minidlna/zlib-1.2.3 -L/opt/toolchains/uclibc-crosstools-gcc-4.4.2-1/usr/mips-linux-uclibc/lib -L/home/netgear/Projects/APCONTROLLER_MIPS/ngos/Feature_APController/SW/Westell/userapps/APController/Controller/M4/packages/build/openssl-0.9.8l/ -lssh -lopenbsd-compat -lcrypto -lutil -lz -lcrypt -lresolv -lresolv
mips-linux-uclibc-ld: warning: libgcc_s.so.1, needed by /home/netgear/Projects/APCONTROLLER_MIPS/ngos/Feature_APController/SW/Westell/userapps/APController/Controller/M4/packages/build/openssl-0.9.8l//libcrypto.so, not found (try using -rpath or -rpath-link)
mips-linux-uclibc-ld: warning: cannot find entry symbol __start; defaulting to 0000000000405e40
clientloop.o: In function `client_loop':
clientloop.c.text+0x5b38): undefined reference to `__gtdf2'
./libssh.a(umac.o): In function `uhash_init':
umac.c.text+0x20d4): undefined reference to `__umoddi3'


I tried to attach them , it is saying invalid file after i have selected them.

openssl.mk
Quote:
Code:
SSL_TARGET=mips-linux

PKG:=openssl
VERSION:=0.9.8l
DIR:=${PKG}-${VERSION}
LDFLAGS=${TOOLCHAIN_TOP}/usr/${HOST}/lib
.PHONY: all
all: install

${DIR}/.build_complete: ${DIR}/Makefile.bak
        ${MAKE} -j1 -C ${DIR} AR="${AR} -r"
        touch ${DIR}/.build_complete

${DIR}/Makefile.bak: ${DIR}/Configure
        cd ${DIR} && ./Configure -L${LDFLAGS} shared  --openssldir=/tmp/wnc/openssl  ${SSL_TARGET}

.PHONY: install
install: ${DIR}/.build_complete
        ${MAKE} -j1 -C ${DIR} INSTALL_PREFIX=${ROOT} install_sw
        $(STRIP) ${ROOT}/wnc/openssl/bin/openssl
        
${DIR}/Configure:
        tar -zxf ${STORAGE}/${PKG}-${VERSION}.tar.gz
        cd ${DIR} && patch -p0 < ${STORAGE}/openssl.patch && patch -p1 < ${STORAGE}/openssl_mips.patch

~
openssh.mk
Quote:
Code:
.NOTPARALLEL:

include ../.config

PKG:=openssh
VERSION:=5.0p1
DIR:=${PKG}-${VERSION}

#ZLIBDIR=${TOPDIR}/linux/embedded_rootfs/build/zlib-1.2.3/
SSLDIR=${TOPDIR}/packages/build/openssl-0.9.8l/
ZLIBDIR=${ZLIB_DIR}
#SSLDIR=${LIBOPENSSL_DIR}

.PHONY: all
all: build install

.PHON: build
build: ${DIR} ${DIR}/Makefile
        ${MAKE} -C ${DIR}
        
${DIR}/Makefile:
        #cd ${DIR} && ./configure --prefix=${ROOT} --host=${CROSS} --disable-strip --with-privsep-path=/var --with-zlib=${ZLIBDIR} --with-ssl-dir=${SSLDIR} --with-linux=${KERNEL_DIR}/ LD=${CC} CFLAGS="-mabi=64" LDFLAGS="-mabi=64" && patch -p0 < ${STORAGE}/openssh-make.patch
        cd ${DIR} && ./configure --prefix=${ROOT} --host=${HOST} --disable-strip --with-privsep-path=/var --with-zlib=${ZLIBDIR} --with-ssl-dir=${SSLDIR} --with-linux=${KERNEL_DIR}/  LD=${CROSS_COMPILE}ld CFLAGS="" LDFLAGS="-L${EXTRALIBDIR} -L${SSLDIR}" && patch -p0 < ${STORAGE}/openssh-make.patch
.PHONY: install
install: ${DIR}
        cd ${DIR} && echo LogLevel QUIET >> sshd_config && ${MAKE} install-nokeys

${DIR}:
        tar -zxf ${STORAGE}/${PKG}-${VERSION}.tar.gz
~


Thanks,
Harinath
 
Old 07-16-2013, 08:03 AM   #2
elucches
Member
 
Registered: Jan 2011
Posts: 108

Rep: Reputation: 11
Hello Harinath,
I don't know if it will help you, but when I compiled it for ARM I followed this.
Best regards,
Esteban
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cross-compilation issue in Ubuntu 12.04 indarkness Ubuntu 0 02-11-2013 11:44 PM
Config Problem With Cross-Compiled OpenSSH Mahonri Linux - General 2 06-02-2007 11:41 AM
Config Problem With Cross-Compiled OpenSSH Mahonri Linux - Software 0 06-01-2007 01:02 PM
openssh compilation solaris simquest Linux - Software 5 04-27-2007 09:09 AM
OpenSSH-3.7.1p1 compilation error (bsd-compat) keex Linux - Software 1 10-01-2003 01:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration