Skip to content

gcc 4.7 compile fails for 1.0.0 #432

Closed

Description

@donpdonp

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)

Activity

  1. rvagg commented on Jan 15, 2015

    @rvagg
    Member

    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.

  2. donpdonp commented on Jan 15, 2015

    @donpdonp
    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.

  3. rvagg commented on Jan 15, 2015

    @rvagg
    Member

    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

  4. bnoordhuis commented on Jan 15, 2015

    @bnoordhuis
    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.

  5. santigimeno commented on Jan 26, 2015

    @santigimeno
    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.

  6. bnoordhuis commented on Jan 26, 2015

    @bnoordhuis
    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.

  7. santigimeno commented on Jan 26, 2015

    @santigimeno
    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.

  8. bnoordhuis commented on Jan 26, 2015

    @bnoordhuis
    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.

  9. jbergstroem commented on Jan 27, 2015

    @jbergstroem
    Member

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

  10. santigimeno commented on Jan 27, 2015

    @santigimeno
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions