supranational / blst

Multilingual BLS12-381 signature library
Apache License 2.0
463 stars 178 forks source link

`blst` fails to build macos 13.x #194

Closed Cmdv closed 1 year ago

Cmdv commented 1 year ago

When following the docs on building locally (running ./build.sh) the following error shows:

+ cc -O2 -fno-builtin -fPIC -Wall -Wextra -Werror -c ./src/server.c
In file included from ./src/server.c:7:
In file included from ./src/keygen.c:7:
In file included from ./src/consts.h:8:
./src/vect.h:402:11: fatal error: 'stdlib.h' file not found
# include <stdlib.h>

To get around that it seems I can copy my x-code dir **/include/ to /usr/local/include/ shown here

But then other C related compilations in my project just fail.

I'm not entirely sure if this is blst related but wanted to see if someone else had hit a similar issue on macos. 😸

abailly commented 1 year ago

Actually, this might be because you're using llvm from brew. When using stock llvm from Xcode command-line, it works.

Cmdv commented 1 year ago

Well that totally did the trick thanks @abailly conflicting llvms 😅