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

solc on linux is dynamically linked #10

Closed
tbocek opened this issue Jun 15, 2018 · 10 comments
Closed

solc on linux is dynamically linked #10

tbocek opened this issue Jun 15, 2018 · 10 comments

Comments

@tbocek
Copy link
Contributor

tbocek commented Jun 15, 2018

The resulting binary should work on any Linux platform, and should look as follows:
$ file solc soltest
solc: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, stripped
soltest: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, stripped

However, the current file looks as follows:
$ file solc
solc: ELF 64-bit LSB pie executable x86-64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-musl-x86_64.so.1, stripped

That means it does not run where libmusl is not installed.

When running the build script run.sh, the following output shows the problem:

CMake Warning:
  Manually-specified variables were not used by the project:

    STATIC_LINKING
@mkalinin
Copy link
Contributor

Good point @tbocek. Latest version I guess?

@tbocek
Copy link
Contributor Author

tbocek commented Jun 15, 2018

@mkalinin Yes, latest version. I tried to replace STATIC_LINKING with SOLC_LINK_STATIC in the dockerfile, but its still dynamically linked.

@mkalinin
Copy link
Contributor

@tbocek could you make a fix for that?

@mkalinin
Copy link
Contributor

Or even better to make a build for 0.4.24 version of solc

@tbocek
Copy link
Contributor Author

tbocek commented Jun 20, 2018

@mkalinin I started to work on that, and I'm wondering why not just take the libraries from https://github.com/ethereum/solidity/releases. Was there a reason to not use those?

@mkalinin
Copy link
Contributor

@tbocek great! 👍 There was no reason for that. I am pretty sure those libs will work. But previous update wasn't done by our team and I just can't say why updater hasn't used libs from solc release.

@tbocek
Copy link
Contributor Author

tbocek commented Jun 21, 2018

@mkalinin alright! I did some changes here: https://github.com/tbocek/solcJ/
The only issues I have are the mac binaries. Since I don't have a mac, I could not compile them and had to ask a friend to do so. The binary seems huge (17MB), and its not a sustainable approach. Do you know if there is a reliable source for mac binaries for solc?

@mkalinin
Copy link
Contributor

I believe he can install it using this guide https://solidity.readthedocs.io/en/latest/installing-solidity.html#binary-packages and get installed binaries

@tbocek
Copy link
Contributor Author

tbocek commented Jun 21, 2018

We will try, if we also get a huge binary, we'll go with that one.

@mkalinin
Copy link
Contributor

Addressed in #12

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

No branches or pull requests

2 participants