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

DED_LDFLAGS tomfoolery for macOS 10.13 #230

Closed
wants to merge 2 commits into from

Conversation

joedevivo
Copy link
Contributor

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.

@jadeallenx
Copy link
Collaborator

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

@kpy3
Copy link
Contributor

kpy3 commented Sep 28, 2017

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

@joedevivo
Copy link
Contributor Author

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
Copy link
Contributor Author

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

@jadeallenx
Copy link
Collaborator

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

@kpy3
Copy link
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?

jadeallenx added a commit that referenced this pull request Oct 2, 2017
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.
@jadeallenx
Copy link
Collaborator

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

@jadeallenx jadeallenx closed this Oct 2, 2017
vladdu pushed a commit to vladdu/kerl that referenced this pull request Jan 26, 2021
As explained in kerl#230, DED_LDFLAGS must be set correctly
for clang 9 to compile various OTP applications correctly
including crypto.

This patch reworks kerl#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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants