# Firefox needs libpng12



## Deleted member 2077 (Aug 5, 2010)

Firefox fails to compile, saying it needs libpng12.

In /usr/ports/graphics/png I installed that, but says it's libpng 1.4.3

How do I install libpng12?  Thanks.

firefox:

```
fire2# cat distinfo
MD5 (firefox-3.6.8.source.tar.bz2) = 0ee5f14fd8be07513d16131027ebcb61
SHA256 (firefox-3.6.8.source.tar.bz2) = fc609cc6a0ddaa2a9ebd8511ec39ae4a404e1107a12e07b233e2afca51d9a10e
SIZE (firefox-3.6.8.source.tar.bz2) = 51238976
fire2# pwd
/usr/ports/www/firefox
```

libpng

```
fire2# pwd
/usr/ports/graphics/png
fire2# cat distinfo
MD5 (libpng-1.4.3.tar.xz) = 322e2e0c0dea7a374ce6e60d9a72e604
SHA256 (libpng-1.4.3.tar.xz) = 3728f11d9b0b9943d855f558f3ee2334af50cc9197a9218825787a303b5037d3
SIZE (libpng-1.4.3.tar.xz) = 539048
MD5 (libpng-1.4.3-apng.patch) = c37a273158cabcd0495d44c9d1a5cedf
SHA256 (libpng-1.4.3-apng.patch) = 7b94cb5089244d8d7be686a9f9a901dda11a65c8b05f48c33d790f843ac96e99
SIZE (libpng-1.4.3-apng.patch) = 54364
```

Ports:

```
fire2# cat port.supfile
*default tag=.
*default host=cvsup11.us.FreeBSD.org
*default prefix=/usr
*default base=/var/db
*default release=cvs delete use-rel-suffix compress
ports-all
```



```
checking for pkg-config... /usr/local/bin/pkg-config
checking for gtk+-2.0 >= 2.10.0 gtk+-unix-print-2.0 glib-2.0 gobject-2.0 gdk-x11-2.0... gnome-config: not found
gnome-config: not found
Package libpng12 was not found in the pkg-config search path. Perhaps you should add the directory containing `libpng12.pc' to the 
PKG_CONFIG_PATH environment variable Package 'libpng12', required by 'cairo', not found
configure: error: Library requirements (gtk+-2.0 >= 2.10.0 gtk+-unix-print-2.0 glib-2.0 gobject-2.0 gdk-x11-2.0) not met; consider adjusting 
the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.
===>  Script "configure" failed unexpectedly.
Please report the problem to gecko@FreeBSD.org [maintainer] and attach the
"/usr/ports/www/firefox/work/mozilla-1.9.2/config.log" including the output
of the failure of your make command. Also, it might be a good idea to provide
an overview of all packages installed on your system (e.g. an `ls
/var/db/pkg`).
*** Error code 1

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


----------



## SirDice (Aug 5, 2010)

> 20100328:
> AFFECTS: users of graphics/png
> AUTHOR: dinoex@FreeBSD.org
> 
> ...



From /usr/ports/UPDATING


----------



## lily (Aug 5, 2010)

www/firefox uses bundled libpng12 under WRKSRC/modules/libimg/png/. In order to use system/external libpng14 you'd have to compile graphics/png with APNG option and hack the port a bit (e.g. ports/146231).

But the error you're seeing is due to graphics/cairo still depending on libpng12.


----------



## SirDice (Aug 5, 2010)

lily said:
			
		

> www/firefox uses bundled libpng12 under WRKSRC/modules/libimg/png/. In order to use system/external libpng14 you'd have to compile graphics/png with APNG option and hack the port a bit (e.g. ports/146231).


Interesting :e


----------



## Deleted member 2077 (Aug 5, 2010)

I have no idea what any of this means.  I don't use portupgrade or portmaster.

Also, why is there 3 different port "managers"?
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/ports-using.html
Which port "manager" is the official FreeBSD approved and supported one for doing things?

Why doesn't 'make; make install' just work, I thought that is how ports were handled in FreeBSD?


I tried rebuilding cardio and it failed:

```
checking for gs... gs
checking for LIBSPECTRE... no
no
checking for cairo's PDF surface backend feature...
checking whether cairo's PDF surface backend feature could be enabled... yes
checking for POPPLER... no
no
configure: WARNING: PDF backend will not be tested since poppler >= 0.9.2 is not available
checking for cairo's SVG surface backend feature...
checking whether cairo's SVG surface backend feature could be enabled... yes
checking for LIBRSVG... no
no
configure: WARNING: SVG backend will not be tested since librsvg >= 2.15.0 is not available
checking for cairo's image surface backend feature...
checking for pixman... no
no
checking whether cairo's image surface backend feature could be enabled... no (requires pixman-1 >= 0.12.0 http://cairographics.org/releases/)
configure: error: mandatory image surface backend feature could not be enabled
===>  Script "configure" failed unexpectedly.
Please run the gnomelogalyzer, available from
"http://www.freebsd.org/gnome/gnomelogalyzer.sh", which will diagnose the
problem and suggest a solution. If - and only if - the gnomelogalyzer cannot
solve the problem, report the build failure to the FreeBSD GNOME team at
gnome@FreeBSD.org, and attach (a)
"/usr/ports/graphics/cairo/work/cairo-1.8.10/config.log", (b) the output of
the failed make command, and (c) the gnomelogalyzer output. Also, it might
be a good idea to provide an overview of all packages installed on your system
(i.e. an `ls /var/db/pkg`). Put your attachment up on any website,
copy-and-paste into http://freebsd-gnome.pastebin.com, or use send-pr(1) with
the attachment. Try to avoid sending any attachments to the mailing list
(gnome@FreeBSD.org), because attachments sent to FreeBSD mailing lists are
usually discarded by the mailing list software.
*** Error code 1

Stop in /usr/ports/graphics/cairo.
```


I built graphics/libsvg and that installed fine and tried cairo again:

```
checking for LIBSPECTRE... no
no
checking for cairo's PDF surface backend feature...
checking whether cairo's PDF surface backend feature could be enabled... yes
checking for POPPLER... no
no
configure: WARNING: PDF backend will not be tested since poppler >= 0.9.2 is not available
checking for cairo's SVG surface backend feature...
checking whether cairo's SVG surface backend feature could be enabled... yes
checking for LIBRSVG... no
no
configure: WARNING: SVG backend will not be tested since librsvg >= 2.15.0 is not available
checking for cairo's image surface backend feature...
checking for pixman... no
no
checking whether cairo's image surface backend feature could be enabled... no (requires pixman-1 >= 0.12.0 http://cairographics.org/releases/)
configure: error: mandatory image surface backend feature could not be enabled
===>  Script "configure" failed unexpectedly.
Please run the gnomelogalyzer, available from
"http://www.freebsd.org/gnome/gnomelogalyzer.sh", which will diagnose the
problem and suggest a solution. If - and only if - the gnomelogalyzer cannot
solve the problem, report the build failure to the FreeBSD GNOME team at
gnome@FreeBSD.org, and attach (a)
"/usr/ports/graphics/cairo/work/cairo-1.8.10/config.log", (b) the output of
the failed make command, and (c) the gnomelogalyzer output. Also, it might
be a good idea to provide an overview of all packages installed on your system
(i.e. an `ls /var/db/pkg`). Put your attachment up on any website,
copy-and-paste into http://freebsd-gnome.pastebin.com, or use send-pr(1) with
the attachment. Try to avoid sending any attachments to the mailing list
(gnome@FreeBSD.org), because attachments sent to FreeBSD mailing lists are
usually discarded by the mailing list software.
*** Error code 1

Stop in /usr/ports/graphics/cairo.
```



```
fire2# ./gnomelogalyzer.sh

Generating build log. Please wait... done.

The cause of your build failure is not known to gnomelogalyzer.sh.  Before
e-mailing the build log to the FreeBSD GNOME team at freebsd-gnome@FreeBSD.org,
TRY EACH OF THE FOLLOWING:

  * If you are generating your own logfile, make sure to generate it with
    something similar to:
          "make 2>&1 | tee /path/to/logfile" (sh/bash/ksh/zsh) or
          "make |& tee /path/to/logfile" (csh/tcsh)
        * Make sure your cvsup(1) configuration file specifies the 'ports-all'
          collection
        * Run cvsup(1) and attempt the build again
        * Check /usr/ports/UPDATING for information pertinent to your build
          failure
        * 99% of the commonly reported build failures can be solved by
          running "portupgrade -a"
        * Read the FAQs at http://www.FreeBSD.org/gnome/
        * Search the archives of freebsd-gnome@FreeBSD.org.  Archives can be
          searched at http://www.freebsd.org/gnome/index.html#search

If you have not performed each of the above suggestions, don't bother asking
for help.  The chances are good that you'll simply be told to perform one of
the aforementioned steps.
```



I tried this in the gnome log.

```
fire2# portupgrade -a
[Updating the pkgdb <format:bdb_btree> in /var/db/pkg ... - 843 packages found (-3 +14) (...).............. done]
/usr/ports/INDEX-6.bz2                        100% of 1416 kB  277 kBps
done
[Updating the portsdb <format:bdb_btree> in /usr/ports ... - 22013 port entries found 
.........1000.........2000.........3000.........4000.........5000.........6000.........
7000.........8000.........9000.........10000.........11000.........12000.........
13000.........14000.........15000.........16000.........17000.........18000.........
19000.........20000.........21000.........22000 ..... done]
Stale dependency: cups-samba-6.0_2 --> samba-3.0.37,1 -- manually run 'pkgdb -F' to fix, or specify -O to force.
```


```
fire2# pkgdb -F
--->  Checking the package registry database
Stale origin: 'devel/gnu-autoconf': perhaps moved or obsoleted.
-> The port 'devel/gnu-autoconf' was removed on 2007-09-10 because:
        "No longer required with new autotools system"
-> Hint:  gnu-autoconf-2.61 is required by the following package(s):
        kde-3.5.6
        gnu-automake-1.10
        kdevelop-3.4.0_2
-> Hint: checking for overwritten files...
 -> No files installed by gnu-autoconf-2.61 have been overwritten by other packages.
Deinstall gnu-autoconf-2.61 ? [no]
```


I used the defaults for everything and it gets to this and fails:


```
Stale dependency: cups-samba-6.0_2 -> samba-3.0.37,1 (net/samba3):



samba-3.3.9 (score:68%) ? ([y]es/[n]o/[a]ll) [no] Install stale dependency? ([y]es/[n]o/[a]ll) [yes]
[Gathering depends for net/samba3 ...................................... done]
--->  Installing 'samba-3.0.37_1,1' from a port (net/samba3)
--->  Building '/usr/ports/net/samba3'
===>  Cleaning for samba-3.0.37_1,1
===>  NOTICE: This version of port has changed location of Samba password
===>  NOTICE: (smbpasswd) directory. Files in '/usr/local/private'
===>  NOTICE: have moved to '/usr/local/etc/samba'.

===>  samba-3.0.37_1,1 conflicts with installed package(s):
      samba-3.3.9

      They install files into the same place.
      Please remove them first with pkg_delete(1).
*** Error code 1

Stop in /usr/ports/net/samba3.
** Command failed [exit code 1]: /usr/bin/script -qa /tmp/portinstall20100805-34940-11pkuh3-0 env make
** Fix the problem and try again.
** Listing the failed packages (-:ignored / *:skipped / !:failed)
        ! net/samba3    (unknown build error)
Command failed [exit code 1]: /usr/local/sbin/portinstall net/samba3
```


I'm just trying to install fire fox.  I have no idea why it's trying to reinstall my samba.  There is no good reason why Samba should be any way involved when installing firefox.  That seems like an absurd way to manage packages.


----------



## wblock@ (Aug 5, 2010)

feralape said:
			
		

> I have no idea what any of this means.  I don't use portupgrade or portmaster.
> 
> Also, why is there 3 different port "managers"?
> Which port "manager" is the official FreeBSD approved and supported one for doing things?



Because people don't always agree, and monocultures are bad.  portmaster is probably the closest to "official"



> Why doesn't 'make; make install' just work, I thought that is how ports were handled in FreeBSD?



make install works fine unless you have some outdated ports already installed.  If the new software you're trying to install depends on newer versions of those other ports, it fails.

portmaster/portupgrade try to help automate the process of upgrading those old ports.


----------



## Deleted member 2077 (Aug 5, 2010)

wblock said:
			
		

> Because people don't always agree, and monocultures are bad.  portmaster is probably the closest to "official"
> 
> 
> 
> ...



ok, thanks.  portmaster it is then.

I tried this as suggested:
`portmaster -r png-`

(using newest portmaster from /usr/ports/ports-mgmt/portmaster)

This might take awhile, it looks like it's going though a lot of things and updating them.

Actually, a lot of these are coming up with a text GUI to configure some ports.  Is there anyway to just accept default config?  I didn't see anything in the man page about this.  I don't want to sit here hitting [enter].  --force-config, is that what I want?

edit:

hrm, portmaster -r png- is failing with:


```
===>>> The dependency for math/gmp
       seems to be handled by libgmp-4.3.1


        ===>>> The math/libgmp4 port moved to math/gmp
        ===>>> Reason: Switch to newer performance release


===>>> The math/libgmp4 port has been deleted: Has expired: Use math/gmp instead.
===>>> Aborting update

===>>> Update for lang/gcc42 failed
===>>> Aborting update

===>>> Update for audio/celt failed
===>>> Aborting update

===>>> Update for jackit-0.103.0 failed
===>>> Aborting update

===>>> Update for arts-1.5.6_1,1 failed
===>>> Aborting update

Terminated
```



```
fire2# cd /usr/ports/math/gmp
fire2# make

===>  gmp-5.0.1 conflicts with installed package(s):
      libgmp-4.3.1

      They install files into the same place.
      Please remove them first with pkg_delete(1).
*** Error code 1

Stop in /usr/ports/math/gmp.
fire2# pkg_delete libgmp-4.3.1
pkg_delete: package 'libgmp-4.3.1' is required by these other packages
and may not be deinstalled:
kde-3.5.6
kdeutils-3.5.6
php5-gmp-5.2.5
```


----------



## wblock@ (Aug 5, 2010)

Always read /usr/ports/UPDATING before you start updating.  There's an entry in there just for GMP.


----------



## DutchDaemon (Aug 5, 2010)

And use 
	
	



```
tags for system output ... you should really know that after 51 posts and ~2 years.
```


----------



## Deleted member 2077 (Aug 5, 2010)

wblock said:
			
		

> Always read /usr/ports/UPDATING before you start updating.  There's an entry in there just for GMP.



ok, gmp is installed and re-doing all the -r png stuff.

I'm not clear on why I can't have two versions of libpng installed?  What everything was using and what is required by firefox.

Also why does firefox/cario need libgpng12 when it's been officially deprecated in the ports?  Shouldn't everything that needs libpng be transitioned and tested on new version before deleting the old one?


----------



## Deleted member 2077 (Aug 5, 2010)

DutchDaemon said:
			
		

> And use
> 
> 
> 
> ...


----------



## DutchDaemon (Aug 5, 2010)

It is now .. guess who edited your posts ..


----------



## Deleted member 2077 (Aug 6, 2010)

DutchDaemon said:
			
		

> It is now .. guess who edited your posts ..



ok, sorry; guess I missed some ending tags or something.


----------



## Deleted member 2077 (Aug 6, 2010)

feralape said:
			
		

> ok, gmp is installed and re-doing all the -r png stuff.
> 
> I'm not clear on why I can't have two versions of libpng installed?  What everything was using and what is required by firefox.



This is really odd.  After that finished, it broke bash, saying it couldn't find libintl.so.8.

I did make install for bash and that fixed it, but also broke courier-imap.  I remade both courier-imap and authlib, but still getting this even after reinstall/restart:


```
Aug  5 19:44:14 fire2 imapd-ssl: /libexec/ld-elf.so.1: Shared object "libintl.so.8" not found, required by "libidn.so.16"
```

How do I find what port libintl.so belongs to?


----------



## wblock@ (Aug 6, 2010)

libintl.so is part of devel/gettext (see UPDATING).  When you have old ports, you should go back in the UPDATING file to the last time you updated and work forward from there.  Since a lot of things depend on gettext, you'll end up rebuilding a lot of ports.  The good news is if you use portupgrade you won't have to rebuild a port multiple times.  portmaster doesn't use a database to keep track of things, so sometimes it rebuilds a port multiple times.


----------



## SPlissken (Aug 9, 2010)

Same problem for me when triyng to install grisbi
It complains about libpng12.pc but libpng14 is installed
Don't know what to do.
With netbsd , i have both installed


----------

