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

Using GCC 4.9 to build SmartOS binaries #628

Closed
misterdjules opened this issue Feb 19, 2017 · 6 comments
Closed

Using GCC 4.9 to build SmartOS binaries #628

misterdjules opened this issue Feb 19, 2017 · 6 comments

Comments

@misterdjules
Copy link
Contributor

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

@jbergstroem
Copy link
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?

@misterdjules
Copy link
Contributor Author

misterdjules commented Feb 21, 2017

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.

@chorrell
Copy link

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.

@Trott
Copy link
Member

Trott commented Feb 17, 2019

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?

@richardlau
Copy link
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

@sam-github
Copy link
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
Projects
None yet
Development

No branches or pull requests

6 participants