This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Problem with cross-compiled gcc


Hi!

I'm currently trying to create a working GNU/Linux system with Mac OS X. The new system goes to an ext2 partition mounted on $LFS.

First I used crosstool to make a cross-compiler with build=host=powerpc-apple-darwin7.2.0, and target=powerpc-750-linux-gnu.

Then I installed the linux kernel headers and the kernel itself, and a bootloader

Then I copied glibc to the new partition: cp -r /opt/crosstool/*/*/powerpc-750-linux-gnu/lib/* $LFS/lib/

Then, I installed gcc-3.3.3 and binutils-2.14 with the following command:

mkdir binutils-build &&\
cd binutils-build &&\
../binutils-2.14/configure --build=powerpc-apple-darwin7.2.0 --host=powerpc-750-linux-gnu --target=powerpc-750-linux-gnu --with-sysroot= --prefix=$LFS/usr/ --enable-shared --disable-nls &&\
make &&\
make install &&\
cd .. &&\
\
mkdir gcc-build &&\
cd gcc-build &&\
../gcc-3.3.3/configure --build=powerpc-apple-darwin7.2.0 --host=powerpc-750-linux-gnu --target=powerpc-750-linux-gnu --with-sysroot= --prefix=$LFS/usr/ --enable-shared --disable-nls --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-languages=c,c++ --disable-multilib &&\
make &&\
make install &&\
cd ..


Further, I installed bash, coreutils, findutils, gawk, sed, make, tar, gzip, bzip2, patch, diffutils, grep.

I was able to boot into the new system, and all installed programs worked without problems.

However, gcc had the following problem: Whenever it was called with the working directory being more than two levels below the root directory, it aborted with: "installation problem, cannot exec `cc1': No such file or
directory". Otherwise it works fine (flawlessly compiles a hello world program).


Maybe this is connected to the fact that "make install" for gcc sometimes wrote:
[...]
PATH="$PATH:/sbin" ldconfig -n /Volumes/root//usr//lib/.
../libtool: line 1: ldconfig: command not found
----------------------------------------------------------------------
Libraries have been installed in:
/Volumes/root//usr//lib/.


If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,--rpath -Wl,LIBDIR' linker flag
   - have your system administrator run these commands:
       PATH="$PATH:/sbin" ldconfig -n /Volumes/root//usr//lib/.

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
[...]


Does someone have an idea what is wrong?


Thanks,
Martin


------ Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]