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

Nightlies don't work on RHEL 6.5 #17194

Closed
buster opened this issue Sep 12, 2014 · 17 comments
Closed

Nightlies don't work on RHEL 6.5 #17194

buster opened this issue Sep 12, 2014 · 17 comments

Comments

@buster
Copy link

buster commented Sep 12, 2014

With regards to #9545 :

Rust is not only not working on RHEL5, but looks like it's also not running on RHEL6:

-bash-4.1# ./install.sh 
install: looking for install programs
install: found mkdir
install: found printf
install: found cut
install: found grep
install: found uname
install: found tr
install: found sed
install: 
install: processing ./install.sh args
install: 
install: CFG_PREFIX           := /usr/local 
install: CFG_LIBDIR           := /usr/local/lib 
install: CFG_MANDIR           := /usr/local/share/man 
install: 
install: validating ./install.sh args
install: 
install: verifying platform can run binaries
/root/rust-nightly-x86_64-unknown-linux-gnu/bin/rustc: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by /root/rust-nightly-x86_64-unknown-linux-gnu/lib/librustc_llvm-4e7c5e5c.so)
install: error: can't execute rustc binary on this platform
@alexcrichton
Copy link
Member

This is actually the nightlies not working. The snapshots for linux are statically linked to libstdc++, while the nightlies are not.

@buster
Copy link
Author

buster commented Sep 12, 2014

Oops, sorry for the confusion. Yes, the nightlies.
Will Rust after 0.11 not support RHEL6?

@alexcrichton
Copy link
Member

Does RHEL6 support a C++11 compiler? If you install one, then rustc will likely work.

@buster
Copy link
Author

buster commented Sep 12, 2014

I don't know. I actually only want to run a rust compiled program on RHEL6, not rust itself.
But it looks like i'll need to compile it on RHEL6 for that because of GLIBC.
I actually do the coding on Debian.

@buster buster changed the title Snapshots don't work on RHEL 6.5 Nightlies don't work on RHEL 6.5 Sep 12, 2014
@alexcrichton
Copy link
Member

In general rust programs themselves run almost wherever, but it'll likely be hindered by a newer libc if you're linking locally against one.

@buster
Copy link
Author

buster commented Sep 12, 2014

So, how would i get my rust program working on RHEL6 then?
Is it possible to link against an older one or something like that? :)

@alexcrichton
Copy link
Member

I would first try to compile the program and then run it on RHEL6 and see if an error happens, it's likely that it'll just work.

@buster
Copy link
Author

buster commented Sep 12, 2014

Unfortunately not:
/lib64/libc.so.6: version GLIBC_2.14' not found`

@alexcrichton
Copy link
Member

In that case you'll need to find a system with an older libc and compile on that system, or possibly find an older libc to compile against on the system where you're compiling

@buster
Copy link
Author

buster commented Sep 12, 2014

I'll try to get rust compiled in a Centos 6.5 vagrant image and hope that works, then..
I hope that the compiler releases won't have such limitations since my work primarily still is on RHEL5 (starting to get to 6, but i won't see a RHEL7 for the next ~2 years)...

@buster
Copy link
Author

buster commented Sep 12, 2014

So, installing g++ 4.7 on CentOS6.5 let me build rustc and compile the program... Thanks!

@brson
Copy link
Contributor

brson commented Sep 12, 2014

Nominating since we need to be able to support RHEL 6.

@alexcrichton
Copy link
Member

Nightlies are now built on CentOS 5.10 and statically link libstdc++, can you confirm that the binaries work for you now?

@buster
Copy link
Author

buster commented Sep 17, 2014

Do i need to wait for the nightlies download?
I get another error now, though:

-bash-4.1# ./install.sh 
install: looking for install programs
install: found mkdir
install: found printf
install: found cut
install: found grep
install: found uname
install: found tr
install: found sed
install: 
install: processing ./install.sh args
install: 
install: CFG_PREFIX           := /usr/local 
install: CFG_LIBDIR           := /usr/local/lib 
install: CFG_MANDIR           := /usr/local/share/man 
install: 
install: validating ./install.sh args
install: 
install: verifying platform can run binaries
/root/rust-nightly-x86_64-unknown-linux-gnu/bin/rustc: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by /root/rust-nightly-x86_64-unknown-linux-gnu/lib/librustc_llvm-4e7c5e5c.so)
install: error: can't execute rustc binary on this platform
-bash-4.1# ldd /root/rust-nightly-x86_64-unknown-linux-gnu/lib/librustc_llvm-4e7c5e5c.so
ldd: warning: you do not have execution permission for `/root/rust-nightly-x86_64-unknown-linux-gnu/lib/librustc_llvm-4e7c5e5c.so'
/root/rust-nightly-x86_64-unknown-linux-gnu/lib/librustc_llvm-4e7c5e5c.so: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by /root/rust-nightly-x86_64-unknown-linux-gnu/lib/librustc_llvm-4e7c5e5c.so)
        linux-vdso.so.1 =>  (0x00007fff0d3fe000)
        librustrt-4e7c5e5c.so => not found
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f7c32141000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007f7c31f3d000)
        libm.so.6 => /lib64/libm.so.6 (0x00007f7c31cb9000)
        libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007f7c319b2000)
        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f7c3179c000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f7c31408000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f7c342a5000)
-bash-4.1# cat /etc/redhat-release 
CentOS release 6.5 (Final)
-bash-4.1# strings /usr/lib64/libstdc++.so.6 | grep GLIBC
GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBCXX_3.4.9
GLIBCXX_3.4.10
GLIBCXX_3.4.11
GLIBCXX_3.4.12
GLIBCXX_3.4.13
GLIBC_2.2.5
GLIBC_2.3
GLIBC_2.4
GLIBC_2.3.2
GLIBCXX_FORCE_NEW
GLIBCXX_DEBUG_MESSAGE_LENGTH

@alexcrichton
Copy link
Member

There can be some syncing problems with cloudfare and S3, you'll want to download from the host static-rust-lang-org.s3.amazonaws.com and rustc -v should print:

rustc 0.12.0-pre-nightly (0e784e168 2014-09-16 23:26:11 +0000)

@buster
Copy link
Author

buster commented Sep 17, 2014

I can confirm that installing and running the nigthly rustc on CentOS 6.5 does work.
The resulting binary was running on another RHEL6 system just fine.

Thanks!

@alexcrichton
Copy link
Member

Awesome, thanks for verifying!

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

3 participants