pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Pkgsrc zlib vs. base zlib, NetBSD



--- Roland Illig <rillig%NetBSD.org@localhost> wrote:

> Gary Thorpe wrote:
> > Hi,
> > 
> > I am trying to get some software (not in pkgsrc) to build using the
> > pkgsrc version of zlib and not the version found bundled with
> NetBSD
> > (which is too old for the included ./configure to work).
> > 
> > The configure script accepts a zlib prefix (/usr/pkg/lib) and makes
> the
> > test but it fails to run:
> > 
> > configure:3865: gcc -o conftest  -pipe -I. -D__UNIXSDL__
> -D__BSDSDL__
> > -I/usr/pkg
> > /lib   conftest.c  -L/usr/pkg/lib -lz >&5
> > configure:3868: $? = 0
> > configure:3874: ./conftest
> > Shared object "libz.so.1" not found
> > configure:3877: $? = 1
> > configure: program exited with status 1
> > 
> > I have tried changing the flags to include
> '-Wl,-rpath,/usr/pkg/lib'
> > but this just results in the library in /usr/lib being used (which
> gets
> > the older version). It seems the -rpath adds the directory to the
> list
> > but /usr/lib is still in front of it.
> 
> Have you tried this:?
> 
> env \
>      CPPFLAGS="-I/usr/pkg/include" \
>      LDFLAGS="-L/usr/pkg/lib -Wl,-R/usr/pkg/lib" \
>      ./configure ...
> 
> You need both of the flags, one for compile time and one for run
> time.
> 
> Roland

Hi,

Thank you, this works partially (configure detects the right version)
but it now fails in the final link stage:
[...]
-R/usr/pkg/lib -Wl,-rpath,/usr/pkg/lib -L/usr/local/lib -L/usr/lib  -lz
-L/usr/local/lib -Wl,-rpath,/usr/local/lib -lSDL -lpthread -lcurses
initc.o(.text+0x15f0): In function `SplitSetup':
: undefined reference to `gzdirect'
initc.o(.text+0x18e3): In function `SplitSetup':
: undefined reference to `gzdirect'
initc.o(.text+0x1b64): In function `SplitSupport':
: undefined reference to `gzdirect'
initc.o(.text+0x23e6): In function `loadROM':
: undefined reference to `gzdirect'
initc.o(.text+0x6094): In function `loadGZipFile':
: undefined reference to `gzdirect'

These symbols are found in the pkgsrc version but not in the /usr/lib
version. Should I try moving the -lz around so it comes before
-L/usr/lib?

Configure also isn't detecting libpng in /usr/pkg even with the
environment variables and --with-libpng-prefix=/usr/pkg

The software is zsnes which is actually already in pkgsrc: older
version, ~50 dependencies, I only need about 4-5 features (maybe more
customizations optioins are needed?).


      Be smarter than spam. See how smart SpamGuard is at giving junk email the 
boot with the All-new Yahoo! Mail at http://mrd.mail.yahoo.com/try_beta?.intl=ca




Home | Main Index | Thread Index | Old Index