Undefined symbols for architecture x86_64 on jsonnet submission

Mojca Miklavec mojca at macports.org
Sat Nov 23 14:35:01 UTC 2019

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
     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.


More information about the macports-dev mailing list