[Sbcl-help] How to install libzstd-dev on MacOS

1,190 views
Skip to first unread message

Bela Pecsek

unread,
Jul 9, 2022, 10:36:46 AM7/9/22
to SBCL help
Hi,

How do I install libzstd-dev on MAcOS?
I tried brew but it is not there.
Therefore I can’t compile sbcl due to missing headers.

Thanks
Bela

_______________________________________________
Sbcl-help mailing list
Sbcl...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sbcl-help

Michał "phoe" Herda via Sbcl-help

unread,
Jul 9, 2022, 11:58:12 AM7/9/22
to sbcl...@lists.sourceforge.net
`brew install zstd` should be enough - the archive downloaded via this
recipe (https://formulae.brew.sh/formula/zstd) contains zstd.h which
should be necessary for building sbcl.

Andreas Wacknitz

unread,
Jul 9, 2022, 1:13:09 PM7/9/22
to sbcl...@lists.sourceforge.net
Hi,

Am 09.07.22 um 16:36 schrieb Bela Pecsek:


> Hi,
>
> How do I install libzstd-dev on MAcOS?

You don't need a -dev package when you use brew on macos. There is no
separation between runtime and development package.
Installing zstd should be sufficient. The package should provide
everything you need for sbcl.

> I tried brew but it is not there.
> Therefore I can’t compile sbcl due to missing headers.

You may need to teach sbcl's build system where it should look for
additional header files and libraries (look where brew installs them).
On my mac they are symlinked to /usr/local/include and /usr/local/lib.

regards,
Andreas

Bela Pecsek

unread,
Jul 18, 2022, 5:30:41 AM7/18/22
to Andreas Wacknitz, SBCL help
I am trying to build sbcl on MacOS Ventura Beta 3 on M1 MacBook Air but the build fails.

I have created the symlinks but now I am getting this:

make: Entering directory '/Users/bpecsek/tmp/sbcl/tools-for-build'
cc -g -Wall -fdollars-in-identifiers -fno-omit-frame-pointer -I/opt/homebrew/include -I../src/runtime -L/opt/homebrew/lib grovel-headers.c -lSystem -lc -ldl -lpthread -lzstd -o grovel-headers
grovel-headers.c:402:29: error: use of undeclared identifier 'page_index_t'
DEFTYPE("page-index-t", page_index_t);
^
grovel-headers.c:402:5: error: use of undeclared identifier 'foo'; did you mean 'for'?
DEFTYPE("page-index-t", page_index_t);
^
grovel-headers.c:78:15: note: expanded from macro 'DEFTYPE'
(((foo=-1)<0) ? "signed" : "unsigned"), (8LU * (sizeof foo))); }
^
grovel-headers.c:402:5: error: expected expression
grovel-headers.c:78:15: note: expanded from macro 'DEFTYPE'
(((foo=-1)<0) ? "signed" : "unsigned"), (8LU * (sizeof foo))); }
^
grovel-headers.c:402:5: error: use of undeclared identifier 'foo'
grovel-headers.c:78:67: note: expanded from macro 'DEFTYPE'
(((foo=-1)<0) ? "signed" : "unsigned"), (8LU * (sizeof foo))); }
^
grovel-headers.c:403:35: error: use of undeclared identifier 'generation_index_t'
DEFTYPE("generation-index-t", generation_index_t);
^
grovel-headers.c:403:5: error: use of undeclared identifier 'foo'; did you mean 'for'?
DEFTYPE("generation-index-t", generation_index_t);
^
grovel-headers.c:78:15: note: expanded from macro 'DEFTYPE'
(((foo=-1)<0) ? "signed" : "unsigned"), (8LU * (sizeof foo))); }
^
grovel-headers.c:403:5: error: expected expression
grovel-headers.c:78:15: note: expanded from macro 'DEFTYPE'
(((foo=-1)<0) ? "signed" : "unsigned"), (8LU * (sizeof foo))); }
^
grovel-headers.c:403:5: error: use of undeclared identifier 'foo'
grovel-headers.c:78:67: note: expanded from macro 'DEFTYPE'
(((foo=-1)<0) ? "signed" : "unsigned"), (8LU * (sizeof foo))); }
^
grovel-headers.c:408:29: error: unknown type name 'os_vm_size_t'; did you mean 'vm_size_t'?
DEFTYPE("os-vm-size-t", os_vm_size_t);
^~~~~~~~~~~~
vm_size_t
grovel-headers.c:76:35: note: expanded from macro 'DEFTYPE'
#define DEFTYPE(lispname,cname) { cname foo; \
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/arm/vm_types.h:105:33: note: 'vm_size_t' declared here
typedef uintptr_t vm_size_t;
^
9 errors generated.

Douglas Katzman via Sbcl-help

unread,
Jul 18, 2022, 9:59:05 AM7/18/22
to Bela Pecsek, SBCL help
There's mention of a resolution in https://bugs.launchpad.net/sbcl/+bug/1981799 (which I profess to not reading)
Reply all
Reply to author
Forward
0 new messages