Bug 60218 - gcc-3.1-0.21 : broken symlink when %{_prefix} is long.
gcc-3.1-0.21 : broken symlink when %{_prefix} is long.
Status: CLOSED CURRENTRELEASE
Product: Red Hat Raw Hide
Classification: Retired
Component: gcc3 (Show other bugs)
1.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-02-22 07:03 EST by Sergey Ostrovsky
Modified: 2007-04-18 12:40 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-10-04 19:04:13 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Sergey Ostrovsky 2002-02-22 07:03:40 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:0.9.5+) Gecko/20011103

Description of problem:
These are actually comments to the patch in "steps to reproduce"...
1) Some people use Red Hat components on their own systems,
   so using %{_vendor} where appropriate would be useful,
   while on Red Hat system %{_vendor}==redhat automagically ...
2) When %{_prefix} path has more than one dir node
   ( like /usr/local ), that relative symlink will be broken.


Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
--- gcc31.spec.orig     Tue Feb  5 06:51:46 2002
+++ gcc31.spec  Fri Feb 22 06:05:43 2002
@@ -275,8 +275,8 @@
 TARGET_PLATFORM=%{_target_platform}

 # There are some MP bugs in libstdc++ and libjava Makefiles
-make -C *-redhat-linux/libstdc++-v3
-make -C *-redhat-linux/libjava
+make -C *-%{_vendor}-linux/libstdc++-v3
+make -C *-%{_vendor}-linux/libjava

 make prefix=$RPM_BUILD_ROOT%{_prefix} mandir=$RPM_BUILD_ROOT%{_mandir} \
   infodir=$RPM_BUILD_ROOT%{_infodir} install
@@ -307,7 +307,7 @@
 mv -f $RPM_BUILD_ROOT%{_prefix}/lib/libgcc_s.so.1
$RPM_BUILD_ROOT/%{_lib}/libgcc_s-%{gcc_version}-%{DATE}.so.1
 chmod 755 $RPM_BUILD_ROOT/%{_lib}/libgcc_s-%{gcc_version}-%{DATE}.so.1
 ln -sf libgcc_s-%{gcc_version}-%{DATE}.so.1 $RPM_BUILD_ROOT/%{_lib}/libgcc_s.so.1
-ln -sf ../../%{_lib}/libgcc_s.so.1 $RPM_BUILD_ROOT%{_prefix}/%{_lib}/libgcc_s.so
+ln -sf $( echo "%{_prefix}" | %{__sed} 's/[\/][^\/]*/\.\.\//g'
)../%{_lib}/libgcc_s.so.1 $RPM_BUILD_ROOT%{_prefix}/%{_lib}/libgcc_s.so
 mv -f $FULLPATH/libobjc.so.1* $RPM_BUILD_ROOT%{_prefix}/%{_lib}/
 pushd $FULLPATH
 if [ "%{_lib}" = "lib" ]; then


Additional info:
Comment 1 Jakub Jelinek 2004-10-04 19:04:13 EDT
Current gcc{32,33,34,4a}.spec uses absolute, not relative symlink
for libgcc_s.so.

Note You need to log in before you can comment on or make changes to this bug.