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

gcc 4.7 compile fails for 1.0.0 #432

Closed
donpdonp opened this issue Jan 15, 2015 · 10 comments
Closed

gcc 4.7 compile fails for 1.0.0 #432

donpdonp opened this issue Jan 15, 2015 · 10 comments

Comments

@donpdonp
Copy link

After a long build process for 1.0.0, it dies with

./src/tls_wrap.h:28:3: error: looser throw specifier for ‘virtual node::TLSCallbacks::~TLSCallbacks()’

Googling for that error brings up this chat
http://logs.nodejs.org/node-forward/2014-10-25

19:12:39    <seishun>   so I tried to build v0.12 on debian: ../src/tls_wrap.h:49:3: error: looser throw specifier for ‘virtual node::TLSCallbacks::~TLSCallbacks()’
19:12:44    <seishun>   is it just me?
20:32:48    <seishun>   which GCC version are we targeting? because it currently doesn't compile on GCC 4.7
20:33:42    <seishun>   indutny ^
20:34:48    <indutny>   it does for me

Sure enough, I'm using gcc version 4.7.3 (Gentoo 4.7.3-r1 p1.4, pie-0.5.5)

@rvagg
Copy link
Member

rvagg commented Jan 15, 2015

We can't support anything less than gcc 4.8, that boat has shipped unfortunately and was out of our control (v8 embraced C++11). You're either going to have to find a path to getting a newer version on your system or just use one of the binaries available in https://iojs.org/dist/latest/ as they should be portable.

@rvagg rvagg closed this as completed Jan 15, 2015
@donpdonp
Copy link
Author

Ok, I'm fine with upgrading gcc - I just didnt know that was the fix! A compiler check in the configure script or makefile would be helpful. Thanks.

@rvagg
Copy link
Member

rvagg commented Jan 15, 2015

agreed re compiler check, we should do that (I'm probably not the person to do it though), it is written on the README though

@bnoordhuis
Copy link
Member

A compiler check would be nice but it's complicated; the output of -v and --version doesn't have a fixed format and -dumpversion is useless with clang, it always prints 4.2.1.

@santigimeno
Copy link
Member

I've been able to make it build using gcc version 4.7.2 (Debian 4.7.2-5) by applying this change: https://github.com/santigimeno/io.js/commit/be9bf923e77c0fc321c25c67cb3342b33ea0b0a2
I am by no means a C++ expert and I don't know if it makes sense though.

@bnoordhuis
Copy link
Member

@santigimeno I'd be alright with taking that patch (just noexcept should work too, I think) but I'm not sure we should be encouraging people to use a compiler with known deficiencies. The build error is straightforward to fix but 4.7 may very well have other, more insidious bugs.

@santigimeno
Copy link
Member

@bnoordhuis The only thing that worries me is in the case there's not an easy way to upgrade to higher gcc versions in wheezy. I've tried to upgrade to gcc-4.9 from jessie and also tries to upgrade libc6 and I'm not sure I'm comfortable with that.

@bnoordhuis
Copy link
Member

I wouldn't be comfortable with that either, no. :-) If it helps, clang 3.5 built painlessly from source for me on wheezy; the only thing you need is patience, or lots of cores.

@jbergstroem
Copy link
Member

gcc 4.7 had only partial c++11 support; I'd avoid lowering requirements.

@santigimeno
Copy link
Member

Fair enough. I'll try to use clang instead. Thanks for the info!

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

5 participants