NetBSD Problem Report #48857

From diro@nixsyspaus.org  Sat May 31 13:38:33 2014
Return-Path: <diro@nixsyspaus.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id AB334A5864
	for <gnats-bugs@gnats.netbsd.org>; Sat, 31 May 2014 13:38:33 +0000 (UTC)
Message-Id: <20140531133830.3D7A02041E5@asche.nixsyspaus.org>
Date: Sat, 31 May 2014 13:38:30 +0000 (UTC)
From: diro@nixsyspaus.org
Reply-To: diro@nixsyspaus.org
To: gnats-bugs@gnats.netbsd.org
Subject: print/ghostscript-gpl fails during build
X-Send-Pr-Version: 3.95

>Number:         48857
>Category:       pkg
>Synopsis:       print/ghostscript-gpl fails during build
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat May 31 13:40:00 +0000 2014
>Originator:     diro@nixsyspaus.org
>Release:        OpenBSD 5.5
>Organization:
>Environment:
System: OpenBSD sunny.my.domain 5.5 SUNNY.MP#0 sparc64
>Description:
	tail of the build:

cc  -DHAVE_MKSTEMP   -DHAVE_FONTCONFIG  -DHAVE_SETLOCALE     -DHAVE_STRERROR
-O2 -I./freetype/include -fPIC -Ijpeg -DPNG_NO_ASSEMBLER_CODE
-I/usr/pkg/include -I/usr/include -I/usr/pkg/include/freetype2  -Wall
-Wstrict-prototypes -Wundef -Wmissing-declarations -Wmissing-prototypes
-Wwrite-strings -Wno-strict-aliasing -Wdeclaration-after-statement
-fno-builtin -fno-common -DHAVE_STDINT_H=1 -DHAVE_DIRENT_H=1
-DHAVE_SYS_DIR_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_TIMES_H=1
-DGX_COLOR_INDEX_TYPE="unsigned long int" -O -DA4 -fPIC -I/usr/pkg/include
-I/usr/include -I/usr/pkg/include/freetype2 -DUSE_LIBICONV_GNU -DUSE_LIBPAPER
-I./soobj -I./base  -DWHICH_CMS="lcms2" -o ./soobj/gsromfs1.o -c
./soobj/gsromfs1.c
./soobj/aux/echogs -w ./soobj/ldt.tr -n - cc -lxcb -L/usr/pkg/lib
-Wl,-R/usr/pkg/lib -L/usr/lib -Wl,-R/usr/lib -L/usr/pkg/lib  -shared
-Wl,-soname=libgs.so.9 -shared -Wl,-soname=libgs.so.9 -o ./sobin/libgs.so.9.06
./soobj/aux/echogs -a ./soobj/ldt.tr -n -s ./soobj/gsromfs1.o ./soobj/gs.o -s
cat ./soobj/ld.tr >>./soobj/ldt.tr
./soobj/aux/echogs -a ./soobj/ldt.tr -s -  -lm  -liconv -L/usr/pkg/lib
-Wl,-R/usr/pkg/lib -lpaper  -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -lfontconfig
-Wl,-R/usr/pkg/lib -lfreetype  -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -lfreetype
-lpthread -lm
if [ x != x ]; then LD_RUN_PATH=; export LD_RUN_PATH; fi; \
XCFLAGS= XINCLUDE= XLDFLAGS= XLIBDIRS= XLIBS= \
FEATURE_DEVS= DEVICE_DEVS= DEVICE_DEVS1= DEVICE_DEVS2= DEVICE_DEVS3= \
DEVICE_DEVS4= DEVICE_DEVS5= DEVICE_DEVS6= DEVICE_DEVS7= DEVICE_DEVS8= \
DEVICE_DEVS9= DEVICE_DEVS10= DEVICE_DEVS11= DEVICE_DEVS12= \
DEVICE_DEVS13= DEVICE_DEVS14= DEVICE_DEVS15= DEVICE_DEVS16= \
DEVICE_DEVS17= DEVICE_DEVS18= DEVICE_DEVS19= DEVICE_DEVS20= \
DEVICE_DEVS_EXTRA= \
/bin/sh <./soobj/ldt.tr
gmake[2]: Leaving directory
'/usr/pkgsrc/print/ghostscript-gpl/work/ghostscript-9.06'
/usr/pkg/bin/gmake GS_XE=./sobin/libgs.so.9.06 DISPLAY_DEV=./soobj/display.dev
STDIO_IMPLEMENTATION=c BUILDDIRPREFIX=so GENOPT='' LDFLAGS='-lxcb
-L/usr/pkg/lib -Wl,-R/usr/pkg/lib -L/usr/lib -Wl,-R/usr/lib -L/usr/pkg/lib '\
 CFLAGS='-O2 -I./freetype/include -Ijpeg -DPNG_NO_ASSEMBLER_CODE
-I/usr/pkg/include -I/usr/include -I/usr/pkg/include/freetype2  -Wall
-Wstrict-prototypes -Wundef -Wmissing-declarations -Wmissing-prototypes
-Wwrite-strings -Wno-strict-aliasing -Wdeclaration-after-statement
-fno-builtin -fno-common -DHAVE_STDINT_H=1 -DHAVE_DIRENT_H=1
-DHAVE_SYS_DIR_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_TIMES_H=1
-DGX_COLOR_INDEX_TYPE="unsigned long int" -O -DA4 -fPIC -I/usr/pkg/include
-I/usr/include -I/usr/pkg/include/freetype2 -DUSE_LIBICONV_GNU -DUSE_LIBPAPER
' prefix=/usr/pkg\
 ./sobin/gsc ./sobin/gsx
gmake[2]: Entering directory
'/usr/pkgsrc/print/ghostscript-gpl/work/ghostscript-9.06'
rm -f ./sobin/libgs.so.9 
ln -s libgs.so.9.06 ./sobin/libgs.so.9 
rm -f ./sobin/libgs.so
ln -s libgs.so.9.06 ./sobin/libgs.so
cc  -DHAVE_MKSTEMP   -DHAVE_FONTCONFIG  -DHAVE_SETLOCALE     -DHAVE_STRERROR
-O2 -I./freetype/include -Ijpeg -DPNG_NO_ASSEMBLER_CODE -I/usr/pkg/include
-I/usr/include -I/usr/pkg/include/freetype2  -Wall -Wstrict-prototypes -Wundef
-Wmissing-declarations -Wmissing-prototypes -Wwrite-strings
-Wno-strict-aliasing -Wdeclaration-after-statement -fno-builtin -fno-common
-DHAVE_STDINT_H=1 -DHAVE_DIRENT_H=1 -DHAVE_SYS_DIR_H=1 -DHAVE_SYS_TIME_H=1
-DHAVE_SYS_TIMES_H=1 -DGX_COLOR_INDEX_TYPE="unsigned long int" -O -DA4 -fPIC
-I/usr/pkg/include -I/usr/include -I/usr/pkg/include/freetype2
-DUSE_LIBICONV_GNU -DUSE_LIBPAPER   -I./soobj -I./base  -DWHICH_CMS="lcms2" -g
-o ./sobin/gsc ./psi/dxmainc.c \
-L./sobin -Wl,-R/usr/pkg/lib -lgs
cc  -DHAVE_MKSTEMP   -DHAVE_FONTCONFIG  -DHAVE_SETLOCALE     -DHAVE_STRERROR
-O2 -I./freetype/include -Ijpeg -DPNG_NO_ASSEMBLER_CODE -I/usr/pkg/include
-I/usr/include -I/usr/pkg/include/freetype2  -Wall -Wstrict-prototypes -Wundef
-Wmissing-declarations -Wmissing-prototypes -Wwrite-strings
-Wno-strict-aliasing -Wdeclaration-after-statement -fno-builtin -fno-common
-DHAVE_STDINT_H=1 -DHAVE_DIRENT_H=1 -DHAVE_SYS_DIR_H=1 -DHAVE_SYS_TIME_H=1
-DHAVE_SYS_TIMES_H=1 -DGX_COLOR_INDEX_TYPE="unsigned long int" -O -DA4 -fPIC
-I/usr/pkg/include -I/usr/include -I/usr/pkg/include/freetype2
-DUSE_LIBICONV_GNU -DUSE_LIBPAPER   -I./soobj -I./base  -DWHICH_CMS="lcms2" -g
-o ./sobin/gsx ./psi/dxmainc.c \
-L./sobin -lgs -Wl,-R/usr/pkg/lib -lgs 
./sobin/libgs.so.9.06: warning: vsprintf() is often misused, please use
vsnprintf()
./sobin/libgs.so.9.06: warning: strcpy() is almost always misused, please use
strlcpy()
./sobin/libgs.so.9.06: warning: rand() isn't random; consider using
arc4random()
./sobin/libgs.so.9.06: warning: strcat() is almost always misused, please use
strlcat()
./sobin/libgs.so.9.06: warning: sprintf() is often misused, please use
snprintf()
/usr/pkg/lib/libICE.so: warning: srand() seed choices are invariably poor
/usr/pkg/lib/libfontconfig.so: warning: random() isn't random; consider using
arc4random()
./sobin/libgs.so.9.06: undefined reference to `memalign'
collect2: ld returned 1 exit status
base/unix-dll.mak:87: recipe for target 'sobin/gsc' failed
gmake[2]: *** [sobin/gsc] Error 1
gmake[2]: *** Waiting for unfinished jobs....
./sobin/libgs.so.9.06: warning: vsprintf() is often misused, please use
vsnprintf()
./sobin/libgs.so.9.06: warning: strcpy() is almost always misused, please use
strlcpy()
./sobin/libgs.so.9.06: warning: rand() isn't random; consider using
arc4random()
./sobin/libgs.so.9.06: warning: strcat() is almost always misused, please use
strlcat()
./sobin/libgs.so.9.06: warning: sprintf() is often misused, please use
snprintf()
/usr/pkg/lib/libICE.so: warning: srand() seed choices are invariably poor
/usr/pkg/lib/libfontconfig.so: warning: random() isn't random; consider using
arc4random()
./sobin/libgs.so.9.06: undefined reference to `memalign'
collect2: ld returned 1 exit status
base/unix-dll.mak:91: recipe for target 'sobin/gsx' failed
gmake[2]: *** [sobin/gsx] Error 1
gmake[2]: Leaving directory
'/usr/pkgsrc/print/ghostscript-gpl/work/ghostscript-9.06'
base/unix-dll.mak:121: recipe for target 'so-subtarget' failed
gmake[1]: *** [so-subtarget] Error 2
gmake[1]: Leaving directory
'/usr/pkgsrc/print/ghostscript-gpl/work/ghostscript-9.06'
base/unix-dll.mak:108: recipe for target 'so' failed
gmake: *** [so] Error 2
*** Error code 2
>How-To-Repeat:
	PREFER_PKGSRC=yes
	cd pkgsrc/print/ghostscript-gpl; bmake 
>Fix:
	adding -lc to LDFLAGS.OpenBSD and/or ${WRKSRC}/base/unixlink.mak has no
effect, as we can see in .work.log:

<.> /usr/pkgsrc/print/ghostscript-gpl/work/.gcc/bin/gcc -DHAVE_MKSTEMP
-DHAVE_FONTCONFIG -DHAVE_SETLOCALE -DHAVE_STRERROR -O2 -I./freetype/include
-Ijpeg -DPNG_NO_ASSEMBLER_CODE
-I/usr/pkgsrc/print/ghostscript-gpl/work/.buildlink/include
-I/usr/pkgsrc/print/ghostscript-gpl/work/.buildlink/include/freetype2 -Wall
-Wstrict-prototypes -Wundef -Wmissing-declarations -Wmissing-prototypes
-Wwrite-strings -Wno-strict-aliasing -Wdeclaration-after-statement
-fno-builtin -fno-common -DHAVE_STDINT_H=1 -DHAVE_DIRENT_H=1
-DHAVE_SYS_DIR_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_TIMES_H=1
"-DGX_COLOR_INDEX_TYPE=unsigned long int" -O -DA4 -fPIC -DUSE_LIBICONV_GNU
-DUSE_LIBPAPER -I./soobj -I./base -DWHICH_CMS=lcms2 -g -o ./sobin/gsc
./psi/dxmainc.c -L./sobin -Wl,-R/usr/pkg/lib
-L/usr/pkgsrc/print/ghostscript-gpl/work/.buildlink/lib  -lgs
<.> /usr/pkgsrc/print/ghostscript-gpl/work/.gcc/bin/gcc -DHAVE_MKSTEMP
-DHAVE_FONTCONFIG -DHAVE_SETLOCALE -DHAVE_STRERROR -O2 -I./freetype/include
-Ijpeg -DPNG_NO_ASSEMBLER_CODE
-I/usr/pkgsrc/print/ghostscript-gpl/work/.buildlink/include
-I/usr/pkgsrc/print/ghostscript-gpl/work/.buildlink/include/freetype2 -Wall
-Wstrict-prototypes -Wundef -Wmissing-declarations -Wmissing-prototypes
-Wwrite-strings -Wno-strict-aliasing -Wdeclaration-after-statement
-fno-builtin -fno-common -DHAVE_STDINT_H=1 -DHAVE_DIRENT_H=1
-DHAVE_SYS_DIR_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_TIMES_H=1
"-DGX_COLOR_INDEX_TYPE=unsigned long int" -O -DA4 -fPIC -DUSE_LIBICONV_GNU
-DUSE_LIBPAPER -I./soobj -I./base -DWHICH_CMS=lcms2 -g -o ./sobin/gsx
./psi/dxmainc.c -L./sobin -Wl,-R/usr/pkg/lib
-L/usr/pkgsrc/print/ghostscript-gpl/work/.buildlink/lib  -lgs

although -lc and -lxcb are being passed in other parts of the build
(soobj/ldt.tr has them).

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.