`ld: unknown option: -z` error for osx build
Opened this issue ยท 2 comments
chenrui333 commented
๐ trying to build the latest release, but run into some build issue. The error log is as below:
build error
==> make check LDFLAGS= CFLAGS_EXTRA=
clang -D_FORTIFY_SOURCE=2 -fPIC -c -o main.o main.c
clang -D_FORTIFY_SOURCE=2 -fPIC -c -o crypto_scrypt-hexconvert.o crypto_scrypt-hexconvert.c
ln -s -f libscrypt.so.0 libscrypt.so
clang -o reference main.o b64.o crypto_scrypt-hexconvert.o -D_FORTIFY_SOURCE=2 -fPIC -Wl,-z,relro -L. -lscrypt
ld: unknown option: -z
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [reference] Error 1
full build log, https://github.com/Homebrew/homebrew-core/runs/5154594733
relates to Homebrew/homebrew-core#94934
technion commented
Hi,
Unfortunately I have no access to Mac environment and I'm going to need a Mac user to provide advise and a PR for this.
risicle commented
The issue is that relro
is an ELF thing and doesn't really mean anything on a Mach-O system as far as I can tell.