Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ld OS X: unknown option -z

Tags:

macos

gcc

linker

ld

I'm trying to compile a particular package for multi simulation called MUSIC (https://github.com/INCF/MUSIC). I didn't have any problems to compile it on ubuntu but when I try to compile it on os x I get this error:

ld: unknown option: -z
collect2: error: ld returned 1 exit status
make[2]: *** [libmusic.la] Error 1

I tried almost everything: cross-compiling (the cross-compiler does not work), using ld installed with binutils... but I always get the same error.

like image 720
nash16 Avatar asked Nov 20 '22 10:11

nash16


1 Answers

I know it is an old question, but I will answer for the sake of completion.

This was solved with https://github.com/INCF/MUSIC/pull/24.

It turns out I got the same error when trying to compile csstidy. In my case I had to remove the linker flags directly in the Makefile.

like image 70
hoorider Avatar answered Dec 08 '22 04:12

hoorider