# Firefox 4 with PGO compile error



## epopen (May 15, 2011)

Hi everyone.

I want to compile Firefox 4 with PGO support. I am running GNOME 2.32.1. But it aborts with an error. Below is log.


```
gmake[4]: Leaving directory `/usr/ports/www/firefox/work/mozilla-2.0/obj-amd64-unknown-freebsd8.2/browser/locales'
gmake[3]: Leaving directory `/usr/ports/www/firefox/work/mozilla-2.0/obj-amd64-unknown-freebsd8.2/browser/installer'
gmake tools
gmake[3]: Entering directory `/usr/ports/www/firefox/work/mozilla-2.0/obj-amd64-unknown-freebsd8.2/browser/installer'
gmake[3]: Nothing to be done for `tools'.
gmake[3]: Leaving directory `/usr/ports/www/firefox/work/mozilla-2.0/obj-amd64-unknown-freebsd8.2/browser/installer'
if test -d ../../dist/bin ; then touch ../../dist/bin/.purgecaches ; fi
hg: not found
gmake[2]: Leaving directory `/usr/ports/www/firefox/work/mozilla-2.0/obj-amd64-unknown-freebsd8.2/browser
/installer'
gmake[1]: Leaving directory `/usr/ports/www/firefox/work/mozilla-2.0/obj-amd64-unknown-freebsd8.2'
OBJDIR=obj-amd64-unknown-freebsd8.2 /usr/local/bin/python2.7 obj-amd64-unknown-freebsd8.2/_profile/pgo/profileserver.py
args: ['/usr/ports/www/firefox/work/mozilla-2.0/obj-amd64-unknown-freebsd8.2/dist/firefox/firefox-bin', '-no-remote', '-profile',
 '/usr/ports/www/firefox/work/mozilla-2.0/obj-amd64-unknown-freebsd8.2/_profile/pgo/pgoprofile/', 'http://127.0.0.1:8888/index.html']
INFO | automation.py | Application pid: 43717

(firefox-bin:43717): GnomeUI-WARNING **: While connecting to session manager:
None of the authentication protocols specified are supported.
**
GLib-GIO:ERROR:gdbusconnection.c:2270:initable_init: assertion failed: (connection->initialization_error == NULL)
TEST-UNEXPECTED-FAIL | automation.py | Exited with code -6 during test run
INFO | automation.py | Application ran for: 0:00:01.447623
INFO | automation.py | Reading PID log: /tmp/tmpD148rhpidlog
gmake: *** [profiledbuild] Error 250
*** Error code 1

Stop in /usr/ports/www/firefox.
*** Error code 1

Stop in /usr/ports/www/firefox.
```

Following google, I tried to recompile py27-sqlite3 (*portupgrade -fR py27-sqlite3*), but it did not work. I do not understand what "http://127.0.0.1:8888/index.html" means. Is it daemon required? But I couldn't get any useful information about it.

How do I install it?
Please help me.

Thanks a lot.


----------



## Martillo1 (May 17, 2011)

It happened to me when using a login manager. I used `$ startx` to start X and it compiled. I suppose it is something related to root no beeing able to log in through login manager.


----------



## Garrosh (May 18, 2011)

I've managed to compile firefox while using KDM as a login manager by using *kdesu*, like this:
[CMD=]$ cd /usr/ports/www/firefox[/CMD]
[CMD=]$ *kdesu* make install clean[/CMD]


----------



## epopen (May 19, 2011)

Thanks Martillo1 and Garrosh 

Sorry if I'm missing someone.

I had been logged in in GNOME by *startx* (ordinary user, not root). Compiled firefox in xterm (by root) on GONME

So I don't know PGO what daemon (http://127.0.0.1:8888) need.

Thanks a lot.


----------



## Garrosh (May 19, 2011)

The only thing I can tell you is the obvious: 127.0.0.1 is your loopback device. It's basically your internal IP address. The port (8888) appears to be a random one.

So the PGO actually tries to connect to your browser via your loopback to perform the profiling (i.e. Profile Guided Optimization).

I think the pertinent error is this:


```
(firefox-bin:43717): GnomeUI-WARNING **: While connecting to session manager:
None of the authentication protocols specified are supported.
```

You might want to Google possible causes for that.


----------



## epopen (May 20, 2011)

Garrosh said:
			
		

> The only thing I can tell you is the obvious: 127.0.0.1 is your loopback device. It's basically your internal IP address. The port (8888) appears to be a random one.
> 
> So the PGO actually tries to connect to your browser via your loopback to perform the profiling (i.e. Profile Guided Optimization).


Thanks, IP/ports is fixed not random.

So firefox wishes to connect to a daemon in X window I think. But after googleing I haven't any answer for the issue.


			
				Garrosh said:
			
		

> I think the pertinent error is this:
> 
> 
> ```
> ...


I haven't an idea about this error message either.

Thanks you a lot.


----------



## Martillo1 (May 24, 2011)

Try another WM in .xinitrc like x11-wm/fvwm2 and use `$ startx` to start X. Heavy DEs are tricky sometimes.


----------



## epopen (Jun 2, 2011)

Thanks all.
After I and Ports owner tested. Solution is *sudo portupgrade firefox*. If use *su*, environment variable modified, and causes dbus connect error; *sudo* keeps it unmodified.

Thanks all very much.


----------



## okeeblow (Jun 21, 2011)

Sorry to bump a solved thread, but it's easy to build Firefox PGO under GNOME like this as su root:

`$ dbus-launch make install`


----------



## epopen (Jun 25, 2011)

okeeblow said:
			
		

> Sorry to bump a solved thread, but it's easy to build Firefox PGO under GNOME like this as su root:
> 
> `$ dbus-launch make install`


Hi okeeblow
The method work also
I use it in root (Firefox 4.0.1 -> 5.0)
`# dbus-launch portupgrade firefox`
Thanks you a lot.


----------



## Martillo1 (Jul 3, 2011)

Good to know!:beer


----------



## rianav (Dec 31, 2011)

Thank you to those who contributed above. I had this problem too.

Cheers.


----------

