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

Multiply defined symbol errors in libuv.lib and openssl.lib because of node.lib #1656

Closed
DragonOsman opened this issue Dec 5, 2018 · 4 comments

Comments

@DragonOsman
Copy link

DragonOsman commented Dec 5, 2018

  • Node.js Version: v11.3.0
  • OS: Windows 10 Home
  • Scope (install, code, runtime, meta, other?): other (building)
  • Module (and version) (if relevant): N/A

I ran vcbuild with this command to generate project files: .\vcbuild release x64 noetw nobuild. Then I opened up Visual Studio, set the include file and library search paths--as well as changing the name of the input file to the linker to zlib.lib (and adding zlibstatic.lib in node.vcxproj)--in all the projects that have options for that, and then tried to build node_lib.vcxproj first which succeeded (I did this because the library files that were generated when I built zlib were zlib.lib and zlibstatic.lib; no z.lib). But building node.vcxproj failed with these errors:

38>libuv.lib(zlib.dll) : error LNK2005: �zlib_NULL_THUNK_DATA already defined in node.lib(zlib.dll)
38>libuv.lib(zlib.dll) : error LNK2005: __NULL_IMPORT_DESCRIPTOR already defined in node.lib(zlib.dll)
38>libuv.lib(zlib.dll) : error LNK2005: __IMPORT_DESCRIPTOR_zlib already defined in node.lib(zlib.dll)
38>openssl.lib(zlib.dll) : error LNK2005: �zlib_NULL_THUNK_DATA already defined in node.lib(zlib.dll)
38>openssl.lib(zlib.dll) : error LNK2005: __NULL_IMPORT_DESCRIPTOR already defined in node.lib(zlib.dll)
38>openssl.lib(zlib.dll) : error LNK2005: __IMPORT_DESCRIPTOR_zlib already defined in node.lib(zlib.dll)
38>C:\node\Release\node.exe : fatal error LNK1169: one or more multiply defined symbols found

And there's also this linker warning:

LIBCMT.lib(initializers.obj) : warning LNK4098: defaultlib 'msvcrt.lib' conflicts with use of other libs; use /NODEFAULTLIB:library

Someone please help me out here. Thanks in advance. [Note: I closed the other issues about this because they were either not needed anymore or I'd already partially solved them at least.]

@DragonOsman
Copy link
Author

I didn't put in the path to /Release/bin, so why is it seeing zlib.dll which is in that directory? I wonder if I should specify static when generating the project files?

@DragonOsman
Copy link
Author

I tried to build the other projects before the main node.vcxproj one. But node.vcxproj keeps failing with linker errors. I have the log file. Gist link: https://gist.github.com/DragonOsman/ea32bd66414064d5c390854ce3ac1db2 . The reason it's so long with so much info is because I chose the setting for the most detailed diagnostic in MSBuild. It gives you info on the whole build environment everything too, not just on the build information.

Anyway, I'd really like some help here.

@gireeshpunathil
Copy link
Member

ping @DragonOsman - is this still an issue for you?

@gireeshpunathil
Copy link
Member

inactive, closing

nodejs-github-bot pushed a commit to nodejs/node that referenced this issue Apr 3, 2024
PR-URL: #52181
Refs: nodejs/help#1656
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
marco-ippolito pushed a commit to nodejs/node that referenced this issue May 2, 2024
PR-URL: #52181
Refs: nodejs/help#1656
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
marco-ippolito pushed a commit to nodejs/node that referenced this issue May 3, 2024
PR-URL: #52181
Refs: nodejs/help#1656
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants