Home
The Toolkit for Online Communities
15897 Community Members, 0 members online, 2312 visitors today
Log In Register

Forum OpenACS Q&A: Compiling ns_xml error

OpenACS Home : Forums : OpenACS Q&A : Compiling ns_xml error

Icon of Envelope Request notifications

+
Posted by Jun Yamog on
Hi,

I am trying to install OpenACS 4 and it ns_xml module of aolserver.

I got the ns_xml code from

http://acs-misc.sourceforge.net/nsxml.html

its version 1.4

Now since i use ximian gnome the libxml has been changed.  make had en
error that it cant find the xml headers.

I made a soft link to the gnome xml headers:

<aolserver src>/include/libxml -> /usr/include/gnome-xml/

make still could not continue but hey it now gets the xml headers i
made a small progress.  But i still can finish it.

Here the code:

gcc -I../aolserver/include -D_REENTRANT=1 -DNDEBUG=1 -g -fPIC -Wall
-Wno-unused -mcpu=i686 -DHAVE_CMMSG=1 -DUSE_FIONREAD=1
-DHAVE_COND_EINTR=1  -c -o ns_xml.o ns_xml.c
ns_xml.c: In function `xml_node_command':
ns_xml.c:1133: structure has no member named `children'
ns_xml.c: In function `Ns_ModuleInit':
ns_xml.c:1510: warning: implicit declaration of function `xmlMemSetup'
ns_xml.c:1510: `xmlFreeFunc' undeclared (first use in this function)
ns_xml.c:1510: (Each undeclared identifier is reported only once
ns_xml.c:1510: for each function it appears in.)
ns_xml.c:1510: parse error before `ns_free'
ns_xml.c:1519: warning: implicit declaration of function `xmlInitParser'
make: *** [ns_xml.o] Error 1


I looked at the nsxml.c source saw where it is but cant solve it.
Besides I maybe just using a broken nsxml.c

Can someone help me?

+
Posted by Jonathan Marsden on
I use an (admittedly rather old!) GNOME setup here.  What I did was just install libxml2 and libxml2-devel RPMs; there was no conflict with the pre-existing libxml-1.8.10-0_helix RPM.

If that will work for your (probably newer) GNOME installation too, it should avoid all the need for editing the Makefile, etc.

+
Posted by Jun Yamog on
Hi Jonathan,

Thanks for the great help.  Downloaded the SRPMs so I would know if it
would run my new libs.  The rpms compiled, nsxml compiled... alright!!!!!

So folks.... read the instructions. libxml2

Jun

+
Posted by MK Tam on
I don't know why I cannot install the rpms (libxml2 and libxml-devel) downloaded from xmlsoft.org, the package manager always complain "...only packages with major numbers <= 3 are supported by this version of RPM".  Is my package manager too old (version3)? Any suggestion?
+
Posted by Jun Yamog on
Hi,

I use rpm ver 4.  on both RH6.2 and RH7.1 i suggest you upgarde your
rpms.  There is an instruction at Redhat to upgrade your rpm its not
straight rpm upgrade.  You have to upgrade your db3 ,etc.

Jun

+
Posted by MK Tam on
Thanks. I finally get it done by downloading and compiling the source of libxml2.  One more question: is libxml2-devel necessary if I just want nsxml.so without XSLT support?
+
Posted by Jonathan Marsden on
You only need libxml2-devel to (for example) recompile libxslt.
All you need for nsxml.so and OpenACS 4.x is libxml2; however, when I asked about the need for libxslt support, I was advised by folks here to put libxslt support into my RPMs -- some folks think OpenACS 4 may eventually use some of the XSLT stuff, either by default or when some OpenACS 4.x users want to customize it to do so.

Grabbing the libxslt-1.0.3 SRPM and recompiling it doesn't take all that long.

+
Posted by MK Tam on
Eventually I dig out how to install nsxml.so with XSLT in my Redhat6.2 with rpm3:

first of all, you have to upgrade rpm3 to rpm4:
- do a rpm --rebuilddb is recommended before upgrading;
- download 3 db3***6.x***.rpm packages and 5 related packages: rpm rpm-devel, rpm-build, rpm-python, popt from rpm.org or redhat
- install the 3 db3 packages first, then the remaining 5.
- do a rpm --rebuilddb to convert db1 to db3.

then you can install libxml2, libxm2-devel and libxslt with the upgraded rpm4.