Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 127020 - filter-flag -fvisibility-inlines-hidden
Summary: filter-flag -fvisibility-inlines-hidden
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
: 126906 136883 137005 143297 144550 147216 147774 148894 155668 209638 211149 232899 305163 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-03-20 16:01 UTC by TGL
Modified: 2010-02-24 11:25 UTC (History)
12 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
wxGTK-2.6.2-r1-filter-flag.patch (wxGTK-2.6.2-r1-filter-flag.patch,653 bytes, patch)
2006-03-20 16:01 UTC, TGL
Details | Diff
wxGTK-2.6.2-r1-filter-flag.patch (wxGTK-2.6.2-r1-filter-flag.patch,654 bytes, patch)
2006-03-20 16:04 UTC, TGL
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description TGL 2006-03-20 16:01:04 UTC
I have recently recompiled my system with gcc-4.1 and the following flags (hope it's not to much ricing... if it is, well, thanks to let me know and feel free to mark WONTFIX):
  % emerge info | grep FLAGS
  CFLAGS="-march=pentium-m -O2 -pipe -g"
  CXXFLAGS="-march=pentium-m -O2 -pipe -g -fvisibility-inlines-hidden"
  LDFLAGS="-Wl,-O1 -Wl,--enable-new-dtags -Wl,--sort-common"

Since then, pgadmin3 (1.4.1 from portage, or 1.4.2 from my overlay) failed to compile (against wxGTK-2.6.2-r1):

i686-pc-linux-gnu-g++ -DDATA_DIR=\"/usr/share/pgadmin3/\" -Wall -Wno-non-virtual-dtor -I../src/include -I../src/agent/include -I../src/slony/include -march=pentium-m -O2 -pipe -g -fvisibility-inlines-hidden  -Wl,-O1 -Wl,--enable-new-dtags -Wl,--sort-common -L/usr/local/pgsql/lib -L/usr/lib -o pgadmin3  pgAdmin3.o base.o appbase.o sysLogger.o pgConnBase.o pgSetBase.o factory.o dlgClasses.o events.o pgConn.o pgSet.o keywords.o pgAggregate.o pgCast.o pgCheck.o pgCollection.o pgColumn.o pgConstraints.o pgConversion.o pgDatabase.o pgDomain.o pgForeignKey.o pgFunction.o pgGroup.o pgIndex.o pgIndexConstraint.o pgLanguage.o pgObject.o pgOperator.o pgOperatorClass.o pgRole.o pgRule.o pgSchema.o pgSequence.o pgServer.o pgTable.o pgTablespace.o pgTrigger.o pgType.o pgUser.o pgView.o pgDatatype.o pgaJob.o pgaStep.o pgaSchedule.o dlgJob.o dlgSchedule.o dlgStep.o xh_sqlbox.o xh_calb.o xh_timespin.o xh_ctlcombo.o ctlSecurityPanel.o ctlComboBox.o ctlTree.o calbox.o timespin.o ctlListView.o ctlSQLBox.o ctlSQLResult.o explainCanvas.o explainShape.o dlgEditGridOptions.o dlgConnect.o dlgHbaConfig.o dlgMainConfig.o dlgSelectConnection.o frmExport.o frmAbout.o frmIndexcheck.o frmMain.o frmOptions.o frmPassword.o frmQuery.o frmHelp.o frmSplash.o frmMaintenance.o frmBackup.o frmRestore.o frmGrantWizard.o frmEditGrid.o frmStatus.o frmUpdate.o frmConfig.o frmHbaConfig.o frmMainConfig.o frmHint.o dlgProperty.o dlgUser.o dlgServer.o dlgGroup.o dlgDatabase.o dlgLanguage.o dlgSchema.o dlgDomain.o dlgTable.o dlgTablespace.o dlgColumn.o dlgIndex.o dlgFunction.o dlgView.o dlgRule.o dlgRole.o dlgOperator.o dlgAggregate.o dlgCast.o dlgConversion.o dlgIndexConstraint.o dlgForeignKey.o dlgSequence.o dlgTrigger.o dlgType.o dlgCheck.o sysSettings.o sysProcess.o misc.o utffile.o pgconfig.o update.o slCluster.o slNode.o slPath.o slListen.o slSet.o slSequence.o slTable.o slSubscription.o dlgRepCluster.o dlgRepNode.o dlgRepListen.o dlgRepPath.o dlgRepSet.o dlgRepSequence.o dlgRepTable.o dlgRepSubscription.o xrcDialogs.o  -lssl -lcrypto -lpq -pthread -Wl,-O1 -Wl,--enable-new-dtags -Wl,--sort-common  -L/usr/X11R6/lib  -lwx_gtk2u_xrc-2.6 -lwx_gtk2u_html-2.6 -lwx_gtk2u_adv-2.6 -lwx_gtk2u_core-2.6 -lwx_baseu_xml-2.6 -lwx_baseu_net-2.6 -lwx_baseu-2.6  -pthread -Wl,-O1 -Wl,--enable-new-dtags -Wl,--sort-common  -L/usr/X11R6/lib -lwx_gtk2u_stc-2.6 -lwx_gtk2u_ogl-2.6 -lwx_baseu-2.6
explainShape.o:(.rodata._ZTV11ExplainLine[vtable for ExplainLine]+0x64): undefined reference to `wxShape::OnLeftDoubleClick(double, double, int, int)'
explainShape.o:(.rodata._ZTV11ExplainLine[vtable for ExplainLine]+0xac): undefined reference to `wxShape::OnBeginSize(double, double)'
explainShape.o:(.rodata._ZTV11ExplainLine[vtable for ExplainLine]+0xb0): undefined reference to `wxShape::OnEndSize(double, double)'
explainShape.o:(.rodata._ZTV11ExplainLine[vtable for ExplainLine]+0xb8): undefined reference to `wxShapeEvtHandler::CopyData(wxShapeEvtHandler&)'explainShape.o:(.rodata._ZTV11ExplainLine[vtable for ExplainLine]+0xec): undefined reference to `wxShape::Recompute()'
explainShape.o:(.rodata._ZTV11ExplainLine[vtable for ExplainLine]+0xf0): undefined reference to `wxShape::CalculateSize()'

(...and many more like that...)

The problem is that with -fvisibility-inlines-hidden, this symbols are dropped from the wxGTK libs.  Removing this flag and recompiling wxGTK fixed the issue, so i think it could be candidate for being filtered by flag-o-matic. I will attach an ebuild patch which does that.
Comment 1 TGL 2006-03-20 16:01:37 UTC
Created attachment 82720 [details, diff]
wxGTK-2.6.2-r1-filter-flag.patch
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2006-03-20 16:04:10 UTC
Well - don't use -fvisibility-inlines-hidden unless you *really* know what are you doing. 
Comment 3 TGL 2006-03-20 16:04:54 UTC
Created attachment 82721 [details, diff]
wxGTK-2.6.2-r1-filter-flag.patch

oops...
Comment 4 TGL 2006-03-20 16:08:46 UTC
CCing gcc-porting@ in case they have comments about whether -fv-i-h falls in the ricer category, or is a legitimate flag ebuilds should care about.

CCing pgsql-bugs@ so that they know about this issue, in case they receive bug reports about it.
Comment 5 TGL 2006-03-20 16:18:19 UTC
(In reply to comment #2)
> Well - don't use -fvisibility-inlines-hidden unless you *really* know what are
> you doing. 
> 

Oops, my previous comment crossed yours. And no, i don't really know what i'm doing :)
It's just that i've seen some good feedback about it on f.g.o, and since i had to recompile my system anyway, i've decided to give it a try (no other issue so far btw, but i don't have that much C++ things installed).
Thanks for your warning.

Btw, is there some kind of list of "supported" C(XX)FLAGS somewhere? I mean, flags that are safe enough for being cared about in ebuilds when they break something. Or is it just -march/-mtune and the -Ox level?
Comment 6 SpanKY gentoo-dev 2006-03-20 16:19:49 UTC
speaking of rice, LDFLAGS=-Wl,--enable-new-dtags is 100% pointless on Gentoo systems ... we patch all of binutils to have this behavior by default
Comment 7 TGL 2006-03-20 16:39:39 UTC
(In reply to comment #6)
> speaking of rice, LDFLAGS=-Wl,--enable-new-dtags is 100% pointless on Gentoo
> systems ... we patch all of binutils to have this behavior by default
> 

Well, thanks for the info. I feel i will soon go back to my good old settings, since i obviously don't have a clue about this things...

/me hides for having temporarily turned into a ricer.
Comment 8 Diego Elio Pettenò (RETIRED) gentoo-dev 2006-03-20 17:04:36 UTC
-fvisibility* flags should probably be filtered by _everything_ using C++ right now, as they changes the default visibility scope.
This means that if the code is not designed entirely to support them, they break.
There is currently no code entirely designed to support them (KDE code is told to be properly designed but no, as it relies on Qt and other C++ libraries that are not and does not push/pop visibility properly), and the effort required to make a software compliant to -fvisibility* changes can be spent instead to make that software hide the symbols that it wants need for sure, rather than telling the compiler to NOT hide symbols that are needed.

Added to that, -fvisibility-inlines-hidden is broken wrt PIC handling (see bug #78720).

Please note that if the use of -fvisibility* flags does not hinder the build stage, it does not mean that it's safe: KDE 3.4 and 3.5 had crash problems related to dynamic_cast not working because type symbols were hidden and then duplicated again, making comparison impossible, the same will happen to anything relying on RTTI (run time type information).
Comment 9 Joe Jezak (RETIRED) gentoo-dev 2006-03-22 12:04:56 UTC
*** Bug 126906 has been marked as a duplicate of this bug. ***
Comment 10 Jakub Moc (RETIRED) gentoo-dev 2006-06-15 08:21:08 UTC
*** Bug 136883 has been marked as a duplicate of this bug. ***
Comment 11 Jakub Moc (RETIRED) gentoo-dev 2006-06-16 12:14:16 UTC
*** Bug 137005 has been marked as a duplicate of this bug. ***
Comment 12 Jakub Moc (RETIRED) gentoo-dev 2006-08-09 00:37:47 UTC
*** Bug 143297 has been marked as a duplicate of this bug. ***
Comment 13 Jakub Moc (RETIRED) gentoo-dev 2006-08-20 13:18:16 UTC
*** Bug 144550 has been marked as a duplicate of this bug. ***
Comment 14 Jakub Moc (RETIRED) gentoo-dev 2006-09-16 00:27:57 UTC
*** Bug 147774 has been marked as a duplicate of this bug. ***
Comment 15 Jakub Moc (RETIRED) gentoo-dev 2006-09-16 08:51:58 UTC
*** Bug 147216 has been marked as a duplicate of this bug. ***
Comment 16 Jakub Moc (RETIRED) gentoo-dev 2006-09-24 03:37:21 UTC
*** Bug 148894 has been marked as a duplicate of this bug. ***
Comment 17 Jakub Moc (RETIRED) gentoo-dev 2006-09-24 03:44:32 UTC
Reopening to re-assign.
Comment 18 Jakub Moc (RETIRED) gentoo-dev 2006-09-24 03:45:47 UTC
We won't be filtering this flag. If users want to shoot themselves in the foot, they are free to do so and pick up the pieces. :P

WONTFIX.
Comment 19 Prakash Punnoor 2006-10-24 07:52:58 UTC
The correct fix would be to use a non broken binutils...
Comment 20 Jakub Moc (RETIRED) gentoo-dev 2006-11-19 05:51:20 UTC
*** Bug 155668 has been marked as a duplicate of this bug. ***
Comment 21 Jakub Moc (RETIRED) gentoo-dev 2007-05-27 07:11:12 UTC
*** Bug 179954 has been marked as a duplicate of this bug. ***
Comment 22 Jakub Moc (RETIRED) gentoo-dev 2008-02-11 11:12:47 UTC
*** Bug 209638 has been marked as a duplicate of this bug. ***
Comment 23 Jakub Moc (RETIRED) gentoo-dev 2008-02-23 01:03:56 UTC
*** Bug 211149 has been marked as a duplicate of this bug. ***
Comment 24 Ryan Hill (RETIRED) gentoo-dev 2008-07-26 03:01:49 UTC
*** Bug 232899 has been marked as a duplicate of this bug. ***
Comment 25 Ryan Hill (RETIRED) gentoo-dev 2010-02-15 00:11:59 UTC
*** Bug 305163 has been marked as a duplicate of this bug. ***