Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 58466 - mozilla 1.7 fails to link due to compiler flag
Summary: mozilla 1.7 fails to link due to compiler flag
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High critical
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-26 13:50 UTC by Joerg Schaible
Modified: 2004-07-27 17:33 UTC (History)
0 users

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


Attachments
mozilla-1.7.ebuild.diff (mozilla-1.7.ebuild.diff,497 bytes, patch)
2004-07-26 13:53 UTC, Joerg Schaible
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joerg Schaible 2004-07-26 13:50:49 UTC
Mozilla 1.7 fails to link due to unresolved externals if the C++ flag -fno-default-inline is set:

gmake[4]: Entering directory `/volatile/portage/mozilla-1.7/work/mozilla/xpcom/tools/registry'
regxpcom.cpp
g++ -o regxpcom.o -c -DXPCOM_GLUE  -DOSTYPE=\"Linux2.4\" -DOSARCH=\"Linux\" -I./../../build  -I../../../dist/include/string -I../../../dist/include/xpcom -I../../../dist/include -I/volatile/portage/mozilla-1.7/work/mozilla/dist/include/nspr     -I/usr/X11R6/include   -fPIC  -I/usr/X11R6/include -fno-rtti -fno-exceptions -Wall -Wconversion -Wpointer-arith -Wcast-align -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wno-long-long -march=athlon-xp -pipe -fno-default-inline -fforce-addr -Wno-deprecated -fshort-wchar -pthread -pipe  -DNDEBUG -DTRIMMED -ffunction-sections -O2  -I/usr/X11R6/include -DMOZILLA_CLIENT -include ../../../mozilla-config.h -Wp,-MD,.deps/regxpcom.pp regxpcom.cpp
g++  -I/usr/X11R6/include -fno-rtti -fno-exceptions -Wall -Wconversion -Wpointer-arith -Wcast-align -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wno-long-long -march=athlon-xp -pipe -fno-default-inline -fforce-addr -Wno-deprecated -fshort-wchar -pthread -pipe  -DNDEBUG -DTRIMMED -ffunction-sections -O2 -o regxpcom regxpcom.o    -L../../../dist/bin -L../../../dist/lib ../../../dist/lib/libxpcomglue.a -L/volatile/portage/mozilla-1.7/work/mozilla/dist/lib -lplds4 -lplc4 -lnspr4 -lpthread -ldl   -ldl -lm
regxpcom.o(.gnu.linkonce.t._ZN24nsGetServiceFromCategoryC2EPKcS1_P11nsISupportsPj+0x1c): In function `nsGetServiceFromCategory::nsGetServiceFromCategory[not-in-charge](char const*, char const*, nsISupports*, unsigned*)':
: undefined reference to `vtable for nsGetServiceFromCategory'
regxpcom.o(.gnu.linkonce.t._ZN24nsGetServiceFromCategoryC1EPKcS1_P11nsISupportsPj+0x1c): In function `nsGetServiceFromCategory::nsGetServiceFromCategory[in-charge](char const*, char const*, nsISupports*, unsigned*)':
: undefined reference to `vtable for nsGetServiceFromCategory'
../../../dist/lib/libxpcomglue.a(nsDebug.o)(.gnu.linkonce.t._ZN11nsDebugImplD2Ev+0x10): In function `nsDebugImpl::~nsDebugImpl [not-in-charge]()':
: undefined reference to `vtable for nsDebugImpl'
../../../dist/lib/libxpcomglue.a(nsDebug.o)(.gnu.linkonce.t._ZN11nsDebugImplD1Ev+0x10): In function `nsDebugImpl::~nsDebugImpl [in-charge]()':
: undefined reference to `vtable for nsDebugImpl'
collect2: ld returned 1 exit status
gmake[4]: *** [regxpcom] Error 1
gmake[4]: Leaving directory `/volatile/portage/mozilla-1.7/work/mozilla/xpcom/tools/registry'
gmake[3]: *** [libs] Error 2
gmake[3]: Leaving directory `/volatile/portage/mozilla-1.7/work/mozilla/xpcom/tools'
gmake[2]: *** [libs] Error 2
gmake[2]: Leaving directory `/volatile/portage/mozilla-1.7/work/mozilla/xpcom'
gmake[1]: *** [tier_2] Error 2
gmake[1]: Leaving directory `/volatile/portage/mozilla-1.7/work/mozilla'
make: *** [default] Error 2

!!! ERROR: net-www/mozilla-1.7 failed.
!!! Function src_compile, Line 370, Exitcode 2
!!! (no error message)


Reproducible: Always
Steps to Reproduce:
1. CXXFLAGS=-fno-default-inline emerge mozilla

Actual Results:  
Linker failer of the description 

Expected Results:  
Linked application. 

filter the flag -fno-default-inline, build works fine then.
Comment 1 Joerg Schaible 2004-07-26 13:53:56 UTC
Created attachment 36223 [details, diff]
mozilla-1.7.ebuild.diff

Patch to filter the flag -fno-default-inline
Comment 2 Aron Griffis (RETIRED) gentoo-dev 2004-07-26 16:27:39 UTC
The problem here is that flag-o-matic's strip-flags function is broken:

            if [ "${flag%%${y}}" = "" ] || [ "${flag:0:5}" = "-fno-" ] || [ "${flag:0:5}" = "-mno-" ] ; then
                NEW_CFLAGS="${NEW_CFLAGS} ${x}"

Anything that starts with -fno- or -mno- is allowed into NEW_CFLAGS at the moment.  :-|
Comment 3 Aron Griffis (RETIRED) gentoo-dev 2004-07-27 17:33:57 UTC
Fixed now in flag-o-matic, thanks to Spanky.  You will need to emerge --sync