Bug 60218 - gcc-3.1-0.21 : broken symlink when %{_prefix} is long.
Summary: gcc-3.1-0.21 : broken symlink when %{_prefix} is long.
Alias: None
Product: Red Hat Raw Hide
Classification: Retired
Component: gcc3 (Show other bugs)
(Show other bugs)
Version: 1.0
Hardware: i386 Linux
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2002-02-22 12:03 UTC by Sergey Ostrovsky
Modified: 2007-04-18 16:40 UTC (History)
0 users

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

Attachments (Terms of Use)

Description Sergey Ostrovsky 2002-02-22 12:03:40 UTC
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:

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 @@

 # 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
 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 23:04:13 UTC
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.