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

build: Updates to enable AIX support #2364

Closed
wants to merge 1 commit into from

Conversation

mhdawson
Copy link
Member

These are the core changes that allow AIX to compile. There
are still some test failures as there are some patches needed for
libuv and npm that we'll need to contribute through those
communities but this set allows node to be built on AIX and
pass most of the core tests

The change in tools/js2c.py is because AIX does not support $ in
identifier names. See the discussion/agreement in
#2272

@mhdawson
Copy link
Member Author

@jbergstroem, FYI. I'm still working on getting an AIX machine that can be used in the build farm but these are the changes that allow AIX to compile/run.

@mhdawson mhdawson added the build Issues and PRs related to build files or the CI. label Aug 12, 2015
@jbergstroem
Copy link
Member

@mhdawson if possible, it'd be great if I could get access to that machine (when available) so I can review this PR.

@mhdawson
Copy link
Member Author

Unfortunately getting the machine is not that far along. Its more in the 1-2 month timeframe that I could see it becoming a reality so I don't want to block the PR on that. It is important to me to get these in so that our builds use as close as possible to the community source.

I can't give you access to the internal machines we have for building but I could set up a screen share where I've done builds and I could show you the builds and we could look into files that you are interested in looking at. If that works I'd like to set it up for early next week as I'm away on vacation the week after that.

'__LITTLE_ENDIAN=1234',
'__BIG_ENDIAN=4321',
'__BYTE_ORDER=__BIG_ENDIAN',
'__FLOAT_WORD_ORDER=__BIG_ENDIAN'],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What uses this? The only thing I can find in the source tree is openssl. Doesn't it make more sense to add it to openssl.gyp(i)?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like moving it to openssl.gyp works. Done.

@mhdawson
Copy link
Member Author

@ bnoordhuis first set of updates and a few questions added

@mhdawson
Copy link
Member Author

@ bnoordhuis I've updated to address all of the comments/discussion. With this patch Node will compile for AIX 32 bit although 64 bit won't due to the removal of the gyp part. Still a good first step I think as it will get it compiling on 32 bit.

I also opened an issue to get the gyp part upstreamed here: https://code.google.com/p/gyp/issues/detail?id=495&q=AIX

While doing this I found the IBM'r who originally added the AIX support in gyp so I'm hoping he can help get the updates accepted in a reasonable timeframe.

I'm heading out on vacation for a week so if there are any additional comments to address I won't respond until then. If it looks ok and there are approvals when I get back I'll squash and land.

matchup = {
'_ARCH_PPC' : 'ppc',
'_ARCH_PPC64' : 'ppc64',
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a no-op, isn't it? The second definition of matchup a few lines below overrides it again.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume you just mean the matchup part. Good point. Since I thought we needed those lines I it seemed like I'd gotten it right when I moved them from the original list (they were removed from earlier patches because alphabetizing had caused issues) . I'll validate that I can just remove them and AIX still builds ok.

@mhdawson
Copy link
Member Author

mhdawson commented Sep 2, 2015

FYI - pull request for gyp change - https://codereview.chromium.org/1319663007

@mhdawson
Copy link
Member Author

mhdawson commented Sep 2, 2015

@bnoordhuis confirmed that we don't need those lines and added commit to remove them.

@mhdawson
Copy link
Member Author

mhdawson commented Sep 5, 2015

I think this is ready to go, just waiting on a final l.g.t.m

@@ -310,7 +310,7 @@ def JS2C(source, target):
else:
ids.append((id, len(lines)))

escaped_id = id.replace('/', '$')
escaped_id = id.replace('/', '_')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's up with this?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I am not wrong this was discussed with @vkurchatkin before.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For posterity, it's mentioned in the commit log: sigils in identifiers are not supported on AIX.

@rvagg
Copy link
Member

rvagg commented Sep 5, 2015

I'm clearly not qualified to review most of it but that's because most of it is isolated to AIX specific blocks, aside from the /dev/stdin, js2c.py, ENOTEMPTY and SIGLOST changes it seems to be nicely separate. I'd like to hear more about the js2c change and the ENOTEMPTY & SIGLOST seem to make sense even if AIX wasn't the only one where those cases held.

So, lgtm pending feedback on js2c and also a CI run as we need to verify that everything else still works.

/cc @nodejs/build

@jbergstroem
Copy link
Member

I'm with @rvagg here. Problem also being I can't verify by running tests on an actual AIX platform.

@mhdawson
Copy link
Member Author

Yup the js2c change was discussed here #2272 as noted in the initial description.

I've run on AIX as well as pLinux and xLinux locally, and of course would run through CI job before landing. CI job started here: https://ci.nodejs.org/job/node-test-pull-request/277/. Will check results when I'm back in the office next week.

@mhdawson mhdawson self-assigned this Sep 10, 2015
@mhdawson
Copy link
Member Author

CI run was clean except for freebsd101-32 which was failing in the prior CI runs at the time (ie for CI runs for other PRs run around that time).

@rvagg do you have any other questions in respect to the js2c change ?

@@ -542,7 +546,10 @@ def is_arm_hard_float_abi():
def host_arch_cc():
"""Host architecture check using the CC command."""

k = cc_macros()
if sys.platform.startswith('aix'):
k = cc_macros('gcc')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a comment here explaining why it hard-codes gcc?

@bnoordhuis
Copy link
Member

LGTM with a request.

@mhdawson
Copy link
Member Author

Incorporated comments from bnoordhuis and revalidated in local build, just hoping for final ok from @rvagg

@rvagg
Copy link
Member

rvagg commented Sep 15, 2015

lgtm

These are the core changes that allow AIX to compile.  There
are still some test failures as there are some patches needed for
libuv and npm that we'll need to contribute through those
communities but this set allows node to be built on AIX and
pass most of the core tests

The change in js2c is because AIX does not support $ in
identifier names.  See the discussion/agreement in
nodejs#2272

PR-URL: nodejs#2364
Reviewed-By: Ben Noordhuis <ben@strongloop.com>
Reviewed-By: Rod Vagg <r@va.gg>
mhdawson added a commit that referenced this pull request Sep 15, 2015
These are the core changes that allow AIX to compile.  There
are still some test failures as there are some patches needed for
libuv and npm that we'll need to contribute through those
communities but this set allows node to be built on AIX and
pass most of the core tests

The change in js2c is because AIX does not support $ in
identifier names.  See the discussion/agreement in
#2272

PR-URL: #2364
Reviewed-By: Ben Noordhuis <ben@strongloop.com>
Reviewed-By: Rod Vagg <r@va.gg>
@Fishrock123
Copy link
Contributor

This is landable on 4.x, right?

@Fishrock123 Fishrock123 added the semver-minor PRs that contain new features and should be released in the next minor version. label Sep 15, 2015
@mhdawson
Copy link
Member Author

Landed as 2a17c7f

mhdawson added a commit that referenced this pull request Sep 15, 2015
These are the core changes that allow AIX to compile.  There
are still some test failures as there are some patches needed for
libuv and npm that we'll need to contribute through those
communities but this set allows node to be built on AIX and
pass most of the core tests

The change in js2c is because AIX does not support $ in
identifier names.  See the discussion/agreement in
#2272

PR-URL: #2364
Reviewed-By: Ben Noordhuis <ben@strongloop.com>
Reviewed-By: Rod Vagg <r@va.gg>
@Fishrock123 Fishrock123 mentioned this pull request Sep 15, 2015
7 tasks
@mhdawson
Copy link
Member Author

I want this to be landed on 4.X, should I put together a PR ?

@mhdawson
Copy link
Member Author

Landed in 4.x now so closing

@mhdawson mhdawson closed this Sep 17, 2015
@rvagg rvagg mentioned this pull request Sep 22, 2015
@mhdawson mhdawson deleted the aixchanges branch May 9, 2016 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Issues and PRs related to build files or the CI. semver-minor PRs that contain new features and should be released in the next minor version.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants