MozillaZine

Error:"definition is marked dllimport" - WinXP/gcc

Discussion about official Mozilla Firefox builds
ronin712
 
Posts: 40
Joined: February 19th, 2004, 8:34 pm

Post Posted February 21st, 2004, 12:12 pm

I'm getting an error building Firefox on WinXP using gcc and the instructions at http://texturizer.net/firefox/build.html. I've searched Google and Google Groups but I'm coming up empty handed. The only places I have deviated are omitting step 5 (MinGW) because the components you need are already in cygwin, in step 12 I followed the alternate instructions and downloaded a tar.gz instead of pulling from CVS, and I used a different .mozconfig (see below). Can anyone point me in the right direction on this one?

Here's the error I'm getting:
Code: Select all
Building deps for /cygdrive/c/mnt/hdc2/mozilla/mozilla/xpcom/obsolete/nsIFileStr
eam.cpp
/cygdrive/c/mnt/hdc2/mozilla/mozilla/build/cygwin-wrapper g++ -mno-cygwin -o nsI
FileStream.o -c -DOSTYPE=\"WINNT5.1\" -DOSARCH=\"WINNT\" -D_IMPL_NS_COM_OBSOLETE
 -I.. -I/cygdrive/c/mnt/hdc2/mozilla/mozilla/xpcom/obsolete/../io  -I../../dist/
include/xpcom -I../../dist/include/string -I../../dist/include/libreg -I../../di
st/include/xpcom_obsolete -I../../dist/include -I../../dist/include/nspr
  -fno-rtti -fno-exceptions -Wall -Wconversion -Wpointer-arith -Wcast-align -Wov
erloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wno-long-
long -pedantic -mms-bitfields -pipe  -DNDEBUG -DTRIMMED -march=athlon-xp -msse -
mmmx -mfpmath=sse -ffast-math -ffloat-store -fforce-addr -ftracer -Os   -DX_DISP
LAY_MISSING=1 -DHAVE_SNPRINTF=1 -D_WINDOWS=1 -D_WIN32=1 -DWIN32=1 -DXP_WIN=1 -DX
P_WIN32=1 -DHW_THREADS=1 -DWINVER=0x400 -DSTDC_HEADERS=1 -DWIN32_LEAN_AND_MEAN=1
 -DNO_X11=1 -D_X86_=1 -DD_INO=d_ino -DSTDC_HEADERS=1 -Duid_t=int -Dgid_t=int -DH
AVE_DIRENT_H=1 -DHAVE_GETOPT_H=1 -DHAVE_MEMORY_H=1 -DHAVE_UNISTD_H=1 -DHAVE_MALL
OC_H=1 -DHAVE_LIBM=1 -DNO_X11=1 -DMMAP_MISSES_WRITES=1 -DHAVE_STRERROR=1 -DHAVE_
SNPRINTF=1 -DHAVE_MEMMOVE=1 -DHAVE_RINT=1 -DVA_COPY=va_copy -DHAVE_VA_COPY=1 -DM
OZ_DEFAULT_TOOLKIT=\"windows\" -DMOZ_PHOENIX=1 -DMOZ_XUL_APP=1 -DOJI=1 -DIBMBIDI
=1 -DMOZ_VIEW_SOURCE=1 -DMOZ_XPINSTALL=1 -DMOZ_JSLOADER=1 -DMOZ_MATHML=1 -DMOZ_L
OGGING=1 -DHAVE___CXA_DEMANGLE=1 -DMOZ_USER_DIR=\"Mozilla\" -DMOZ_XUL=1 -DMOZ_PR
OFILELOCKING=1 -DMOZ_DLL_SUFFIX=\".dll\" -DJS_THREADSAFE=1 -DNS_PRINT_PREVIEW=1
-DNS_PRINTING=1 -DMOZILLA_VERSION=\"1.7a\" -DMOZILLA_LOCALE_VERSION=\"1.7a\" -DM
OZILLA_REGION_VERSION=\"1.7a\"  -D_MOZILLA_CONFIG_H_ -DMOZILLA_CLIENT /cygdrive/
c/mnt/hdc2/mozilla/mozilla/xpcom/obsolete/nsIFileStream.cpp
In file included from c:/mnt/hdc2/mozilla/mozilla/xpcom/obsolete/nsIFileStream.c
pp:45:
c:/mnt/hdc2/mozilla/mozilla/xpcom/io/nsSegmentedBuffer.h:76: error: function `
   PRUint32 nsSegmentedBuffer::GetSegmentCount()' definition is marked
   dllimport.
c:/mnt/hdc2/mozilla/mozilla/xpcom/io/nsSegmentedBuffer.h:83: error: function `
   PRUint32 nsSegmentedBuffer::GetSegmentSize()' definition is marked
   dllimport.
c:/mnt/hdc2/mozilla/mozilla/xpcom/io/nsSegmentedBuffer.h:87: error: function `
   char* nsSegmentedBuffer::GetSegment(unsigned int)' definition is marked
   dllimport.
c:/mnt/hdc2/mozilla/mozilla/xpcom/obsolete/nsIFileStream.cpp: In member
   function `FileImpl::~FileImpl()':
c:/mnt/hdc2/mozilla/mozilla/xpcom/obsolete/nsIFileStream.cpp:184: warning: unuse
d
   variable `nsresult rv'
make[3]: *** [nsIFileStream.o] Error 1
make[3]: Leaving directory `/cygdrive/c/mnt/hdc2/mozilla/build/xpcom/obsolete'
make[2]: *** [tier_2] Error 2
make[2]: Leaving directory `/cygdrive/c/mnt/hdc2/mozilla/build'
make[1]: *** [default] Error 2
make[1]: Leaving directory `/cygdrive/c/mnt/hdc2/mozilla/build'
make: *** [build] Error 2


Here's my .mozconfig (taken from http://forums.mozillazine.org/viewtopic.php?t=55410, changing the march from pentium3 to athlon-xp and adding MOZ_OBJDIR):
Code: Select all
CC=gcc
CXX=g++
CPP=cpp
AS=as
LD=ld
LDFLAGS=-mwindows

export MOZ_PHOENIX=1
mk_add_options MOZ_PHOENIX=1

mk_add_options MOZ_OBJDIR=c:/mnt/hdc2/mozilla/build

ac_add_options --disable-accessibility
ac_add_options --disable-activex
ac_add_options --disable-activex-scripting
ac_add_options --disable-composer
ac_add_options --disable-debug
ac_add_options --disable-installer
ac_add_options --disable-ldap
ac_add_options --disable-mailnews
ac_add_options --disable-profilesharing
ac_add_options --disable-tests
ac_add_options --enable-crypto
ac_add_options --enable-extensions=cookie,xml-rpc,xmlextras,p3p,pref,transformiix,universalchardet,typeaheadfind,webservices,inspector
ac_add_options --enable-optimize="-march=athlon-xp -msse -mmmx -mfpmath=sse -ffast-math -ffloat-store -fforce-addr -ftracer -Os"
ac_add_options --enable-strip
ac_add_options --enable-strip-libs

cls

User avatar
 
Posts: 77
Joined: July 31st, 2003, 12:27 pm
Location: San Diego, CA

Post Posted February 22nd, 2004, 2:47 pm

This is probably caused by a gcc bug exposed by the recent string changes. Try applying the patch from mozbug 231995.

Return to Firefox Builds


Who is online

Users browsing this forum: No registered users and 4 guests