Bugzilla – Bug 90685
link error when class is compiled with different visibility
Last modified: 2006-10-05 11:01:02 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.
Created attachment 39120 [details] testcase
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.
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.
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.
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
this looks like a duplicate or relative to bug #83908
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...
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 :-(
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...
Yes, I also experienced this problem while trying to build Mozilla.
a workaround is to remove the gcc-hidden.h files (or comment out the pragma's in there).
fixed in 10.2