Subject: buildlink trouble
To: None <tech-pkg@netbsd.org>
From: Amitai Schlair <schmonz@schmonz.com>
List: tech-pkg
Date: 12/08/2001 14:29:10
I'm attempting to package cvsgraph
<URL:http://www.akhphd.au.dk/~bertho/cvsgraph/>. It looks really cool, and I
wish I could get it to work. :-)

$ uname -mrs
NetBSD 1.5.2 i386

$ cat Makefile
DISTNAME=        cvsgraph-1.1.3
CATEGORIES=      devel
MASTER_SITES=    http://www.akhphd.au.dk/~bertho/cvsgraph/release/

MAINTAINER=      schmonz+netbsd@schmonz.com
HOMEPAGE=        http://www.akhphd.au.dk/~bertho/cvsgraph/
COMMENT=         graphically represents CVS/RCS branches and file revisions

GNU_CONFIGURE=   YES

ALL_TARGET=      cvsgraph

.include "../../graphics/gd/buildlink.mk"
.include "../../mk/x11.buildlink.mk"
.include "../../mk/bsd.pkg.mk"

$ make
===> Validating dependencies for cvsgraph-1.1.3
=> Checksum OK for cvsgraph-1.1.3.tar.gz.
===> Extracting for cvsgraph-1.1.3
===> Required installed package gd>=1.8.3: gd-1.8.3 found
===> Required installed package freetype-lib>=1.3.1: freetype-lib-1.3.1
found
===> Required installed package gettext-lib>=0.10.35nb1:
gettext-lib-0.10.35nb1 found
===> Required installed package jpeg-6b: jpeg-6b found
===> Required installed package png>=1.0.11: png-1.0.12 found
===> Required installed package xpm-3.4k: xpm-3.4k found
===> Required installed package x11-links>=0.4: x11-links-0.4 found
===> Patching for cvsgraph-1.1.3
===> Configuring for cvsgraph-1.1.3
=> Linking zlib files into /usr/src/pkg/devel/cvsgraph/work/.buildlink.
=> Linking gettext files into /usr/src/pkg/devel/cvsgraph/work/.buildlink.
=> Linking freetype files into /usr/src/pkg/devel/cvsgraph/work/.buildlink.
=> Linking jpeg files into /usr/src/pkg/devel/cvsgraph/work/.buildlink.
=> Linking png files into /usr/src/pkg/devel/cvsgraph/work/.buildlink.
=> Linking xpm files into /usr/src/pkg/devel/cvsgraph/work/.buildlink.
=> Linking gd files into /usr/src/pkg/devel/cvsgraph/work/.buildlink.
creating cache ./config.cache
checking for gcc... cc
checking whether the C compiler (cc
-I/usr/src/pkg/devel/cvsgraph/work/.buildlink/include -O2
-I/usr/pkg/share/x11-links/include
-L/usr/src/pkg/devel/cvsgraph/work/.buildlink/lib
-L/usr/pkg/share/x11-links/lib -Wl,-R/usr/X11R6/lib -Wl,-R/usr/pkg/lib
-L/usr/pkg/lib) works... yes
checking whether the C compiler (cc
-I/usr/src/pkg/devel/cvsgraph/work/.buildlink/include -O2
-I/usr/pkg/share/x11-links/include
-L/usr/src/pkg/devel/cvsgraph/work/.buildlink/lib
-L/usr/pkg/share/x11-links/lib -Wl,-R/usr/X11R6/lib -Wl,-R/usr/pkg/lib
-L/usr/pkg/lib) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether cc accepts -g... yes
checking for flex... flex
checking for yywrap in -lfl... yes
checking for bison... yacc
checking for gcc strength-reduce bug... no
checking for sqrt in -lm... yes
checking for gdImageGif in -lgd... no
checking for gdImagePng in -lgd... yes
checking for gdImageJpeg in -lgd... yes
checking how to run the C preprocessor... cc -E
checking for gd.h... yes
updating cache ./config.cache
creating ./config.status
creating Makefile
creating config.h
Configure done. Run 'make' to build CvsGraph
=> Removing rpath references to buildlink directories.
===> Building for cvsgraph-1.1.3
cc -I/usr/src/pkg/devel/cvsgraph/work/.buildlink/include -O2
-I/usr/pkg/share/x11-links/include  -Wall -DETCDIR=\"/usr/pkg/etc\" -c -o
cvsgraph.o cvsgraph.c
cc -I/usr/src/pkg/devel/cvsgraph/work/.buildlink/include -O2
-I/usr/pkg/share/x11-links/include  -Wall -DETCDIR=\"/usr/pkg/etc\" -c -o
utils.o utils.c
yacc -t -d confy.y
cc -I/usr/src/pkg/devel/cvsgraph/work/.buildlink/include -O2
-I/usr/pkg/share/x11-links/include  -Wall -DETCDIR=\"/usr/pkg/etc\" -c -o
y.tab.o y.tab.c
flex -8 -Cf -d confl.l
cc -I/usr/src/pkg/devel/cvsgraph/work/.buildlink/include -O2
-I/usr/pkg/share/x11-links/include  -Wall -DETCDIR=\"/usr/pkg/etc\" -c -o
lex.yy.o lex.yy.c
yacc -t -d -brcs -prcs rcsy.y
cc -I/usr/src/pkg/devel/cvsgraph/work/.buildlink/include -O2
-I/usr/pkg/share/x11-links/include  -Wall -DETCDIR=\"/usr/pkg/etc\" -c -o
rcs.tab.o rcs.tab.c
flex -8 -Cf -d -Prcs rcsl.l
cc -I/usr/src/pkg/devel/cvsgraph/work/.buildlink/include -O2
-I/usr/pkg/share/x11-links/include  -Wall -DETCDIR=\"/usr/pkg/etc\" -c -o
lex.rcs.o lex.rcs.c
cc -I/usr/src/pkg/devel/cvsgraph/work/.buildlink/include -O2
-I/usr/pkg/share/x11-links/include  -Wall -DETCDIR=\"/usr/pkg/etc\" -o
cvsgraph cvsgraph.o utils.o y.tab.o lex.yy.o rcs.tab.o lex.rcs.o
-L/usr/src/pkg/devel/cvsgraph/work/.buildlink/lib -Wl,-R/usr/pkg/lib -lintl
-lgd
/usr/bin/ld: warning: libX11.so.6, needed by
/usr/src/pkg/devel/cvsgraph/work/.buildlink/lib/libgd.so, not found (try
using --rpath)
/usr/pkg/lib/libXpm.so.4: undefined reference to `XDefaultScreen'
/usr/pkg/lib/libXpm.so.4: undefined reference to `XCreateImage'
/usr/pkg/lib/libXpm.so.4: undefined reference to `XDefaultVisual'
/usr/pkg/lib/libXpm.so.4: undefined reference to `XFreeGC'
/usr/pkg/lib/libXpm.so.4: undefined reference to `XUngrabServer'
/usr/pkg/lib/libXpm.so.4: undefined reference to `XGetImage'
/usr/pkg/lib/libXpm.so.4: undefined reference to `XFreeColors'
/usr/pkg/lib/libXpm.so.4: undefined reference to `XParseColor'
/usr/pkg/lib/libXpm.so.4: undefined reference to `XGrabServer'
/usr/pkg/lib/libXpm.so.4: undefined reference to `XQueryColors'
/usr/pkg/lib/libXpm.so.4: undefined reference to `XAllocColor'
/usr/pkg/lib/libXpm.so.4: undefined reference to `XGetGeometry'
/usr/pkg/lib/libXpm.so.4: undefined reference to `XDefaultColormap'
/usr/pkg/lib/libXpm.so.4: undefined reference to `XDefaultDepth'
/usr/pkg/lib/libXpm.so.4: undefined reference to `XPutImage'
/usr/pkg/lib/libXpm.so.4: undefined reference to `XCreatePixmap'
/usr/pkg/lib/libXpm.so.4: undefined reference to `XCreateGC'
collect2: ld returned 1 exit status
*** Error code 1

Stop.
*** Error code 1

Stop.
*** Error code 1

Stop.

-----

libX11.so.6 is indeed in /usr/pkg/share/x11-links/lib, and following the
symlinks leads to /usr/X11R6/lib/libX11.so.6.1, so I'm not sure where to go
from here.

(xpkgwedge is installed, FWIW.)

Thanks for any suggestions,

- Amitai