On Saturday, 16 November 2013 at 03:50:25 UTC, evilrat wrote:
On Saturday, 16 November 2013 at 03:20:03 UTC, Andrew Edwards wrote:
I am having little problem building druntime on Mac OS X 10.9 (Mavericks) and am wondering if anyone has experienced with this and some guidance on how to fix it.

Here is my command:
make -f posix.mak install DMD=../install/bin/dmd

And here is the resulting error:
../install/bin/dmd -ofgenerated/osx/default/rdmd rdmd.d
ld: unknown option: --export-dynamic
clang: error: linker command failed with exit code 1 (use -v to see invocation)
--- errorlevel 1
make: *** [generated/osx/default/rdmd] Error 1


i think this is related to hidden replace of gcc with clang. personally i don't do much c++ on osx, but people suggests use "-export-dynamic"(note single minus). hope it helps.

The recent switch to clang on 10.9 as the reason seemed to make sense, as I've run into a similar issue with clang before. But after googling a little bit and looking at the error, maybe the problem is a new linker in OS X 10.9? Assuming we've always been passing --export-dynamic to the linker, I don't see why it would start failing now, unless the GNU ld from binutils has been swapped out.

I suggest you look at where this --export-dynamic flag is being added in the build scripts and try changing the number of dashes or removing the flag, after looking at the docs for the OS X linker to see what flags it takes.

Reply via email to