Date: Mon, 7 Jul 2003 18:48:55 -0700 From: Joshua Oreman <oremanj@webserver.get-linux.org> To: lewiz <purple@lewiz.info> Cc: ports@freebsd.org Subject: Re: ld and libraries troubles (newbie). Message-ID: <20030708014855.GA73307@webserver.get-linux.org> In-Reply-To: <20030708005521.GA18650@lewiz.org> References: <20030708004340.GB18537@lewiz.org> <20030708005147.GC40769@webserver.get-linux.org> <20030708005521.GA18650@lewiz.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Jul 08, 2003 at 01:55:21AM +0100 or thereabouts, lewiz wrote: > On Mon, Jul 07, 2003 at 05:51:47PM -0700, Joshua Oreman wrote: > > > For some reason it does not find libexpat (ld: cannot find -lexpat), > > > which is available in /usr/local/lib. I created a symlink to /usr/lib > > > and it worked, but then failed when make got to libintl.a (in > > > /usr/local). I've done my best to read the Porter's Handbook > > > (especially the chapter on Dependencies) but this has been of little > > > help. Any pointers in the right direction would be greatly appreciated! > > > > DON'T depend on symlinking libraries, since when the port installs the > > end user might not have those symlinks. > > Hehe, I know. Sorry, I didn't make it clear that was a temporary > work-around. > > > Add -L/usr/local/lib to the link line in the Makefile. Make a patch > > to do this. > > Is that the only way to solve this issue? I was expecting there to be > some option for the port Makefile? The port makefile can't just add stuff to the software's Makefiles. If the software has a "good" makefile, then either of these (in the port Makefile, in order of preference) should work: LDFLAGS+= -L/usr/local/lib -or- LIBS+= -L/usr/local/lib -or- CFLAGS+= -L/usr/local/lib CXXFLAGS+= -L/usr/local/lib If that doesn't work, then yes, you have to edit the software's Makefile. -- Josh > > Thanks very much, > > -lewiz. > > -- > Chism's Law of Completion: > The amount of time required to complete a government project is > precisely equal to the length of time already spent on it. > ------------------------------------------------------------------------ > -| msn:purple@lewiz.net | jab:lewiz@jabber.org | url:http://lewiz.net |-
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030708014855.GA73307>