[Scratchbox-users] Using Foriegn Toolchain error

Jussi Hakala jussi.hakala at movial.fi
Thu Jun 26 11:32:26 EEST 2008


You can try something like [1] to figure out what's exactly happening 
when gcc is executed.

That should reveal at least some of the potential pitfalls and help 
adjust your toolchain...

Regards,

   Jussi


[1] echo '' | gcc -v -x c - 2>&1 | less

E Robertson wrote:
> On Wednesday 25 June 2008 08:26:24 am Jussi Hakala wrote:
>> E Robertson wrote:
>>> I get this when I run that comand:
>>>
>>> sb-conf: No fakeroot versions found for compiler: host-gcc
>> Ah, yes.
>>
>> I don't know what I was thinking when I wrote that, sorry :)
>>
>> Is the error message the same if you try to run anything else under
>> fakeroot, for example:
>>
>> $ fakeroot ls -l
>>
>> If it is, the fakeroot in your current environment is broken. You can
>> try recreating the target to see if it's a problem with your target, say
>>
>> $ sb-conf st host2 -c host-gcc -d perl:debian-etch -t none
>> $ sb-conf in host2 -c -d -e
>> $ sb-conf se host2
>>
>> and retry. Above command should provide you with a clean host target, in
>> which you should be able to compile toolchain-extras on top of your
>> precompiled toolchain just fine.
>>
>> The error message is about fakeroot being unable to preload the library
>> containing the wrapper functions and thus failing to provide you with
>> the fake root environment.
>>
>> There can be a number of reasons why this is happening.
>>
>> For further digging in the subject, you can also try
>>
>> $ which -a fakeroot
>>
>> in your current target to verify which fakeroot is actually run (and
>> check also the hash to see what's in there).
>>
> 
> Hi Jussi,
> This perhaps makes more sense to you but I think I know what's happening but I 
> can't explain why. I decided to make clean and start over and I for the same 
> fakeroot error. So I deleted everything in my toolchain directory and 
> re-populate it. Now at this point I only have bin, lib, include and usr 
> directories at the root of my compiler.
> when I ran the make again, it build some files. At least no fakeroot errors.
> Now it's time to build some deb files and that worked to a point when building 
> fakeroot from source. This is what config.log looks like for that error (I 
> explain more further):
> 
> Thread model: posix
> gcc version 4.2.4
> configure:2558: $? = 0
> configure:2560: /scratchbox/compilers/arm-gcc4.2.4-uclibc0.9.29/bin/arm-linux-uclibc-gcc -V 
> </dev/null >&5
> arm-linux-uclibc-gcc: '-V' option must have argument
> configure:2563: $? = 1
> configure:2586: checking for C compiler default output file name
> configure:2589: /scratchbox/compilers/arm-gcc4.2.4-uclibc0.9.29/bin/arm-linux-uclibc-gcc -O2   
> conftest.c  >&5
> arm-linux-uclibc-gcc: error trying to exec 'cc1': execvp: No such file or 
> directory
> configure:2592: $? = 1
> configure: failed program was:
> | /* confdefs.h.  */
> |
> | #define PACKAGE_NAME "fakeroot"
> | #define PACKAGE_TARNAME "fakeroot"
> | #define PACKAGE_VERSION "1.4.2"
> | #define PACKAGE_STRING "fakeroot 1.4.2"
> | #define PACKAGE_BUGREPORT "schizo at debian.org"
> | #define PACKAGE "fakeroot"
> | #define VERSION "1.4.2"
> | /* end confdefs.h.  */
> |
> | int
> | main ()
> | {
> |
> |   ;
> |   return 0;
> | }
> configure:2631: error: C compiler cannot create executables
> 
> 
> OK. so now I added libexec to my toolchain root and took care of that error, 
> but got another sort-of related error:
> 
> Thread model: posix
> gcc version 4.2.4
> configure:2558: $? = 0
> configure:2560: /scratchbox/compilers/arm-gcc4.2.4-uclibc0.9.29/bin/arm-linux-uclibc-gcc -V 
> </dev/null >&5
> arm-linux-uclibc-gcc: '-V' option must have argument
> configure:2563: $? = 1
> configure:2586: checking for C compiler default output file name
> configure:2589: /scratchbox/compilers/arm-gcc4.2.4-uclibc0.9.29/bin/arm-linux-uclibc-gcc -O2   
> conftest.c  >&5
> /scratchbox/compilers/arm-gcc4.2.4-uclibc0.9.29/bin/../lib/gcc/arm-linux-uclibc/4.2.4/../../../../arm-linux-uclibc/bin/ld: 
> crt1.o: No such file: No such file or directory
> collect2: ld returned 1 exit status
> configure:2592: $? = 1
> configure: failed program was:
> | /* confdefs.h.  */
> |
> | #define PACKAGE_NAME "fakeroot"
> | #define PACKAGE_TARNAME "fakeroot"
> | #define PACKAGE_VERSION "1.4.2"
> | #define PACKAGE_STRING "fakeroot 1.4.2"
> | #define PACKAGE_BUGREPORT "schizo at debian.org"
> | #define PACKAGE "fakeroot"
> | #define VERSION "1.4.2"
> | /* end confdefs.h.  */
> |
> | int
> | main ()
> | {
> |
> |   ;
> |   return 0;
> | }
> configure:2631: error: C compiler cannot create executables
> 
> all these files (crtX.o) are in my lib directory and for some reason it seem 
> to be looking somewhere else for it. One of my paths seems to be off but I 
> haven't been able to find it, or maybe it's looking in a specific place.
> Do you have any clues?
> 
> 
> The point I was making earlier is, if I now did a make clean and remake the 
> toolchain extras, I will get the fakeroot error. It apprears that once one of 
> the needed files has been created by the package (don't know which ones yet), 
> it will fail. The quickest way is to delete and re-populate. Make any sense?
> 
> Thanks.
> E!
> 
> by the way, this is my config arguments(if that helps):
> 
> $ ./configure --with-ipc=tcp --program-suffix=-tcp --libdir=/usr/lib/libfakeroot 
> CC=/scratchbox/compilers/arm-gcc4.2.4-uclibc0.9.29/bin/arm-linux-uclibc-gcc --target=arm-linux-uclibc --host=arm-linux-uclibc
> 
> 
> 
> 
>>>>> dpkg-architecture: warning: Unknown gcc system type arm-linux-uclibc,
>>>>> falling back to default (native compilation)
>>>>> dpkg-architecture: warning: Unknown gcc system type arm-linux-uclibc,
>>>>> falling back to default (native compilation)
>>>>> dpkg-buildpackage: host architecture i386
>>>>> dpkg-buildpackage: source version without epoch 4.2.4-sb1
>>>>> dpkg-checkbuilddeps: Using Scratchbox tools to satisfy builddeps
>>>>>  fakeroot debian/rules clean
>>>>> fakeroot: preload library not found, aborting.
>>>>> make[1]: *** [build-packages] Error 1
>>>>> make[1]: Leaving directory
>>>>> `/home/erobertson/sb-toolchain-extras/cc/gcc-3.4-debian'
>>>>> make: *** [dep-../../cc/gcc-3.4-debian] Error 2
>>>>> make: Leaving directory
>>>>> `/home/erobertson/sb-toolchain-extras/meta/alien-tc'
>>>>> [sbox-HOST: ~/sb-toolchain-extras] >
>>>>>
> 
> 
> 



More information about the Scratchbox-users mailing list