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: require --openssl-no-asm if no suitable assemble on x86_64 and ia32 #20226

Closed
wants to merge 6 commits into from

Conversation

shigeki
Copy link
Contributor

@shigeki shigeki commented Apr 23, 2018

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • [] tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

This is a copy of #20217 (review) and add an additional commit to limit assembler check only on x86_64 and ia32 and BUILDING.md updates.

I submit a new PR with fast-track for only 5 hours left to land semver-major on Node-v10.0.0 until PST noon as described in #20217 (comment).

Fixes: #19944
Refs: #20217

@rvagg @mhdawson @danbev @jasnell @bnoordhuis @nodejs/build @nodejs/tsc

rvagg and others added 3 commits April 23, 2018 23:25
The current openssl checks assembler version only x86_64 or ia32
target arch for use of AES-NI, AVX and AVX2.
This requires --openssl-no-asm option during configure when an older
assembler version is found only on x86_64 or ia32.
@shigeki shigeki added semver-major PRs that contain breaking changes and should be released in the next major version. build Issues and PRs related to build files or the CI. openssl Issues and PRs related to the OpenSSL dependency. fast-track PRs that do not need to wait for 48 hours to land. labels Apr 23, 2018
@nodejs-github-bot nodejs-github-bot added build Issues and PRs related to build files or the CI. doc Issues and PRs related to the documentations. labels Apr 23, 2018
@shigeki
Copy link
Contributor Author

shigeki commented Apr 23, 2018

BUILDING.md Outdated

* gas (GNU assembler) version 2.23 or higher
* xcode version 5.0 or higher
* llvm version 3.3 or higher
* nasm version 2.10 or higher in Windows

Otherwise, `--openssl-no-asm` is added with warning in configure.
Otherwise, configure is failed. Install one or build with --openssl-no-asm.
Copy link
Contributor

@vsemozhetbyt vsemozhetbyt Apr 23, 2018

Choose a reason for hiding this comment

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

configure -> `configure`?
--openssl-no-asm -> `--openssl-no-asm`?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@vsemozhetbyt Thanks and very sorry for I often missed backquotes. Fixed in 0388dbd.

Copy link
Contributor

Choose a reason for hiding this comment

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

It is OK, cryptography domain is complicated enough to not also track all the doc nits)

Copy link
Contributor

Choose a reason for hiding this comment

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

minor nit: 'Otherwise configure will fail with an error. This can be avoided by either providing a new enough assembler as per the list above or by using the --openssl-no-asm flag.'

@jasnell
Copy link
Member

jasnell commented Apr 23, 2018

@nodejs/tsc ... need eyes on this today. It needs to land by noon pacific if it's going to make it in to 10.0.0

@rvagg @shigeki ... can you summarize a bit why this needs to be fast tracked? Why is is critical this gets into 10.0.0?

@shigeki
Copy link
Contributor Author

shigeki commented Apr 23, 2018

can you summarize a bit why this needs to be fast tracked? Why is is critical this gets into 10.0.0?

This is my summary.

The main behaviour change here is to fail ./configure if you don't have an assembler new enough, which forces you to supply --openssl-no-asm rather than doing it implicitly. The cost of no-asm is that you get binaries that are potentially a lot slower, it's not something you should walk blindly in to. Discussion around this is primarily in #19944

  • I'm not sure how much user are affected this. I think we can save them with adding some fallbacks after 10.0.0 release if users require it but this semver-major change can be landed only at this time of Node-v10.0.0.

@vsemozhetbyt
Copy link
Contributor

Copy link
Contributor

@ofrobots ofrobots left a comment

Choose a reason for hiding this comment

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

It is indeed debatable if this is semver major. Fine to get into 10.0.0 IMO.

BUILDING.md Outdated

* gas (GNU assembler) version 2.23 or higher
* xcode version 5.0 or higher
* llvm version 3.3 or higher
* nasm version 2.10 or higher in Windows

Otherwise, `--openssl-no-asm` is added with warning in configure.
Otherwise, configure is failed. Install one or build with --openssl-no-asm.
Copy link
Contributor

Choose a reason for hiding this comment

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

minor nit: 'Otherwise configure will fail with an error. This can be avoided by either providing a new enough assembler as per the list above or by using the --openssl-no-asm flag.'

@shigeki
Copy link
Contributor Author

shigeki commented Apr 23, 2018

@ofrobots I follow your comment to the doc for I'm not native English speaker. Fixed in e885c42. Thanks.

Copy link
Contributor

@MylesBorins MylesBorins left a comment

Choose a reason for hiding this comment

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

LGTM. This only touches the compilation tool chain and ensures that people are not going to be broken when building.

I think this should be Semver-Patch imho. The breaking change was in the OpenSSL upgrade, this is a bugfix

BUILDING.md Outdated

* gas (GNU assembler) version 2.23 or higher
* xcode version 5.0 or higher
* llvm version 3.3 or higher
* nasm version 2.10 or higher in Windows

Otherwise, `--openssl-no-asm` is added with warning in configure.
Otherwise `configure` will fail with an error. This can be avoided by
either providing a new enough assembler as per the list above or by
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: s/new enough assembler/a newer

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 36becf8. Thanks.

sys.exit()
Please make sure you have a C compiler installed on your system and/or
consider adjusting the CC environment variable if you installed
it in a non-standard prefix.''')
Copy link
Contributor

Choose a reason for hiding this comment

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

did we want to remove the sys.exit() here

sys.exit()
Please make sure you have a C compiler installed on your system and/or
consider adjusting the CC environment variable if you installed
it in a non-standard prefix.''')
Copy link
Contributor

Choose a reason for hiding this comment

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

same as above re: sys.exit

sys.exit()
Please make sure you have a C compiler installed on your system and/or
consider adjusting the CC environment variable if you installed
it in a non-standard prefix.''')
Copy link
Contributor

Choose a reason for hiding this comment

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

same here re: sys.exit()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@MylesBorins This is in def error(msg) and sys.exit(1) is included in it.

Copy link
Contributor

Choose a reason for hiding this comment

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

thanks for explaining 😄

@shigeki shigeki removed the semver-major PRs that contain breaking changes and should be released in the next major version. label Apr 23, 2018
@shigeki
Copy link
Contributor Author

shigeki commented Apr 23, 2018

I removed semver-major tag to follow the comments.

@jasnell
Copy link
Member

jasnell commented Apr 23, 2018

@shigeki
Copy link
Contributor Author

shigeki commented Apr 23, 2018

Oops, I did it https://ci.nodejs.org/job/node-test-pull-request/14453/ and just cancelled it.

@jasnell
Copy link
Member

jasnell commented Apr 23, 2018

There was some red on linux... appears to be a flaky test, trying again https://ci.nodejs.org/job/node-test-commit-linux/18222/

@jasnell
Copy link
Member

jasnell commented Apr 23, 2018

Ok, things look good between the two CI runs. There are still a couple running on one but they passed on the others and the red that is remaining is known. Will be landing this and will be doing another CI run on 10.0.0 just to make certain.

@shigeki
Copy link
Contributor Author

shigeki commented Apr 23, 2018

Yes. The failures on alpine linux are due to its timezone problem and I think it is nothing to do with this PR.

jasnell pushed a commit that referenced this pull request Apr 23, 2018
PR-URL: #20226
Fixes: #19944
Refs: #20217
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
jasnell pushed a commit that referenced this pull request Apr 23, 2018
PR-URL: #20226
Fixes: #19944
Refs: #20217
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
jasnell pushed a commit that referenced this pull request Apr 23, 2018
The current openssl checks assembler version only x86_64 or ia32
target arch for use of AES-NI, AVX and AVX2.
This requires --openssl-no-asm option during configure when an older
assembler version is found only on x86_64 or ia32.

PR-URL: #20226
Fixes: #19944
Refs: #20217
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
jasnell pushed a commit that referenced this pull request Apr 23, 2018
PR-URL: #20226
Fixes: #19944
Refs: #20217
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
jasnell pushed a commit that referenced this pull request Apr 23, 2018
PR-URL: #20226
Fixes: #19944
Refs: #20217
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
jasnell pushed a commit that referenced this pull request Apr 23, 2018
The current openssl checks assembler version only x86_64 or ia32
target arch for use of AES-NI, AVX and AVX2.
This requires --openssl-no-asm option during configure when an older
assembler version is found only on x86_64 or ia32.

PR-URL: #20226
Fixes: #19944
Refs: #20217
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
@jasnell
Copy link
Member

jasnell commented Apr 23, 2018

Landed in 65db8c7, de968999, and 3bcd857

@jasnell jasnell closed this Apr 23, 2018
@shigeki
Copy link
Contributor Author

shigeki commented Apr 23, 2018

Thanks. Happy release of Node-v10.0.0!

@rvagg
Copy link
Member

rvagg commented Apr 23, 2018

thanks @shigeki! sometimes I wonder if you even sleep.

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. doc Issues and PRs related to the documentations. fast-track PRs that do not need to wait for 48 hours to land. openssl Issues and PRs related to the OpenSSL dependency.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Require openssl-no-asm option explicitly if older assembler version is found.
9 participants