Hello,
I just checked out out the most recent Mozilla trunk from CVS and
followed the build instructions on the Mozilla website. During the
compilation, I ran into the error below. Are there any steps I'm
missing or is the problem with the actual code?
c++ -o nsStandardURL.o -c -DMOZILLA_INTERNAL_API
-DOSTYPE=\"Darwin8.1.0\" -DOSARCH=\"Darwin\" -DBUILD_ID=0000000000
-DIMPL_NS_NET -I../../../dist/include/xpcom
-I../../../dist/include/string -I../../../dist/include/mimetype
-I../../../dist/include/uconv -I../../../dist/include/locale
-I../../../dist/include/pref -I../../../dist/include/necko
-I../../../dist/include -I../../../dist/include/nspr
-I../../../dist/sdk/include -mdynamic-no-pic -fno-rtti
-fno-exceptions -Wall -Wconversion -Wpointer-arith -Wcast-align
-Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy
-Wno-non-virtual-dtor -Wno-long-long -fpascal-strings -no-cpp-precomp
-fno-common -fshort-wchar -I/Developer/Headers/FlatCarbon -pipe
-DNDEBUG -DTRIMMED -O -DMOZILLA_CLIENT -include
../../../mozilla-config.h -Wp,-MD,.deps/nsStandardURL.pp
nsStandardURL.cpp
nsStandardURL.cpp: In member function `nsresult
nsStandardURL::BuildNormalizedSpec(const char*)':
../../../dist/include/string/nsTSubstring.h:502: error:
'nsCSubstring::nsCSubstring(const nsCSubstring&)' is protected
nsStandardURL.cpp:497: error: within this context
../../../dist/include/string/nsTSubstring.h:502: error:
'nsCSubstring::nsCSubstring(const nsCSubstring&)' is protected
nsStandardURL.cpp:497: error: within this context
make[4]: *** [nsStandardURL.o] Error 1
make[3]: *** [libs] Error 2
make[2]: *** [libs] Error 2
make[1]: *** [tier_9] Error 2
make: *** [default] Error 2
Ludovic Hirlimann - 10 Jun 2005 19:06 GMT
> Hello,
>
> I just checked out out the most recent Mozilla trunk from CVS and
> followed the build instructions on the Mozilla website. During the
> compilation, I ran into the error below. Are there any steps I'm
> missing or is the problem with the actual code?
Where the tinderboxes green ?
Ludo
- --
Ludovic Hirlimann http://perso.hirlimann.net/~ludo/blog/
GPG key 1024D/C139647C 2005-03-06
Key fingerprint = 6EFB D26F C7A2 12B2 E093 B9E8 68F3 58F6 C139 647C
Javier Pedemonte - 13 Jun 2005 18:16 GMT
Which version of gcc are you using? On 10.4, you need to switch to gcc
3.3 (gcc 4.0 still doesn't work at building). Do "sudo gcc_select 3.3"
in order to switch your compiler.
javier
Mark Mentovai - 14 Jun 2005 06:37 GMT
> I just checked out out the most recent Mozilla trunk from CVS and
> followed the build instructions on the Mozilla website. During the
> compilation, I ran into the error below. Are there any steps I'm
> missing or is the problem with the actual code?
[...]
> nsStandardURL.cpp: In member function `nsresult
> nsStandardURL::BuildNormalizedSpec(const char*)':
[quoted text clipped - 4 lines]
> 'nsCSubstring::nsCSubstring(const nsCSubstring&)' is protected
> nsStandardURL.cpp:497: error: within this context
You are using gcc 4.0 from Xcode 2.0. It's a prerelease compiler with a
handful of bugs. It won't work, ever. As Javier points out, you need
"sudo gcc_select 3.3".
You should update to Xcode 2.1, which includes a gcc 4.0 that won't be
tripped up by this same bug. You won't be able to build an unpatched
Mozilla with that compiler yet, but a patch is available (bug 294244)
and will be finding its way onto the trunk.
Mark