Re: [lxml-dev] Compiling lxml with OpenOffice embeded python 2.3.4 runtime
Voici le résultat de la compilation après installation de python 2.3.5 C:\Download\lxml-source\lxml-1.0.2>python setup.py bdist_wininst --static Building lxml version 1.0.2 *NOTE*: Trying to build without Pyrex, needs pre-generated 'src/lxml/etree.c' ! running bdist_wininst running build running build_py running build_ext building 'lxml.etree' extension C:\Program Files\Microsoft Visual Studio\VC98\BIN\cl.exe /c /nologo /Ox /MD /W3 /GX /DNDEBUG -IC:\soft\python23\include -IC:\soft\python23\PC /Tcsrc/l xml/etree.c /Fobuild\temp.win32-2.3\Release\src/lxml/etree.obj -w -I..\libxml2-2.6.26.win32\include -I..\libxslt-1.1.17.win32\include -I..\zlib-1.2.3. win32\include -I..\iconv-1.9.2.win32\include Command line warning D4025 : overriding '/W3' with '/w' etree.c C:\Program Files\Microsoft Visual Studio\VC98\BIN\link.exe /DLL /nologo /INCREMENTAL:NO /LIBPATH:C:\soft\python23\libs /LIBPATH:C:\soft\python23\PCBui ld /EXPORT:initetree build\temp.win32-2.3\Release\src/lxml/etree.obj /OUT:build\lib.win32-2.3\lxml\etree.pyd /IMPLIB:build\temp.win32-2.3\Release\src/ lxml\etree.lib ..\libxml2-2.6.26.win32\lib\libxml2_a.lib ..\libxslt-1.1.17.win32\lib\libxslt_a.lib ..\libxslt-1.1.17.win32\lib\libexslt_a.lib ..\zlib- 1.2.3.win32\lib\zlib.lib ..\iconv-1.9.2.win32\lib\iconv_a.lib Creating library build\temp.win32-2.3\Release\src/lxml\etree.lib and object build\temp.win32-2.3\Release\src/lxml\etree.exp LINK : warning LNK4049: locally defined symbol "_xmlFree" imported LINK : warning LNK4049: locally defined symbol "_xsltDocDefaultLoader" imported LINK : warning LNK4049: locally defined symbol "_xsltLibxsltVersion" imported libxslt_a.lib(numbers.obj) : error LNK2001: unresolved external symbol __ftol2 libexslt_a.lib(date.obj) : error LNK2001: unresolved external symbol __ftol2 libexslt_a.lib(strings.obj) : error LNK2001: unresolved external symbol __ftol2 libexslt_a.lib(math.obj) : error LNK2001: unresolved external symbol __ftol2 libxml2_a.lib(xpath.obj) : error LNK2001: unresolved external symbol __ftol2 libxml2_a.lib(xpointer.obj) : error LNK2001: unresolved external symbol __ftol2 libxml2_a.lib(xmlschemastypes.obj) : error LNK2001: unresolved external symbol __ftol2 libxslt_a.lib(xsltutils.obj) : error LNK2001: unresolved external symbol __ftol2 build\lib.win32-2.3\lxml\etree.pyd : fatal error LNK1120: 1 unresolved externals error: command '"C:\Program Files\Microsoft Visual Studio\VC98\BIN\link.exe"' failed with exit status 1120
Stefan Behnel <behnel_ml@gkec.informatik.tu-darmstadt.de> 26/07/06 9:02 AM >>> Hi Olivier,
Olivier Collioud wrote:
I have no experience with Python C extension compilation too.
Do you mean that I do not need any C compiler to build this kind of beast.
No, en fait, je pensais plutôt que ça vaut le coup d'essayer avec un 'vrais' Python. Si le mystérieux "sdkinstallrootv1.1" vient de OOo, ça se peut que tu arriveras à utiliser un lxml compilé pour un python.org Python dans le OOo Python. Donc: Installer Python 2.3.4 'normal', compiler et installer lxml avec ça, et après copier le répertoire installé (site-packages/lxml) dans le Python de OOo. Stefan
Stefan Behnel Olivier Collioud wrote: following these instructions: http://codespeak.net/lxml/build.html#static-linking-on-windows
Running these commands:
C:\Download\lxml-source\lxml-1.0.2>set PATH="C:\Program Files\OpenOffice.org 2.0\program";"C:\Program Files\OpenOffice.org 2.0\program\python-core-2.3.4\bin";"C:\Program Files\Microsoft Visual Studio\VC98\Bin"
C:\Download\lxml-source\lxml-1.0.2>set PYTHONPATH="C:\Program Files\OpenOffice.org 2.0\program";"C:\Program Files\OpenOffice.org 2.0\program\python-core-2.3.4\lib"
C:\Download\lxml-source\lxml-1.0.2>python setup.py bdist_wininst --static Building lxml version 1.0.2 [...] File "C:\Program Files\OpenOffice.org 2.0\program\python-core-2.3.4\lib\distutils\msvccompiler.py", line 118, in set_macro self.macros["$(%s)" % macro] = d[key] KeyError: 'sdkinstallrootv1.1'
My guess is that it is related to my MS-VS installation.
Looks like it. Though I'm not sure which 'sdk' is referred to here. Might also be the OOo SDK.
I have no experience with MS compilation. (I don't even know why it is installed on my PC :-).
Guess you accidentally installed MS-Windows, that tends to install a lot of Microsoft stuff. ;)
I would be grateful if anybody can help me to build this or tell me where I can download an lxml 1.0.2 or more recent (or not too old) build for win32 and Python 2.3.4.
We usually don't have Windows binaries for Python 2.3. Martijn keeps building Linux eggs for it, mainly to support Web-Servers, but most people are on 2.4 by now.
What about installing a normal Python 2.3 (from python.org), build lxml against that and then just /install/ it to the OOo Python directory?
Stefan
_______________________________________________ lxml-dev mailing list lxml-dev@codespeak.net http://codespeak.net/mailman/listinfo/lxml-dev
------ World Intellectual Property Organization Disclaimer:
This electronic message may contain privileged, confidential and copyright protected information. If you have received this e-mail by mistake, please immediately notify the sender and delete this e-mail and all its attachments. Please ensure all e-mail attachments are scanned for viruses prior to opening or using.
------ World Intellectual Property Organization Disclaimer: This electronic message may contain privileged, confidential and copyright protected information. If you have received this e-mail by mistake, please immediately notify the sender and delete this e-mail and all its attachments. Please ensure all e-mail attachments are scanned for viruses prior to opening or using.
Hi Olivier, Olivier Collioud wrote:
here is what I get after installing Python 2.3.5
C:\Download\lxml-source\lxml-1.0.2>python setup.py bdist_wininst --static Building lxml version 1.0.2 *NOTE*: Trying to build without Pyrex, needs pre-generated 'src/lxml/etree.c' ! running bdist_wininst running build running build_py running build_ext building 'lxml.etree' extension C:\Program Files\Microsoft Visual Studio\VC98\BIN\cl.exe /c /nologo /Ox /MD /W3 /GX /DNDEBUG -IC:\soft\python23\include -IC:\soft\python23\PC /Tcsrc/l xml/etree.c /Fobuild\temp.win32-2.3\Release\src/lxml/etree.obj -w -I..\libxml2-2.6.26.win32\include -I..\libxslt-1.1.17.win32\include -I..\zlib-1.2.3. win32\include -I..\iconv-1.9.2.win32\include Command line warning D4025 : overriding '/W3' with '/w' etree.c C:\Program Files\Microsoft Visual Studio\VC98\BIN\link.exe /DLL /nologo /INCREMENTAL:NO /LIBPATH:C:\soft\python23\libs /LIBPATH:C:\soft\python23\PCBui ld /EXPORT:initetree build\temp.win32-2.3\Release\src/lxml/etree.obj /OUT:build\lib.win32-2.3\lxml\etree.pyd /IMPLIB:build\temp.win32-2.3\Release\src/ lxml\etree.lib ..\libxml2-2.6.26.win32\lib\libxml2_a.lib ..\libxslt-1.1.17.win32\lib\libxslt_a.lib ..\libxslt-1.1.17.win32\lib\libexslt_a.lib ..\zlib- 1.2.3.win32\lib\zlib.lib ..\iconv-1.9.2.win32\lib\iconv_a.lib Creating library build\temp.win32-2.3\Release\src/lxml\etree.lib and object build\temp.win32-2.3\Release\src/lxml\etree.exp LINK : warning LNK4049: locally defined symbol "_xmlFree" imported LINK : warning LNK4049: locally defined symbol "_xsltDocDefaultLoader" imported LINK : warning LNK4049: locally defined symbol "_xsltLibxsltVersion" imported libxslt_a.lib(numbers.obj) : error LNK2001: unresolved external symbol __ftol2 libexslt_a.lib(date.obj) : error LNK2001: unresolved external symbol __ftol2 libexslt_a.lib(strings.obj) : error LNK2001: unresolved external symbol __ftol2 libexslt_a.lib(math.obj) : error LNK2001: unresolved external symbol __ftol2 libxml2_a.lib(xpath.obj) : error LNK2001: unresolved external symbol __ftol2 libxml2_a.lib(xpointer.obj) : error LNK2001: unresolved external symbol __ftol2 libxml2_a.lib(xmlschemastypes.obj) : error LNK2001: unresolved external symbol __ftol2 libxslt_a.lib(xsltutils.obj) : error LNK2001: unresolved external symbol __ftol2 build\lib.win32-2.3\lxml\etree.pyd : fatal error LNK1120: 1 unresolved externals error: command '"C:\Program Files\Microsoft Visual Studio\VC98\BIN\link.exe"' failed with exit status 1120
Hmm, ok, lxml commonly links against libm, so my guess is that you need to supply that one also. Another possibility could be that libxml2/xslt/exslt were compiled with a newer compiler than the one you use. If you want to try, you can compile libxml2 and libxslt also from source. Since you're building lxml statically anyway, that should be ok for your purpose. Stefan PS: C'est soit l'Anglais pour la liste, soit le Français pour moi. Pas trop bien de malin les deux...
Stefan Behnel wrote:
Olivier Collioud wrote:
C:\Download\lxml-source\lxml-1.0.2>python setup.py bdist_wininst --static Building lxml version 1.0.2 C:\Program Files\Microsoft Visual Studio\VC98\BIN\link.exe /DLL /nologo /INCREMENTAL:NO /LIBPATH:C:\soft\python23\libs /LIBPATH:C:\soft\python23\PCBui ld /EXPORT:initetree build\temp.win32-2.3\Release\src/lxml/etree.obj /OUT:build\lib.win32-2.3\lxml\etree.pyd /IMPLIB:build\temp.win32-2.3\Release\src/ lxml\etree.lib ..\libxml2-2.6.26.win32\lib\libxml2_a.lib ..\libxslt-1.1.17.win32\lib\libxslt_a.lib ..\libxslt-1.1.17.win32\lib\libexslt_a.lib ..\zlib- 1.2.3.win32\lib\zlib.lib ..\iconv-1.9.2.win32\lib\iconv_a.lib Creating library build\temp.win32-2.3\Release\src/lxml\etree.lib and object build\temp.win32-2.3\Release\src/lxml\etree.exp LINK : warning LNK4049: locally defined symbol "_xmlFree" imported LINK : warning LNK4049: locally defined symbol "_xsltDocDefaultLoader" imported LINK : warning LNK4049: locally defined symbol "_xsltLibxsltVersion" imported libxslt_a.lib(numbers.obj) : error LNK2001: unresolved external symbol __ftol2 libexslt_a.lib(date.obj) : error LNK2001: unresolved external symbol __ftol2 libexslt_a.lib(strings.obj) : error LNK2001: unresolved external symbol __ftol2 libexslt_a.lib(math.obj) : error LNK2001: unresolved external symbol __ftol2 libxml2_a.lib(xpath.obj) : error LNK2001: unresolved external symbol __ftol2 libxml2_a.lib(xpointer.obj) : error LNK2001: unresolved external symbol __ftol2 libxml2_a.lib(xmlschemastypes.obj) : error LNK2001: unresolved external symbol __ftol2 libxslt_a.lib(xsltutils.obj) : error LNK2001: unresolved external symbol __ftol2 build\lib.win32-2.3\lxml\etree.pyd : fatal error LNK1120: 1 unresolved externals error: command '"C:\Program Files\Microsoft Visual Studio\VC98\BIN\link.exe"' failed with exit status 1120
could be that libxml2/xslt/exslt were compiled with a newer compiler than the one you use.
Yup, that's it: http://www.mail-archive.com/openssl-users@openssl.org/msg31551.html http://www.issociate.de/board/post/9216/Compiling_with_VC6.html So, try this:
If you want to try, you can compile libxml2 and libxslt also from source. Since you're building lxml statically anyway, that should be ok for your purpose.
Stefan
participants (2)
-
Olivier Collioud
-
Stefan Behnel