pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: libdl
On Fri, Jan 09, 2015 at 08:04:09PM +0100, Niclas Rosenvik wrote:
> On Fri, 9 Jan 2015 17:10:34 +0000
> Patrick Welche <prlw1%cam.ac.uk@localhost> wrote:
>
> > Is there a pkgsrc way of dealing with libdl?
> >
> > I have just got a package which uses waf to run successfully on
> > NetBSD, but I had to:
> >
> > SUBST_CLASSES+= rmdl
> > SUBST_STAGE.rmdl= pre-configure
> > SUBST_MESSAGE.rmdl= remove -ldl
> > SUBST_FILES.rmdl= src/wscript_build
> > SUBST_SED.rmdl= -e "s/, 'dl'//"
> >
> > This is fine for NetBSD, but presumably not for linux...
> >
> > Cheers,
> >
> > Patrick
>
> See mk/dlopen.buildlink3.mk
>
> In wip/premake4/Makefile I use a dlopen.buildlink3.mk and a buildlink
> transform to handle libdl, it looks like this:
> BUILDLINK_TRANSFORM+= opt:-ldl:${BUILDLINK_LDADD.dl:M*}
> I think it works on linux but I haven't tried.
I think I should have been more explicit...
The wafscript contains
bld(
lib = ['m', 'jpeg', 'dl'],
...
)
which tests for libdl and fails if it doesn't find it. (At least,
that is my impression.) If it didn't fail, and simply added -ldl,
then the BUILDLINK_TRANSFORM would work.
I suspect I'm asking for the list of OSes for which -ldl is necessary,
and avoid the sed for those?
Cheers,
Patrick
Home |
Main Index |
Thread Index |
Old Index