HTML module improperly built - parse-internal#2 not found

Bug #1284240 reported by Cefn
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zorba
New
Undecided
Unassigned

Bug Description

I downloaded today's bzr version of zorba and zorba_modules.

After completing a cmake, make, make install sequence I was surprised to find the html module was not available with a simple source example such as...

import module namespace html = "http://www.zorba-xquery.com/modules/converters/html";

html:parse("file:///home/cefn/Documents/something.html")

It threw an error suggesting there was no such module installed...

Message: (no URI):1,2: static error [err:XQST0059]: module "http://www.zorba-xquery.com/modules/converters/html" not found at location "http://www.zorba-xquery.com/modules/converters/html" : "http://www.zorba-xquery.com/modules/converters/html.module": Could not create stream resource.

I therefore created a build directory in zorba_modules/html and manually ran the cmake, make, make install sequence from there.

Initially I hit the following compiler error (which may explain why the module was silently skipped perhaps)....

/home/cefn/Documents/code/zorba/bzr/zorba_modules/html/src/html.xq.src/html.cpp: In member function ‘virtual zorba::ItemSequence_t zorba::htmlmodule::ParseFunction::evaluate(const Arguments_t&, const zorba::StaticContext*, const zorba::DynamicContext*) const’:
/home/cefn/Documents/code/zorba/bzr/zorba_modules/html/src/html.xq.src/html.cpp:45:5: error: ‘auto_ptr’ is not a member of ‘std’
     std::auto_ptr<std::istringstream> iss;
     ^
/home/cefn/Documents/code/zorba/bzr/zorba_modules/html/src/html.xq.src/html.cpp:45:37: error: expected primary-expression before ‘>’ token
     std::auto_ptr<std::istringstream> iss;
                                     ^
/home/cefn/Documents/code/zorba/bzr/zorba_modules/html/src/html.xq.src/html.cpp:45:39: error: ‘iss’ was not declared in this scope
     std::auto_ptr<std::istringstream> iss;
                                       ^
make[2]: *** [src/CMakeFiles/modlib1_html.xq.dir/html.xq.src/html.cpp.o] Error 1
make[1]: *** [src/CMakeFiles/modlib1_html.xq.dir/all] Error 2
make: *** [all] Error 2

However, this was easily overcome by adding the line...
#include <memory>
...after the #include <stream> line, after which the module compiled and installed.

Whereas before, the module with the specified namespace was not available, after running the install I had a different error when trying to tidy a document, as follows...

Message: </usr/local/share/zorba/uris/com/zorba-xquery/www/modules/converters/html.module>:127,18: error [zerr:ZXQP0008]: "{http://www.zorba-xquery.com/modules/converters/html}parse-internal#2": function implementation not found.

This final error I don't know how to tackle. I attach the .deb which was created by wrapping the sudo make install invocation in a checkinstall call, which indicates all the additional files which were added to my system. Does the html module still build correctly, and what do I have to do to achieve this?

Revision history for this message
Cefn (6-launchpad-net-cefn-com) wrote :
summary: - HTML module improperly built
+ HTML module improperly built - parse-internal#2 not found
Revision history for this message
Cefn (6-launchpad-net-cefn-com) wrote :

I tried installing the zorba-html-module 3.0.0 from PPA .deb, and then soft-linking the 'converters' directory from its /usr/lib path to /usr/local/lib and from its /usr/share path to /usr/local/share (where my source-compiled zorba was installed).

However, the module installed in this way throws a different error...

Message: </usr/local/share/zorba/uris/com/zorba-xquery/www/modules/converters/html.module>:85,5: error [zerr:ZAPI0040]: iterator is not open.

I guess I have to get the bzr version of the html module to work or it won't be compatible with the latest build.

Revision history for this message
Cefn (6-launchpad-net-cefn-com) wrote :

For reference, these are the symlinks which created the above error when trying to use a previously build html module within a PPA .deb. Probably best for me to to focus on fixing the original missing function reference error within the bzr version of html-module, but don't know how to proceed.

/usr/local$ ls -la lib/zorba/com/zorba-xquery/www/modules/converters
lrwxrwxrwx 1 root root 54 Feb 24 18:24 lib/zorba/com/zorba-xquery/www/modules/converters -> /usr/lib/zorba/com/zorba-xquery/www/modules/converters

/usr/local$ ls -la share/zorba/uris/com/zorba-xquery/www/modules/converters
lrwxrwxrwx 1 root root 61 Feb 24 18:23 share/zorba/uris/com/zorba-xquery/www/modules/converters -> /usr/share/zorba/uris/com/zorba-xquery/www/modules/converters

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.