Page 1 of 1

build virtualbox 5.2.2 on win 7 64bit

Posted: 3. Jan 2019, 14:14
by jhon rosy
I tried build virtualbox on win6 64bit with default target (adm64). But all failed. I have tried to build on two win 7 64bit computers and all stopped at this error
Erorr:

Code: Select all

kBuild: Linking VBoxRT
kBuild: Linking VBoxRT-x86
   Creating library C:/Users/phongvip/Downloads/vb/VirtualBox-5.2.22/out/win.amd
64/release/obj/VBoxRT/VBoxRT.lib and object C:/Users/phongvip/Downloads/vb/Virtu
alBox-5.2.22/out/win.amd64/release/obj/VBoxRT/VBoxRT.exp
LINK : warning LNK4199: /DELAYLOAD:gdi32.dll ignored; no imports found from gdi3
2.dll
VBoxRTDeps.obj : error LNK2001: unresolved external symbol xmlLoadCatalogs
xml.obj : error LNK2019: unresolved external symbol xmlSetExternalEntityLoader r
eferenced in function "public: void __cdecl xml::GlobalLock::setExternalEntityLo
ader(struct _xmlParserInput * (__cdecl*)(char const *,char const *,struct _xmlPa
rserCtxt *))" (?setExternalEntityLoader@GlobalLock@xml@@QEAAXP6APEAU_xmlParserIn
put@@PEBD0PEAU_xmlParserCtxt@@@Z@Z)
xml.obj : error LNK2019: unresolved external symbol xmlGetExternalEntityLoader r
eferenced in function "public: void __cdecl xml::GlobalLock::setExternalEntityLo
ader(struct _xmlParserInput * (__cdecl*)(char const *,char const *,struct _xmlPa
rserCtxt *))" (?setExternalEntityLoader@GlobalLock@xml@@QEAAXP6APEAU_xmlParserIn
put@@PEBD0PEAU_xmlParserCtxt@@@Z@Z)
xml.obj : error LNK2019: unresolved external symbol xmlFreeDoc referenced in fun
ction "public: void __cdecl xml::Document::Data::reset(void)" (?reset@Data@Docum
ent@xml@@QEAAXXZ)
s3.obj : error LNK2001: unresolved external symbol xmlFreeDoc
xml.obj : error LNK2019: unresolved external symbol xmlCopyDoc referenced in fun
ction "public: void __cdecl xml::Document::Data::copyFrom(struct xml::Document::
Data const *)" (?copyFrom@Data@Document@xml@@QEAAXPEBU123@@Z)
xml.obj : error LNK2019: unresolved external symbol xmlSetStructuredErrorFunc re
ferenced in function "protected: __cdecl xml::XmlParserBase::XmlParserBase(void)
" (??0XmlParserBase@xml@@IEAA@XZ)
xml.obj : error LNK2019: unresolved external symbol xmlSetGenericErrorFunc refer
enced in function "protected: __cdecl xml::XmlParserBase::XmlParserBase(void)" (
??0XmlParserBase@xml@@IEAA@XZ)
xml.obj : error LNK2019: unresolved external symbol xmlNewParserCtxt referenced
in function "protected: __cdecl xml::XmlParserBase::XmlParserBase(void)" (??0Xml
ParserBase@xml@@IEAA@XZ)
xml.obj : error LNK2019: unresolved external symbol xmlFreeParserCtxt referenced
 in function "protected: __cdecl xml::XmlParserBase::~XmlParserBase(void)" (??1X
mlParserBase@xml@@IEAA@XZ)
xml.obj : error LNK2001: unresolved external symbol __imp_xmlFree
s3.obj : error LNK2001: unresolved external symbol __imp_xmlFree
xml.obj : error LNK2019: unresolved external symbol xmlDocDumpFormatMemory refer
enced in function "public: void __cdecl xml::XmlMemWriter::write(class xml::Docu
ment const &,void * *,unsigned __int64 *)" (?write@XmlMemWriter@xml@@QEAAXAEBVDo
cument@2@PEAPEAXPEA_K@Z)
xml.obj : error LNK2019: unresolved external symbol xmlInitParser referenced in
function "public: __cdecl Global::Global(void)" (??0Global@@QEAA@XZ)
xml.obj : error LNK2019: unresolved external symbol xmlCheckVersion referenced i
n function "public: __cdecl Global::Global(void)" (??0Global@@QEAA@XZ)
xml.obj : error LNK2019: unresolved external symbol xmlCleanupParser referenced
in function "public: __cdecl Global::~Global(void)" (??1Global@@QEAA@XZ)
xml.obj : error LNK2019: unresolved external symbol xmlAddChild referenced in fu
nction "public: class xml::ContentNode * __cdecl xml::ElementNode::addContent(ch
ar const *)" (?addContent@ElementNode@xml@@QEAAPEAVContentNode@2@PEBD@Z)
xml.obj : error LNK2019: unresolved external symbol xmlNewText referenced in fun
ction "public: class xml::ContentNode * __cdecl xml::ElementNode::addContent(cha
r const *)" (?addContent@ElementNode@xml@@QEAAPEAVContentNode@2@PEBD@Z)
xml.obj : error LNK2019: unresolved external symbol xmlNodeSetContent referenced
 in function "public: class xml::ContentNode * __cdecl xml::ElementNode::setCont
ent(char const *)" (?setContent@ElementNode@xml@@QEAAPEAVContentNode@2@PEBD@Z)
xml.obj : error LNK2019: unresolved external symbol xmlSetProp referenced in fun
ction "public: class xml::AttributeNode * __cdecl xml::ElementNode::setAttribute
(char const *,char const *)" (?setAttribute@ElementNode@xml@@QEAAPEAVAttributeNo
de@2@PEBD0@Z)
xml.obj : error LNK2019: unresolved external symbol xmlNewProp referenced in fun
ction "public: class xml::AttributeNode * __cdecl xml::ElementNode::setAttribute
(char const *,char const *)" (?setAttribute@ElementNode@xml@@QEAAPEAVAttributeNo
de@2@PEBD0@Z)
xml.obj : error LNK2019: unresolved external symbol xmlNewNode referenced in fun
ction "public: class xml::ElementNode * __cdecl xml::ElementNode::createChild(ch
ar const *)" (?createChild@ElementNode@xml@@QEAAPEAV12@PEBD@Z)
xml.obj : error LNK2019: unresolved external symbol xmlDocGetRootElement referen
ced in function "private: void __cdecl xml::Document::refreshInternals(void)" (?
refreshInternals@Document@xml@@AEAAXXZ)
s3.obj : error LNK2001: unresolved external symbol xmlDocGetRootElement
xml.obj : error LNK2019: unresolved external symbol xmlAddPrevSibling referenced
 in function "public: class xml::ElementNode * __cdecl xml::Document::createRoot
Element(char const *,char const *)" (?createRootElement@Document@xml@@QEAAPEAVEl
ementNode@2@PEBD0@Z)
xml.obj : error LNK2019: unresolved external symbol xmlNewDocComment referenced
in function "public: class xml::ElementNode * __cdecl xml::Document::createRootE
lement(char const *,char const *)" (?createRootElement@Document@xml@@QEAAPEAVEle
mentNode@2@PEBD0@Z)
xml.obj : error LNK2019: unresolved external symbol xmlDocSetRootElement referen
ced in function "public: class xml::ElementNode * __cdecl xml::Document::createR
ootElement(char const *,char const *)" (?createRootElement@Document@xml@@QEAAPEA
VElementNode@2@PEBD0@Z)
xml.obj : error LNK2019: unresolved external symbol xmlNewDoc referenced in func
tion "public: class xml::ElementNode * __cdecl xml::Document::createRootElement(
char const *,char const *)" (?createRootElement@Document@xml@@QEAAPEAVElementNod
e@2@PEBD0@Z)
xml.obj : error LNK2019: unresolved external symbol xmlCtxtGetLastError referenc
ed in function "public: void __cdecl xml::XmlMemParser::read(void const *,unsign
ed __int64,class RTCString const &,class xml::Document &)" (?read@XmlMemParser@x
ml@@QEAAXPEBX_KAEBVRTCString@@AEAVDocument@2@@Z)
xml.obj : error LNK2019: unresolved external symbol xmlCtxtReadMemory referenced
 in function "public: void __cdecl xml::XmlMemParser::read(void const *,unsigned
 __int64,class RTCString const &,class xml::Document &)" (?read@XmlMemParser@xml
@@QEAAXPEBX_KAEBVRTCString@@AEAVDocument@2@@Z)
xml.obj : error LNK2019: unresolved external symbol xmlSaveClose referenced in f
unction "public: int __cdecl xml::XmlStringWriter::write(class xml::Document con
st &,class RTCString *)" (?write@XmlStringWriter@xml@@QEAAHAEBVDocument@2@PEAVRT
CString@@@Z)
xml.obj : error LNK2019: unresolved external symbol xmlSaveDoc referenced in fun
ction "public: int __cdecl xml::XmlStringWriter::write(class xml::Document const
 &,class RTCString *)" (?write@XmlStringWriter@xml@@QEAAHAEBVDocument@2@PEAVRTCS
tring@@@Z)
xml.obj : error LNK2019: unresolved external symbol xmlSaveToIO referenced in fu
nction "public: int __cdecl xml::XmlStringWriter::write(class xml::Document cons
t &,class RTCString *)" (?write@XmlStringWriter@xml@@QEAAHAEBVDocument@2@PEAVRTC
String@@@Z)
xml.obj : error LNK2019: unresolved external symbol __xmlSaveNoEmptyTags referen
ced in function "public: int __cdecl xml::XmlStringWriter::write(class xml::Docu
ment const &,class RTCString *)" (?write@XmlStringWriter@xml@@QEAAHAEBVDocument@
2@PEAVRTCString@@@Z)
xml.obj : error LNK2019: unresolved external symbol __xmlTreeIndentString refere
nced in function "public: int __cdecl xml::XmlStringWriter::write(class xml::Doc
ument const &,class RTCString *)" (?write@XmlStringWriter@xml@@QEAAHAEBVDocument
@2@PEAVRTCString@@@Z)
xml.obj : error LNK2019: unresolved external symbol __xmlIndentTreeOutput refere
nced in function "public: int __cdecl xml::XmlStringWriter::write(class xml::Doc
ument const &,class RTCString *)" (?write@XmlStringWriter@xml@@QEAAHAEBVDocument
@2@PEAVRTCString@@@Z)
xml.obj : error LNK2019: unresolved external symbol xmlCtxtReadIO referenced in
function "public: void __cdecl xml::XmlFileParser::read(class RTCString const &,
class xml::Document &)" (?read@XmlFileParser@xml@@QEAAXAEBVRTCString@@AEAVDocume
nt@2@@Z)
s3.obj : error LNK2019: unresolved external symbol xmlStrcmp referenced in funct
ion "struct _xmlNode * __cdecl rtS3FindNode(struct _xmlNode *,char const *)" (?r
tS3FindNode@@YAPEAU_xmlNode@@PEAU1@PEBD@Z)
s3.obj : error LNK2019: unresolved external symbol xmlReadMemory referenced in f
unction "int __cdecl rtS3ReadXmlFromMemory(struct RTS3TMPMEMCHUNK *,char const *
,struct _xmlDoc * *,struct _xmlNode * *)" (?rtS3ReadXmlFromMemory@@YAHPEAURTS3TM
PMEMCHUNK@@PEBDPEAPEAU_xmlDoc@@PEAPEAU_xmlNode@@@Z)
s3.obj : error LNK2019: unresolved external symbol xmlNodeListGetString referenc
ed in function "void __cdecl rtS3ExtractAllBuckets(struct _xmlDoc *,struct _xmlN
ode *,struct RTS3BUCKETENTRY const * *)" (?rtS3ExtractAllBuckets@@YAXPEAU_xmlDoc
@@PEAU_xmlNode@@PEAPEBURTS3BUCKETENTRY@@@Z)
C:/Users/phongvip/Downloads/vb/VirtualBox-5.2.22/out/win.amd64/release/obj/VBoxR
T/VBoxRT.dll : fatal error LNK1120: 37 unresolved externals
kmk: *** [C:/Users/phongvip/Downloads/vb/VirtualBox-5.2.22/out/win.amd64/release
/obj/VBoxRT/VBoxRT.dll] Error 1120 (0x460)
The failing command:
@  C:/PROGRA~2/MICROS~1.0/VC/bin/amd64/link.exe -nologo -machine:amd64
                                                           -Ignore:4197 /NOD /IN
CREMENTAL:NO /MAPINFO:EXPORTS /LargeAddressAware /DynamicBase /NxCompat /Release
 /Debug /Opt:Ref /Opt:Icf /Version:502.22 /STUB:C:/Users/phongvip/Downloads/vb/V
irtualBox-5.2.22/src/VBox/HostDrivers/Support/win/winstub.com /DISALLOWLIB:libc.
lib /DISALLOWLIB:libcd.lib /DISALLOWLIB:libcmt.lib /DISALLOWLIB:libcmtd.lib /DIS
ALLOWLIB:msvcrtd.lib /DISALLOWLIB:msvcprtd.lib    /MANIFEST /delayload:gdi32.dll
 /delayload:user32.dll /delayload:shell32.dll /delayload:ole32.dll /delayload:ol
eaut32.dll /delayload:advapi32.dll    /OUT:C:/Users/phongvip/Downloads/vb/Virtua
lBox-5.2.22/out/win.amd64/release/obj/VBoxRT/VBoxRT.dll /IMPLIB:C:/Users/phongvi
p/Downloads/vb/VirtualBox-5.2.22/out/win.amd64/release/obj/VBoxRT/VBoxRT.lib /MA
PINFO:EXPORTS /INCREMENTAL:NO /MAP:C:/Users/phongvip/Downloads/vb/VirtualBox-5.2
.22/out/win.amd64/release/obj/VBoxRT/VBoxRT.map /DLL  /DEF:C:/Users/phongvip/Dow
nloads/vb/VirtualBox-5.2.22/out/win.amd64/release/obj/VBoxRT/VBoxRT.def   /LIBPA
TH:C:/PROGRA~1/MICROS~2/Windows/v7.1/Lib/x64  /LIBPATH:C:/WinDDK/7600.16385.1/li
b/wlh/amd64  /LIBPATH:C:/PROGRA~1/MICROS~2/Windows/v7.1/Lib/x64 @C:/Users/phongv
ip/Downloads/vb/VirtualBox-5.2.22/out/win.amd64/release/obj/VBoxRT/VBoxRT.rsp
kmk: *** [C:/Users/phongvip/Downloads/vb/VirtualBox-5.2.22/out/win.amd64/release
/obj/VBoxRT/VBoxRT.dll] Deleting file `C:/Users/phongvip/Downloads/vb/VirtualBox
-5.2.22/out/win.amd64/release/obj/VBoxRT/VBoxRT.map'
kmk: *** [C:/Users/phongvip/Downloads/vb/VirtualBox-5.2.22/out/win.amd64/release
/obj/VBoxRT/VBoxRT.dll] Deleting file `C:/Users/phongvip/Downloads/vb/VirtualBox
-5.2.22/out/win.amd64/release/obj/VBoxRT/VBoxRT.lib'
kmk: *** [C:/Users/phongvip/Downloads/vb/VirtualBox-5.2.22/out/win.amd64/release
/obj/VBoxRT/VBoxRT.dll] Deleting file `C:/Users/phongvip/Downloads/vb/VirtualBox
-5.2.22/out/win.amd64/release/obj/VBoxRT/VBoxRT.exp'
kmk: *** [C:/Users/phongvip/Downloads/vb/VirtualBox-5.2.22/out/win.amd64/release
/obj/VBoxRT/VBoxRT.dll] Deleting file `C:/Users/phongvip/Downloads/vb/VirtualBox
-5.2.22/out/win.amd64/release/obj/VBoxRT/VBoxRT.rsp'
kmk: *** [C:/Users/phongvip/Downloads/vb/VirtualBox-5.2.22/out/win.amd64/release
/obj/VBoxRT/VBoxRT.dll] Deleting file `C:/Users/phongvip/Downloads/vb/VirtualBox
-5.2.22/out/win.amd64/release/obj/VBoxRT/VBoxRT.pdb'
kmk: *** Waiting for unfinished jobs....
   Creating library C:/Users/phongvip/Downloads/vb/VirtualBox-5.2.22/out/win.amd
64/release/obj/VBoxRT-x86/VBoxRT-x86.lib and object C:/Users/phongvip/Downloads/
vb/VirtualBox-5.2.22/out/win.amd64/release/obj/VBoxRT-x86/VBoxRT-x86.exp
LINK : warning LNK4199: /DELAYLOAD:gdi32.dll ignored; no imports found from gdi3
2.dll
Microsoft (R) Manifest Tool version 6.1.7716.0
Copyright (c) Microsoft Corporation 2009.
All rights reserved.
kmk: *** Exiting with status 2
It's very long and I'm trying to handle the first error.
But it seems very hard and I can't do it. Can you help me? Any advice?

Re: build virtualbox 5.2.2 on win 7 64bit

Posted: 5. Jan 2019, 12:40
by Yurii.Ch
Explanation of the error is quite clear, you have a linking error with libxml2. This library is located in src\libs\libxml2-2.9.4 directory (as per 5.2.18). Check is it's compiled, maybe you have different libxml2 build in your system and have a conflict, it's hard to say without your LocalConfig.kmk and PATH env of your system. By the way, check your Config.kmk, there should be default paths to all 3rd-party libraries, maybe libxml2 as well. If so, do not edit Config.kmk, it should be re-defined in LocalConfig.kmk

Re: build virtualbox 5.2.2 on win 7 64bit

Posted: 7. Jan 2019, 15:59
by jhonrosy
Thanks for your help. I tried checking again. I used another version of xml2. So I rebuilt xml2 according to the virtualbox version required. But despite trying to build in many ways, I still have the above error.
I also tried to build virtualbox 32 bit and also stopped at this error.
Can you give me another advice?
I think this is the last problem. So I hope to receive any help from you

Re: build virtualbox 5.2.2 on win 7 64bit

Posted: 18. Jan 2019, 10:26
by Yurii.Ch
It's hard to say without access to all system settings and logs, it might be numerous reasons.
As a workaround, try to include sources of libxml2 to VBoxRT.dll through its Makefile src\VBox\Runtime\Makefile.kmk and see what would happen