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

DED_LDFLAGS tomfoolery for macOS 10.13 #230

Closed
wants to merge 2 commits into
base: master
from

Conversation

Projects
None yet
3 participants
@joedevivo
Contributor

joedevivo commented Sep 27, 2017

My old builds on an upgraded laptop were giving me an error like the one here. They fixed it in erlang/otp#1501, but even backported to maintenance branches, any versioned source tarball won't be able to build SSL because the DED_LDFLAGS are no longer compatible.

I haven't gone back far enough to check, but this definitely works on OTP 20.1. I'll test it on more builds throughout the day, but I thought I'd get it into your hands sooner than later.

@mrallen1

This comment has been minimized.

Show comment
Hide comment
@mrallen1

mrallen1 Sep 28, 2017

Collaborator

Thanks for the patch! Definitely a lot of good ideas in here. I will take a closer look at this tomorrow!

Collaborator

mrallen1 commented Sep 28, 2017

Thanks for the patch! Definitely a lot of good ideas in here. I will take a closer look at this tomorrow!

@kpy3

This comment has been minimized.

Show comment
Hide comment
@kpy3

kpy3 Sep 28, 2017

Contributor

It seems this patch doesn't work against Erlang 17 (tried it against 17.5.6.9)

Contributor

kpy3 commented Sep 28, 2017

It seems this patch doesn't work against Erlang 17 (tried it against 17.5.6.9)

@joedevivo

This comment has been minimized.

Show comment
Hide comment
@joedevivo

joedevivo Sep 28, 2017

Contributor

I don't know how it was working before, but after a reboot it wasn't even working for 20.1. It turns out that kerl has no access to the $CC environment variable that autoconf chooses.

This is only a big deal because otp's erts/configure.in file only lets you override DED_LDFLAGS if you also override DED_LD, so we have to set it to something, and that something needs to be whatever CC is. I've fixed this temporarily by hard coding both to clang for High Sierra only. There's got to be a better way, but I'm now way out of my depth with autoconf.

Contributor

joedevivo commented Sep 28, 2017

I don't know how it was working before, but after a reboot it wasn't even working for 20.1. It turns out that kerl has no access to the $CC environment variable that autoconf chooses.

This is only a big deal because otp's erts/configure.in file only lets you override DED_LDFLAGS if you also override DED_LD, so we have to set it to something, and that something needs to be whatever CC is. I've fixed this temporarily by hard coding both to clang for High Sierra only. There's got to be a better way, but I'm now way out of my depth with autoconf.

@joedevivo

This comment has been minimized.

Show comment
Hide comment
@joedevivo

joedevivo Sep 28, 2017

Contributor

@kpy3 I was able to build 17.5.6.9 after this last commit.

Contributor

joedevivo commented Sep 28, 2017

@kpy3 I was able to build 17.5.6.9 after this last commit.

@mrallen1

This comment has been minimized.

Show comment
Hide comment
@mrallen1

mrallen1 Sep 28, 2017

Collaborator

This whole thread is making me 😢 Why can't we have nice things 🍎 ???!!!

Collaborator

mrallen1 commented Sep 28, 2017

This whole thread is making me 😢 Why can't we have nice things 🍎 ???!!!

@kpy3

This comment has been minimized.

Show comment
Hide comment
@kpy3

kpy3 Sep 29, 2017

Contributor

@joedevivo tried updated PR (with #232) and it seems to work now. The only strange thing I have to notice is

===> Error in dialyzing apps: Could not get abstract code for file: /Users/yes/.kerl/install/17.5/lib/crypto-3.5/ebin/crypto.beam (please recompile it with +debug_info)

My build flags are: KERL_CONFIGURE_OPTIONS="--enable-smp-support -with-ssl=brew --prefix openssl--enable-threads --enable-kernel-poll --with-dynamic-trace=dtrace --enable-dirty-schedulers"

Any thoughts on this?

Contributor

kpy3 commented Sep 29, 2017

@joedevivo tried updated PR (with #232) and it seems to work now. The only strange thing I have to notice is

===> Error in dialyzing apps: Could not get abstract code for file: /Users/yes/.kerl/install/17.5/lib/crypto-3.5/ebin/crypto.beam (please recompile it with +debug_info)

My build flags are: KERL_CONFIGURE_OPTIONS="--enable-smp-support -with-ssl=brew --prefix openssl--enable-threads --enable-kernel-poll --with-dynamic-trace=dtrace --enable-dirty-schedulers"

Any thoughts on this?

@mrallen1 mrallen1 referenced this pull request Oct 1, 2017

Closed

Discussion for Oct 6 #18

mrallen1 added a commit that referenced this pull request Oct 2, 2017

Maybe munge LD and DED flags when macOS >= 10.13
As explained in #230, DED_LDFLAGS must be set correctly
for clang 9 to compile various OTP applications correctly
including crypto.

This patch reworks #230 a little bit so that it's a tiny
bit more generalized, in case we run across another
situation where this needs to be done for a particular
operating system.
@mrallen1

This comment has been minimized.

Show comment
Hide comment
@mrallen1

mrallen1 Oct 2, 2017

Collaborator

Thanks for the patch, I am closing this in favor of #234

Collaborator

mrallen1 commented Oct 2, 2017

Thanks for the patch, I am closing this in favor of #234

@mrallen1 mrallen1 closed this Oct 2, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment