Building lxml statically for MeVisLab
Hi, I'm trying to build lxml for MeVisLab 2.7 on Windows 7 x64. Therefore I'm using the Python 2.7 delivered with MeVisLab and MS Visual Studio 2013 Professional. As my workplace is behind a proxy I had to configure the setup.py and buildlibxml.py to use the already downloaded libraries. How I did this is described in the appended build-changes.txt. So when trying to build lxml it fails with the output in build.log. It looks like it's trying to rebuild lxml.etree, but does it even have to? Would you please help me with this? I don't know what to do from here on. Sincerely, Corbie
Hi, I wrote another mail this week but it seemed to be too confusing. I'm trying to build lxml statically under Windows, but when I do so the script seems to try to build the 'lxml.etree' extension. Those source files are not listed in the git repository, so should etree even be compiled? Or do I have to link a binary somehow? Sincerely, Corbie
Hi again, I solved this problem myself. I should not have used the git repository but the python package https://pypi.python.org/pypi/lxml/3.4.4 So here comes the next problem: the linker seems to be missing some references: lxml.etree.c
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\amd64\link.exe /DLL /nologo /INCREMENTAL:NO /LIBPATH:[...] libxslt_a.lib libexslt_a.lib libxml2_a.lib iconv_a.lib zlib.lib WS2_32.lib /EXPORT:initetree build\temp.win-amd64-2.7\Release\src\lxml\lxml.etree.obj /OUT:build\lib.win-amd64-2.7\lxml\etree.pyd /IMPLIB:build\temp.win-amd64-2.7\Release\src\lxml\etree.lib /MANIFEST /MANIFESTFILE:build\temp.win-amd64-2.7\Release\src\lxml\etree.pyd.manifest
lxml.etree.obj : warning LNK4197: export 'initetree' specified multiple times; using first specification Creating library build\temp.win-amd64-2.7\Release\src\lxml\etree.lib and object build\temp.win-amd64-2.7\Release\src\lxml\etree.exp
lxml.etree.obj : error LNK2019: unresolved external symbol xmlStrdup referenced in function __pyx_f_4lxml_5etree_9_LogEntry__setError (and so on...)
Is this a missing library? And which one? Sincerely, Corbie
Corvus Corax <corbie@mailbox.org> hat am 20. November 2015 um 15:54 geschrieben:
Hi,
I wrote another mail this week but it seemed to be too confusing. I'm trying to build lxml statically under Windows, but when I do so the script seems to try to build the 'lxml.etree' extension. Those source files are not listed in the git repository, so should etree even be compiled? Or do I have to link a binary somehow?
Sincerely,
Corbie
_________________________________________________________________ Mailing list for the lxml Python XML toolkit - http://lxml.de/ lxml@lxml.de https://mailman-mail5.webfaction.com/listinfo/lxml
On Fri, Nov 20, 2015 at 05:37:42PM +0100, Corvus Corax wrote:
Hi again,
I solved this problem myself. I should not have used the git repository but the python package https://pypi.python.org/pypi/lxml/3.4.4
lxml.etree.c is a Cython-generated file from the true source, which is lxml.etree.pyx. lxml releases on PyPI have all the generated files in them, so that users who install from PyPI aren't required to have Cython on installed their machines.
So here comes the next problem: the linker seems to be missing some references:
lxml.etree.c
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\amd64\link.exe /DLL /nologo /INCREMENTAL:NO /LIBPATH:[...] libxslt_a.lib libexslt_a.lib libxml2_a.lib iconv_a.lib zlib.lib WS2_32.lib /EXPORT:initetree build\temp.win-amd64-2.7\Release\src\lxml\lxml.etree.obj /OUT:build\lib.win-amd64-2.7\lxml\etree.pyd /IMPLIB:build\temp.win-amd64-2.7\Release\src\lxml\etree.lib /MANIFEST /MANIFESTFILE:build\temp.win-amd64-2.7\Release\src\lxml\etree.pyd.manifest
lxml.etree.obj : warning LNK4197: export 'initetree' specified multiple times; using first specification Creating library build\temp.win-amd64-2.7\Release\src\lxml\etree.lib and object build\temp.win-amd64-2.7\Release\src\lxml\etree.exp
lxml.etree.obj : error LNK2019: unresolved external symbol xmlStrdup referenced in function __pyx_f_4lxml_5etree_9_LogEntry__setError (and so on...)
Is this a missing library? And which one?
I'd say libxml2. Marius Gedminas -- ...Unix, MS-DOS, and Windows NT (also known as the Good, the Bad, and the Ugly). -- Matt Welsh
Hi Marius, thanks for the answer! In the compiler/linker call the LIBPATH variable is set like this: /LIBPATH:D:\Python\libxslt-1.1.26.win32\lib /LIBPATH:D:\Python\iconv-1.9.2.win32\lib /LIBPATH:D:\Python\zlib-1.2.5\lib /LIBPATH:D:\Python\libxml2-2.7.8.win32\lib /LIBPATH:D:\Programs\Python\libs /LIBPATH:D:\Programs\Python\PC\VC6 libxslt_a.lib libexslt_a.lib libxml2_a.lib iconv_a.lib zlib.lib WS2_32.lib So I can't see why the library still is not found. Do I have to set the variables somehow different? Sincerely, Corbie
Marius Gedminas <marius@gedmin.as> hat am 21. November 2015 um 09:54 geschrieben:
On Fri, Nov 20, 2015 at 05:37:42PM +0100, Corvus Corax wrote: > Hi again, > > I solved this problem myself. I should not have used the git repository > but the > python package https://pypi.python.org/pypi/lxml/3.4.4
lxml.etree.c is a Cython-generated file from the true source, which is lxml.etree.pyx.
lxml releases on PyPI have all the generated files in them, so that users who install from PyPI aren't required to have Cython on installed their machines.
> So here comes the next problem: the linker seems to be missing some > references: > > lxml.etree.c > > C:\Program Files (x86)\Microsoft Visual Studio > > 12.0\VC\BIN\amd64\link.exe /DLL > > /nologo /INCREMENTAL:NO /LIBPATH:[...] libxslt_a.lib libexslt_a.lib > > libxml2_a.lib iconv_a.lib zlib.lib WS2_32.lib /EXPORT:initetree > > build\temp.win-amd64-2.7\Release\src\lxml\lxml.etree.obj > > /OUT:build\lib.win-amd64-2.7\lxml\etree.pyd > > /IMPLIB:build\temp.win-amd64-2.7\Release\src\lxml\etree.lib /MANIFEST > > /MANIFESTFILE:build\temp.win-amd64-2.7\Release\src\lxml\etree.pyd.manifest > > > > lxml.etree.obj : warning LNK4197: export 'initetree' specified > > multiple times; > > using first specification > > Creating library build\temp.win-amd64-2.7\Release\src\lxml\etree.lib > > and > > object build\temp.win-amd64-2.7\Release\src\lxml\etree.exp > > > > lxml.etree.obj : error LNK2019: unresolved external symbol xmlStrdup > > referenced in function __pyx_f_4lxml_5etree_9_LogEntry__setError > > (and so on...) > > Is this a missing library? And which one?
I'd say libxml2.
Marius Gedminas -- ...Unix, MS-DOS, and Windows NT (also known as the Good, the Bad, and the Ugly). -- Matt Welsh _________________________________________________________________ Mailing list for the lxml Python XML toolkit - http://lxml.de/ lxml@lxml.de https://mailman-mail5.webfaction.com/listinfo/lxml
On Mon, Nov 16, 2015 at 5:01 PM Corvus Corax <corbie@mailbox.org> wrote:
I'm trying to build lxml for MeVisLab 2.7 on Windows 7 x64. Therefore I'm using the Python 2.7 delivered with MeVisLab and MS Visual Studio 2013 Professional.
Extensions should be build with the same compiler that built python, you should probably check if that was indeed VS2013 (I'm unfamiliar with MeVisLab).
So when trying to build lxml it fails with the output in build.log. It looks like it's trying to rebuild lxml.etree, but does it even have to?
Are you building from the git repository? Then you should build with Cython, else you need the source distribution which includes the Cython generated files. HTH, Wietse
participants (3)
-
Corvus Corax
-
Marius Gedminas
-
Wietse Jacobs