Skip to content
This repository has been archived by the owner on Feb 7, 2018. It is now read-only.

macOS Sierra - Address build breaks #614

Closed
bobsummerwill opened this issue Jul 5, 2016 · 19 comments
Closed

macOS Sierra - Address build breaks #614

bobsummerwill opened this issue Jul 5, 2016 · 19 comments
Assignees

Comments

@bobsummerwill
Copy link
Contributor

bobsummerwill commented Jul 5, 2016

The next release of macOS will be released this summer, called macOS Sierra, with the OS name having been changed from OS X back to macOS, and the casing aligned with the other Apple operating systems (iOS, watchOS, tvOS).

See https://en.wikipedia.org/wiki/MacOS_Sierra.

See https://gitter.im/ethereum/cpp-ethereum?at=577be0b264f940856a11269e for first report of issues with Sierra.

@EtherTyper
Copy link

EtherTyper commented Jul 6, 2016

Appears to hang forever, then I finally get:

../include/string:1938:44: error: 'basic_string<_CharT, _Traits, _Allocator>' is missing exception specification 'noexcept(is_nothrow_copy_constructible<allocator_type>::value)'
basic_string<_CharT, _Traits, _Allocator>::basic_string(const allocator_type& __a)
                                       ^
../include/string:1326:40: note: previous declaration is here
_LIBCPP_INLINE_VISIBILITY explicit basic_string(const allocator_type& __a)

@EtherTyper
Copy link

Wait a second... I realized LLVM isn't run by Ethereum, (I'm a serious newb,) but then I found out it might be an issue with a file included form LLVM, the standard C++ implementation! Don't know why std::basic_string's failure to compile doesn't break anything else... If you need to try anything else on Sierra, let me be your test dummy! 😆

@chfast
Copy link
Member

chfast commented Jul 6, 2016

Looks like problem with libc++.

Can you provide a minimal test?

Is Xcode available on macOS Sierra?

@EtherTyper
Copy link

@chfast Yup, it's a libc++ issue. Running Xcode 8 beta, June 13.

@EtherTyper
Copy link

What kind of fix should I test?

@chfast
Copy link
Member

chfast commented Jul 6, 2016

Anything that shows that standard header is broken. To report to LLVM or
Xcode.

On Wed, Jul 6, 2016, 20:58 ELI JOSEPH BRADLEY notifications@github.com
wrote:

What kind of fix should I test?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#614 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AAi_xHBZaJMMpKGKQwRZ0ufy0s4vC6Fbks5qS_rKgaJpZM4JFmNW
.

@bobsummerwill
Copy link
Contributor Author

Hey @EtherTyper,

So let's start with a bug report at https://github.com/Homebrew/homebrew-core/issues/new. If you follow that URL you will see that they have a template for such reports, with the output from brew gist-logs being the main thing which we would need from you.

So you should be able to replicate the issue, I think, with brew install llvm37 on Sierra, which would be a simpler use-case for us to start with.

Please could you see if you can replicate the issue with brew install llvm37 and get the gist logs from that? If you do that, I am happy to be the one to actually log the issue with Homebrew.

And that might well lead to us needing to submit a bug report for LLVM itself, as per http://llvm.org/docs/HowToSubmitABug.html.

I am happy to do all the issue reporting work, but we'll need to lean on your for the actual logs, etc, because you have the Sierra install.

PS. If you want to workaround this in cpp-ethereum the meantime, you should be able to do brew install cpp-ethereum --without-evmjit. I think that command is right, eh, @chfast?

@EtherTyper
Copy link

@bobsummerwill Will post the link to the gist after the test!

@EtherTyper
Copy link

@bobsummerwill So, I fixed LLVM building problems. I untarred the libcxx tarball and fixed the error about the absence of exception declaration by adding the exception declaration to line 1938, as the error suggested. After making an updated tarball, I edited the llvm37.rb formula to the following, to match the SHAs correctly. Here's a patch to the current homebrew-versions repository showing the changes:

From 7a8123f838ca82e0155112a10798d0cd1bfb78cc Mon Sep 17 00:00:00 2001
From: Eli Joesph Bradley <elijos03@gmail.com>
Date: Sat, 9 Jul 2016 08:34:15 -1000
Subject: [PATCH] Update llvm37 formula

---
 llvm37.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/llvm37.rb b/llvm37.rb
index c4e07db..db9d897 100644
--- a/llvm37.rb
+++ b/llvm37.rb
@@ -57,7 +57,7 @@ class Llvm37 < Formula

     resource "libcxx" do
       url "http://llvm.org/releases/3.7.1/libcxx-3.7.1.src.tar.xz"
-      sha256 "357fbd4288ce99733ba06ae2bec6f503413d258aeebaab8b6a791201e6f7f144"
+      sha256 "1ad27d1af083a3aff63606fdad76c631a2218e69041f34aef670ec22ade61ae6"
     end

     if MacOS.version <= :snow_leopard
-- 
2.9.0

However, alas, I get more errors: https://gist.github.com/07c22c353ef33d895fe1730c0dff7995

And this time, I don't believe this is a dependency error. There might be some incompatibility with my Xcode 8 building tools and the webthree-umbrella source code. Thanks!

@bobsummerwill
Copy link
Contributor Author

Great!

Yes, you are hitting what appears to be a build error at HEAD which I am looking at right now :-)

Join us on https://gitter.im/ethereum/cpp-ethereum for updates!

@bobsummerwill
Copy link
Contributor Author

bobsummerwill commented Jul 10, 2016

So, you needed an edit in libc++ within LLVM. Is that right?

Here's the source tree ... https://github.com/llvm-mirror/llvm/tree/release_38

What was your edit?

@EtherTyper
Copy link

@bobsummerwill I modified a 3.7.1 tarball, so diffing against the 3.8 trunk would probably make git unnecessarily puke out priorly documented changes... Long story short, I edited the basic_string<_CharT, _Traits, _Allocator>::basic_string(const allocator_type& __a) function at line 1938 to have the noexcept(is_nothrow_copy_constructible<allocator_type>::value) exception declaration it required.

@EtherTyper
Copy link

I'll get around to submitting a Phabricator patch to LLVM tomorrow.

@bobsummerwill
Copy link
Contributor Author

bobsummerwill commented Jul 10, 2016

Thanks! Much appreciated. Will be great to have Sierra working ahead of time.

If you could report the issue to Homebrew, they can patch around it in the meantime. LLVM release cadence seems very slow, but LLVM is broadly used, so I imagine the Homebrew team would want this to be in a good state on Sierra.

@EtherTyper
Copy link

@bobsummerwill Already tried. They refused to help because my brew doctor said I was running Sierra, which they don't support. Homebrew/homebrew-core#2826

@EtherTyper
Copy link

Here's the LLVM patch I submitted:

http://reviews.llvm.org/D22200

@bobsummerwill
Copy link
Contributor Author

Thanks for both of those, @EtherTyper!

A little surprising on Sierra, because I would have thought they would want to get started, but no doubt they have a plan of attack.

I'll keep this issue open pending movement on the LLVM issue.

@EtherTyper
Copy link

@bobsummerwill Update: Homebrew acknowledged the issue when someone who was running a stable build of macOS encountered the same thing... Homebrew/homebrew-versions#1298

@bobsummerwill
Copy link
Contributor Author

This issue was moved to ethereum/aleth#3191

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

No branches or pull requests

3 participants