Skip to content

Build: "--fully-static" configure option is broken #41497

Description

@emerzon

Version

Affects all versions from 12.x to 17.3.1
The test below was done with 16.13.2.

Platform

Linux sagan-02 5.13.0-23-generic #23-Ubuntu SMP Fri Nov 26 11:41:15 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Subsystem

No response

What steps will reproduce the bug?

./configure --fully-static; make -j8

How often does it reproduce? Is there a required condition?

Always

What is the expected behavior?

No response

What do you see instead?

g++ -o /home/egomes/a/node-v16.13.2/out/Release/obj.target/libtest_crypto_engine.so -shared -pthread -rdynamic -m64  -Wl,-soname=libtest_crypto_engine.so -Wl,--whole-archive /home/egomes/a/node-v16.13.2/out/Release/obj.target/test_crypto_engine/test/fixtures/test_crypto_engine.o -Wl,--no-whole-archive -static
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/crtbeginT.o: relocation R_X86_64_32 against hidden symbol `__TMC_END__' can not be used when making a shared object
collect2: error: ld returned 1 exit status
make[1]: *** [test_crypto_engine.target.mk:123: /home/egomes/a/node-v16.13.2/out/Release/obj.target/libtest_crypto_engine.so] Error 1
make[1]: *** Waiting for unfinished jobs....
rm 9fc6b65b733c27999009f69898f8526185d4c971.intermediate
make: *** [Makefile:110: node] Error 2

Additional information

Somehow seems that the "-shared" flag gets out to the above line when it shouldn't.

Metadata

Metadata

Assignees

No one assigned

    Labels

    buildIssues and PRs related to Node.js builds or CI infrastructure.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions