# lost files in png-1.4.8_1 port



## luvgalz (Mar 6, 2012)

When i trying to install  png-1.4.8_1 port, some files didn't creates.


```
optimus# pkg_info -L png\*
Information for png-1.4.8_1:

Files:
/usr/local/man/man3/libpng.3.gz
/usr/local/man/man3/libpngpf.3.gz
/usr/local/man/man5/png.5.gz
/usr/local/bin/libpng-config
/usr/local/include/libpng/png.h
/usr/local/include/libpng/pngconf.h
/usr/local/include/libpng/pngpriv.h
/usr/local/lib/libpng.a
/usr/local/lib/libpng.so
/usr/local/lib/libpng.so.6
/usr/local/libdata/pkgconfig/libpng14.pc
```

Folder /usr/local/include/libpng/ is empty, so when *I* try to install php5-gd, it has error:


```
__CUTTED__
configure: error: png.h not found.
===>  Script "configure" failed unexpectedly.
Please report the problem to [email]ale@FreeBSD.org[/email] [maintainer] and attach the
"/usr/ports/graphics/php5-gd/work/php-5.3.10/ext/gd/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/graphics/php5-gd.
*** Error code 1

Stop in /usr/ports/graphics/php5-gd.
```

deinstall/reinstall didn't help. help me to solve it please.


```
FreeBSD optimus 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan  3 07:46:30 UTC 2012     [email]root@farrell.cse.buffalo.edu[/email]:/usr/obj/usr/src/sys/GENERIC  amd64
```


----------



## SirDice (Mar 6, 2012)

Something must have gone wrong with graphics/png. Can you post the output of the deinstall/install?


----------



## luvgalz (Mar 6, 2012)

sure, here it is:

```
optimus# make deinstall clean
===>  Deinstalling for graphics/png
===>   Deinstalling png-1.4.8_1
pkg_delete: file '/usr/local/include/libpng/png.h' doesn't exist
pkg_delete: file '/usr/local/include/libpng/pngconf.h' doesn't exist
pkg_delete: file '/usr/local/include/libpng/pngpriv.h' doesn't exist
pkg_delete: couldn't entirely delete package `png-1.4.8_1'
(perhaps the packing list is incorrectly specified?)
===>  Cleaning for png-1.4.8_1
```


----------



## luvgalz (Mar 6, 2012)

```
optimus# make install clean
===>  Vulnerability check disabled, database not found
===>  License check disabled, port has not defined LICENSE
===>  Found saved configuration for png-1.4.8_1
===>  Extracting for png-1.4.8_1
=> SHA256 Checksum OK for libpng-1.4.8.tar.xz.
=> SHA256 Checksum OK for libpng-1.4.8-apng.patch.gz.
/bin/cp /usr/ports/distfiles//libpng-1.4.8-apng.patch.gz /usr/ports/graphics/png/work/libpng-1.4.8/
/usr/bin/gzip -nf -9 -d /usr/ports/graphics/png/work/libpng-1.4.8/libpng-1.4.8-apng.patch.gz
===>  Patching for png-1.4.8_1
===>  Applying extra patch /usr/ports/graphics/png/work/libpng-1.4.8/libpng-1.4.8-apng.patch
===>  Applying FreeBSD patches for png-1.4.8_1
===>  Configuring for png-1.4.8_1
===>  Building for png-1.4.8_1
( cat scripts/libpng-config-head.in;  echo prefix=\"/usr/local\";  echo libdir=\"/usr/local/lib\";  echo ccopts=\"-O2 -pipe -march=athlon64 -fno-strict-aliasing\";
  echo cppflags=\"\";  echo I_opts=\"-I/usr/local/include/libpng\";  echo L_opts=\"-L/usr/local/lib\";  echo libs=\"-lpng -lz -lm\";  echo ldopts=\"\";  cat
 scripts/libpng-config-body.in ) > libpng-config
cc -O2 -pipe -march=athlon64 -I. -std=gnu99 -fstack-protector  -c png.c
chmod +x libpng-config
cc -fpic -DPIC -O2 -pipe -march=athlon64 -I. -std=gnu99 -fstack-protector  -c png.c -o png.So
cc -O2 -pipe -march=athlon64 -I. -std=gnu99 -fstack-protector  -c pngset.c
cc -fpic -DPIC -O2 -pipe -march=athlon64 -I. -std=gnu99 -fstack-protector  -c pngset.c -o pngset.So
cc -O2 -pipe -march=athlon64 -I. -std=gnu99 -fstack-protector  -c pngget.c
cc -fpic -DPIC -O2 -pipe -march=athlon64 -I. -std=gnu99 -fstack-protector  -c pngget.c -o pngget.So
cc -O2 -pipe -march=athlon64 -I. -std=gnu99 -fstack-protector  -c pngrutil.c
cc -fpic -DPIC -O2 -pipe -march=athlon64 -I. -std=gnu99 -fstack-protector  -c pngrutil.c -o pngrutil.So
cc -O2 -pipe -march=athlon64 -I. -std=gnu99 -fstack-protector  -c pngtrans.c
cc -fpic -DPIC -O2 -pipe -march=athlon64 -I. -std=gnu99 -fstack-protector  -c pngtrans.c -o pngtrans.So
cc -O2 -pipe -march=athlon64 -I. -std=gnu99 -fstack-protector  -c pngwutil.c
cc -fpic -DPIC -O2 -pipe -march=athlon64 -I. -std=gnu99 -fstack-protector  -c pngwutil.c -o pngwutil.So
cc -O2 -pipe -march=athlon64 -I. -std=gnu99 -fstack-protector  -c pngread.c
cc -fpic -DPIC -O2 -pipe -march=athlon64 -I. -std=gnu99 -fstack-protector  -c pngread.c -o pngread.So
cc -O2 -pipe -march=athlon64 -I. -std=gnu99 -fstack-protector  -c pngrio.c
cc -fpic -DPIC -O2 -pipe -march=athlon64 -I. -std=gnu99 -fstack-protector  -c pngrio.c -o pngrio.So
cc -O2 -pipe -march=athlon64 -I. -std=gnu99 -fstack-protector  -c pngwio.c
cc -fpic -DPIC -O2 -pipe -march=athlon64 -I. -std=gnu99 -fstack-protector  -c pngwio.c -o pngwio.So
cc -O2 -pipe -march=athlon64 -I. -std=gnu99 -fstack-protector  -c pngwrite.c
cc -fpic -DPIC -O2 -pipe -march=athlon64 -I. -std=gnu99 -fstack-protector  -c pngwrite.c -o pngwrite.So
cc -O2 -pipe -march=athlon64 -I. -std=gnu99 -fstack-protector  -c pngrtran.c
cc -fpic -DPIC -O2 -pipe -march=athlon64 -I. -std=gnu99 -fstack-protector  -c pngrtran.c -o pngrtran.So
cc -O2 -pipe -march=athlon64 -I. -std=gnu99 -fstack-protector  -c pngwtran.c
cc -fpic -DPIC -O2 -pipe -march=athlon64 -I. -std=gnu99 -fstack-protector  -c pngwtran.c -o pngwtran.So
cc -O2 -pipe -march=athlon64 -I. -std=gnu99 -fstack-protector  -c pngmem.c
cc -fpic -DPIC -O2 -pipe -march=athlon64 -I. -std=gnu99 -fstack-protector  -c pngmem.c -o pngmem.So
cc -O2 -pipe -march=athlon64 -I. -std=gnu99 -fstack-protector  -c pngerror.c
cc -fpic -DPIC -O2 -pipe -march=athlon64 -I. -std=gnu99 -fstack-protector  -c pngerror.c -o pngerror.So
cc -O2 -pipe -march=athlon64 -I. -std=gnu99 -fstack-protector  -c pngpread.c
cc -fpic -DPIC -O2 -pipe -march=athlon64 -I. -std=gnu99 -fstack-protector  -c pngpread.c -o pngpread.So
gzip -cn libpng.3 > libpng.3.gz
gzip -cn libpngpf.3 > libpngpf.3.gz
gzip -cn png.5 > png.5.gz
cc -O2 -pipe -march=athlon64 -I. -std=gnu99 -fstack-protector  -c pngtest.c
building static png library
ranlib libpng.a
building shared library libpng.so.6
cc -O2 -pipe -march=athlon64 -I. -std=gnu99 -fstack-protector  -L. -static -o pngtest pngtest.o -lpng -lz -lm
./pngtest

 Testing libpng version 1.4.8
   with zlib   version 1.2.5

libpng version 1.4.8 - July 7, 2011
Copyright (c) 1998-2010 Glenn Randers-Pehrson
Copyright (c) 1996-1997 Andreas Dilger
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
 library (10408): libpng version 1.4.8 - July 7, 2011

 pngtest (10408): libpng version 1.4.8 - July 7, 2011
 sizeof(png_struct)=1120, sizeof(png_info)=400

 Testing pngtest.png:
 Pass 0: rwrwrwrwrwrwrwrwrw
 Pass 1: rwrwrwrwrwrwrwrwrw
 Pass 2: rwrwrwrwrwrwrwrw
 Pass 3: rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
 Pass 4: rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
 Pass 5: rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
         rwrwrwrw
 Pass 6: rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
         rwrwrwrwrw
 PASS (9782 zero samples)
 Filter 0 was used 21 times
 Filter 1 was used 15 times
 Filter 2 was used 52 times
 Filter 3 was used 10 times
 Filter 4 was used 33 times
 tIME = 7 Jun 1996 17:58:08 +0000
 libpng passes test
===>  Installing for png-1.4.8_1
===>   Generating temporary packing list
===>  Checking if graphics/png already installed
install  -o root -g wheel -m 555  libpng-config /usr/local/bin
ln -sf libpng-config /usr/local/bin/libpng14-config
install -C -o root -g wheel -m 444   libpng.a /usr/local/lib
install -s -o root -g wheel -m 444     libpng.so.6 /usr/local/lib
ln -fs libpng.so.6 /usr/local/lib/libpng.so
install -o root -g wheel -m 444 libpng.3.gz  /usr/local/man/man3
install -o root -g wheel -m 444 libpngpf.3.gz  /usr/local/man/man3
install -o root -g wheel -m 444 png.5.gz  /usr/local/man/man5
/usr/local/include/libpng/../png.h -> libpng/png.h
/usr/local/include/libpng/../pngconf.h -> libpng/pngconf.h
/usr/bin/sed -e 's|@PREFIX@|/usr/local|' /usr/ports/graphics/png/work/libpng-1.4.8/scripts/libpng.pc.in  > /usr/ports/graphics/png/work/libpng-1.4.8/scripts/libpng.pc
install  -o root -g wheel -m 444 /usr/ports/graphics/png/work/libpng-1.4.8/scripts/libpng.pc  /usr/local/libdata/pkgconfig/libpng14.pc
/bin/ln -sf libpng14.pc /usr/local/libdata/pkgconfig/libpng.pc
===>   Running ldconfig
/sbin/ldconfig -m /usr/local/lib
===>   Registering installation for png-1.4.8_1
===>  Cleaning for png-1.4.8_1
```


----------



## SirDice (Mar 6, 2012)

luvgalz said:
			
		

> sure, here it is:
> 
> ```
> optimus# make deinstall clean
> ...



That's to be expected.

Please use [code] tags, not [cmd].


----------



## luvgalz (Mar 6, 2012)

```
/usr/local/include/libpng/../png.h -> libpng/png.h
/usr/local/include/libpng/../pngconf.h -> libpng/pngconf.h
```

I found them into /usr/local/include/, not in libpng/. So i guess i have to use flag --prefix= with make install command ?


----------



## SirDice (Mar 6, 2012)

Files are correctly copied during the install. What are the permissions on /usr/local/include/libpng/?

Don't muck about with PREFIX.


----------



## luvgalz (Mar 6, 2012)

```
drwxr-xr-x  2 root  wheel
```


----------



## luvgalz (Mar 6, 2012)

Solved by deleting *NO_TOOLCHAIN=YES* directive from /etc/make.conf. Thanks for your replies.


----------

