Undefined symbols for architecture x86_64 on jsonnet submission

Mojca Miklavec mojca at macports.org
Sat Nov 23 15:03:12 UTC 2019


On Sat, 23 Nov 2019 at 15:53, Joshua Root wrote:
> On 2019-11-24 01:35 , Mojca Miklavec wrote:
> > On Sat, 23 Nov 2019 at 14:56, Steven Smith wrote:
> >>
> >>
> >> Here’s the current not-working Portfile:
> >>
> >> https://github.com/macports/macports-ports/blob/4a9cd2d6b34e6d48e22bfb608529e900f49f8dcb/devel/jsonnet/Portfile
> >
> > It builds perfectly fine for me (I built it with "sudo port -vt
> > destroot"), it only fails during the destroot phase (considering what
> > it tries to do, rightly so):
> >
> > mkdir -p /usr/local/bin
> > cp jsonnet jsonnetfmt /usr/local/bin/
> > cp: /usr/local/bin/jsonnet: Permission denied
> > cp: /usr/local/bin/jsonnetfmt: Permission denied
> > make: *** [install] Error 1
> >
> > You need to do at least two things:
> >
> > 1.) Replace lines like
> >      mkdir -p $(PREFIX)/bin
> > with
> >      mkdir -p $(DESTDIR)$(PREFIX)/bin
> > (and ask upstream to fix that).
> >
> > 2.) Add something like
> >     build.env PREFIX=${prefix}
> > to your Portfile.
> >
> > However the paste which you linked is using CMake,  while the linked
> > Portfile is using make, so it's not really comparable.
>
> I'm pretty sure the CMakeLists is just buggy. The missing symbols are
> defined in libjsonnet.cpp, while is compiled to libjsonnet.cpp.o, but
> there's just no attempt to include any libraries or .o files other than
> libjsonnet++.cpp.o when linking libjsonnet++.0.14.0.dylib.

I also miss something simisar to
    target_link_libraries(libjsonnet++ PRIVATE libjsonnet)
in the CMakeList (something similar is even commented out), but that's
in fact something that upstream needs to fix.

Mojca


More information about the macports-dev mailing list