镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Using GCC 4.9 to build SmartOS binaries #628

Closed

Description

@misterdjules

Ref: nodejs/node#11444.

Currently, it seems node binaries are built with GCC 4.8 on SmartOS. If I remember correctly, we had chosen GCC 4.8 because we wanted to target the oldest possible compiler. However it seems it would make sense to move to GCC 4.9 as per @jperkin's comment:

GCC 4.8 is not recommended on SmartOS, it has never been the default compiler so has not been well tested, and does not have our fixes and patches. GCC 4.9 is a much better choice.

Since both SmartOS 15.x and 16.x images include GCC 4.9 preinstalled, and 14.x images use a pkgsrc repository that contains GCC 4.9 (but not preinstalled), it shouldn't be a problem for users of SmartOS.

It could probably break ABI compatibility though for users of native node modules built with GCC 4.8 if they moved to a version of node that was built with GCC 4.9, so I would suggest making that change with the next major version at the earliest.

/cc @nodejs/build

Activity

  1. jbergstroem commented on Feb 20, 2017

    @jbergstroem
    Member

    @misterdjules we changed the logic for what smartos version builds what node version recently. It seems that the user is trying to use a toolchain version we're not "supporting" (our official support table is yet to be merged). How about we skip 6.x altogether for smartos14 then?

  2. misterdjules commented on Feb 21, 2017

    @misterdjules
    ContributorAuthor

    Building node binaries with GCC 4.8 won't be supported out of the box (i.e without installing any additional package from pkgsrc) on any SmartOS image. This was an oversight from me, and due to miscommunication between myself and the team building SmartOS images and packages.

    However, I'm not sure moving from GCC 4.8 to GCC 4.9 is an option within a given major version number due to potential ABI compatibility issues, which is why I was suggesting to move to GCC 4.9 for node >= v8.x.

    This is a summary of my understanding of the current situation on SmartOS:

    Node.js building requirements on SmartOS

    Node version SmartOS image Compiler Notes
    >= v4.x <= master >= 14.x GCC 4.9 The v7.x branch still builds on SmartOS 14.x images because nodejs/node#11029 floated a patch that fixes compilation on these images.
    master >= 15.x GCC 4.9 the master branch relies on a GCC bugfix that hasn't backported to the pkgsrc repository that comes with SmartOS 14.x images

    Node.js runtime requirements for SmartOS

    Node version SmartOS image Notes
    >= 0.10.x >= 1.7.0 SmartOS images >= 1.7.0 < 14.4.0 are not supported though, so one should really use images >= 14.4.2
    >= v4.x <= v8.x >= image version used to build node binaries (is it 14.x?) and < 16.4.x The gcc4.8-libs package needs to be installed, because node binaries have been built with GCC 4.8, for which runtime libraries are not installed by default. For these node versions, the recommended binaries are the ones available in pkgsrc, not the one available from nodejs.org. Note that the binaries downloaded from the pkgsrc repositories are not officially supported by the Node.js project, and instead are supported by Joyent. SmartOS images >= 16.4 are not supported because GCC 4.8 runtime libraries are not available in their pkgsrc repository
    >= v8.x >= 15.4.0 node binaries should be built with a GCC 4.9 that includes fixes that haven't been backported to 14.x images

    @jbergstroem Does the above look correct? Also, on what SmartOS images are node binaries for versions >= v4.x and <= v8.x currently built? That would determine the minimum SmartOS image version required to run those (with the caveat of needing to install GCC 4.8 runtime libraries, as noted in the table above).

    Also pinging @jperkin for feedback.

  3. chorrell commented on Mar 20, 2017

    @chorrell

    Looks good!

    I think it might be useful to add the SmartOS image type (e.g., base-64-lts or base-32-lts) as well as the image version (e.g., 15.4.x). I think it would also be good to spell out the pkgsrc release version the given image version corresponds to. So for example:

    Node version SmartOS image pkgsrc release Compiler Notes
    >= v4.x <= master >= base-64-lts 14.4.x 2014Q4 GCC 4.9 The v7.x branch still builds on SmartOS 14.x images because nodejs/node#11029 floated a patch that fixes compilation on these images.
    master >= base-64-lts 15.4.x 2015Q4 GCC 4.9 the master branch relies on a GCC bugfix that hasn't backported to the pkgsrc repository that comes with SmartOS 14.x images

    For the image type, I'm assuming 64-bit pkgsrc (base-64-lts) is what is required. Also, for image and pkgsrc versions I would generally recommend sticking with the Q4 (14.4.x, 15.4.x, 16.4.x etc) release since those are our LTS releases.

  4. Trott commented on Feb 17, 2019

    @Trott
    Member

    AFAIK, two years later, we're still using GCC 4.8. Or at least that's what we say in https://github.com/nodejs/node/blob/master/BUILDING.md#supported-platforms-1. Is that correct? And if so, should we do something to change it?

  5. richardlau commented on Feb 17, 2019

    @richardlau
    Member

    AFAIK, two years later, we're still using GCC 4.8. Or at least that's what we say in https://github.com/nodejs/node/blob/master/BUILDING.md#supported-platforms-1. Is that correct? And if so, should we do something to change it?

    nodejs/node#25684

  6. sam-github commented on Jan 28, 2020

    @sam-github
    Contributor

    Closing as stale, but if anyone wants to take this up feel free to reopen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions