mingw builds: linking libxul fails

RESOLVED WORKSFORME

Status

RESOLVED WORKSFORME
11 years ago
3 years ago

People

(Reporter: silvioq, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

11 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11
Build Identifier: Xul Runner 1.8.0.4 

g++ -mno-cygwin -shared -Wl,--out-implib -Wl,libxul.dll.a -Wl,--export-all-symbols -o xul.dll  nsStaticXULComponents.o   ./
module.res -mwindows   -Wl,--whole-archive ../../dist/lib/libxpcom_core.a ../../dist/lib/libxpcom_compat.a ../../dist/lib/l
ibunicharutil_s.a ../../dist/lib/libucvutil_s.a ../../dist/lib/libgkgfx.a ../../dist/lib/libgfxshared_s.a ../../dist/lib/li
bxulapp_s.a ../../dist/lib/components/libxpcom_compat_c.a ../../dist/lib/components/libxpconnect.a ../../dist/lib/component
s/libnecko.a ../../dist/lib/components/libuconv.a ../../dist/lib/components/libi18n.a ../../dist/lib/components/libjar50.a 
../../dist/lib/components/libpref.a ../../dist/lib/components/libcaps.a ../../dist/lib/components/librdf.a ../../dist/lib/c
omponents/libhtmlpars.a ../../dist/lib/components/libimglib2.a ../../dist/lib/components/libgkplugin.a ../../dist/lib/compo
nents/libgklayout.a ../../dist/lib/components/libdocshell.a ../../dist/lib/components/libembedcomponents.a ../../dist/lib/c
omponents/libwebbrwsr.a ../../dist/lib/components/libeditor.a ../../dist/lib/components/libnsappshell.a ../../dist/lib/comp
onents/libtxmgr.a ../../dist/lib/components/libcomposer.a ../../dist/lib/components/libchrome.a ../../dist/lib/components/l
ibmork.a ../../dist/lib/components/libmozfind.a ../../dist/lib/components/libappcomps.a ../../dist/lib/components/libcomman
dlines.a ../../dist/lib/components/libtoolkitcomps.a ../../dist/lib/components/libxpinstall.a ../../dist/lib/components/lib
jsd.a ../../dist/lib/components/libintlcmpt.a ../../dist/lib/components/libnecko2.a ../../dist/lib/components/libimgicon.a
../../dist/lib/components/libgkgfxwin.a ../../dist/lib/components/libgkwidget.a  -Wl,--no-whole-archive  -L../../dist/bin -
L../../dist/lib -L../../dist/lib -ljpeg3250 -L../../dist/lib -lpng -L../../dist/lib -ljs3250  -L../../dist/lib -lmozz  -L..
/../dist/lib -lnspr4 -lplc4 -lplds4 -lshell32 -lole32 -luuid -lversion -lwinspool -lComdlg32 -lgdi32 -lm
../../dist/lib/libxpcom_compat.a(nsSpecialSystemDirectory.o):nsSpecialSystemDirectory.cpp:(.bss+0x0): multiple definition o
f `gGetSpecialPathProc'^M
../../dist/lib/libxpcom_core.a(SpecialSystemDirectory.o):SpecialSystemDirectory.cpp:(.bss+0x0): first defined here^M
C:/msys/1.0/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../libuuid.a(objidl-uuid.o):objidl-uuid.c:(.rdata+0x1d0): multiple def
inition of `IID_IPersistFile'^M
../../dist/lib/libxpcom_compat.a(nsFileSpec.o):nsFileSpec.cpp:(.rdata+0x4): first defined here^M
Creating library file: libxul.dll.a^M
../../dist/lib/libunicharutil_s.a(nsUnicharUtils.o):nsUnicharUtils.cpp:(.text+0x1bb): undefined reference to `_imp___ZN13ns
COMPtr_baseD2Ev@4'^M
../../dist/lib/libunicharutil_s.a(nsUnicharUtils.o):nsUnicharUtils.cpp:(.text+0x201): undefined reference to `_imp___ZN18ns
AString_internal17GetWritableBufferEPPw@8'^M
../../dist/lib/libunicharutil_s.a(nsUnicharUtils.o):nsUnicharUtils.cpp:(.text+0x217): undefined reference to `_imp___ZN18ns
AString_internal17GetWritableBufferEPPw@8'^M
../../dist/lib/libunicharutil_s.a(nsUnicharUtils.o):nsUnicharUtils.cpp:(.text+0x260): undefined reference to `_imp___ZN11ns
Substring13EnsureMutableEv@4'^M
../../dist/lib/libunicharutil_s.a(nsUnicharUtils.o):nsUnicharUtils.cpp:(.text+0x2b2): undefined reference to `_imp___ZN11ns
Substring13EnsureMutableEv@4'^M
../../dist/lib/libunicharutil_s.a(nsUnicharUtils.o):nsUnicharUtils.cpp:(.text+0x320): undefined reference to `_imp___ZNK18n
sAString_internal6LengthEv@4'^M
../../dist/lib/libunicharutil_s.a(nsUnicharUtils.o):nsUnicharUtils.cpp:(.text+0x32a): undefined reference to `_imp___ZN18ns
AString_internal9SetLengthEj@8'^M
../../dist/lib/libunicharutil_s.a(nsUnicharUtils.o):nsUnicharUtils.cpp:(.text+0x334): undefined reference to `_imp___ZN18ns
AString_internal17GetWritableBufferEPPw@8'^M
../../dist/lib/libunicharutil_s.a(nsUnicharUtils.o):nsUnicharUtils.cpp:(.text+0x353): undefined reference to `_imp___ZNK18n
sAString_internal17GetReadableBufferEPPKw@8'^M
../../dist/lib/libunicharutil_s.a(nsUnicharUtils.o):nsUnicharUtils.cpp:(.text+0x36a): undefined reference to `_imp___ZNK18n
sAString_internal17GetReadableBufferEPPKw@8'^M
../../dist/lib/libunicharutil_s.a(nsUnicharUtils.o):nsUnicharUtils.cpp:(.text+0x3cf): undefined reference to `_imp___ZN18ns
AString_internal17GetWritableBufferEPPw@8'^M


Reproducible: Always

Steps to Reproduce:
1. 
2.
3.


Expected Results:  
Correct compiling
(Reporter)

Comment 1

11 years ago
Created attachment 294740 [details]
.mozconfig used

This is my .mozconfig file used
(Reporter)

Comment 2

11 years ago
Created attachment 294741 [details]
output from make -f client.mk &> salida.txt

Comment 3

11 years ago
XULRunner 1.8.0.4 is ancient. Could you please try trunk sources?
Summary: building with mingw crashes when linking → mingw builds: linking libxul fails
(Reporter)

Comment 4

11 years ago
I think I have the same problem ...
I maked 
  make -f client.mk checkout
  make -f client.mk clean
  make -f client.mk build

... and get ...

g++ -mno-cygwin -shared -Wl,--out-implib -Wl,libxul.dll.a -Wl,--export-all-symbols -o xul.dll  nsStaticXULComponents.o
 ./module.res -mwindows   -Wl,--whole-archive ../../dist/lib/libxpcom_core.a ../../dist/lib/libxpcom_compat.a ../../dist
/lib/libunicharutil_s.a ../../dist/lib/libucvutil_s.a ../../dist/lib/libgkgfx.a ../../dist/lib/libgfxshared_s.a ../../di
st/lib/libxulapp_s.a ../../dist/lib/components/libxpcom_compat_c.a ../../dist/lib/components/libxpconnect.a ../../dist/l
ib/components/libnecko.a ../../dist/lib/components/libuconv.a ../../dist/lib/components/libi18n.a ../../dist/lib/compone
nts/libjar50.a ../../dist/lib/components/libpref.a ../../dist/lib/components/libcaps.a ../../dist/lib/components/librdf.
a ../../dist/lib/components/libhtmlpars.a ../../dist/lib/components/libimglib2.a ../../dist/lib/components/libgkplugin.a
 ../../dist/lib/components/libgklayout.a ../../dist/lib/components/libdocshell.a ../../dist/lib/components/libembedcompo
nents.a ../../dist/lib/components/libwebbrwsr.a ../../dist/lib/components/libeditor.a ../../dist/lib/components/libnsapp
shell.a ../../dist/lib/components/libtxmgr.a ../../dist/lib/components/libcomposer.a ../../dist/lib/components/libchrome
.a ../../dist/lib/components/libmork.a ../../dist/lib/components/libmozfind.a ../../dist/lib/components/libappcomps.a ..
/../dist/lib/components/libcommandlines.a ../../dist/lib/components/libtoolkitcomps.a ../../dist/lib/components/libxpins
tall.a ../../dist/lib/components/libjsd.a ../../dist/lib/components/libintlcmpt.a ../../dist/lib/components/libnecko2.a
../../dist/lib/components/libimgicon.a ../../dist/lib/components/libgkgfxwin.a ../../dist/lib/components/libgkwidget.a
-Wl,--no-whole-archive  -L../../dist/bin -L../../dist/lib -L../../dist/lib -ljpeg3250 -L../../dist/lib -lpng -L../../dis
t/lib -ljs3250  -L../../dist/lib -lmozz  -L../../dist/lib -lnspr4 -lplc4 -lplds4 -lshell32 -lole32 -luuid -lversion -lwi
nspool -lComdlg32 -lgdi32 -lm
../../dist/lib/libxpcom_compat.a(nsSpecialSystemDirectory.o):nsSpecialSystemDirectory.cpp:(.bss+0x0): multiple definitio
n of `gGetSpecialPathProc'^M
../../dist/lib/libxpcom_core.a(SpecialSystemDirectory.o):SpecialSystemDirectory.cpp:(.bss+0x0): first defined here^M
C:/msys/1.0/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../libuuid.a(objidl-uuid.o):objidl-uuid.c:(.rdata+0x1d0): multiple 
definition of `IID_IPersistFile'^M
../../dist/lib/libxpcom_compat.a(nsFileSpec.o):nsFileSpec.cpp:(.rdata+0x4): first defined here^M
Creating library file: libxul.dll.a^M
../../dist/lib/libunicharutil_s.a(nsUnicharUtils.o):nsUnicharUtils.cpp:(.text+0x1bb): undefined reference to `_imp___ZN1
3nsCOMPtr_baseD2Ev@4'^M
../../dist/lib/libunicharutil_s.a(nsUnicharUtils.o):nsUnicharUtils.cpp:(.text+0x201): undefined reference to `_imp___ZN1
8nsAString_internal17GetWritableBufferEPPw@8'^M
../../dist/lib/libunicharutil_s.a(nsUnicharUtils.o):nsUnicharUtils.cpp:(.text+0x217): undefined reference to `_imp___ZN1
8nsAString_internal17GetWritableBufferEPPw@8'^M
../../dist/lib/libunicharutil_s.a(nsUnicharUtils.o):nsUnicharUtils.cpp:(.text+0x260): undefined reference to `_imp___ZN1
1nsSubstring13EnsureMutableEv@4'^M
../../dist/lib/libunicharutil_s.a(nsUnicharUtils.o):nsUnicharUtils.cpp:(.text+0x2b2): undefined reference to `_imp___ZN1
1nsSubstring13EnsureMutableEv@4'^M
../../dist/lib/libunicharutil_s.a(nsUnicharUtils.o):nsUnicharUtils.cpp:(.text+0x320): undefined reference to `_imp___ZNK
18nsAString_internal6LengthEv@4'^M
../../dist/lib/libunicharutil_s.a(nsUnicharUtils.o):nsUnicharUtils.cpp:(.text+0x32a): undefined reference to `_imp___ZN1
8nsAString_internal9SetLengthEj@8'^M
../../dist/lib/libunicharutil_s.a(nsUnicharUtils.o):nsUnicharUtils.cpp:(.text+0x334): undefined reference to `_imp___ZN1
8nsAString_internal17GetWritableBufferEPPw@8'^M
../../dist/lib/libunicharutil_s.a(nsUnicharUtils.o):nsUnicharUtils.cpp:(.text+0x353): undefined reference to `_imp___ZNK
18nsAString_internal17GetReadableBufferEPPKw@8'^M
../../dist/lib/libunicharutil_s.a(nsUnicharUtils.o):nsUnicharUtils.cpp:(.text+0x36a): undefined reference to `_imp___ZNK
18nsAString_internal17GetReadableBufferEPPKw@8'^M
../../dist/lib/libunicharutil_s.a(nsUnicharUtils.o):nsUnicharUtils.cpp:(.text+0x3cf): undefined reference to `_imp___ZN1
8nsAString_internal17GetWritableBufferEPPw@8'^M
../../dist/lib/libunicharutil_s.a(nsUnicharUtils.o):nsUnicharUtils.cpp:(.text+0x3e5): undefined reference to `_imp___ZN1
8nsAString_internal17GetWritableBufferEPPw@8'^M
../../dist/lib/libunicharutil_s.a(nsUnicharUtils.o):nsUnicharUtils.cpp:(.text+0x42e): undefined reference to `_imp___ZN1
1nsSubstring13EnsureMutableEv@4'^M
../../dist/lib/libunicharutil_s.a(nsUnicharUtils.o):nsUnicharUtils.cpp:(.text+0x480): undefined reference to `_imp___ZN1
1nsSubstring13EnsureMutableEv@4'^M
../../dist/lib/libunicharutil_s.a(nsUnicharUtils.o):nsUnicharUtils.cpp:(.text+0x4ee): undefined reference to `_imp___ZNK
18nsAString_internal6LengthEv@4'^M
../../dist/lib/libunicharutil_s.a(nsUnicharUtils.o):nsUnicharUtils.cpp:(.text+0x4f8): undefined reference to `_imp___ZN1
8nsAString_internal9SetLengthEj@8'^M



Thanks

Comment 5

11 years ago
Could you please answer the question about which sources you're using? The 1.8.0 sources are known not to work with the mingw compiler, but the trunk sources should work. And you're building libxpcom_compat, which is not enabled by default on trunk.

Comment 6

10 years ago
WFM w/ CVS trunk & Hg comm-central.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → WORKSFORME
Product: Toolkit → Toolkit Graveyard
You need to log in before you can comment on or make changes to this bug.