Gerald Pfeifer <[EMAIL PROTECTED]> writes:

> We currently perform the following sequence of commands as part of the 
> installation (-m 444 being the default on current FreeBSD systems).
> 
>   install -m 444 ./libgcc.a 
> /prefix/lib/gcc/i386-portbld-freebsd5.4/3.4.5/gcc/i386-portbld-freebsd5.4/3.4.5/
>   ranlib 
> /prefix/lib/gcc/i386-portbld-freebsd5.4/3.4.5/gcc/i386-portbld-freebsd5.4/3.4.5/libgcc.a
> 
> This works fine when running as root, but when doing an installation as
> user, installation fails:
>  
>   ranlib: unable to copy file 
> '/prefix/lib/gcc/i386-portbld-freebsd5.4/3.4.5/gcc/i386-portbld-freebsd5.4/3.4.5/libgcc.a'
>  reason: Permission denied
>   gmake[2]: *** [install] Error 1
> 
> 
> I believe installing libraries with permissions 444 ought to be okay,
> as is for ranlib to refuse working on files which are not writeable.
> 
> Does anyone disagree (and if not, have suggestions how to address this
> in GCC)?

ranlib is basically never required on a modern system.  It is really
only needed if the archive is built with the S option to ar.

So I think the best way to address this is to not run ranlib.

Ian

Reply via email to