-
Notifications
You must be signed in to change notification settings - Fork 105
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
wasmd does not run on centos 7 #32
Comments
this is the result of ldd libgo_cosmwasm.so built on centos 7
|
Here is the default build from ubuntu 18.04 (also works on debian):
|
The versions all seem to be the same, the issue is the location of the links. @westaking can you try the following on the master branch (with default build) and let me know if it works for you?
Btw, this is the contents of lib64 on my system:
|
Alternatively, I can try using a static lib on rust. It says how to do so here.. let's see if this works (and doesn't break macos builds): |
Linking glibc on Linux is backward-compatible but not forward-compatible. i.e. whatever you build on a given system will run on newer systems but not on older ones. (see also https://stackoverflow.com/a/11108336/2013738) When the lib is build on Ubuntu 18.04 it will require glibc >= 2.27. But Centos 7 ships glibc 2.12. In general you want to have a build system that is older or equal to all supported runtime systems. The lowest version that can reasonably be used for building is Ubuntu 16.04 LTS, which sets the min glibc version to 2.23. Using 16.04 would add compatibility to Debian 9 Strech (oldstable). Given this, I do not have much hope for Centos 7 support using precompiled binaries. But Centos 8 should work (coming with glibc 2.28). I wonder if statically linking of the libc is even possible. I never heard someone trying that. This behaves entirely different for Windows and Mac where you tell the compiler which min OS version should be supported. At Kullo we compile Windoes 7+ software on Windows 10 and Mac 10.12+ software on Mac 10.15. |
Okay, a bit of a trick to get the static lib to work, but maybe that is the proper approach for this. I consider it experimental in any case, but let's see if this allows better cross-linux support. @westaking Please checkout (Note that the |
It doesn't work. |
I know that..... It doesn't work...
|
It works fine as follows:
It would suggest follows.
ps. I'm sorry to poor my english. |
I'm sorry, I didn't understand if you tested the version with *.a (not building locally). As to keeping branches, I can make a branch of go-cosmwasm with custom support But that adds a fair bit of overhead. And makes it hard to follow releases. I would ideally get a build system that just works in one branch. But yeah, it is possible one way or another. If you want to try this out. You can make a fork of go-cosmwasm and maintain that (you have the centos fork, just pull from master and rebuild the custom *.so file). Then make a fork of wasmd, which is the same as upstream (so easy to pull changes), except you add one line to the In fact, if you want to use this in the next week, that is likely the only approach. I will investigate a longer term universal solution, but I don't want to maintain branches for support of platforms I can't even test on. I am happy to assist you in supporting that, or work for a more universal solution. Example use of |
I have not tested * .a It's sad that you can't have continuous support for centos7. in go.mod of wasmd it works. thank you for the information. |
The issue is the version of If we look at debian glibc support:
I think it is a good idea to compile with an older architecture to get a older glibc version. But forcing back to 2.12 is quite a stretch. I will try to build the next release with as old as I can, but given jessie is deprecated, I wonder how much tooling works for it. |
@westaking There is an option for official support. I build the releases with a Dockerfile. This is based on Debian Stretch or Buster, and compiles for linux and osx. If you want to make a PR with a subdir that contains a Dockerfile that builds based on CentOS (no cross-compile - just the linux version), I would be happy to merge it. If the produced build works well on a modern CI machine, I may use this for the official releases. I am not sure if I lose anything with such an old glibc version, but if it works, I can support it. Since you have installed the rust toolchain and compiled locally in CentOS, this will be much easier for you to get working than me trying to figure it out. I think I will keep the MacOS and later Windows cross-compile from the current Dockerfile, but could use yours for wider linux support |
thank you for caring for centos7 users. what should I do for docker? |
Take a look at the current Dockerfile for a rough idea. You should start Then install rustup (and add nightly) inside the Docker image After that, you probably just want Minimum you need so that |
Feel free to use or ignore the build script, whatever is easier for you. You will want to add some other lines in the
If it works and doesn't break anything else, I can merge it and start a bit of cleanup if needed |
I created a dockerfile for centos7. |
and I tested it by building wasmd with static library in the centos-support branch. (libgo_cosmwasm.a)
works fine in centos7 ( with static lib) If you keep it as static lib, remove PR #35 (dockerfile for centos7) |
Thank you very much. I will review it today. |
Thank you, I merged #35 I will integrate this into the release build system and include support for CentOS 7 in the next tagged release |
wow~ thank you~ |
Preparing with CentOS7 support on 0.6 release (tomorrow): #42 Thanks for your help |
Use json.RawMessage to displays bytes nicer in json format
wasmd does not run on centos7.
This is because of the following reasons.
wasmd: /lib64/libc.so.6: version `GLIBC_2.18' not found (required by /home/user777/go/pkg/mod/github.com/confio/[email protected]/api/libgo_cosmwasm.so)
go-cosmwasm builds well on centos7.
libgo_cosmwasm.so file should support centos7.
The text was updated successfully, but these errors were encountered: