-
Notifications
You must be signed in to change notification settings - Fork 11
prebuilt release for gcc 4.8 #10
Comments
@kdy1 Can you send me (leto.zju#hotmail.com) an invitation of https://swc-org.slack.com/ ? |
@cyjake https://swc-slackin.herokuapp.com/ |
@cyjake Btw, please feel free to ping me on github or slack if you need any help using swc. |
@kdy1 I believe the linux environment that runs rustc is default to gcc 5.4 https://github.com/swc-project/node-swc/blob/master/.travis.yml#L76 hence make the linked binary demanding cxxabi_1.3.9 (which is the abi version provided by gcc 5) |
@cyjake I got it. I'll publish a new version asap. |
@cyjake I published v1.0.54. |
nope. I'll investigate |
@cyjake Although it's a rough guess, maybe an envrionment variable |
@kdy1 Yeah, I was composing a comment about the same suspect :-) |
@cyjake I configured Can you check it? I don't have a linux machine. Steps
https://github.com/swc-project/node-swc/releases/tag/v1.0.55 57 is for node@8, 64 is for node@10, 67 is for node@11 and 72 is for node@12.
|
@cyjake If you are busy, I can test it tomorrow. |
I tried with https://github.com/swc-project/node-swc/releases/download/v1.0.55/linux-x64-64.node > require('./lib/index')
Thrown:
Error: /root/foo/node-swc/native/index.node: invalid ELF header
at Object.Module._extensions..node (internal/modules/cjs/loader.js:807:18)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
> process.version
'v10.16.3'
|
> require('./lib/index')
Thrown:
Error: /lib64/libc.so.6: version `GLIBC_2.18' not found (required by /home/admin/node-swc/native/index.node)
at Object.Module._extensions..node (internal/modules/cjs/loader.js:807:18)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18) It works but out system uses glibc 2.17. Which version of gcc was used to compile, 4.8 or 4.9? |
I think gcc and glibc versions aren't that correlated https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Linux_compatibility_matrix It seems I have to provide a specific prebuilt package for our environment by myself. There're just too many gcc glibc versions to support if all of them needs to be supported by you. |
Oh.. It is much more complicated than I thought. I guess using musl-libc can solve the issue. Do you mind it? |
It could be. But preparing another package for our linux infrastructure is another pain (there's no musl package yet) I'd rather not go through. I've tried and succeeded to build node-swc on my local docker container with default gcc and glibc settings, hence I think I should go with a slightly forked mirror. |
Hmm.. Despite of the linux compatibility table, many linux binary work without any issue. (especially programs written in golang) Clearly, there's a way to support multiple glibc version with single binary. I'll investigate further when I go home. I don't have a linux machine now. And if possible, I want to avoid the situation where user rebuilt swc on their machine because building swc takes long time. |
Agree and much appreciated. It could still work If we can build with gcc 4.8 and glibc 2.17. I'm trying to find ways to accomplish that. |
@cyjake I've investigated, but I failed. I'll investigate further. I configured docker based build system on travis, so I can easily change version of the linked glibc. I guess you are using centos 7, right? I'll try it. Investigations(for who tries to do simillar thing)
Related: neon-bindings/neon#360 (comment)
Related: rust-lang/rust#57497. But linkage is weak, so we can build it with older version of glibc.
According to https://github.com/wangbj/rust-staticlib-linker, I can do it but it will crash because nodejs uses glibc, |
Great findings! yes we're using centos 7. |
Guess we can use travis docker service with the centos image from docker hub. |
There's prebuilt binaries built on centos 7. Can you test it? https://github.com/swc-project/node-swc/releases/tag/v1.0.55 I verified that it works with newer version of glibc (ubuntu 18.04, all updated). |
There's a validation script which successed to run on centos 7. Closing. |
I've published v1.0.55 |
@kdy1 It works perfectly both on my local docker container and our ci environment. Hooray! |
https://docs.travis-ci.com/user/languages/cpp/#gcc-on-linux
Is it ok to provide prebuilt release for linux environments that use gcc 4.8 as well? I've tested compiling node-swc on one of our linux box and it works as expected with gcc 4.8
cc @fengmk2
The text was updated successfully, but these errors were encountered: