Bug 90685

Summary: link error when class is compiled with different visibility
Product: [openSUSE] SUSE LINUX 10.0 Reporter: Dirk Mueller <dmueller>
Component: DevelopmentAssignee: Michael Matz <matz>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: kairo
Version: unspecified   
Target Milestone: ---   
Hardware: Other   
OS: All   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: testcase

Description Dirk Mueller 2005-06-14 14:33:25 UTC
Hi,  
 
I'm not sure if this is a bug in the testcase or in gcc. I'm experiencing a  
weird linker error that only happens when using -fPIC and the mixed 
visibility. see testcase. also reported as bug in gcc 22063.
Comment 1 Dirk Mueller 2005-06-14 14:34:25 UTC
Created attachment 39120 [details]
testcase
Comment 2 Michael Matz 2005-06-14 15:04:35 UTC
Btw. have you reproduce this also with the CVS GCC 4.0?  I'm asking because 
we have some additional patches fiddling with visibility on top. 
Comment 3 Dirk Mueller 2005-06-14 16:24:18 UTC
not yet, will do.. the gcc bugzilla maintainers are pretty quick with closing 
bugreports if they can't reproduce it with plain CVS anyway. I'll let you 
know.  
Comment 4 Dirk Mueller 2005-08-19 18:41:29 UTC
I can reproduce it with (build from CVS today): 
 
$ gcc -v 
Using built-in specs. 
Target: i686-pc-linux-gnu 
Configured with: ../configure --prefix=/opt/gcc --enable-c99 
--enable-long-long --enable-shared --enable-threads --enable-languages=c,c++ 
--disable-checking --enable-werror --with-system-zlib 
Thread model: posix 
gcc version 4.0.2 20050819 (prerelease) 
 
 
It doesn't seem to happen with the redhat incarnation of gcc though. 
 
 
Comment 5 Robert Kaiser 2005-09-02 01:52:52 UTC
I think I'm seeing this with 10.0beta4 on a machine I'm trying to set up to
compile current SeaMonkey source (successor of Mozilla suite).

Actually, it's failing in zlib there, which uses -fPIC.

See (the end of) the build log at
http://tinderbox.mozilla.org/showlog.cgi?log=MozillaTest/1125623880.7171.gz&fulltext=1
Comment 6 Wolfgang Rosenauer 2005-09-02 12:20:22 UTC
this looks like a duplicate or relative to bug #83908
Comment 7 Robert Kaiser 2005-09-02 12:40:32 UTC
Would the patch in http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20297 fix this?
If someone provides an rpm for beta4 with this patch, I'd be happy to test it on
my tinderbox machine...
Comment 8 Michael Matz 2005-09-02 13:21:38 UTC
Robert, your bug is really #83908, like Wolfgang mentioned, not this one. 
Both have to do with visibility, but HJ's patch only deals with builtins, 
which is where you have the problems.  HJ's patch would not fix the initial 
problem reported here, but possibly might fix the problem in SeaMonkey. 
 
The problem is, that HJ's patch was controversial and hence never included. 
So short before release I'm also reluctant to include it in our release 
compiler :-( 
Comment 9 Robert Kaiser 2005-09-02 13:38:41 UTC
Oh, sorry, it seemed so similar that I thought it might be the same bug.

Regarding the patch, I only fear that quite a bunch of developers might stumble
over it after release... It might be an idea to make an rpm publicly available
and link it from the bug so that those running into the problem can at least
easily try it... but that might be better discussed over in bug #83908...
Comment 10 Dirk Mueller 2005-09-03 20:19:07 UTC
Yes, I also experienced this problem while trying to build Mozilla.  
Comment 11 Dirk Mueller 2005-09-03 20:19:56 UTC
a workaround is to remove the gcc-hidden.h files (or comment out the pragma's 
in there).  
Comment 12 Dirk Mueller 2006-10-05 11:01:02 UTC
fixed in 10.2