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

deps,build,tools: fix openssl-is-fips for ninja builds #40518

Closed
wants to merge 3 commits into from

Conversation

danbev
Copy link
Contributor

@danbev danbev commented Oct 19, 2021

Currently using the --openssl-is-fips configuration option in
combination with --ninja is broken.

This commit fixes two issues, one being an issue with the linker/version
script path variable. The second is that the locations of built
artifacts that differ for ninja and make.

ninja:

$ ./configure --openssl-is-fips --ninja
$ ninja -C out/Release
$ ./node --enable-fips -p 'crypto.getFips()'
1

make:

$ ./configure --openssl-is-fips
$ make -j8
$ ./node --enable-fips -p 'crypto.getFips()'
1

Refs: #40509

Currently using the --openssl-is-fips configuration option in
combination with --ninja is broken.

This commit fixes two issues, one being an issue with the linker/version
script path variable. The second is that the locations of built
artifacts that differ for ninja and make.

ninja:
$ ./configure --openssl-is-fips --ninja
$ ninja -C out/Release
$ ./node --enable-fips -p 'crypto.getFips()'
1

make:
$ ./configure --openssl-is-fips
$ make -j8
$ ./node --enable-fips -p 'crypto.getFips()'
1

Refs: nodejs#40509
@nodejs-github-bot nodejs-github-bot added build Issues and PRs related to build files or the CI. needs-ci PRs that need a full CI run. openssl Issues and PRs related to the OpenSSL dependency. labels Oct 19, 2021
@targos
Copy link
Member

targos commented Oct 19, 2021

Note that this fixes the path issue seen in #40421, but the macro-redefined warning is still emitted:

In file included from <built-in>:391:
<command line>:26:9: warning: 'OPENSSLDIR' macro redefined [-Wmacro-redefined]
#define OPENSSLDIR "/System/Library/OpenSSL/"
        ^
<command line>:25:9: note: previous definition is here
#define OPENSSLDIR "/Users/targos/git/nodejs/node/out/Release/obj.target/deps/openssl"
        ^
1 warning generated.

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@danbev danbev added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Oct 20, 2021
@bnb
Copy link
Contributor

bnb commented Oct 20, 2021

non-contributor +1, running into this trying to build Node.js in a Docker image :)

danbev added a commit that referenced this pull request Oct 21, 2021
Currently using the --openssl-is-fips configuration option in
combination with --ninja is broken.

This commit fixes two issues, one being an issue with the linker/version
script path variable. The second is that the locations of built
artifacts that differ for ninja and make.

ninja:
$ ./configure --openssl-is-fips --ninja
$ ninja -C out/Release
$ ./node --enable-fips -p 'crypto.getFips()'
1

make:
$ ./configure --openssl-is-fips
$ make -j8
$ ./node --enable-fips -p 'crypto.getFips()'
1

PR-URL: #40518
Refs: #40509
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
danbev added a commit that referenced this pull request Oct 21, 2021
PR-URL: #40518
Refs: #40509
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
danbev added a commit that referenced this pull request Oct 21, 2021
PR-URL: #40518
Refs: #40509
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
@danbev
Copy link
Contributor Author

danbev commented Oct 21, 2021

Landed in f4bd91b, a16c34e, and f233cb2.

@danbev danbev closed this Oct 21, 2021
@danbev danbev deleted the ninja-fips branch October 21, 2021 02:37
targos pushed a commit that referenced this pull request Oct 23, 2021
Currently using the --openssl-is-fips configuration option in
combination with --ninja is broken.

This commit fixes two issues, one being an issue with the linker/version
script path variable. The second is that the locations of built
artifacts that differ for ninja and make.

ninja:
$ ./configure --openssl-is-fips --ninja
$ ninja -C out/Release
$ ./node --enable-fips -p 'crypto.getFips()'
1

make:
$ ./configure --openssl-is-fips
$ make -j8
$ ./node --enable-fips -p 'crypto.getFips()'
1

PR-URL: #40518
Refs: #40509
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
targos pushed a commit that referenced this pull request Oct 23, 2021
PR-URL: #40518
Refs: #40509
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
targos pushed a commit that referenced this pull request Oct 23, 2021
PR-URL: #40518
Refs: #40509
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
@targos targos mentioned this pull request Nov 8, 2021
'out', default_variables['build_type']))
else:
default_variables.setdefault("PRODUCT_DIR_ABS", os.path.join(output_dir,
default_variables['build_type']))
Copy link
Member

Choose a reason for hiding this comment

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

@danbev should this sticks to CONFIGURATION_NAME, I run into some problems when directly run this files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. build Issues and PRs related to build files or the CI. needs-ci PRs that need a full CI run. openssl Issues and PRs related to the OpenSSL dependency.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants