# Can't install Firefox 22.0: libsoup error



## vlast (Jul 22, 2013)

Hey there,

I recently tried to install Firefox 22.0. I am running FreeBSD 9.1 with KDE4. 
But everytime I type `cd /usr/ports/www/firefox && make install clean` I get the error:


```
===>  Building for libsoup-2.40.3_2
gmake  all-recursive
gmake[1]: Entering directory `/usr/ports/devel/libsoup/work/libsoup-2.40.3'
Making all in libsoup
gmake[2]: Entering directory `/usr/ports/devel/libsoup/work/libsoup-2.40.3/libsoup'
  GEN    soup-marshal.list
  GEN    soup-enum-types.c
  GEN    soup-enum-types.h
./tld-parser.py ../data/effective_tld_names.dat tld_data.inc
env: python2: No such file or directory
gmake[2]: *** [tld_data.inc] Error 127
gmake[2]: *** Waiting for unfinished jobs....
gmake[2]: Leaving directory `/usr/ports/devel/libsoup/work/libsoup-2.40.3/libsoup'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/usr/ports/devel/libsoup/work/libsoup-2.40.3'
gmake: *** [all] Error 2
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** [do-build] Error code 1

Stop in /usr/ports/devel/libsoup.
*** [lib-depends] Error code 1

Stop in /usr/ports/devel/libsoup-gnome.
*** [lib-depends] Error code 1

Stop in /usr/ports/devel/gvfs.
*** [install] Error code 1

Stop in /usr/ports/devel/gvfs.
*** [lib-depends] Error code 1

Stop in /usr/ports/x11-toolkits/libgnomeui.
*** [lib-depends] Error code 1

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

Stop in /usr/ports/www/firefox.
root@vlast:/usr/ports/www/firefox #
```


If I try to install /usr/ports/devel/libsoup it says the same.

What's wrong with it?


----------



## vlast (Jul 22, 2013)

I use `#cd /usr/ports/www/firefox && make install clean` or `#cd /usr/ports/devel/libsoup && make install clean` as _root_ of course.


----------



## vlast (Jul 22, 2013)

Okay, I was able to fix the libsouperror. Seems that some ports were outdated.

But a few minutes later I get a new error:


```
make: *** [all-recursive] Error 1
*** [do-build] Error code 1

Stop in /usr/ports/textproc/gnome-doc-utils.
*** [build-depends] Error code 1

Stop in /usr/ports/sysutils/policykit-gnome.
*** [run-depends] Error code 1

Stop in /usr/ports/sysutils/gnome-mount.
*** [run-depends] Error code 1

Stop in /usr/ports/devel/gvfs.
*** [install] Error code 1

Stop in /usr/ports/devel/gvfs.
*** [lib-depends] Error code 1

Stop in /usr/ports/x11-toolkits/libgnomeui.
*** [lib-depends] Error code 1

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

Stop in /usr/ports/www/firefox.
root@vlast:/usr/ports/www/firefox #
```

I tried to `#cd /usr/ports/textproc/gnome-doc-utils && make install clean` but it says

```
raceback (most recent call last):
  File "/usr/ports/textproc/gnome-doc-utils/work/gnome-doc-utils-0.20.3/doc/gnome-doc-make/../../xml2po/xml2po/xml2po", line 191, in <module>
    main(sys.argv[1:])
  File "/usr/ports/textproc/gnome-doc-utils/work/gnome-doc-utils-0.20.3/doc/gnome-doc-make/../../xml2po/xml2po/xml2po", line 88, in main
    from xml2po import Main
  File "/usr/ports/textproc/gnome-doc-utils/work/gnome-doc-utils-0.20.3/xml2po/xml2po/__init__.py", line 27, in <module>
    import libxml2
  File "/usr/local/lib/python2.7/site-packages/libxml2.py", line 1, in <module>
    import libxml2mod
ImportError: /usr/local/lib/python2.7/site-packages/libxml2mod.so: Undefined symbol "xmlTextReaderRelaxNGValidateCtxt"
gmake[2]: *** [de/gnome-doc-make.xml] Error 1
gmake[2]: Leaving directory `/usr/ports/textproc/gnome-doc-utils/work/gnome-doc-utils-0.20.3/doc/gnome-doc-make'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/usr/ports/textproc/gnome-doc-utils/work/gnome-doc-utils-0.20.3/doc'
gmake: *** [all-recursive] Error 1
*** [do-build] Error code 1

Stop in /usr/ports/textproc/gnome-doc-utils.
root@vlast:/usr/ports/textproc/gnome-doc-utils #
```


Even tough I checked http://www.freshports.organd installed all ports required by gnome-doc-utils


----------



## wblock@ (Jul 22, 2013)

Please read Upgrading FreeBSD Ports.  Before trying to install any more major ports, install sysutils/bsdadminscripts and run `pkg_libchk -q`.  If it does not report any problems, great!  But it probably will, and all the problems ports listed will need to be rebuilt.  The best way to do that is with ports-mgmt/portmaster.  The link above talks about how to upgrade ports and avoid problems, but first we need to make sure yours are all known to be good.


----------



## vlast (Jul 23, 2013)

So can I just run `# portmaster -L --index-only| egrep '(ew|ort) version|total install'`

Example output:


```
===>>> new version available: example1
      ===>>> new version available: example2
      .
      .
      .
```

and after this, upgrade all the ports listed with `# portmaster example1 example2 ...` or shall I upgrade ALL ports by using `# man portmaster | less -p reinstallation`?

And one question: in the description of portmaster at this page it says:



> *portmaster first checks that everything the port depends on is present.* Then it rebuilds that port, and finally rebuilds all ports that depend on it.
> 
> If there is more than one outdated port, just list them all on the command line. portmaster will work out the dependencies and build order.



What, if not everything the port needs is present? Does portmaster automatically install missing contents or does it produce an error and I have to add the missing files manually?


----------



## wblock@ (Jul 23, 2013)

If things that the port being upgraded are missing, portmaster installs them.  More often, those dependencies are present but outdated, so they will be upgraded first.

Whether to rebuild all ports kind of depends on how many are outdated.  If 200 ports need to be rebuilt, `pkg_libhck -q` shows a long list of ports with problems, and /usr/ports/UPDATING has not been followed, rebuilding them all with the portmaster(8) reinstall procedure can be the easiest and sometimes quickest way to go.


----------



## vlast (Jul 23, 2013)

So you suggest to use `pkg_libhck -q` instead of `# portmaster -L --index-only| egrep '(ew|ort) version|total install'` to find out which ports are outdated?

And if there are only a few which need update I shall update them manually using portmaster and if there are too many it might be easier to use `# man portmaster | less -p reinstallation` to get them all refreshed?

Got it right?


----------



## wblock@ (Jul 23, 2013)

No, they are two different things.  `pkg_libchk` looks for installed applications that need missing libraries.  Usually, those libraries are missing because ports have been upgraded in a haphazard way, and the applications with problems can be fixed by upgrading or reinstalling them.  `portmaster -L --index-only| egrep '(ew|ort) version|total install'` shows which ports have new versions in the ports tree and can be upgraded.

Yes to the second part.  If ports are really mixed up, reinstalling all of them can clean things up.  That is severe and can take a long time, so it's best to avoid by checking new entries in /usr/ports/UPDATING before installing or upgrading ports.


----------



## vlast (Jul 24, 2013)

Okay I ran `# pkg_libchk -q`. `# pkg_libchk -q` didn't come out with anything.

After running `#pkg_libchk -q` and not getting any errors I tried to install www/firefox again, but:


```
gmake[4]: Leaving directory `/usr/ports/www/firefox/work/mozilla-release/obj-x86_64-portbld-freebsd9.1/browser/locales'
gmake[3]: Leaving directory `/usr/ports/www/firefox/work/mozilla-release/obj-x86_64-portbld-freebsd9.1/browser/installer'
gmake tools
gmake[3]: Entering directory `/usr/ports/www/firefox/work/mozilla-release/obj-x86_64-portbld-freebsd9.1/browser/installer'
gmake[3]: Nothing to be done for `tools'.
gmake[3]: Leaving directory `/usr/ports/www/firefox/work/mozilla-release/obj-x86_64-portbld-freebsd9.1/browser/installer'
gmake[2]: Leaving directory `/usr/ports/www/firefox/work/mozilla-release/obj-x86_64-portbld-freebsd9.1/browser/installer'
gmake[1]: Leaving directory `/usr/ports/www/firefox/work/mozilla-release/obj-x86_64-portbld-freebsd9.1'
rm -f ./jarlog/en-US.log
MOZ_PGO_INSTRUMENTED=1 JARLOG_FILE=jarlog/en-US.log EXTRA_TEST_ARGS=10 gmake -C . pgo-profile-run
gmake[1]: Entering directory `/usr/ports/www/firefox/work/mozilla-release/obj-x86_64-portbld-freebsd9.1'
gmake[1]: *** No rule to make target `pgo-profile-run'.  Stop.
gmake[1]: Leaving directory `/usr/ports/www/firefox/work/mozilla-release/obj-x86_64-portbld-freebsd9.1'
gmake: *** [profiledbuild] Error 2
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** [do-build] Error code 1

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

Stop in /usr/ports/www/firefox.
root@vlast:/usr/ports/www/firefox #
```

`# pkg_libchk` without the `-q` dependency gave me:

```
bootstrap-openjdk-r306764: /usr/local/bootstrap-openjdk/bin/idlj misses libz.so.4
bootstrap-openjdk-r306764: /usr/local/bootstrap-openjdk/bin/jar misses libz.so.4
bootstrap-openjdk-r306764: /usr/local/bootstrap-openjdk/bin/java misses libz.so.4
bootstrap-openjdk-r306764: /usr/local/bootstrap-openjdk/bin/javac misses libz.so.4
bootstrap-openjdk-r306764: /usr/local/bootstrap-openjdk/bin/javah misses libz.so.4
bootstrap-openjdk-r306764: /usr/local/bootstrap-openjdk/bin/javap misses libz.so.4
bootstrap-openjdk-r306764: /usr/local/bootstrap-openjdk/bin/native2ascii misses libz.so.4
bootstrap-openjdk-r306764: /usr/local/bootstrap-openjdk/bin/rmic misses libz.so.4
bootstrap-openjdk-r306764: /usr/local/bootstrap-openjdk/jre/bin/java misses libz.so.4
bootstrap-openjdk-r306764: /usr/local/bootstrap-openjdk/jre/lib/amd64/libzip.so misses libz.so.4
```

EDIT: Maybe it is important to mention that I had Firefox 17.0 installed before. I removed it using `# cd /usr/ports/www/firefox && make deinstall clean` and now I am trying to install Firefox 22.0

I think I heavily messed up with my ports. Is there any way to set my OS to zero, like if I just installed it? Or any command to deinstall all programs etc. and set them up newly?


----------



## kpa (Jul 24, 2013)

You can just do:

`rm -rf /usr/local/*`
`rm -rf /var/db/pkg/*`
`rm -rf /var/db/ports/*`

And then delete all settings in /etc/rc.conf that were added for packages/ports.

After that you have a clean system as far as packages/ports are concerned.


----------



## SirDice (Jul 24, 2013)

vlast said:
			
		

> Or any command to deinstall all programs etc. and set them up newly?


`# pkg_delete -a` usually does the trick.


----------



## wblock@ (Jul 24, 2013)

vlast said:
			
		

> Okay I ran `# pkg_libchk -q`. `# pkg_libchk -q` didn't come out with anything.
> 
> After running `#pkg_libchk -q` and not getting any errors I tried to install www/firefox again, but:



Going back through this thread, there is no mention of how you are updating the ports tree to get the newer version of Firefox.


----------



## vlast (Jul 24, 2013)

The FreeBSD-9.1-RELEASE has Firefox 17.0 in the ports tree which I installed.

So I made `# cd /usr/ports/www/firefox && make deinstall clean`
`# portsnap fetch`
`# portsnap extract`
`# cd /usr/ports/www/firefox && make install clean`

I thought this might work to deinstall Firefox 17.0 and install Firefox 22.0.


----------



## wblock@ (Jul 24, 2013)

After updating with portsnap(8), it is extremely important to check for new entries in /usr/ports/UPDATING.  Do not skip that step.  See Upgrading FreeBSD Ports.


----------



## tedjohnson (Aug 27, 2013)

I too am getting 
	
	



```
MOZ_PGO_INSTRUMENTED=1 JARLOG_FILE=jarlog/en-US.log EXTRA_TEST_ARGS=10 gmake -C . pgo-profile-run
gmake[1]: Entering directory `/usr/ports/www/firefox/work/mozilla-release/obj-x86_64-unknown-freebsd9.1'
gmake[1]: *** No rule to make target `pgo-profile-run'.  Stop.
gmake[1]: Leaving directory `/usr/ports/www/firefox/work/mozilla-release/obj-x86_64-unknown-freebsd9.1'
gmake: *** [profiledbuild] Error 2
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** [do-build] Error code 1
```

I have updated everything with portmaster, but it is stuck with firefox. Is the current Firefox port simply broken?


----------



## wblock@ (Aug 27, 2013)

It works here.  Turn off the PGO option.


----------



## mahashakti89 (Aug 27, 2013)

tedjohnson said:
			
		

> I too am getting
> 
> 
> 
> ...



I think I built it without any problem. Reading the error message I would say: build it without PGO-support. Do a simple `make config` and build it again.

Regards


----------



## tedjohnson (Aug 27, 2013)

mahashakti89 said:
			
		

> I think I built it without any problem. Reading the error message I would say: build it without PGO-support. Do a simple `make config` and build it again.
> 
> Regards



Thanks, that worked!


----------



## wmoreno3 (Nov 19, 2013)

Maybe this can help to someone ...

```
# pkg_libchk
bootstrap-openjdk-r333271: /usr/local/bootstrap-openjdk/bin/idlj misses libz.so.5
...
```
Solution
`# ln -s /lib/libz.so.6 /lib/libz.so.5`
Test
`# pkg_libchk` and `# portsclean -L` OK
I didn't rebuild all, spending a lot of time


----------



## kpa (Nov 19, 2013)

That's really really bad advice, sorry to be so blunt about it. There's a much better alternative and that is installing a compatibility package that has the correct library that is missing, most likely it is misc/compat8x if you're on FreeBSD 9.


----------



## wblock@ (Nov 19, 2013)

How symlinking libraries fails: Thread 32311.


----------



## wmoreno3 (Nov 19, 2013)

kpa said:
			
		

> That's really really bad advice, sorry to be so blunt about it. There's a much better alternative and that is installing a compatibility package that has the correct library that is missing, most likely it is misc/compat8x if you're on FreeBSD 9.


If I do as you said:

```
Installing compat8x-amd64-8.4.804000.201310_2... done
===>  Cleaning for compat8x-amd64-8.4.804000.201310_2
root@server:/usr/ports/misc/compat8x # portsclean -L
** /usr/local/lib/gcc49/libobjc.so.4 is shadowed by /usr/local/lib/compat/libobjc.so.4
        /usr/local/lib/compat/libobjc.so.4      <- ["compat8x-amd64-8.4.804000.201310_2"]
        /usr/local/lib/gcc49/libobjc.so.4       <- ["gcc-4.9.0.20131020_1"]
 --> Two packages install the same library in different directories!
```


----------



## kpa (Nov 19, 2013)

I have no idea what portsclean is supposed to do so I don't know if that is significant in any way.

I can not see how providing the same exact library from two different locations would do any harm since the compat library isn't even used when building ports.


----------



## wmoreno3 (Nov 19, 2013)

I am now trying to "Installation of Plug-ins for Opera" Opera teams wrote:

```
So that Java will be discovered, type the following commands: 
cd /usr/local/lib/opera/plugins 
ln -s /path/to/libnpjp2.so
```
Does anybody have a better alternative*?*


----------

