Bug 202211 - [graphics/linux-c6-png] build failure due to missing libpng-1.2.49 directory
Summary: [graphics/linux-c6-png] build failure due to missing libpng-1.2.49 directory
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Some People
Assignee: freebsd-emulation (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-10 04:18 UTC by Joseph Mingrone
Modified: 2015-08-30 09:46 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (emulation)


Attachments
add DOCS option to fix plist issue (1.35 KB, patch)
2015-08-14 19:14 UTC, Joseph Mingrone
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Mingrone freebsd_committer freebsd_triage 2015-08-10 04:18:39 UTC
The problem occurred in a 10.1 jail in poudriere.  The build output is short, so I've pasted it below.

====>> Building graphics/linux-c6-png
build started at Mon Aug 10 01:12:05 ADT 2015
port directory: /usr/ports/graphics/linux-c6-png
building for: FreeBSD 10amd64-default-job-02 10.1-RELEASE-p17 FreeBSD 10.1-RELEASE-p17 amd64
maintained by: emulation@FreeBSD.org
Makefile ident:      $FreeBSD: head/graphics/linux-c6-png/Makefile 393817 2015-08-09 19:14:13Z netchild $
Poudriere version: 3.1.7
Host OSVERSION: 1001508
Jail OSVERSION: 1001000

---Begin Environment---
OSVERSION=1001000
UNAME_v=FreeBSD 10.1-RELEASE-p17
UNAME_r=10.1-RELEASE-p17
BLOCKSIZE=K
MAIL=/var/mail/root
STATUS=1
SAVED_TERM=screen-256color
MASTERMNT=/usr/local/poudriere/data/.m/10amd64-default/ref
FORCE_PACKAGE=yes
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/root/bin
POUDRIERE_BUILD_TYPE=bulk
PKGNAME=linux-c6-png-1.2.49_2
OLDPWD=/
PWD=/usr/local/poudriere/data/.m/10amd64-default/ref/.p/pool
MASTERNAME=10amd64-default
SCRIPTPREFIX=/usr/local/share/poudriere
USER=root
HOME=/root
POUDRIERE_VERSION=3.1.7
SCRIPTPATH=/usr/local/share/poudriere/bulk.sh
LIBEXECPREFIX=/usr/local/libexec/poudriere
LOCALBASE=/usr/local
PACKAGE_BUILDING=yes
---End Environment---

---Begin OPTIONS List---
---End OPTIONS List---

--CONFIGURE_ARGS--

--End CONFIGURE_ARGS--

--CONFIGURE_ENV--
XDG_DATA_HOME=/wrkdirs/usr/ports/graphics/linux-c6-png/work  XDG_CONFIG_HOME=/wrkdirs/usr/ports/graphics/linux-c6-png/work  HOME=/wrkdirs/usr/ports/graphics/linux-c6-png/work TMPDIR="/tmp" SHELL=/bin/sh CONFIG_SHELL=/bin/sh
--End CONFIGURE_ENV--

--MAKE_ENV--
XDG_DATA_HOME=/wrkdirs/usr/ports/graphics/linux-c6-png/work  XDG_CONFIG_HOME=/wrkdirs/usr/ports/graphics/linux-c6-png/work  HOME=/wrkdirs/usr/ports/graphics/linux-c6-png/work TMPDIR="/tmp" NO_PIE=yes SHELL=/bin/sh NO_LINT=YES PREFIX=/compat/linux  LOCALBASE=/usr/local  LIBDIR="/usr/lib"  CC="cc" CFLAGS="-O2 -pipe  -fstack-protector -fno-strict-aliasing"  CPP="cpp" CPPFLAGS=""  LDFLAGS=" -fstack-protector" LIBS=""  CXX="c++" CXXFLAGS="-O2 -pipe -fstack-protector -fno-strict-aliasing "  MANPREFIX="/compat/linux" BSD_INSTALL_PROGRAM="install   -m 555"  BSD_INSTALL_LIB="install   -m 444"  BSD_INSTALL_SCRIPT="install  -m 555"  BSD_INSTALL_DATA="install  -m 0644"  BSD_INSTALL_MAN="install  -m 444"
--End MAKE_ENV--

--PLIST_SUB--
OSREL=10.1
PREFIX=%D
LOCALBASE=/usr/local
RESETPREFIX=/compat/linux
PORTDOCS="@comment
"
PORTEXAMPLES=""
LIB32DIR=lib
DOCSDIR="usr/share/doc/libpng-1.2.49"
EXAMPLESDIR="share/examples/png"
DATADIR="share/png"
WWWDIR="www/png"
ETCDIR="etc/png"
--End PLIST_SUB--

--SUB_LIST--
PREFIX=/compat/linux
LOCALBASE=/usr/local
DATADIR=/compat/linux/share/png
DOCSDIR=/compat/linux/usr/share/doc/libpng-1.2.49
EXAMPLESDIR=/compat/linux/share/examples/png
WWWDIR=/compat/linux/www/png
ETCDIR=/compat/linux/etc/png
--End SUB_LIST--

---Begin make.conf---
USE_PACKAGE_DEPENDS=yes
BATCH=yes
WRKDIRPREFIX=/wrkdirs
PORTSDIR=/usr/ports
PACKAGES=/packages
DISTDIR=/distfiles
#### /usr/local/etc/poudriere.d/make.conf ####
DEFAULT_VERSIONS=perl5=5.22
#DEVELOPER=yes
OPTIONS_UNSET=ASPELL CUPS DBUS DOCS HAL IPV6 ISPELL KDE KDE4 NVIDIA NVIDIA_GL NLS PUSEAUDIO
DISABLE_MAKE_JOBS=poudriere
---End make.conf---
=======================<phase: check-sanity   >============================
===========================================================================
=======================<phase: pkg-depends    >============================
===>   linux-c6-png-1.2.49_2 depends on file: /usr/local/sbin/pkg - not found
===>   Installing existing package /packages/All/pkg-1.5.5.txz
[10amd64-default-job-02] Installing pkg-1.5.5...
[10amd64-default-job-02] Extracting pkg-1.5.5: .......... done
Message for pkg-1.5.5:
If you are upgrading from the old package format, first run:

  # pkg2ng
===>   linux-c6-png-1.2.49_2 depends on file: /usr/local/sbin/pkg - found
===>   Returning to build of linux-c6-png-1.2.49_2
===========================================================================
=======================<phase: fetch-depends  >============================
===========================================================================
=======================<phase: fetch          >============================
===> Fetching all distfiles required by linux-c6-png-1.2.49_2 for building
===========================================================================
=======================<phase: checksum       >============================
===> Fetching all distfiles required by linux-c6-png-1.2.49_2 for building
=> SHA256 Checksum OK for rpm/i686/centos/6.6/libpng-1.2.49-1.el6_2.i686.rpm.
=> SHA256 Checksum OK for rpm/i686/centos/6.6/libpng-1.2.49-1.el6_2.src.rpm.
===========================================================================
=======================<phase: extract-depends>============================
===========================================================================
=======================<phase: extract        >============================
===> Fetching all distfiles required by linux-c6-png-1.2.49_2 for building
===>  Extracting for linux-c6-png-1.2.49_2
=> SHA256 Checksum OK for rpm/i686/centos/6.6/libpng-1.2.49-1.el6_2.i686.rpm.
=> SHA256 Checksum OK for rpm/i686/centos/6.6/libpng-1.2.49-1.el6_2.src.rpm.
===========================================================================
=======================<phase: patch-depends  >============================
===========================================================================
=======================<phase: patch          >============================
===>  Patching for linux-c6-png-1.2.49_2
===========================================================================
=======================<phase: build-depends  >============================
===========================================================================
=======================<phase: lib-depends    >============================
===========================================================================
=======================<phase: configure      >============================
===>  Configuring for linux-c6-png-1.2.49_2
===========================================================================
=======================<phase: build          >============================
===========================================================================
=======================<phase: run-depends    >============================
===>   linux-c6-png-1.2.49_2 depends on file: /compat/linux/bin/sh - not found
===>   Installing existing package /packages/All/linux_base-c6-6.6_6.txz
[10amd64-default-job-02] Installing linux_base-c6-6.6_6...
[10amd64-default-job-02] Extracting linux_base-c6-6.6_6: .......... done
grep: /etc/fstab: No such file or directory

+++ Some programs may need linprocfs, please add it to /etc/fstab! +++

Running linux ldconfig...
Message for linux_base-c6-6.6_6:
This software is based in part on the work of the FreeType Team.
See <URL:http://www.freetype.org/>.

Installation of the Linux base system is finished. The Linux kernel
mode, which must be enabled for Linux binaries to run, is now
enabled. Linux mode can be enabled permanently with the linux_enable
variable of rc.conf(5).

----------------------
You should enable Linux mode with the linux_enable variable of rc.conf(5).
Depending on the version of FreeBSD you are using you may have to increase
the emulated linux version via compat.linux.osrelease=2.6.18 in
sysctl.conf(5). Check via "sysctl compat.linux.osrelease" that it shows a
lower version number before setting it.
----------------------

If you want to use shared memory in Linux applications, you need to set up
a link from /dev/shm to a suitable place, e.g. by adding the following line
to /etc/devfs.conf (takes effect on each boot):
	link /tmp shm

To make use of NIS you have to adjust yp.conf and nsswitch.conf in
/compat/linux/etc/ accordingly. For example:

Set your yp-server and yp-domainname in yp.conf:
	domainname	my.yp.domainname
	ypserver	my.yp.server

Let your lists for hosts, passwd and group be resolved via nsswitch.conf:
	passwd:	files nis
	shadow:	files nis
	group:	files nis
	hosts:	files dns nis

WARNING: doing work which needs to chroot into the linux base may not work.
In such cases (e.g. cross-development) you are better suited with a linux_dist
port.
===>   linux-c6-png-1.2.49_2 depends on file: /compat/linux/bin/sh - found
===>   Returning to build of linux-c6-png-1.2.49_2
===========================================================================
=======================<phase: stage          >============================
The problem occurred in poudriere using a 10.1 jail.  The output can be found at http://pkg.awarnach.mathstat.dal.ca/data/10amd64-default/2015-08-10_01h10m18s/logs/errors/linux-c6-png-1.2.49_2.log.  It's short sho

===>  Staging for linux-c6-png-1.2.49_2
===>   Generating temporary packing list
cd /wrkdirs/usr/ports/graphics/linux-c6-png/work && /usr/bin/find * ! -path "stage*" -type d -exec /bin/mkdir -p "/wrkdirs/usr/ports/graphics/linux-c6-png/work/stage/compat/linux/{}" \;
cd /wrkdirs/usr/ports/graphics/linux-c6-png/work && /usr/bin/find * ! -path "stage/*" ! -type d | /usr/bin/cpio -pm -R root:wheel /wrkdirs/usr/ports/graphics/linux-c6-png/work/stage/compat/linux
641 blocks
====> Compressing man pages (compress-man)
===========================================================================
=======================<phase: package        >============================
===>  Building package for linux-c6-png-1.2.49_2
pkg-static: lstat(/wrkdirs/usr/ports/graphics/linux-c6-png/work/stage/compat/linux/usr/share/doc/libpng-1.2.49/): No such file or directory
*** Error code 1

Stop.
make: stopped in /usr/ports/graphics/linux-c6-png
====>> Cleaning up wrkdir
===>  Cleaning for linux-c6-png-1.2.49_2
build of graphics/linux-c6-png ended at Mon Aug 10 01:12:09 ADT 2015
build time: 00:00:04
!!! build failure encountered !!!
Comment 1 Justin Yang 2015-08-14 06:06:54 UTC
Hi,

I find a workaround to fix this issue by removing the `@dirrmtry usr/share/doc/libpng-1.2.49` line in `/usr/ports/graphics/linux-c6-png/pkg-plist.i686` file. Now we can build and install it without any problem. But I believe there is a more elegant way to deal with it.
Comment 2 Joseph Mingrone freebsd_committer freebsd_triage 2015-08-14 19:14:43 UTC
Created attachment 159873 [details]
add DOCS option to fix plist issue

The problem occurs when OPTIONS_UNSET includes DOCS.  In this case, PORTDOCS should not be set.

The attached patch defines an option for DOCS and only installs the documentation files when that option is turned on.

Output for poudriere testport can be found at the URLs below (for 10.1-RELEASE amd64 and i386):

http://pkg.awarnach.mathstat.dal.ca/data/10amd64-default/2015-08-14_14h01m37s/logs/linux-c6-png-1.2.49_2.log

http://pkg.awarnach.mathstat.dal.ca/data/10i386-default/2015-08-14_13h40m00s/logs/linux-c6-png-1.2.49_2.log
Comment 3 Justin Yang 2015-08-15 02:00:41 UTC
(In reply to Joseph Mingrone from comment #2)
Hi,

I test it on my computer, and it builds and installs successfully after applying your patch. Thank you.
Comment 4 Antoine Brodin freebsd_committer freebsd_triage 2015-08-30 09:36:08 UTC
@dirrmtry is deprecated,  those plist lines should just be removed...
Comment 5 commit-hook freebsd_committer freebsd_triage 2015-08-30 09:46:02 UTC
A commit references this bug:

Author: antoine
Date: Sun Aug 30 09:45:36 UTC 2015
New revision: 395603
URL: https://svnweb.freebsd.org/changeset/ports/395603

Log:
  Cleanup plist, fixing packaging with OPTIONS_UNSET=DOCS

  PR:		202211

Changes:
  head/graphics/linux-c6-png/pkg-plist.i686
  head/graphics/linux-c6-png/pkg-plist.x86_64