# can't build firefox-21.0_1,1



## ColdfireMC (Jun 1, 2013)

As the title says, *I* can't build www/firefox. It fails at the beginning of the profiling test stage.

It's being built with DBUS, GSTREAMER, LIBRPOXY, OPTIMIZED_CFLAGS, PGO, WEBRTC, PULSEAUDIO options

`uname -a` says 


```
FreeBSD casav 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Sat May 25 22:37:28 CLT 2013     root@casav:/usr/obj/usr/src/sys/FOO  amd64
```

The last lines of compilation:


```
MOZ_PGO_INSTRUMENTED=1 OBJDIR=. JARLOG_FILE=./jarlog/en-US.log /usr/local/bin/python2.7 ./_profile/pgo/profileserver.py
args: ['/usr/ports/www/firefox/work/mozilla-release/obj-x86_64-portbld-freebsd9.1/dist/firefox/firefox-bin', '-no-remote', '-profile', '/usr/ports/www/firefox/work/mozilla-release/obj-x86_64-portbld-freebsd9.1/_profile/pgo/pgoprofile/', 'http://127.0.0.1:8888/index.html']
INFO | automation.py | Application pid: 6269
TEST-UNEXPECTED-FAIL | automation.py | Exited with code -10 during test run
INFO | automation.py | Application ran for: 0:00:00.066476
INFO | automation.py | Reading PID log: /tmp/tmpt8PJfhpidlog
gmake: *** [profiledbuild] Error 246
*** [do-build] Error code 1

Stop in /usr/ports/www/firefox.
*** [build] Error code 1
```

I changed permissions of the www/firefox folder and its contents to avoid screen permissions related issues and making possible build as user. In this moment *I*'m using KDE4, but the same error occurs with another DE's and window managers like twm, CDE, GNOME2. The previous version was built and installed successfully with the same options.

I have noticed that lang/python27 has been updated a few days ago, approximately the same time that *I* have this problem. Is that update causing this problem instead?


----------



## cpm@ (Jun 1, 2013)

Try to build without Profile-Guided Optimization (PGO) option.

```
[CMD]# make pretty-print-config[/CMD]
+DBUS -DEBUG -GCONF -GIO -GNOMEUI -GNOMEVFS2 +GSTREAMER +LIBPROXY -LOGGING +OPTIMIZED_CFLAGS -PGO +WEBRTC AUDIO( -ALSA -OSS +PULSEAUDIO )
```


----------



## ColdfireMC (Jun 6, 2013)

Ok, it builds without PGO, but has poor performance compared to previous successfull installation. This qualifies for a PR? (PGO broken)


----------



## ColdfireMC (Jun 6, 2013)

Now updated to firefox-21.0_2,1 and PGO is still broken*.*


----------



## cpm@ (Jun 6, 2013)

Firefox needs connect a daemon if PGO support is enabled when build. If you used plain su(1)() to become root, it won't have the right environment, so try using `% sudo portmaster firefox`

Seems that you have a similar problem to reported in the freebsd-gecko ML. Feel free to ask there


----------



## jozze (Jun 6, 2013)

If you have configured your build with PGO enabled, then you have to change to the root account with `# su -m`. This will make sure that you will be logged in as root and yourself at the same time), otherwise PGO cannot access the X-server to enable those optimizations.

There is actually a message that warns you about it when before the build process starts ...

I hope this helps.


----------



## ColdfireMC (Jun 6, 2013)

jozze said:
			
		

> If you have configured your build with PGO enabled, then you have to change to the root account with `# su -m`. This will make sure that you will be logged in as root and yourself at the same time), otherwise PGO cannot access the X-server to enable those optimizations.
> 
> There is actually a message that warns you about it when before the build process starts ...
> 
> I hope this helps.



Thanks. I have read about that issue, but this is not the case, I have compiled it with `su -m`, and logging in as root with other DE's and WM's but occurs the same problem. Note that with the same configuration, previous versions built succesfully. I think that is related with the last version of www/python (2.7.5). The error code is -10, not -15.

PS: now (since 21.0_2,1) www/firefox is being compiled with clang


----------

