Subject: Re: aalib-x11 need curses?, SDL build failed, simple fix included here
To: Jeremy C. Reed <reed@reedmedia.net>
From: Johnny C. Lam <jlam@NetBSD.org>
List: tech-pkg
Date: 11/02/2003 06:49:28
On Sat, Nov 01, 2003 at 05:13:24PM -0800, Jeremy C. Reed wrote:
> I was building devel/SDL on a Linux system and it failed with:
> 
> ...
> -L/usr/lib -Wl,-R/usr/lib -L/usr/X11R6/lib -Wl,-R/usr/X11R6/lib -lm -ldl
> -L/usr/X11R6/lib -lX11 -lXext -L/usr/X11R6/lib -Wl,-rpath,/usr/X11R6/lib
> -laa-x11 -lm -L/usr/X11R6/lib -lX11 -lncurses
> grep:
> //tmp/pkgsrc/devel/SDL/work.antelope/.buildlink/lib/libncurses.la:  No
> such file or directory
> sed: can't read
> //tmp/pkgsrc/devel/SDL/work.antelope/.buildlink/lib/libncurses.la: No such
> file or directory
> libtool: link:
> `//tmp/pkgsrc/devel/SDL/work.antelope/.buildlink/lib/libncurses.la' is not
> a valid libtool archive
> make[2]: *** [libSDL.la] Error 1
> 
> 
> No ncurses was buildlinked.
> 
> So I tracked this down to its use by graphics/aalib-x11.
> 
> aalib and aalib-x11 don't have any use of ncurses buildlink2. But the
> configure detected ncurses and enabled it and built it with it.

If you're running with LOCALBASE=/usr, I think you're probably going
to run into this situation many more times.  Buildlink won't stop
GNU configure scripts from finding libraries and headers not in the
.buildlink directory because they'll all be readily available in
/usr/lib.  I don't really have a solution for this in mind yet.  I
think it may be possible to create some sort of pkgtools/system-links
package that has system libraries and headers (analogous to x11-links
and X11R6 libs and headers) and force the compiler/linker to be passed
"-nostdinc" and "-nostdlib".  This hypothethical system-links package
would have to be unique for each OS.  If anyone else wants to pursue
this idea and would like some guidance, please send me private email.

	Cheers,

	-- Johnny Lam <jlam@NetBSD.org>