# cannot build firefox



## tuhoaja (Jul 31, 2012)

Hello

I'm having trouble building firefox.  I have removed the old version of firefox and tried to build with and without libxul, but the result is always the same:


```
/usr/local/bin/python2.7 ../.././../config/pythonpath.py -I../../config ../.././../config/expandlibs_exec.py --uselist --  /usr/bin/clang++ -o plugin-container -Qunused-arguments        -I/usr/local/include/nss -I/usr/local/include/nss/nss      -I/usr/local/include -fno-rtti -Qunused-arguments -Wall -Wpointer-arith -Woverloaded-virtual -Werror=return-type -Wtype-limits -Wempty-body -Wno-ctor-dtor-privacy -Wno-overlength-strings -Wno-invalid-offsetof -Wno-variadic-macros -Wno-c++0x-extensions -Wno-unknown-warning-option -Wno-return-type-c-linkage -O3 -march=x86-64 -fno-strict-aliasing -fno-exceptions -fno-strict-aliasing -std=gnu++0x -ffunction-sections -fdata-sections -pipe  -DNDEBUG -DTRIMMED -O3 -fomit-frame-pointer MozillaRuntimeMain.o   -pthread         -L/usr/local/lib/nss -Wl,-rpath,/usr/local/lib/firefox      -lc  -Wl,-rpath-link,/usr/ports/www/firefox/work/mozilla-release/obj-i386-portbld-freebsd9.0/dist/bin -Wl,-rpath-link,/usr/local/lib    -L../../dist/bin -L../../dist/lib -L/usr/ports/www/firefox/work/mozilla-release/obj-i386-portbld-freebsd9.0/dist/bin -lxpcom -lmozalloc -lxul  -L/usr/local/lib -lplds4 -lplc4 -lnspr4 -pthread  -Wl,--whole-archive /usr/ports/www/firefox/work/mozilla-release/obj-i386-portbld-freebsd9.0/dist/lib/libmozglue.a -Wl,--no-whole-archive -rdynamic -lvpx -pthread -L/usr/local/lib -liconv -lkvm
../../dist/bin/libxul.so: undefined reference to `nsWrapperCache::GetWrapper() const'
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[4]: *** [plugin-container] Virhe 1
gmake[4]: Poistutaan hakemistosta "/usr/ports/www/firefox/work/mozilla-release/obj-i386-portbld-freebsd9.0/ipc/app"
```

And this is of course after

```
portsnap fetch
portsnap update
```

Any ideas what's wrong? I'm using 9.0-RELEASE i386.


----------



## ath0 (Jul 31, 2012)

Do you use make or something like portmaster? if you use make try to make clean first.

hth
ath0


----------



## tuhoaja (Jul 31, 2012)

I use make and did make clean first.  

I'm using clang(/usr/bin/clang) as compiler, could that cause this? I'll try to build with gcc and see how it goes.


----------



## ath0 (Jul 31, 2012)

sorry can't test it, my boxes run on 8.3. I guess there is a build issue with Libreoffice if you build it with the base clang and llvm. So you may right.


----------



## tuhoaja (Jul 31, 2012)

Compiling with gcc resolved this.


----------



## Mercenary (Aug 9, 2012)

I had faced the same problem. However, with lowest level optimization possible (CFLAGS+= -O0) ff14 was successfully compiled by clang++.


----------

