Re: gcc in chroot

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Eric \"Shubes\"
Date:  
To: Main PLUG discussion list
Subject: Re: gcc in chroot
Jeremy C. Reed wrote:
> On Thu, 15 Jun 2006, Eric "Shubes" wrote:
>
>> When I try to build a source package in the chroot jail, I get the following
>> message:
>>
>> gcc: installation problem, cannot exec `cc1': No such file or directory
>>
>> I can't figure out why gcc can't find cc1. It's in the same place in both
>> environments:
>> /usr/lib/gcc-lib/i386-redhat-linux/3.2.3/cc1
>> /usr/libexec/gcc/i386-redhat-linux/3.4.3/cc1
>> and permissions/owners are the same (I'm running as root anywise).
>
> Use strace (or other tracing or debugger) to see which cc1 your gcc is
> trying to use. Although both above examples look good to me.


I don't know how to do that. Can you give me an example to get me
started? I think this will be revealing.

> Also run gcc -v to see if you are using the same gcc version.


There's only one version installed that I know of. I get the same result
from inside and outside of the jail:
# gcc -v
Using built-in specs.
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--disable-checking --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-java-awt=gtk
--host=i386-redhat-linux
Thread model: posix
gcc version 3.4.5 20051201 (Red Hat 3.4.5-2)


> Also make sure you can run it while in the chroot, for example:
>
> $ echo | /usr/lib/gcc-lib/i386-redhat-linux/3.2.3/cc1
>
> Execution times (seconds)
>  TOTAL                 :   0.01             0.00             0.00


Both cc1 files run ok, same inside and outside of the jail.

> I frequently do software (and package) builds in chroot jails on Linux.


Thanks, Jeremy. That's encouraging.

>
> Jeremy C. Reed
>



--
-Eric 'shubes'
---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change you mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss