Re: [xml] LibXML2 digitally signed?
On Mon, Nov 09, 2009 at 10:28:13PM -0800, Michael Shang wrote: Hi I would like to know where I can find a version of the LibXML2library with the 32bits and 64bits dlls digitally signed? The one I downloaded on the website did not contain digital signature. I sign the rpms I produce for Linux. I will never do that on Windows since I don't even have a licence for the Windows operating system. Does the current license allows any company that use these dlls to digitally sign them? The licence is provided as part of the package sources. You can ask a lawyer what it things about your question. I'm not a lawyer Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ dan...@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/ ___ xml mailing list, project page http://xmlsoft.org/ xml@gnome.org http://mail.gnome.org/mailman/listinfo/xml
Re: [xml] RelaxNG schema and entities file: namespace warning : Namespace default prefix was not found
On Wed, Nov 11, 2009 at 04:54:23PM +0100, Daniel Leidert wrote: Hi, Consider this example: !DOCTYPE foo [ !ENTITY comment 'comment id=comment.xml /' ] foo xmlns=http://foo.bar/ns/foo; ... comment; ... /foo When I run `xmllint --noout --noent --relaxng foo.rng foo.xml' I receive: | namespace warning : Namespace default prefix was not found | ... | element comment: Relax-NG validity error : Did not expect element comment there But `jing foo.rng foo.xml' succeeds and does not complain. I have to add the xmlns attribute to comment for xmllint to succeed. Is this correct or an issue in xmllint? I wouldn't have expected, that I have to add the namespace to this entity. I thought it gets directly replaced. libxml2 being designed as an editing toolkit, and before XML namespaces does not handle well this kind of namespace and entities mixups. Best is to add the namespace declaration in ten entity, yes. Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ dan...@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/ ___ xml mailing list, project page http://xmlsoft.org/ xml@gnome.org http://mail.gnome.org/mailman/listinfo/xml
Re: [xml] MSYS and MINGW: undefined reference to _imp__xmlFree
On 2009/11/09 at 01:26 AM, Igor Zlatkovic i...@zlatkovic.com wrote: On 05/11/09 12:50, Martin Schlemmer wrote: Hi, Sorry for the extra late reply - year end with all its deadlines, etc. As for fixing this issue - I guess the first will be to back out that patch again. Then I have thought about two possible solutions: - deal with linking to static without LIBXML_STATIC defined by keep telling people to not do that. As for the failures with xmllint, etc. I can try to help debug that if I could get more information about build environment, etc. - rather use the approach GLIB and friends use - only allow either static or shared builds, and define LIBXML_STATIC via the headers if needed instead of hoping the user will remember it Personally I thought the second approach will be the less painful in future approach, and I made a patch as well as tested it in the situations I could think could cause the failure. I also redid the definitions in xmlexports.h to be more like glib's which I think is more clear. If I am not wrong, when I look at your patch, that second approach results in two sets of headers, one for the dynamic, the other for the static business. How should the binary distribution look like? Two packages? That was the idea. Normally they would use either mostly only static or dynamic linking, and if they are not sure, it should not really matter. Just the DLL could be another download for those that only looked for that. One package with two sets of headers? What about that static for DLL, when the user builds a shared library which links to libxml2 statically? I will be honest if I say that I really do not know if and why this is needed on Windows, so I will rather refrain from answering. Do we now have three packages or three sets of headers there? The user will not have to define LIBXML_STATIC, but will likely chose a wrong package or a wrong set of headers. Nothing is won. Ah well, like I said, I could see two ways of doing this: - Keep saying no don't do that - or just don't allow it If the second is not appropriate, and you don't mind keeping repeating yourself, I do not mind trying to get it working again via another solution. As for the rest, I am very interested in seeing a working MSYS+MinGW build which produces libraries usable by Microsoft linker. I am presently next to unfamiliar with GNU autoconf/automake and given my dislike for the dreaded build system, I am likely to make myself familiar with it only in a grave need :) I would be eternaly thankful to you if you could revise your patch and make the thing work with the following constraints and freedoms: 1. Don't, under any circumstances, break the build on Linux nor alter the binary compatibility there or on any OS which has Unix roots. Much of the world, to name GNOME and KDE as prominent examples, depend on libxml2 and they will whip our backs til the skin comes off if we affect them. 2. Resulting libraries must be usable by Microsoft linker. This means that those forsaken __declspec(dllimport/dllexport) things must be defined properly for the build of libxml2 itself and the user code. With all the development, etc at MSFT, you would have thought that they might have decided by now to try and get on with the time for exporting and importing symbols as well. Especially if they did not mind breaking things with the needed manifest stuff for newer MSCRT, etc 3. You may alter the output files on Windows, such as naming them differently (when I last tried, MSYS+MinGW produced a libxml2-2.dll, not the hoped for libxml2.dll). This is okay. As an orientation: If some greedy corporation must recompile all their Windows software for the new libxml2 release, that I don't care about. But if Tor Lillqvist can use the thing for his GTK and GIMP work without having to tweak it and thus be able to spend more time with his children, I am all in :) As Roumen showed, it is possible to not have the version appended by libtool. However, if you want it compatible with GCC and MSVC, you will have to have all three library extensions (.a, .dll.a and .lib), because as I pointed out, GCC search for .dll.a - .a - .lib if you did not specify static, and without the .dll.a and -DLIBXML_STATIC things will break ... 4. If possible, use the same set of headers for the dynamic and the static business, even if the user has to do a -DLIBXML_STATIC for the static part to work. I think it is a small requirement which is easily met and eases the packaging of binaries. This now sounds like a whole pile of demands and like I would love to see it done by someone else. Believe me, if I have had the time to meet the secrets of GNU autoconf/automake, I would have done it long ago. You seem to know your way there and can do it much more swiftly than I could. As a remedy, don't bother with things beneath the win32 subdirectory in the source. Once your patch to
Re: [xml] MSYS and MINGW: undefined reference to _imp__xmlFree
On 2009/11/09 at 10:53 PM, Roumen Petrov bugtr...@roumenpetrov.info wrote: Martin Schlemmer wrote: On 11/8/2009 at 8:08 PM, Roumen Petrov bugtr...@roumenpetrov.info wrote: Roumen Petrov wrote: Martin Schlemmer wrote: Hi, [SNIP] It seems to me Martin is right but proposed patch is not correct to me. I think that code has to set LIBXML_STATIC internally when is compiled for static library. As libxml build is libtool based we may use PIC definition. libtool when compile source for shared always set -DPIC . Idea was sort of to remove the need for that. I will respond to Igor's mail about that. Now with reverted commit http://git.gnome.org/cgit/libxml2/commit/?id=a194ccb8d19ddde94c2c04ddf197e6a 629f7cc9b , i.e. restored ...defined(IN_LIBXML)... plus following patch == diff --git a/libxml.h b/libxml.h index 3c44c83..1656ac2 100644 --- a/libxml.h +++ b/libxml.h @@ -90,4 +90,7 @@ void __xmlGlobalInitMutexDestroy(void); #endif #endif #endif +#ifndef PIC +# define LIBXML_STATIC +#endif #endif /* ! __XML_LIBXML_H__ */ == This probably will break MSVC and Borland. Also non-libtool-enabled builds might also break, as -fPIC -DPIC is added by libtool, but ignored by gcc on win32 as all code on x86-win32 is already position independent. No ! -fPIC is not set for gcc mingw target by libtool ! For mingw target it is another definition that you already use in the patch proposed by you : #if defined(DLL_EXPORT) i.e. libtool for mingw target set -DDLL_EXPORT -DPIC. For gcc on linux it is -fPIC -DPIC . For other compilers as example -kPIC -DPIC. In brief one is compiler flag and another is common for all platforms - it is C preprocessor flag -DPIC. Never mind here - I missed that it was in an internal header, and thus would not have effected external projects linking against libxml. Not sure what to suggest with this, but to check that with reverted commit that xmlsec is indeed built with -DLIBXML_STATIC if linking to the static version of the library. Don't mix preprocessor flags set by other projects when static linking with libxml is required. Like Igor pointed out, LIBXML_STATIC needs to be defined if you link against the static version for the current setup. If using pkg-config for a static only build of libxml, this is not an issue, but ... Regards, Martin Vrywaringsklousule / Disclaimer: http://www.nwu.ac.za/it/gov-man/disclaimer.html ___ xml mailing list, project page http://xmlsoft.org/ xml@gnome.org http://mail.gnome.org/mailman/listinfo/xml
Re: [xml] MSYS and MINGW: undefined reference to _imp__xmlFree
On 2009/11/09 at 10:53 PM, Roumen Petrov bugtr...@roumenpetrov.info wrote: Igor Zlatkovic wrote: On 05/11/09 12:50, Martin Schlemmer wrote: [SNIP] 3. You may alter the output files on Windows, such as naming them differently (when I last tried, MSYS+MinGW produced a libxml2-2.dll, not the hoped for libxml2.dll). This is okay. As an orientation: If some greedy corporation must recompile all their Windows software for the new libxml2 release, that I don't care about. But if Tor Lillqvist can use the thing for his GTK and GIMP work without having to tweak it and thus be able to spend more time with his children, I am all in :) if we use libtool flag -avoid-version the dll will be created without version number in name. I propose a patch t This year issue with patch (use more compatible autotools based build system for windows hosts) is closed with resolution Not GNOME (!). I would suggest splitting the patch into different ones that only handle one issue at a time, and then sending them here to be reviewed. Hopefully this is the preferred method for libxml. I can however point out that at least the $(EXEEXT) bits might be bogus, as it would seem to only affect things if cross-compiled to win32 on a non-win32 host. Here on a Windows host with MSYS it works fine, as the convenience wrappers have a .exe extension. So it might rather be a libtool issue when cross-compiling, although I do not have that much experience in this field. Regards, Martin Vrywaringsklousule / Disclaimer: http://www.nwu.ac.za/it/gov-man/disclaimer.html ___ xml mailing list, project page http://xmlsoft.org/ xml@gnome.org http://mail.gnome.org/mailman/listinfo/xml
[xml] xmllint: validating a document that doesn't specify a DTD
Should I be able to validate an XML document (such as a .glade file) that has no DOCTYPE line, and therefore doesn't specify a DTD? When I try it with xmllint, I get this error validity error : Validation failed: no DTD found ! even when I have specified a local DTD with --dtdvalid. -- murr...@murrayc.com www.murrayc.com www.openismus.com ___ xml mailing list, project page http://xmlsoft.org/ xml@gnome.org http://mail.gnome.org/mailman/listinfo/xml
[xml] Compilation fails with Sun Studio on Solaris 10
Hello. libtool: compile: /opt/sunstudio12.1/bin/cc -DHAVE_CONFIG_H -I. -I.. -I./include -I../include -D_REENTRANT -I/opt/local/zlib//include -g -c ../relaxng.c -KPIC -DPIC -o .libs/relaxng.o ../relaxng.c, line 5372: operands have incompatible types: pointer to char : pointer to const unsigned char ../relaxng.c, line 5372: warning: argument #5 is incompatible with prototype: prototype: pointer to const unsigned char : ../relaxng.c, line 510 argument : pointer to char ../relaxng.c, line 9462: warning: argument #3 is incompatible with prototype: prototype: pointer to const unsigned char : ../relaxng.c, line 2347 argument : pointer to char cc: acomp failed for ../relaxng.c *** Error code 1 make: Fatal error: Command failed for target `relaxng.lo' Current working directory /export/home/user/Source/libxml2-2.7.6/.32. (Also available at http://pastebin.ca/1674937 for a guaranteed unwrapped version...) I was trying to compile libxml2-2.7.6 on a Solaris 10 5/09 Sparc system using Sun Studio 12 Update 1 compiler. No CFLAGS or CXXFLAGS have been set. --($ ~/Source/libxml2-2.7.6/.32.)-- env | grep ^C CXX=/opt/sunstudio12.1/bin/CC CC=/opt/sunstudio12.1/bin/cc Any idea about what might be wrong? Searching the list, I found an /ancient/ mail from 3 years, 28 weeks, 1 day, 1 hour and 10 minutes ago *G* on http://thread.gmane.org/gmane.comp.gnome.lib.xml.general/11165/focus=11169 However, according to Daniels answer from way back then, Bill commited some patch. I fiddled now with relaxng: --- ../relaxng.c-kaputt_:-( Di Nov 17 16:14:40 2009 +++ ../relaxng.cDi Nov 17 16:15:23 2009 @@ -5369,7 +5369,7 @@ } else { xmlRngPErr(ctxt, node, XML_RNGP_CHOICE_CONTENT, expecting name, anyName, nsName or choice : got %s\n, - (node == NULL ? nothing : node-name), NULL); + (node == NULL ? BAD_CAST nothing : node-name), NULL); return (NULL); } if (ret != def) { http://pastebin.ca/1674944 Now it compiles, I think - but I get a sh*tload of symbol referencing errors - http://pastebin.ca/1674946 . Unsure if they are related? Well, I'd VERY much appreciate, if someone more knowledgeable could please have a look ;) Thanks a lot, Alexander ___ xml mailing list, project page http://xmlsoft.org/ xml@gnome.org http://mail.gnome.org/mailman/listinfo/xml
Re: [xml] xmllint: validating a document that doesn't specify a DTD
On Tue, 2009-11-17 at 14:24 +0100, Daniel Veillard wrote: On Tue, Nov 17, 2009 at 01:33:44PM +0100, Murray Cumming wrote: Should I be able to validate an XML document (such as a .glade file) that has no DOCTYPE line, and therefore doesn't specify a DTD? When I try it with xmllint, I get this error validity error : Validation failed: no DTD found ! even when I have specified a local DTD with --dtdvalid. Works for me with the version from git head: Thanks. I was actually using xmllint --valid --dtdvalid mydtd.dtd mydoc.xml So is --dtdvalid an alternative to --valid rather than a way of using --valid? -- murr...@murrayc.com www.murrayc.com www.openismus.com ___ xml mailing list, project page http://xmlsoft.org/ xml@gnome.org http://mail.gnome.org/mailman/listinfo/xml
Re: [xml] xmllint: validating a document that doesn't specify a DTD
On Tue, Nov 17, 2009 at 05:03:41PM +0100, Murray Cumming wrote: On Tue, 2009-11-17 at 14:24 +0100, Daniel Veillard wrote: On Tue, Nov 17, 2009 at 01:33:44PM +0100, Murray Cumming wrote: Should I be able to validate an XML document (such as a .glade file) that has no DOCTYPE line, and therefore doesn't specify a DTD? When I try it with xmllint, I get this error validity error : Validation failed: no DTD found ! even when I have specified a local DTD with --dtdvalid. Works for me with the version from git head: Thanks. I was actually using xmllint --valid --dtdvalid mydtd.dtd mydoc.xml So is --dtdvalid an alternative to --valid rather than a way of using --valid? and alternative, as DTD validation as defined in the XML-1.0 spec is --valid i.e. validating as parsing based on DOCTYPE contained in the document, and --dtdvalid is just a different kind of validation closely related, but certainly different, and in subtle case you may see different results (but in general it will be the same !) Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ dan...@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/ ___ xml mailing list, project page http://xmlsoft.org/ xml@gnome.org http://mail.gnome.org/mailman/listinfo/xml