Closed Bug 82928 Opened 23 years ago Closed 23 years ago

Cannot build with --disable-debug

Categories

(SeaMonkey :: Build Config, defect, P4)

x86
Linux

Tracking

(Not tracked)

VERIFIED WORKSFORME
Future

People

(Reporter: andreas.koenig, Assigned: cls)

Details

(Keywords: crash, Whiteboard: helpwanted)

Attachments

(1 file)

Trying to build a non-debugging mozilla from CVS

In my build directory I write a .mozconfig file with

    ac_add_options --disable-debug

I run 'gmake -f client.mk'

Resulting failure:

[...]
gmake[5]: Leaving directory `/usr/sources/www/browser/mozilla-2001-05-26-nodebug
/mozilla/extensions/transformiix/source/xslt'
gmake[4]: Leaving directory `/usr/sources/www/browser/mozilla-2001-05-26-nodebug
/mozilla/extensions/transformiix/source'
gmake[4]: Entering directory `/usr/sources/www/browser/mozilla-2001-05-26-nodebu
g/mozilla/extensions/transformiix/build'
../../../config/nsinstall -R -m 555 libtransformiix.so ../../../dist/lib/compone
nts
../../../dist/bin/elf-dynstr-gc ../../../dist/lib/components/libtransformiix.so
Not an ELF file
gmake[4]: *** [install] Error 1
gmake[4]: Leaving directory `/usr/sources/www/browser/mozilla-2001-05-26-nodebug
/mozilla/extensions/transformiix/build'
gmake[3]: *** [install] Error 2
gmake[3]: Leaving directory `/usr/sources/www/browser/mozilla-2001-05-26-nodebug
/mozilla/extensions/transformiix'
gmake[2]: *** [install] Error 2
gmake[2]: Leaving directory `/usr/sources/www/browser/mozilla-2001-05-26-nodebug
/mozilla/extensions'
gmake[1]: *** [install] Error 2
gmake[1]: Leaving directory `/usr/sources/www/browser/mozilla-2001-05-26-nodebug
/mozilla'
gmake: *** [build] Error 2
Adding

    ac_add_options --disable-elf-dynstr-gc

fixes the problem.
Spoke too soon. Yes, the compilation succeeds, but the resulting mozilla SEGVs.
 I tried with a make clean just to be on the safe side, didn't help. When I
start ./mozilla -g and issue a "r" at the gdb prompt, I get:

Program received signal SIGSEGV, Segmentation fault.
_dl_relocate_object (l=0x80cba98, scope=0x80cbbec, lazy=1, 
    consider_profiling=0) at do-rel.h:66
66      do-rel.h: No such file or directory.
(gdb) bt
#0  _dl_relocate_object (l=0x80cba98, scope=0x80cbbec, lazy=1, 
    consider_profiling=0) at do-rel.h:66
#1  0x405eb9b4 in dl_open_worker (a=0xbfffe8fc) at dl-open.c:312
#2  0x4000d602 in _dl_catch_error (objname=0xbfffe8f4, errstring=0xbfffe8f8, 
    operate=0x405eb574 <dl_open_worker>, args=0xbfffe8fc) at dl-error.c:149
#3  0x405ebb68 in _dl_open (
    file=0x80cb908
"/usr/sources/www/browser/mozilla-2001-05-26-nodebug/mozilla/dist/bin/components/libtransformiix.so",
mode=-1073747724, caller=0x4024d185)
    at dl-open.c:380
#4  0x4028b353 in dlopen_doit (a=0xbfffea6c) at dlopen.c:39
#5  0x4000d602 in _dl_catch_error (objname=0x8061690, errstring=0x8061694, 
    operate=0x4028b320 <dlopen_doit>, args=0xbfffea6c) at dl-error.c:149
#6  0x4028b790 in _dlerror_run (operate=0x4028b320 <dlopen_doit>, 
    args=0xbfffea6c) at dlerror.c:130
#7  0x4028b392 in __dlopen_check (
    file=0x80cb908
"/usr/sources/www/browser/mozilla-2001-05-26-nodebug/mozilla/dist/bin/components/libtransformiix.so",
mode=1) at dlopen.c:53
#8  0x4024d185 in pr_LoadLibraryByPathname ()
   from
/usr/sources/www/browser/mozilla-2001-05-26-nodebug/mozilla/dist/bin/libnspr4.so
#9  0x4024d038 in PR_LoadLibraryWithFlags ()
   from
/usr/sources/www/browser/mozilla-2001-05-26-nodebug/mozilla/dist/bin/libnspr4.so
#10 0x4024d096 in PR_LoadLibrary ()
   from
/usr/sources/www/browser/mozilla-2001-05-26-nodebug/mozilla/dist/bin/libnspr4.so
#11 0x40100fd2 in nsLocalFile::Load ()
   from
/usr/sources/www/browser/mozilla-2001-05-26-nodebug/mozilla/dist/bin/libxpcom.so
#12 0x4011309c in nsDll::Load ()
   from
/usr/sources/www/browser/mozilla-2001-05-26-nodebug/mozilla/dist/bin/libxpcom.so
#13 0x40109490 in nsNativeComponentLoader::SelfRegisterDll ()
   from
/usr/sources/www/browser/mozilla-2001-05-26-nodebug/mozilla/dist/bin/libxpcom.so
#14 0x4010a92f in nsNativeComponentLoader::AutoRegisterComponent ()
   from
/usr/sources/www/browser/mozilla-2001-05-26-nodebug/mozilla/dist/bin/libxpcom.so
#15 0x40108fc6 in nsNativeComponentLoader::RegisterComponentsInDir ()
   from
/usr/sources/www/browser/mozilla-2001-05-26-nodebug/mozilla/dist/bin/libxpcom.so
#16 0x40108d1c in nsNativeComponentLoader::AutoRegisterComponents ()
   from
/usr/sources/www/browser/mozilla-2001-05-26-nodebug/mozilla/dist/bin/libxpcom.so
#17 0x40106181 in nsComponentManagerImpl::AutoRegisterImpl ()
   from
/usr/sources/www/browser/mozilla-2001-05-26-nodebug/mozilla/dist/bin/libxpcom.so
#18 0x40105bf0 in nsComponentManagerImpl::AutoRegister ()
   from
/usr/sources/www/browser/mozilla-2001-05-26-nodebug/mozilla/dist/bin/libxpcom.so
#19 0x4010f2eb in nsComponentManager::AutoRegister ()
   from
/usr/sources/www/browser/mozilla-2001-05-26-nodebug/mozilla/dist/bin/libxpcom.so
#20 0x8056502 in NS_AutoregisterComponents ()
#21 0x8056635 in NS_SetupRegistry_1 ()
#22 0x8054c6a in main1 ()
#23 0x8056482 in main ()
#24 0x4051704a in __libc_start_main (main=0x80562dc <main>, argc=1, 
    ubp_av=0xbffff994, init=0x804fb68 <_init>, fini=0x805cc68 <_fini>, 
    rtld_fini=0x4000d964 <_dl_fini>, stack_end=0xbffff98c)
    at ../sysdeps/generic/libc-start.c:129


Adding the crash keyword.
Keywords: crash
ccing XSLT owner
Severity: normal → blocker
Status: UNCONFIRMED → NEW
Ever confirmed: true
hrm. I wonder how that could happen.
Is this parallel build? I don't see the link line for libtransformiix.so, but
elf-dynstr.gc.
I'd be curious if a nm libtransformiix.so works, and if so, what's your 
.mozconfig
About the stack trace, could you verify which library it's trying to load?

Axel
As reported, the .mozconfig contained a single line in the first try and two
lines in the second.

I removed libtransformiix.so and reran the make. Here's the link line you're
looking for (if I understand you correctly)


c++ -I/usr/X11R6/include -fno-rtti -fno-exceptions -Wall -Wconversion -Wpointer-
arith -Wbad-function-cast -Wcast-align -Woverloaded-virtual -Wsynth -pedantic -W
no-long-long -pipe -pthread  -DNDEBUG -DTRIMMED -shared -Wl,-h -Wl,libtransformi
ix.so -o libtransformiix.so  XSLTProcessorModule.o ../source/base/ArrayList.o ..
/source/base/DefaultStringComparator.o ../source/base/Double.o ../source/base/In
teger.o ../source/base/List.o ../source/base/TxObjectWrapper.o ../source/base/Ma
p.o ../source/base/NamedMap.o ../source/base/SimpleErrorObserver.o ../source/bas
e/Stack.o ../source/base/StringComparator.o ../source/base/StringList.o ../sourc
e/base/Tokenizer.o ../source/base/MozillaString.o ../source/net/URIUtils.o ../so
urce/xml/dom/mozImpl/MozillaObjectWrapper.o ../source/xml/dom/mozImpl/MozillaAtt
r.o ../source/xml/dom/mozImpl/MozillaCDATASection.o ../source/xml/dom/mozImpl/Mo
zillaCharacterData.o ../source/xml/dom/mozImpl/MozillaComment.o ../source/xml/do
m/mozImpl/MozillaDOMImplementation.o ../source/xml/dom/mozImpl/MozillaDocument.o
 ../source/xml/dom/mozImpl/MozillaDocumentFragment.o ../source/xml/dom/mozImpl/M
ozillaDocumentType.o ../source/xml/dom/mozImpl/MozillaElement.o ../source/xml/do
m/mozImpl/MozillaEntity.o ../source/xml/dom/mozImpl/MozillaEntityReference.o ../
source/xml/dom/mozImpl/MozillaNamedNodeMap.o ../source/xml/dom/mozImpl/MozillaNo
de.o ../source/xml/dom/mozImpl/MozillaNodeList.o ../source/xml/dom/mozImpl/Mozil
laNotation.o ../source/xml/dom/mozImpl/MozillaProcInstruction.o ../source/xml/do
m/mozImpl/MozillaText.o ../source/xpath/AdditiveExpr.o ../source/xpath/Attribute
Expr.o ../source/xpath/AttributeValueTemplate.o ../source/xpath/BasicNodeExpr.o 
../source/xpath/BooleanExpr.o ../source/xpath/BooleanFunctionCall.o ../source/xp
ath/BooleanResult.o ../source/xpath/ElementExpr.o ../source/xpath/ErrorFunctionC
all.o ../source/xpath/ExprLexer.o ../source/xpath/ExprParser.o ../source/xpath/E
xtensionFunctionCall.o ../source/xpath/FilterExpr.o ../source/xpath/FunctionCall
.o ../source/xpath/IdentityExpr.o ../source/xpath/LocationStep.o ../source/xpath
/MultiplicativeExpr.o ../source/xpath/NodeSet.o ../source/xpath/NodeSetFunctionC
all.o ../source/xpath/nsNodeSet.o ../source/xpath/NumberExpr.o ../source/xpath/N
umberFunctionCall.o ../source/xpath/NumberResult.o ../source/xpath/ParentExpr.o 
../source/xpath/PathExpr.o ../source/xpath/PredicateList.o ../source/xpath/Relat
ionalExpr.o ../source/xpath/RootExpr.o ../source/xpath/StringExpr.o ../source/xp
ath/StringFunctionCall.o ../source/xpath/StringResult.o ../source/xpath/TextExpr
.o ../source/xpath/UnionExpr.o ../source/xpath/VariableRefExpr.o ../source/xpath
/XPathNames.o ../source/xpath/XPathProcessor.o ../source/xml/XMLUtils.o ../sourc
e/xml/XMLDOMUtils.o ../source/xml/util/DOMHelper.o ../source/xml/parser/XMLParse
r.o ../source/xml/parser/nsSyncLoader.o ../source/xslt/OutputFormat.o ../source/
xslt/Names.o ../source/xslt/Numbering.o ../source/xslt/ProcessorState.o ../sourc
e/xslt/VariableBinding.o ../source/xslt/XSLTProcessor.o ../source/xslt/functions
/CurrentFunctionCall.o ../source/xslt/functions/DocumentFunctionCall.o ../source
/xslt/functions/ElementAvailableFnCall.o ../source/xslt/functions/FunctionAvaila
bleFnCall.o ../source/xslt/functions/GenerateIdFunctionCall.o ../source/xslt/fun
ctions/SystemPropertyFunctionCall.o ../source/xslt/util/NodeSorter.o ../source/x
slt/util/NodeStack.o    -L../../../dist/bin -lxpcom -L../../../dist/bin -L/usr/s
ources/www/browser/mozilla-2001-05-26-nodebug/mozilla/dist/lib -lplds4 -lplc4 -l
nspr4 -lpthread -ldl -lc  -L../../../dist/bin -lmozjs  -Wl,--version-script,../.
./../build/unix/gnu-ld-scripts/components-version-script -ldl -lm  -lc   


This is not a parallel make.

% nm extensions/transformiix/build/libtransformiix.so|wc -l
   4905

I suppose you do not want me to post the complete output.
 
Let me know what I can do to help debugging. Exact instructions appreciated.
Priority: -- → P2
Target Milestone: --- → mozilla0.9.3
I can't reproduce this problem with a fresh trunk tree.  However, when I was
rearranging things on a branch build, I ran across this problem when I
accidentally compiled certain modules without -fPIC.  

Please provide a full clobber build log including configure output, config.log,
config-defs.h & config/autoconf.mk .
Commenting the attachment above, here's what I did:

mkdir mozilla-2001-06-04-nodebug
cd mozilla-2001-06-04-nodebug/
cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co mozilla/client.mk
cd mozilla/
vi .mozconfig   # adding single line "ac_add_options --disable-debug"
gmake -f client.mk >| make.out 2>&1
tar cvvf moz-build-nodebug-20010604.tar make.out config.log \
          config-defs.h config/autoconf.mk
bzip2 -9 moz-build-nodebug-20010604.tar

Which version of binutils (ld in particular) are you using?  

Here's another test.  With a clean build, set
MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS to nothing in config/autoconf.mk after
running configure. (This will require running './configure' and 'make'
separately instead of via 'make -f client.mk').

% ld -v
GNU ld version 2.9.5 (with BFD 2.9.5.0.22)

And yes, setting MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS to nothing solves the
problem for me.
Can anyone verify that build/unix/gnu-ld-scripts/components-version-script works
when it's used?  Looking at the info page for ld 2.9.5.0.22, I cannot find any
reference to EXPORTED :-/ .
The actual symbol versioning name doesn't really matter. I just chose EXPORTED
to give it a descriptive name. You can call it FOOBAR if you like, the important
result is that all non-listed symbols are made local.
I still can't reproduce the problem.  A `nm transformiix` shows that the linker
script is working as it should and EXPORTED & NSGetModule are the only global
symbols.

Andreas, if you're still hitting this problem, can you attach the output of:
nm dist/bin/components/libtransformiix.so | grep ^0 | awk '{ print $2 " " $3 }'
| egrep '^([A-Z])'

Whiteboard: helpwanted
Oh so weird! (Attn: long-line-breakage ahead):

% /bin/ls -l dist/bin/components/libtransformiix.so
lrwxrwxrwx    1 k        k              57 Jun 15 07:45
dist/bin/components/libtransformiix.so ->
../../../extensions/transformiix/build/libtransformiix.so


% /usr/bin/nm
dist/bin/components/libtransformiix.so                                                         
/usr/bin/nm: dist/bin/components/libtransformiix.so: File format not recognized
% file extensions/transformiix/build/libtransformiix.so
extensions/transformiix/build/libtransformiix.so: data
% xxd extensions/transformiix/build/libtransformiix.so | head
0000000: 3f54 4b46 0101 0100 0000 0000 0000 0000  ?TKF............
0000010: 0300 0300 0100 0000 108d 0000 3400 0000  ............4...
0000020: 901e 0800 0000 0000 3400 2000 0300 2800  ........4. ...(.
0000030: 2400 2100 0100 0000 0000 0000 0000 0000  $.!.............
0000040: 0000 0000 c04e 0500 c04e 0500 0500 0000  .....N...N......
0000050: 0010 0000 0100 0000 c04e 0500 c04e 0500  .........N...N..
0000060: c04e 0500 a448 0000 fc50 0000 0600 0000  .N...H...P......
0000070: 0010 0000 0200 0000 6c96 0500 6c96 0500  ........l...l...
0000080: 6c96 0500 f800 0000 f800 0000 0600 0000  l...............
0000090: 0400 0000 c500 0000 0501 0000 9100 0000  ................


As libtransformiix.so is built by c++, maybe we need to consider its version?

% c++ --version
2.95.2

The link command that makes the lib is already posted above.
Spontaneous healing. Bug has disappeared and I cannot reproduce now. All I did
was adding ac_add_options --enable-crypto to the .mozconfig, built a working
Mozilla from that, removed the line again, built a working Mozilla without a
problem.
I'm sorry, I do not even have a backup of the state before the healing.
Ok.  Marking WFM before the bug reasserts itself. ;)
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → WORKSFORME
Aaaarg, it's back again!

c++ -I/usr/X11R6/include -fno-rtti -fno-exceptions -Wall -Wconversion -Wpointer-
arith -Wbad-function-cast -Wcast-align -Woverloaded-virtual -Wsynth -pedantic -W
no-long-long -pipe -pthread  -DNDEBUG -DTRIMMED -shared -Wl,-h -Wl,libtransformi
ix.so -o libtransformiix.so  XSLTProcessorModule.o ../source/base/ArrayList.o ..
/source/base/DefaultStringComparator.o ../source/base/Double.o ../source/base/In
teger.o ../source/base/List.o ../source/base/TxObjectWrapper.o ../source/base/Ma
p.o ../source/base/NamedMap.o ../source/base/SimpleErrorObserver.o ../source/bas
e/Stack.o ../source/base/StringComparator.o ../source/base/StringList.o ../sourc
e/base/Tokenizer.o ../source/base/MozillaString.o ../source/net/URIUtils.o ../so
urce/xml/dom/mozImpl/MozillaObjectWrapper.o ../source/xml/dom/mozImpl/MozillaAtt
r.o ../source/xml/dom/mozImpl/MozillaCDATASection.o ../source/xml/dom/mozImpl/Mo
zillaCharacterData.o ../source/xml/dom/mozImpl/MozillaComment.o ../source/xml/do
m/mozImpl/MozillaDOMImplementation.o ../source/xml/dom/mozImpl/MozillaDocument.o
 ../source/xml/dom/mozImpl/MozillaDocumentFragment.o ../source/xml/dom/mozImpl/M
ozillaDocumentType.o ../source/xml/dom/mozImpl/MozillaElement.o ../source/xml/do
m/mozImpl/MozillaEntity.o ../source/xml/dom/mozImpl/MozillaEntityReference.o ../
source/xml/dom/mozImpl/MozillaNamedNodeMap.o ../source/xml/dom/mozImpl/MozillaNo
de.o ../source/xml/dom/mozImpl/MozillaNodeList.o ../source/xml/dom/mozImpl/Mozil
laNotation.o ../source/xml/dom/mozImpl/MozillaProcInstruction.o ../source/xml/do
m/mozImpl/MozillaText.o ../source/xpath/AdditiveExpr.o ../source/xpath/Attribute
Expr.o ../source/xpath/AttributeValueTemplate.o ../source/xpath/BasicNodeExpr.o 
../source/xpath/BooleanExpr.o ../source/xpath/BooleanFunctionCall.o ../source/xp
ath/BooleanResult.o ../source/xpath/ElementExpr.o ../source/xpath/ErrorFunctionC
all.o ../source/xpath/ExprLexer.o ../source/xpath/ExprParser.o ../source/xpath/E
xtensionFunctionCall.o ../source/xpath/FilterExpr.o ../source/xpath/FunctionCall
.o ../source/xpath/IdentityExpr.o ../source/xpath/LocationStep.o ../source/xpath
/MultiplicativeExpr.o ../source/xpath/NodeSet.o ../source/xpath/NodeSetFunctionC
all.o ../source/xpath/nsNodeSet.o ../source/xpath/NumberExpr.o ../source/xpath/N
umberFunctionCall.o ../source/xpath/NumberResult.o ../source/xpath/ParentExpr.o 
../source/xpath/PathExpr.o ../source/xpath/PredicateList.o ../source/xpath/Relat
ionalExpr.o ../source/xpath/RootExpr.o ../source/xpath/StringExpr.o ../source/xp
ath/StringFunctionCall.o ../source/xpath/StringResult.o ../source/xpath/TextExpr
.o ../source/xpath/UnionExpr.o ../source/xpath/VariableRefExpr.o ../source/xpath
/XPathNames.o ../source/xpath/XPathProcessor.o ../source/xml/XMLUtils.o ../sourc
e/xml/XMLDOMUtils.o ../source/xml/util/DOMHelper.o ../source/xml/parser/XMLParse
r.o ../source/xml/parser/nsSyncLoader.o ../source/xslt/OutputFormat.o ../source/
xslt/Names.o ../source/xslt/Numbering.o ../source/xslt/ProcessorState.o ../sourc
e/xslt/VariableBinding.o ../source/xslt/XSLTProcessor.o ../source/xslt/functions
/CurrentFunctionCall.o ../source/xslt/functions/DocumentFunctionCall.o ../source
/xslt/functions/ElementAvailableFnCall.o ../source/xslt/functions/FunctionAvaila
bleFnCall.o ../source/xslt/functions/GenerateIdFunctionCall.o ../source/xslt/fun
ctions/txKeyFunctionCall.o ../source/xslt/functions/SystemPropertyFunctionCall.o
 ../source/xslt/util/NodeSorter.o ../source/xslt/util/NodeStack.o    -L../../../
dist/bin -lxpcom -L../../../dist/bin -L/usr/sources/www/browser/mozilla-2001-06-
04-nodebug/mozilla/dist/lib -lplds4 -lplc4 -lnspr4 -lpthread -ldl -lc  -L../../.
./dist/bin -lmozjs  -Wl,--version-script,../../../build/unix/gnu-ld-scripts/comp
onents-version-script -ldl -lm  -lc   
chmod +x libtransformiix.so
true libtransformiix.so
../../../config/nsinstall -R -m 555 libtransformiix.so ../../../dist/lib/compone
nts
../../../dist/bin/elf-dynstr-gc ../../../dist/lib/components/libtransformiix.so
Warning, unable to convert address 1849360957 (0x6e3b023d) to file offset
Warning, unable to convert address 134799360 (0x808e000) to file offset
../../../config/nsinstall -R -m 555 libtransformiix.so ../../../dist/bin/compone
nts
../../../dist/bin/elf-dynstr-gc ../../../dist/bin/components/libtransformiix.so
Not an ELF file



Maybe it has something to do with big file support? I'm running on Linux 2.4.5
and have big file support.
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
I'm running 2.4.6pre5 and I'm not seeing the problem.  But if it's kernel
related, there are any number of variables that could contribute to the problem.
 In any case, I don't believe that there's anything in the mozilla build system
that could be triggering that problem.

Could you try recompiling binutils and making sure that they are built with the
proper LFS flags?  The LFS flags should be used by default if your glibc was
built using kernel 2.4 headers (or maybe that's just a RH thing).  
Severity: blocker → major
Priority: P2 → P4
Target Milestone: mozilla0.9.3 → Future
No luck right now. I've tried upgrading to gcc 3.0 and glibc 2.2.3 and am now
unable to build Mozilla, no matter with which switches. I'll have to care about
other things now. Please close as WFM again. I'll reopen when I get some new
evidence. As long as I'm the only one who sees it, it's ok to close this bug.
Thanks for you help so far!
back to WFM, as requested.

Axel
Status: REOPENED → RESOLVED
Closed: 23 years ago23 years ago
Resolution: --- → WORKSFORME
verified.
Status: RESOLVED → VERIFIED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: