Skip to content

cctest target build failed if configured with '--enable-static' #17991

Description

@liqyan
  • Version: master
  • Platform: linux
  • Subsystem: build

the cctest target build will fail if configured with --enable-static


./configure --enable-static
make

There're some function multiple definition errors such as:


out/Release/obj.target/node/src/node_crypto.o: In function `node::crypto::RandomBytesWork(uv_work_s*)':
node_crypto.cc:(.text+0x60): multiple definition of `node::crypto::RandomBytesWork(uv_work_s*)'
out/Release/obj.target/node/src/node_crypto.o:node_crypto.cc:(.text+0x60): first defined here

It's caused by repetition object files in cctest target 'libraries' and libnode.a.
cctest picks some object files from node target which is libnode.a actually if configured with '--enable-static' and add them to 'libraries'. Both 'libraries' and libnode.a are passed to linker, then errors occurred.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions