Subject: Re: pkg/32031: pkgsrc-2005Q3 problems under NetBSD 2.1
To: None <,,>
From: Matthew Mondor <>
List: pkgsrc-bugs
Date: 11/10/2005 02:16:03
The following reply was made to PR pkg/32031; it has been noted by GNATS.

From: Matthew Mondor <>
Subject: Re: pkg/32031: pkgsrc-2005Q3 problems under NetBSD 2.1
Date: Wed, 9 Nov 2005 21:14:57 -0500

  > 	vim		Configure problems, it uses -lncurses because of
  > 			CONFIGURE_ARGS+= --with-tlib=ncurses
  > 			in Makefile instead of --with-tlib=curses
  > 			(was "fixed" to compile using pkgsrc under linux?)
  > 			Would pkgsrc popularity lead to other such non-netbsd
  > 			friendly changes?
  > 			Note the same problem applies for vim-gtk, vim-gtk2,
  > 			possibly also vim-xforms and vim-kde...
  > Buids under 2.0, I can't see why it would be different in 2.1:
 Perhaps a missing dependency to ncurses package, considering that it
 does use CONFIGURE_ARGS+= --with=tlib=ncurses ?
 As mentionned in the comment, it built fine against standard curses
 once I fixed that line.  I don't have ncurses package installed (and didn't
 need it otherwise).
  > 	wget		had to fix conditionals for openssl in http-* with
  > 			NetBSD 2.0.2 (or 2.0_STABLE dating a few months back)
  > 			Because of OpenSSL version change (this affected no
  > 			other package)
  > 			Hmm actually I was told it was because of OpenSSL
  > 			upgrade in 2.1, but under 2.1 the same problem
  > 			occurred.
 Unsure of what's wrong with this... on my 2.1 system:
  --- (ttypc) root@hal.xisop # openssl
 OpenSSL> version
 OpenSSL 0.9.7d 17 Mar 2004
 OpenSSL> exit
  --- (ttypb) root@hal.xisop # ls -l /usr/bin/openssl 
 -r-xr-xr-x  1 root  wheel  366933 Nov  4 20:59 /usr/bin/openssl
 And it only compiled fine once I removed some conditional code about
 openssl version...
 Removing the following condition worked:
 Then, if my openssl isn't the proper one, would it be possible that
 the install to / procedure using was not properly done,
 or that an existing other openssl package was installed on the build
 server via pkgsrc first?  Would it then be a build order issue?
 Unless the postinstall fixing script failed to fix something?
 I upgraded by tracking the netbsd-2 branch all the time, then
 same again lately after 2.1 release.  The openssl binary does seem
 to have been updated the 4th when I upgraded. (date shown with ls)
  > +	MesaLib		missing -I/usr/pkg/X11R6/include
 Still fails for me;  Would it have built fine on the build server because
 it also had installed xorg package first?  Or that there was no /usr/X11R6
 on the netbsd server?  Not sure why these few packages denoted with +, and
 those only, had this problem where I needed to add to CFLAGS and LDFLAGS the
 stuff for /usr/X11R6 includes and libraries... (or to add a .include buildlink
 for X11).
  > 	libdvdcss	url to download the file is obsolete and should be
  > 			changed, works otherwise
  > This one is probably restricted, so not available as binary package
 Yes it is restricted, the fix was quite easy for this one, only the url
 to get the file fails.
  > +	gd		missing -I/usr/pkg/include and -I/usr/pkg/X11R6/include 
 Another one with same problem as with MesaLib
  > *	gphoto		both hashes mismatch (gphoto-0.4.3.tar.gz)
  > +	gphoto2		Another problem where an existing headerfile can't be
  > 			found
 This one now works, I suspect that one of the servers had corrupt files
 possibly, it now failed to get it from the first url, tried with a second
 one and the file checksums are okay.  It also built fine just now.
 Oh it's devel/libgphoto2 which failed to build (and was a dependency of
 gphoto2), for libgphoto2 to build, I had to add a .include for jpeg package,
 since it was failing at libjpeg.h not found error otherwise.  Why though,
 no idea.
 As for gphoto2, it fails to build, at -lncurses not found error.
 This one seems to refer to ncurses in Makefile:
 .include "../../devel/ncurses/"
 How come it didn't try to install the ncurses package, no idea.
 But I obviously would like it to use curses instead, although I
 couldn't make the configure script do so using various CONFIGURE_ARGS
 and commenting out the ncurses buildling .include, so I just went
 and fixed the generated Makefile after configuration to use -lcurses
 instead which fixed my problem for now and built it.
  > 	python		Error creating package, had to use pkg_tarup.
  > 			Caused by some files supplied to tar which aren't found
  > 			causing tar to report error and make package to fail
  > 			Probably incorrect PLIST
  > All python packages from 1.5 to 2.4 have built under 2.0, and are available
  > from the ftp server.
 This was only a PLIST problem and the auto tarup failed with an error,
 although the file was still created fine.
  > 	xlockmore	Same as for python, incorrect PLIST
  > xlockmore-5.19nb2.tgz on ftp server
 Also just a PLIST issue like above
  > +	SDL		Again the missing -I/-L 
  > SDL-1.2.9.tgz on ftp server
 Another case marked with + where I suspect a build order problem or
 that netbsd server doesn't have X11 installed, or has xorg, etc?
  > *	cscope		Configure problems.
  > 			Moreover, also seems to refer to ncurses.
  > Yes, this one seems to not build
 At least we agree on that one package :))
  > *	nspr		Fails in configure script
  > nspr-4.4.1nb1.tgz on ftp server
 ===> Checking for vulnerabilities in nspr-4.4.1nb1
 => Checksum SHA1 OK for nspr-4.4.1.tar.gz.
 => Checksum RMD160 OK for nspr-4.4.1.tar.gz.
 ===> Extracting for nspr-4.4.1nb1
 ===> Required installed package autoconf213>=2.13: autoconf213-2.13nb1 found
 ===> Required installed package gmake>=3.78: gmake-3.80nb4 found
 ===> Patching for nspr-4.4.1nb1
 ===> Applying pkgsrc patches for nspr-4.4.1nb1
 ===> Overriding tools for nspr-4.4.1nb1
 ===> Creating toolchain wrappers for nspr-4.4.1nb1
 ===> Configuring for nspr-4.4.1nb1
 cd /usr/pkgsrc/devel/nspr/work/nspr-4.4.1/mozilla/nsprpub/build/.. && autoconf
 configure: WARNING: If you wanted to set the --build type, don't use --host.
     If a cross compiler is detected then cross compile mode will be used.
 checking build system type... i386-unknown-netbsdelf2.1.
 checking host system type... i386--netbsdelf
 checking target system type... i386--netbsdelf
 checking for whoami... /usr/bin/whoami
 checking for i386--netbsdelf-g++... c++
 checking whether we are using the GNU C++ compiler... no
 checking whether c++ accepts -g... no
 checking for i386--netbsdelf-gcc... cc
 checking whether we are using the GNU C compiler... no
 checking whether cc accepts -g... no
 checking for cc option to accept ANSI C... none needed
 checking how to run the C preprocessor... cc -E
 checking for i386--netbsdelf-ranlib... no
 checking for ranlib... ranlib
 checking for as... /usr/bin/as
 checking for ar... /usr/bin/ar
 checking for ld... /usr/bin/ld
 checking for strip... /usr/bin/strip
 checking for windres... no
 checking for gcc -pipe support... no
 checking for perl5... no
 checking for perl... /usr/pkg/bin/perl
 ./configure.lineno: 8875: Syntax error: "fi" unexpected (expecting ")")
 *** Error code 2
 rm -f conftest.err conftest.$ac_ext
 echo "$as_me:8873: result: $ac_header_preproc" >&5
 echo "${ECHO_T}$ac_header_preproc" >&6
 [Line 8875 here]
 # So?  What about this header?
 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 I tried without CFLAGS/LDFLAGS changes in mk.conf (or env), as well as
 using /bin/sh (I'm usually using /bin/ksh for interactive shell).
 Quite an odd bug, I'm not sure what fails.  If I can't build this one
 with some hacking or not I might need to revert to an i386 version from
 the netbsd site...
  > *	gaim		Requires nspr above so couldn't build obviously
  > gaim-1.5.0nb1.tgz on ftp server
 Would probably also build fine for me once I had nspr
  > +	xforms		Missing an -I/usr/X11R6/include with -lXext, needed
  > 			to manually fix Makefile during build since it won't
  > 			take LDFLAGS from mk.conf (using imake)
  > xforms-1.0nb4.tgz on ftp server
 Yet another case of X11 linking problems with a +
  > 	SDL_sound	Required addition of .include for dependencies of
  > 			flac and speex
  > SDL_sound-1.0.1nb2.tgz on ftp server
 I suspect a build order issue, since for me it detected installed flac and
 speex but missed the .include buildlink stuff. (another way could have
 been to add a few --without to the configure flags).
  > 	SDL_mixer	Required addition of .include for dependencies of
  > 			libmikmod
  > SDL_mixer-1.2.6nb2.tgz on ftp server
 Like above, but detected libmikmod and couldn't use it without me adding
 the .include for it (or a --without), so also probably a build order issue.
  > *	db4		Compilation error
  > db4-4.3.28.tgz on ftp server
 ranlib .libs/libdb4_cxx-4.3.a
 (cd .libs && rm -f && ln -s ../
 rm -f libdb4_cxx.a
 ln -s .libs/libdb4_cxx-4.3.a libdb4_cxx.a
 /bin/sh ./libtool --mode=compile cc -c -I. -I../dist/.. -O2 -march=i686 -O2 -pipe ../dist/../rpc_server/c/db_server_proc.c
  cc -c -I. -I../dist/.. -O2 -march=i686 -O2 -pipe ../dist/../rpc_server/c/db_server_proc.c  -fPIC -DPIC -o .libs/db_server_proc.o
  cc -c -I. -I../dist/.. -O2 -march=i686 -O2 -pipe ../dist/../rpc_server/c/db_server_proc.c -o db_server_proc.o >/dev/null 2>&1
 /bin/sh ./libtool --mode=compile cc -c -I. -I../dist/.. -O2 -march=i686 -O2 -pipe db_server_svc.c
  cc -c -I. -I../dist/.. -O2 -march=i686 -O2 -pipe db_server_svc.c  -fPIC -DPIC -o .libs/db_server_svc.o
 db_server_svc.c: In function `closedown':
 db_server_svc.c:61: error: storage size of `tinfo' isn't known
 db_server_svc.c:63: error: `T_CLTS' undeclared (first use in this function)
 db_server_svc.c:63: error: (Each undeclared identifier is reported only once
 db_server_svc.c:63: error: for each function it appears in.)
 db_server_svc.c: In function `__dbsrv_main':
 db_server_svc.c:607: error: `FMNAMESZ' undeclared (first use in this function)
 db_server_svc.c:609: error: `I_LOOK' undeclared (first use in this function)
 db_server_svc.c:623: error: `I_POP' undeclared (first use in this function)
 db_server_svc.c:623: error: `I_PUSH' undeclared (first use in this function)
 db_server_svc.c:628: error: `T_DATAXFER' undeclared (first use in this function)
 *** Error code 1
 make: stopped in /usr/pkgsrc/databases/db4/work/db-4.3.28/build_unix
 *** Error code 1
 Not sure what's wrong here.  I would have to check the C code and see...
 It's one of the packages I'll probably play with until it cleanly builds
 to not have to manually compile it to get an i686 optimized version...
  > *	fceu		Compilation error
  > fceu-0.98.12nb1.tgz on ftp server
 Interestingly, this was missing -lossaudio when linking oss.o driver...
 Other oss using tools such as xmms, mplayer built fine.
  > *	MesaDemos	Compilation error
  > MesaDemos-6.2.1.tgz on ftp server
 Hmm very interesting, this one like ones marked with a + above,
 was missing -I/usr/X11R6/include or such, but it did have the -L
 and -W,-R stuff.  Most binaries built fine in it, except glxdemo
 which needed that additional -I.
  > 	xawtv		--disable-aalib didn't work, so had to remove it from
  > 			Makefile and add aalib dependency via .include
  > 			Also had to add dependency to libdv
  > xawtv-3.90nb2.tgz on ftp server
 Also seems a build order issue, since it detected install aalib and wanted
 to use it, couldn't be passed --disable-aalib, so I had to add .include
 to aalib buildlink.
  > 	mplayer-share	Had to add --disable-aa in Makefile.common
  > mplayer-share is not on the ftp server, but mplayer may be RESTRICTED
 It is indeed restricted.  Also build order related it appears, since I
 had again to either disable aalib via a configure arg, or to add buildinking
 info to it via .include.
  > 	sylpheed-claws	Requires gpgme03, but looks for gpgme-config,
  > 			so doesn't build the pgpmime plugin unless
  > 			I made a symlink from gpgme-config to gpgme03-config,
  > 			could perhaps be considered a gpgme03 package bug
  > 			which should have a symlink.
  > 			Moreover, had to be built before abiword, since
  > 			abiword requires gnu libiconv, and if that is
  > 			installed sylpheed-claws doesn't seem to build
  > 			properly. (unless fix applied to abiword to use
  > 			system iconv)
  > sylpheed-claws-1.0.4.tgz on ftp server
 Of course.  As noted above, package builds fine but is missing to build
 the pgpmime plugin (which is a bug since it would otherwise not require
 the gpgme dependencies, and previous versions built that plugin).
 As told in my notes above, it was easily fixed using the described steps.
  > 	abiword		By default failed to build without libiconv package
  > 			installed;  Had to comment USE_GNU_ICONV and
  > 			the libiconv buildlink .include for it to use the
  > 			system iconv (another gnu system friendly fix?)
  > abiword-2.4.1.tgz on ftp server.
 Possibly that the GNU libiconv package was previously compiled on the
 server and that building abiword used it.  Building abiword here failed
 to try to install the GNU iconv (it didn't try), and anyway since we
 already have iconv with the fix described it worked fine.
 > There are very very few changes between between 2.0 and 2.1 which should
 > affect packages build. Most changes are bug fixes, a few features added.
 > But *no* API or ABI changes (this is what a minor release mean).
 > So, especially for your PLIST, missing includes or libraries, I should
 > have got these errors in the 2.0 bulk build. This is why I strongly suspect
 > something in your environnement, or system setup.
  > My /etc/mk.conf is as follows:
  > CFLAGS+=-march=i686 -O2 -pipe
  > Did you try without CFLAGS ?
 Of course.  Playing with these as well as the default shell for root
 were among my first attempts to fix the problems.
 So since with various hacks I could make most packages build,
 the only ones I'll be caring about for now will be: db4, cscope and nspr
 for which I would like i686 and netbsd pkg friendly packages...
 I might be mistaken, but I suspect that several of these problems are
 caused by build order problems.  It would seem overkill for me to have
 to build all 5000+ packages for the little less than 400 that I'll
 ever need, though, just in order to get i686 packages...
 Thanks for the interest and time,