Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fails on OS X #50

Closed
coke opened this issue Jul 17, 2020 · 7 comments
Closed

Build fails on OS X #50

coke opened this issue Jul 17, 2020 · 7 comments
Labels

Comments

@coke
Copy link

coke commented Jul 17, 2020

 $ sw_vers
ProductName:	Mac OS X
ProductVersion:	10.15.5
BuildVersion:	19F101
$ g++ --version
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 11.0.3 (clang-1103.0.32.62)
Target: x86_64-apple-darwin19.5.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
$ cc --version
Apple clang version 11.0.3 (clang-1103.0.32.62)
Target: x86_64-apple-darwin19.5.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
$ grep -i sass Build.PL
      'CSS::Sass'                        => '3.6.3',
$ cpanm -vn --installdeps .

...

and eventually dies with

cc -O3 -lstdc++ -shared -o blib/arch/auto/CSS/Sass/plugins/glob/glob.dylib -Wl,-z,origin -Wl,-rpath,\$ORIGIN/../.. -Wl,-install_name,glob.dylib plugins/glob/src/glob.o plugins/glob/vendor/FS.o -Lblib/arch/auto/CSS/Sass -lsass -lstdc++
ld: unknown option: -z
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [blib/arch/auto/CSS/Sass/plugins/glob/glob.dylib] Error 1
@coke
Copy link
Author

coke commented Jul 17, 2020

Blocking rakudo/rakudo.org#20

@mgreter
Copy link
Contributor

mgreter commented Aug 8, 2020

Have taken some time off from github, will look into this next week!

@mgreter mgreter added the bug label Aug 8, 2020
@mgreter
Copy link
Contributor

mgreter commented Aug 10, 2020

Seems your clang version has finally deprecated the -z origin parameter. According to the comments in Makefile.PL this was added for BSD compatibility, so I'm tempted to just exclude this parameter on MacOS. Unfortunately cross compilation is rather hard to get right for every situation, but still sorry for the inconvenience.

Maybe somebody has more insights here and I also haven't yet found out if all MacOS clang versions suffer from this or if this was introduced more recently. Anyway, will look into it another time to come up with a fix.

Btw. if you want and are able to, you might simply comment out the offending line in Makefile.PL.
Also it seems you can simply call perl Makefile.PL --no-plugins; AFAICT it should disable this option too.

@warpspin
Copy link

Fails on Mac OS X 10.14.6, too, with that parameter. Removing it makes the build succeed.

@tangentsoft
Copy link

Adding "&& $^O ne 'darwin'" to the end of line 654 in Makefile.PL fixes it.

@mgreter
Copy link
Contributor

mgreter commented May 21, 2021

I've removed the -z,origin parameter for darwin in the latest release.

@mgreter mgreter closed this as completed May 21, 2021
@tangentsoft
Copy link

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants