http://bugs.winehq.org/show_bug.cgi?id=13035
Summary: Bad HAVE_XSLTINIT in msxml3 Product: Wine Version: CVS/GIT Platform: Other OS/Version: other Status: NEW Severity: enhancement Priority: P2 Component: msxml3 AssignedTo: wine-bugs@winehq.org ReportedBy: fgouget@codeweavers.com
I think the HAVE_XSLTINIT in dlls/msxml3/main.c is wrong because it does not take into account potential differences between the compilation environment and the runtime environment.
Case 1 ------
If the libxslt.so available at compile time does not have xsltinit(), then HAVE_XSLTINIT will be undefined and thus msxml3 will not call it... So what happens then if at runtime the libxslt.so that's used does have that function? Will it crash randomly because it's uninitialized?
Conversely, the compilation environment could have xsltinit() but no the runtime environment. This this would cause msxml3.dll to fail to load.
Compile vs. runtime environment differences is why we dlopen() a lot of the Unix libraries and it seems to me that we should be using dlsym() here.
http://bugs.winehq.org/show_bug.cgi?id=13035
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |source
--- Comment #1 from Austin English austinenglish@gmail.com 2008-11-12 14:20:04 --- Is this still an issue in current (1.1.8 or newer) wine?
http://bugs.winehq.org/show_bug.cgi?id=13035
--- Comment #2 from François Gouget fgouget@codeweavers.com 2008-11-17 03:42:30 --- Yes, nothing has changed.
http://bugs.winehq.org/show_bug.cgi?id=13035
--- Comment #3 from François Gouget fgouget@codeweavers.com 2008-11-17 09:41:57 --- <julliard> fgouget: are there really platforms that have a libxml with and without xsltInit under the same soname?
So I checked and found the following:
* libxslt1.1 version 1.1.15-1ubuntu1 in Ubuntu 6.06 (Dapper Drake) nm -D /usr/lib/libxslt.so.1 | grep xsltInit 00018a02 T xsltInitCtxtExts 00014e62 T xsltInitCtxtKeys 00018fc3 T xsltInitElemPreComp
* libxslt1.1 version 1.1.19-3 in Debian 4.0 nm -D /usr/libxslt.so.1 | grep xsltInit 0000af90 T xsltInit 0001b4d0 T xsltInitCtxtExts 00016380 T xsltInitCtxtKey 00016a60 T xsltInitCtxtKeys 00019ac0 T xsltInitElemPreComp
It's the same soname in both cases. So currently an msxml3 binary compiled on Debian 4.0 won't work (load) on Ubuntu 6.06.
http://bugs.winehq.org/show_bug.cgi?id=13035
François Gouget fgouget@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED
--- Comment #4 from François Gouget fgouget@codeweavers.com 2008-11-18 11:29:44 --- This is fixed. We now load libxslt at run time and use wine_dlsym() to call its API. This means we no longer need to check for the presence of xsltInit() at compile time at all.
commit 3d384f172cb5fcabf441bd1c64cb4760df013781 Author: Francois Gouget fgouget@codeweavers.com Date: Mon Nov 17 19:29:32 2008 +0100
msxml3: Dynamically load libxslt.so and only call xsltInit() if present.
http://bugs.winehq.org/show_bug.cgi?id=13035
Lei Zhang thestig@google.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|FIXED |
--- Comment #5 from Lei Zhang thestig@google.com 2008-11-18 14:16:09 --- Except now Wine does not compile on Dapper. Even with --without-xml.
gcc -c -I. -I. -I../../include -I../../include -I/usr/include/libxml2 -I/usr/include/libxml2 -D__WINESRC__ -DCOM_NO_WINDOWS_H -D_REENTRANT -fPIC -Wall -pipe -fno-strict-aliasing -Wdeclaration-after-statement -Wwrite-strings -Wpointer-arith -g -O2 -o attribute.o attribute.c In file included from attribute.c:33: msxml_private.h:108: error: 'xsltInit' undeclared here (not in a function) msxml_private.h:108: warning: type defaults to 'int' in declaration of 'pxsltInit'
http://bugs.winehq.org/show_bug.cgi?id=13035
François Gouget fgouget@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution| |FIXED
--- Comment #6 from François Gouget fgouget@codeweavers.com 2008-11-19 09:21:27 --- Sorry about that. Should be fixed again:
commit 681d3751365d2f72560ec19c60b6fc7a1f8c7875 Author: Francois Gouget fgouget@codeweavers.com Date: Wed Nov 19 08:40:25 2008 +0100
msxml3: Fix compilation on systems that don't have xsltInit(). Reduce the scope of xsltInit(). Remove an include that was needed only for xsltInit().
http://bugs.winehq.org/show_bug.cgi?id=13035
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #7 from Alexandre Julliard julliard@winehq.org 2008-11-21 10:31:32 --- Closing bugs fixed in 1.1.9.
http://bugs.winehq.org/show_bug.cgi?id=13035
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|CVS/GIT |unspecified