gpsd cross-compile problem

Holger
Hello,
I try to compile gpsd for the Mini6410.
lsusb on the Mini:

Bus 001 Device 002: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial
Port

So I get the sources for gpsd, cd to gpsd and write an .scons-option-cache:
libgpsmm = False
libQgpsmm = False
python = False
prefix = '/workroot/output/staging/usr/'
target = 'arm-none-linux-gnueabi'
sysroot = '/workroot/output/staging/'

Run scons, I get:

/opt/FriendlyARM/toolschain/4.5.1/lib/gcc/arm-none-linux-gnueabi/4.5.1/../../../
../arm-none-linux-gnueabi/bin/ld:
crt1.o: No such file: No such file or directory

$ locate crt1.o
/opt/FriendlyARM/toolschain/4.5.1/arm-none-linux-gnueabi/sys-root/usr/lib/Mcrt1.
o
/opt/FriendlyARM/toolschain/4.5.1/arm-none-linux-gnueabi/sys-root/usr/lib/Scrt1.
o
/opt/FriendlyARM/toolschain/4.5.1/arm-none-linux-gnueabi/sys-root/usr/lib/crt1.o

/opt/FriendlyARM/toolschain/4.5.1/arm-none-linux-gnueabi/sys-root/usr/lib/gcrt1.
o
/usr/lib32/Mcrt1.o
/usr/lib32/Scrt1.o
/usr/lib32/crt1.o
/usr/lib32/gcrt1.o
/usr/lib64/Mcrt1.o
/usr/lib64/Scrt1.o
/usr/lib64/crt1.o
/usr/lib64/gcrt1.o

I added
/opt/FriendlyARM/toolschain/4.5.1/arm-none-linux-gnueabi/sys-root/usr/lib
to /etc/ld.so.conf und run ldconfig, but with the same result.

I set LIBRARY_PATH with now success.

What have I to do that the ld the crt1.o could find?

I worked on a 64 bit Gentoo, but the toolchain is working. I compiled
QT4.8.1 successful for the Mini.

Or is their a simple solution to get gps data without the gpsd? 

Greetings from Germany
Holger

holger
Solved.

I added 
sysroot =
'/opt/FriendlyARM/toolschain/4.5.1/arm-none-linux-gnueabi/sys-root'
libdir =
'/opt/FriendlyARM/toolschain/4.5.1/arm-none-linux-gnueabi/sys-root/usr/lib'

to $gpsd_source/.scons-option-cache and the the linker found the right
libs.

manoj
hi..
i am trying to develop a toolchain for gcc for beagle board.
at the last step i am facing the error that crt1.o not found.

I tried to understand your artical but didn't get it.

[root@Mannu 4.5.1]# locate crt1.o
/usr/lib/Mcrt1.o
/usr/lib/Scrt1.o
/usr/lib/crt1.o
/usr/lib/gcrt1.o

.
.
locate gives me the above output..

where to add the crt1.o exactly..

Manoj   |  India

holger
Where did you get the error?
I added it to the configure script of the application I compiled.

manoj
this is my script for creating toolchain.
The part covered with * is done...
after that when i run make -j 2 ... then it gives the error that c can not
create executables.
.
.
my target is arm-linux.
.
when i run a command to execute a hello.c program by 

arm-linux-gcc hello.c

it gives me crt1.o not found
ld retrurns 1
.
.
.


.
.
#!/bin/bash
#delete old toolchain
GAP=////////////////////////////////////////////////////////////////////////////
////////////////////////////////////
echo $GAP
echo "Delete old directory of toolchain ?"
#read i
rm -rf /home/toolchain_project/
#go to home directory
cd /home
echo $(pwd)
#read i
#make toolchain directory
mkdir toolchain_project
cd /home/toolchain_project


mkdir Control-project
cd /home/toolchain_project/Control-project
echo $GAP
echo "make important directories like build-tools tools etc.? "
#read i

mkdir bootldr build-tools debug doc images kernel project rootfs sysapps
tmp tools
echo $GAP
ls
echo $GAP
echo "copy kernel 2.6.10 from downloads ? "
#read i
cp /home/mannu/Downloads/linux-2.6.10.tar.gz
/home/toolchain_project/Control-project/kernel/
echo $GAP
cd /home/toolchain_project/Control-project/kernel
echo $GAP
echo "you are here..."
echo $(pwd)
echo $GAP
echo "uncompress kernel ? "
#read i
tar -xvzf linux-2.6.10.tar.gz
cd /home/toolchain_project/Control-project/kernel/linux-2.6.10
echo "configure kernel ? "
#read i
echo $GAP
make ARCH=arm CROSS_COMPILE=arm-linux- menuconfig
cd /home/toolchain_project/Control-project/tools
mkdir arm-linux
cd /home/new_project
echo $GAP
echo "copy script of Environment variables from /home/new_project/ ?"
#read i
export PROJECT=/home/toolchain_project/Control-project
export PRJROOT=/home/toolchain_project
export TARGET=arm-linux
export PREFIX=$PROJECT/tools
export TARGET_PREFIX=$/PREFIX/$TARGET
export PATH=$PREFIX/bin:$PATH
cd $PROJECT


#cp /home/new_project/script /home/toolchain_project/
#cd /home/toolchain_project/
echo $GAP
echo $(pwd)
echo "Run script of Environment variable ? "
echo $GAP
#. ./script
echo $GAP
echo "you are here..."
echo $(pwd)
echo $GAP
#read i
mkdir -p ${TARGET_PREFIX}/include
cp -r $PROJECT/kernel/linux-2.6.10/include/linux ${TARGET_PREFIX}/include
cp -r $PROJECT/kernel/linux-2.6.10/include/asm-arm
${TARGET_PREFIX}/include/asm
cp -r $PROJECT/kernel/linux-2.6.10/include/asm-generic
${TARGET_PREFIX}/include
cd /home/toolchain_project/Control-project/build-tools
echo $GAP
echo $(pwd)
echo "generating build-binutils build-gcc build-newlib build-boot-gcc"
echo $GAP
#read i
mkdir build-binutils build-gcc build-newlib build-boot-gcc
cp /home/mannu/Downloads/mpfr-3.0.0.tar.bz2 ./
cp /home/manoj_board/Control-project/build-tools/gcc-4.5.1.tar.bz2 ./
cp /home/manoj_board/Control-project/build-tools/gmp-5.0.1.tar.bz2 ./
cp /home/manoj_board/Control-project/build-tools/binutils-2.20.1.tar.bz2 ./
cp /home/manoj_board/Control-project/build-tools/newlib-1.20.0.tar.gz ./
cp /home/mannu/Downloads/mpc-0.8.2.tar.gz ./
echo "uncompressing all files..."
echo $GAP
echo $GAP
tar -xvjf binutils-2.20.1.tar.bz2
tar -xvjf gcc-4.5.1.tar.bz2
tar -xvjf mpfr-3.0.0.tar.bz2
tar -xvjf gmp-5.0.1.tar.bz2
tar -xvzf newlib-1.20.0.tar.gz
tar -xvzf mpc-0.8.2.tar.gz
echo $GAP
cd /home/toolchain_project/Control-project/build-tools/build-binutils/
echo $GAP
echo "you are here....."
echo $(pwd)
echo "press enter to start configuration of binutils..."
echo $GAP
#read i
../binutils-2.20.1/configure --target=$TARGET --prefix=$PREFIX
--enable-interwork --disable-multilib --with-gnu-as --with-gnu-ld
--disable-nls --disable-werror
echo "Wanna run make -j 2 for binutils ? "
echo $GAP
#read i
echo $GAP
echo $GAP
make -j 2
echo "Ready to install ? "
echo $GAP
#read i
make install
cd ..
cd gcc-4.5.1
echo "check for the current directory... is it gcc-4.5.1... if not then
press ctrl+z...:-)"
echo $(pwd)
echo "press enter to start configuration of build-boot-gcc..."
echo $GAP
#read i
mv ../gmp-5.0.1 gmp
mv ../mpfr-3.0.0 mpfr
mv ../mpc-0.8.2 mpc
cd ../build-boot-gcc
../gcc-4.5.1/configure --target=$TARGET --prefix=$PREFIX --enable-interwork
--disable-multilib --enable-languages="c" --with-newlib
--with-gmp-include=$(pwd)/gmp --with-gmp-lib=$(pwd)/gmp/.libs
--without-headers --disable-shared --disable-nls --with-gnu-as
--with-gnu-ld
echo "ready to make bootstrap compiler..?"
echo $GAP
#read i
make -j 2 all-gcc
make install-gcc
echo "ready for build-newlib ? "
echo "press enter to start configuration of build-newlib..."
echo $GAP
#read i
cd ../build-newlib/
../newlib-1.20.0/configure --target=$TARGET --prefix=$PREFIX
--enable-interwork --disable-multilib --with-gnu-as --with-gnu-ld
--disable-nls
echo "ready to make ? "
echo $GAP
#read i
make -j 2
make install
echo $GAP
echo "you are here..."
echo $(pwd)

echo "press enter to start configuration of build-gcc..."
echo $GAP
#read i

echo $GAP
cd ../build-gcc/
***********************************************************************
../gcc-4.5.1/configure --target=$TARGET --prefix=$PREFIX --enable-interwork
--disable-multilib --enable-languages="c,c++" --with-newlib
--with-gmp-include=$(pwd)/gmp --with-gmp-lib=$(pwd)/gmp/.libs
--without-headers --disable-shared --disable-libssp --disable-nls
--disable-hardfloat --enable-threads=single --with-gnu-as --with-gnu-ld
**********************************************************************
echo $GAP
echo $GAP
echo "arrived at last step... ready to make..?"
echo $GAP
echo $GAP
#read i
make -j 2.....#here i m getting error.


                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                169,0-1       Bot