[Monetdb-developers] libxml2 LINK error on win64.
Hi, I am trying to build on windows 2003 x64, and was able to build a few prerequisites, however, libxml2 is not linking due to this error: nanohttp.obj : error LNK2019: unresolved external symbol __imp_freeaddrinfo referenced in function xmlNanoHTTPConnectHost nanohttp.obj : error LNK2019: unresolved external symbol __imp_getaddrinfo referenced in function xmlNanoHTTPConnectHost bin.msvc\libxml2.dll : fatal error LNK1120: 2 unresolved externals NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\amd64\link.exe"' : return code '0x460' Stop. I am enclosing the output of /verbose:lib Microsoft (R) Program Maintenance Utility Version 9.00.21022.08 Copyright (C) Microsoft Corporation. All rights reserved. link.exe /nologo /VERBOSE:lib /VERSION:2.6 /LIBPATH:bin.msvc /LIBPATH:C:\libxml2-2.6.30.win64\lib /LIBPATH:"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\ATLMFC\LIB\amd64" /OPT:NOWIN98 /DLL /IMPLIB:bin.msvc\libxml2.lib /OUT:bin.msvc\libxml2.dll int.msvc\c14n.obj int.msvc\catalog.obj int.msvc\chvalid.obj int.msvc\debugXML.obj int.msvc\dict.obj int.msvc\DOCBparser.obj int.msvc\encoding.obj int.msvc\entities.obj int.msvc\error.obj int.msvc\globals.obj int.msvc\hash.obj int.msvc\HTMLparser.obj int.msvc\HTMLtree.obj int.msvc\legacy.obj int.msvc\list.obj int.msvc\nanoftp.obj int.msvc\nanohttp.obj int.msvc\parser.obj int.msvc\parserInternals.obj int.msvc\pattern.obj int.msvc\relaxng.obj int.msvc\SAX2.obj int.msvc\SAX.obj int.msvc\schematron.obj int.msvc\threads.obj int.msvc\tree.obj int.msvc\uri.obj int.msvc\valid.obj int.msvc\xinclude.obj int.msvc\xlink.obj int.msvc\xmlIO.obj int.msvc\xmlmemory.obj int.msvc\xmlreader.obj int.msvc\xmlregexp.obj int.msvc\xmlmodule.obj int.msvc\xmlsave.obj int.msvc\xmlschemas.obj int.msvc\xmlschemastypes.obj int.msvc\xmlunicode.obj int.msvc\xmlwriter.obj int.msvc\xpath.obj int.msvc\xpointer.obj int.msvc\xmlstring.obj wsock32.lib iconv.lib zlib1.lib kernel32.lib LINK : warning LNK4224: /OPT:NOWIN98 is no longer supported; ignored Searching libraries Searching C:\Program Files\\Microsoft SDKs\Windows\v6.0A\lib\x64\wsock32.lib: Searching C:\iconv-1.11.win64\lib\iconv.lib: Searching C:\zlib-1.2.3.win64\lib\zlib1.lib: Searching C:\Program Files\\Microsoft SDKs\Windows\v6.0A\lib\x64\kernel32.lib: Searching C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\LIB\amd64\MSVCRT.lib: Searching C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\LIB\amd64\OLDNAMES.lib: Searching C:\Program Files\\Microsoft SDKs\Windows\v6.0A\lib\x64\uuid.lib: Searching C:\Program Files\\Microsoft SDKs\Windows\v6.0A\lib\x64\wsock32.lib: Searching C:\iconv-1.11.win64\lib\iconv.lib: Searching C:\zlib-1.2.3.win64\lib\zlib1.lib: Searching C:\Program Files\\Microsoft SDKs\Windows\v6.0A\lib\x64\kernel32.lib: Searching C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\LIB\amd64\MSVCRT.lib: Finished searching libraries Creating library bin.msvc\libxml2.lib and object bin.msvc\libxml2.exp Searching libraries Searching C:\Program Files\\Microsoft SDKs\Windows\v6.0A\lib\x64\wsock32.lib: Searching C:\iconv-1.11.win64\lib\iconv.lib: Searching C:\zlib-1.2.3.win64\lib\zlib1.lib: Searching C:\Program Files\\Microsoft SDKs\Windows\v6.0A\lib\x64\kernel32.lib: Searching C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\LIB\amd64\MSVCRT.lib: Searching C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\LIB\amd64\OLDNAMES.lib: Searching C:\Program Files\\Microsoft SDKs\Windows\v6.0A\lib\x64\uuid.lib: Finished searching libraries nanohttp.obj : error LNK2019: unresolved external symbol __imp_freeaddrinfo referenced in function xmlNanoHTTPConnectHost nanohttp.obj : error LNK2019: unresolved external symbol __imp_getaddrinfo referenced in function xmlNanoHTTPConnectHost bin.msvc\libxml2.dll : fatal error LNK1120: 2 unresolved externals NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\amd64\link.exe"' : return code '0x460' Stop. Any advice on how to address this would be appreciated! -- View this message in context: http://www.nabble.com/libxml2-LINK-error-on-win64.-tp15673701p15673701.html Sent from the monetdb-developers mailing list archive at Nabble.com.
mobigital1 wrote:
Hi,
I am trying to build on windows 2003 x64, and was able to build a few prerequisites, however, libxml2 is not linking due to this error:
nanohttp.obj : error LNK2019: unresolved external symbol __imp_freeaddrinfo referenced in function xmlNanoHTTPConnectHost nanohttp.obj : error LNK2019: unresolved external symbol __imp_getaddrinfo referenced in function xmlNanoHTTPConnectHost bin.msvc\libxml2.dll : fatal error LNK1120: 2 unresolved externals NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\amd64\link.exe"' : return code '0x460' Stop.
I am enclosing the output of /verbose:lib
Microsoft (R) Program Maintenance Utility Version 9.00.21022.08 Copyright (C) Microsoft Corporation. All rights reserved.
link.exe /nologo /VERBOSE:lib /VERSION:2.6 /LIBPATH:bin.msvc /LIBPATH:C:\libxml2-2.6.30.win64\lib /LIBPATH:"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\ATLMFC\LIB\amd64" /OPT:NOWIN98 /DLL /IMPLIB:bin.msvc\libxml2.lib /OUT:bin.msvc\libxml2.dll int.msvc\c14n.obj int.msvc\catalog.obj int.msvc\chvalid.obj int.msvc\debugXML.obj int.msvc\dict.obj int.msvc\DOCBparser.obj int.msvc\encoding.obj int.msvc\entities.obj int.msvc\error.obj int.msvc\globals.obj int.msvc\hash.obj int.msvc\HTMLparser.obj int.msvc\HTMLtree.obj int.msvc\legacy.obj int.msvc\list.obj int.msvc\nanoftp.obj int.msvc\nanohttp.obj int.msvc\parser.obj int.msvc\parserInternals.obj int.msvc\pattern.obj int.msvc\relaxng.obj int.msvc\SAX2.obj int.msvc\SAX.obj int.msvc\schematron.obj int.msvc\threads.obj int.msvc\tree.obj int.msvc\uri.obj int.msvc\valid.obj int.msvc\xinclude.obj int.msvc\xlink.obj int.msvc\xmlIO.obj int.msvc\xmlmemory.obj int.msvc\xmlreader.obj int.msvc\xmlregexp.obj int.msvc\xmlmodule.obj int.msvc\xmlsave.obj int.msvc\xmlschemas.obj int.msvc\xmlschemastypes.obj int.msvc\xmlunicode.obj int.msvc\xmlwriter.obj int.msvc\xpath.obj int.msvc\xpointer.obj int.msvc\xmlstring.obj wsock32.lib iconv.lib zlib1.lib kernel32.lib LINK : warning LNK4224: /OPT:NOWIN98 is no longer supported; ignored
Searching libraries Searching C:\Program Files\\Microsoft SDKs\Windows\v6.0A\lib\x64\wsock32.lib: Searching C:\iconv-1.11.win64\lib\iconv.lib: Searching C:\zlib-1.2.3.win64\lib\zlib1.lib: Searching C:\Program Files\\Microsoft SDKs\Windows\v6.0A\lib\x64\kernel32.lib: Searching C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\LIB\amd64\MSVCRT.lib: Searching C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\LIB\amd64\OLDNAMES.lib: Searching C:\Program Files\\Microsoft SDKs\Windows\v6.0A\lib\x64\uuid.lib: Searching C:\Program Files\\Microsoft SDKs\Windows\v6.0A\lib\x64\wsock32.lib: Searching C:\iconv-1.11.win64\lib\iconv.lib: Searching C:\zlib-1.2.3.win64\lib\zlib1.lib: Searching C:\Program Files\\Microsoft SDKs\Windows\v6.0A\lib\x64\kernel32.lib: Searching C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\LIB\amd64\MSVCRT.lib:
Finished searching libraries Creating library bin.msvc\libxml2.lib and object bin.msvc\libxml2.exp
Searching libraries Searching C:\Program Files\\Microsoft SDKs\Windows\v6.0A\lib\x64\wsock32.lib: Searching C:\iconv-1.11.win64\lib\iconv.lib: Searching C:\zlib-1.2.3.win64\lib\zlib1.lib: Searching C:\Program Files\\Microsoft SDKs\Windows\v6.0A\lib\x64\kernel32.lib: Searching C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\LIB\amd64\MSVCRT.lib: Searching C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\LIB\amd64\OLDNAMES.lib: Searching C:\Program Files\\Microsoft SDKs\Windows\v6.0A\lib\x64\uuid.lib:
Finished searching libraries nanohttp.obj : error LNK2019: unresolved external symbol __imp_freeaddrinfo referenced in function xmlNanoHTTPConnectHost nanohttp.obj : error LNK2019: unresolved external symbol __imp_getaddrinfo referenced in function xmlNanoHTTPConnectHost bin.msvc\libxml2.dll : fatal error LNK1120: 2 unresolved externals NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\amd64\link.exe"' : return code '0x460' Stop.
Any advice on how to address this would be appreciated!
The functions the linker complains about are freeaddrinfo and getaddrinfo. These functions are only used in sections inside #ifdef SUPPORT_IP6/#endif. So it seems you have the symbol SUPPORT_IP6 defined somewhere. You need to find out where that is defined. My guess would be: the file config.h. One possibility might be that you used the same sources on a non-Windows system where the file config.h was created? You may be able to remove the file config.h and rerun the cscript command. That should recreate the file. config.h is in the main directory (i.e. one up from the win32 directory where you need to build).
participants (2)
-
mobigital1
-
Sjoerd Mullender