pkgsrc-Users archive

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

Re: Linking SDL2 fails on linux sparc

Connor McLaughlan <> writes:

> The solution was to comment out this line in the pkgsrc Makefile:
> This allows configure to find libdl and build the package:
> checking for dlopen in -ldl... yes
> Without BUILDLINK_TRANSFORM removed, the build on debian/sparc64 is
> not possible.

libdl appears on some systems (Linux, perhaps only Linux)) and not on
many others.  From memory, I think POSIX says that dlopen must simply be
present (implying libc), rahter than needing to link a special lib.  It
seems to be a common upstream bug to assume that the world is Linux and
always include -ldl, rather than testing for it with configure, or only
including it on systems known to deviate from POSIX.

So the best (theoretical) way forward is to patch upstream.

THe less satisfactory but far less difficult way is to conditionalize
the removal of -ldl, so it doesn't happen on Linux.

(( have not checked, but it seems really likely that without the
dropping of -ldl, the build would fail on many (most?) platforms.)

Attachment: signature.asc
Description: PGP signature

Home | Main Index | Thread Index | Old Index