Simon J Mudd wrote:
Doug Summers <[EMAIL PROTECTED]> writes:
Henri - I got the exact same results with GCC 3.3.6 (from CURRENT). It
seems that the compile works fine, but the spec file is wrong. Just
before it crashes these commands are executed:
+ mv /openpkg/RPM/TMP/gcc33-3.3.6-root/openpkg/lib/pthread/libiberty.a
/openpkg/RPM/TMP/gcc33-3.3.6-root/openpkg/lib/pthread/libstdc++.a
/openpkg/RPM/TMP/gcc33-3.3.6-root/openpkg/lib/pthread/libsupc++.a
/openpkg/RPM/TMP/gcc33-3.3.6-root/openpkg/lib/gcc33-lib/powerpc-ibm-aix5.1.0.0/3.3.6/pthread/
+ rm -rf /openpkg/RPM/TMP/gcc33-3.3.6-root/openpkg/lib/pthread
>>>> this line is the culprit <<<<
And here's where it fails:
+ mv
'/openpkg/RPM/TMP/gcc33-3.3.6-root/openpkg/lib/pthread/power/lib*.a'
/openpkg/RPM/TMP/gcc33-3.3.6-root/openpkg/lib/gcc33-lib/powerpc-ibm-aix5.1.0.0/3.3.6/pthread/power/
mv: cannot rename
/openpkg/RPM/TMP/gcc33-3.3.6-root/openpkg/lib/pthread/power/lib*.a to
/openpkg/RPM/TMP/gcc33-3.3.6-root/openpkg/lib/gcc33-lib/powerpc-ibm-aix5.1.0.0/3.3.6/pthread/power//lib*.a:
No such file or directory
>>>> of course there's no files - <<<<
>>>> the above rm -rf command killed them <<<<
I wish I knew more about .spec files but I'm not sure how to fix this.
This comes from the spec file entry (%install) section
(see http://cvs.openpkg.org/getfile/openpkg-src/gcc33/gcc33.spec)
%install
rm -rf $RPM_BUILD_ROOT
# fetch GNU platform triple
triple=`./config.guess`
# perform the standard installation procedure
( cd obj
%{l_make} %{l_mflags} install \
INSTALL="%{l_shtool} install -c" \
DESTDIR=$RPM_BUILD_ROOT
) || exit $?
# cleanup installation tree
mv $RPM_BUILD_ROOT%{l_prefix}/lib/lib*.a \
$RPM_BUILD_ROOT%{l_prefix}/lib/gcc%{V_comp}-lib/${triple}/%{V_full}/
for multilib in `$RPM_BUILD_ROOT%{l_prefix}/bin/gcc --print-multi-lib`; do
subdir=`echo "$multilib" | sed -e 's/;.*$//'`
[ ".$subdir" = .. ] && continue
mv $RPM_BUILD_ROOT%{l_prefix}/lib/$subdir/lib*.a \
$RPM_BUILD_ROOT%{l_prefix}/lib/gcc%{V_comp}-lib/${triple}/%{V_full}/$subdir/
rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib/$subdir
done
...
The mv above is failing.
The %install section is used to "copy" the correctly built software
into the "right location" for the final package. The directory tree
has a temporary prefix $RPM_BUILD_ROOT, but everything is otherwise
ok. It looks like the gcc "libraries" are being "relocated" because
they can NOT be put in /lib,/usr/lib on the target platform, and are
so put under %{l_prefix}.
The question really comes down to is "where are the lib*.a files" as
if the mv fails they are NOT in the expected location of
$RPM_BUILD_ROOT%{l_prefix}/lib/lib*.a.
I'll see if I can get the compile to run on a box I have access to and
see where the libraries really are.
Regards,
Simon
______________________________________________________________________
The OpenPKG Project www.openpkg.org
User Communication List openpkg-users@openpkg.org
The only reason the mv is failing is because an earlier cleanup killed
the parent directory. The pthread directory is being removed before the
pthread/power files are moved.
Doug
______________________________________________________________________
The OpenPKG Project www.openpkg.org
User Communication List openpkg-users@openpkg.org