-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
Provide binary macOS releases #3168
Comments
What kind of macOS version are you using? On a early-2011 Macbook Pro with 8GB ram it doesn't take longer than 10 minutes to build. |
I would also like to see a precompiled macOS binary, as this would easy the maintenance for e.g., https://github.com/ether-camp/solcJ. |
Now that we have macos CI in place we could very well do this. |
Please do this. |
Does someone know how to do this properly? |
Hey, i am Juan working for @nomiclabs , was told to take a look at this. The project was cloned and built in a MacOS Catalina machine, with no issue. This was tested on a clean machine, only installing XCode previously, as explained in the documentation. The result was the expected build folder in which the solc binary can be found. This binary was tested on other machines with success. With the flag correctly set here Solidity declares it is supporting MacOS of 10.14 and greater (Mojave and Catalina), which roughly correspond to 70% user market share and probably more for developers. Architecture-wise, there is no issues since all Mac machines are x86-64 processors since 2007. It appears that the Solidity Team already has everything set up for MacOS distribution. Only thing that is left is to add this to the release process, building it on a MacOS machine CI. I can tell the tasks in .travis.yml regarding MacOS are commented. along with some comments regarding older MacOS versions (10.9-10.12) which Solidity should not support, due to the requirement of the function |
@jcaracciolo we are "in the process" of moving away from travis. Would you be able to create a circleci config file to create MacOS artifacts that work on most MacOS machines? We already have a job that compiles a binary on CircleCI, but our main problem is that we have no experience in packaging for MacOS, which I assume is especially difficult for commandline applications like solc. |
There is no packaging we can do for macOS, just release the binary. Packaging is achieved by homebrew or someone creating a GUI for solc (hope not). |
Oh right - does it make sense to provide a binary homebrew release? |
Although a binary release in homebrew would be an improvement, most people use solc thru their enviroment tool (aka Buidler, Truffle, etc). These tools allow you pick specific version of solidity needed for your project, and they manage the download and verification. They are currently using the releases available in https://solc-bin.ethereum.org/. If the binary releases would be available there, the tools could provide the option to decide whether to use solc-js or use solc binary. As a starting point, i would generate binary releases on github, the same way you guys are releasing linux and windows versions. Unlike windows and Linux, MacOS binaries all have the same architecture and, as i explained earlier, you guys already set the flag correctly for supporting all 10.13 and 10,14 MacOS, this means that by compiling the binary on any 10.13 or greater MacOS machine, the resulting binary is ready for distribution as it will be compatible on any other 10.13 and 10.14 MacOS |
Sounds great, thanks! |
A note that these tools use |
For example, here's Truffle:
|
The tools use solcjs because that's the only option as binaries are not distributed for Mac. We (Nomic Labs) are going to make Buidler download the native binary if it's available and use it instead of solcjs, as well as push for other tools (mainly Truffle) to do the same. Devs on Mac will end up using the binary through their existing tooling |
@fzeoli that's great! Still, a Homebrew option (with, ideally, easy past version switching) would be very welcome for those of us who live mostly outside of the NPM ecosystem. For example, go-ethereum just calls solc directly, which is fine. |
If native |
As far as i have seen, you guys already have a CircleCI MacOS build task that generates a |
It is built in debug mode: https://github.com/ethereum/solidity/blob/develop/.circleci/config.yml#L534 I actually think that this is not necessary. You can just replace it by |
Hey @chriseth, How can we help publish these build in https://solc-bin.ethereum.org/ ? |
First, we have to verify that they work, you can help with that :) Would you like to also publish binaries for older packages? What about homebrew, can we use binaries there? |
I just downloaded the binaries from the CI run of this commit 61568fd and tested them in MacOS Mojave and Catalina. Worked in both cases. @jcaracciolo can you give more info about why Solc won't work on MacOS version < Mojave, please? |
Yes, that would be ideal.
I think so. We'll dig deeper into this and report back. |
@alcuadrado It is explained here. Solidity makes use of |
The 0.6.9 release page doesn't include a macos binary. Will it be added? or should we wait for 0.6.10? Is this blocking adding binary builds to solc-bin? |
Oh I'm sorry! I just added the binary - can you try if it works? I named it |
Thanks, @chriseth ! I tested it on Catalina and High Sierra, and it works. The name |
@chriseth next step for this is to get the binaries built for all the previous versions and published in https://solc-bin.ethereum.org/, that's when we can get tools to use it. Is there anything we can do to help do this? |
We need an architecture about how to organize and publish the binaries. github pages is not a solution because it does not scale to our needs. One problem we encountered was that some ways to host the binaries does not provide the correct mime type for the solcjs binaries. |
Did 0.8.16 reintroduce this bug? forge test
[⠊] Compiling...
[⠒] installing solc version "0.8.16"
[⠆] Successfully installed solc 0.8.16
Error:
Solc Error: dyld[74016]: Library not loaded: /opt/homebrew/opt/z3/lib/libz3.dylib
Referenced from: /Users/me/.svm/0.8.16/solc-0.8.16
Reason: tried: '/opt/homebrew/opt/z3/lib/libz3.dylib' (no such file), '/usr/local/lib/libz3.dylib' (no such file), '/usr/lib/libz3.dylib' (no such file) Going 8.14 -> 8.15 had no issues. |
I think you just don't have Z3 installed. Looks like forge must have switched to linking to Z3 dynamically on macOS. We don't provide binaries for M1 right now but the ones for Intel macs have Z3 linked statically. |
I think SVM (binaries that Foundry uses) already fixed that. |
Please think about providing precompiled macOS binaries. Compiling a new solc version is excruciatingly slow locally and almost impossible on Travis CI due to maximum job runtime.
The text was updated successfully, but these errors were encountered: