compile error in xslt.c

9 November 2012, 16:37
src/xslt.c: In function 'apply_xslt_sheet':
src/xslt.c:417:69: error: dereferencing pointer to incomplete type
src/xslt.c:421:55: error: dereferencing pointer to incomplete type
src/xslt.c:421:80: error: dereferencing pointer to incomplete type

This is with default build options.

Hiawatha version: 8.6
Operating System: NetBSD/amd64 6.0
Hugo Leisink
10 November 2012, 18:48
Thanks for reporting. I'll take a look at it for the next release.
12 November 2012, 16:12
Whenever you find it, please post. I'll include the patch locally in the package I'm creating, until 8.7(?) is released.
Hugo Leisink
12 November 2012, 20:38
I'll see what I can do. Looking into this issue requires me to install and learn NetBSD. That takes some time. If you have an account for me on some NetBSD machine and with all the required building software installed, that could speed up the process.
Dmitry Mikhirev
21 November 2012, 08:45
I confirm this bug on ROSA Linux Desktop 2012.1 beta with Linaro gcc 4.7.3_2012.10 and libxml2 2.9.0.
Build log:
Installed packages:
Dmitry Mikhirev
21 November 2012, 09:49
This issue can be related to libxml2 API changes introduced by this commit:
Hugo Leisink
21 November 2012, 09:51
Try with this file and please let me know if it works.
Dmitry Mikhirev
21 November 2012, 11:33
Thank you!

Now xslt.c is being compiled successfully, but I get a linkage error:
/usr/bin/gcc -Wall -Wextra -O2 -g -Wl,--as-needed -Wl,--no-undefined -Wl,-z,relro -Wl,-O1 -Wl,--build-id -Wl,--enable-new-dtags -Wl,--hash-style=gnu CMakeFiles/hiawatha.dir/src/alternative.c.o CMakeFiles/hiawatha.dir/src/cache.c.o CMakeFiles/hiawatha.dir/src/cgi.c.o CMakeFiles/hiawatha.dir/src/client.c.o CMakeFiles/hiawatha.dir/src/envir.c.o CMakeFiles/hiawatha.dir/src/hiawatha.c.o CMakeFiles/hiawatha.dir/src/http.c.o CMakeFiles/hiawatha.dir/src/httpauth.c.o CMakeFiles/hiawatha.dir/src/libfs.c.o CMakeFiles/hiawatha.dir/src/libip.c.o CMakeFiles/hiawatha.dir/src/liblist.c.o CMakeFiles/hiawatha.dir/src/libssl.c.o CMakeFiles/hiawatha.dir/src/libstr.c.o CMakeFiles/hiawatha.dir/src/log.c.o CMakeFiles/hiawatha.dir/src/mimetype.c.o CMakeFiles/hiawatha.dir/src/monitor.c.o CMakeFiles/hiawatha.dir/src/rproxy.c.o CMakeFiles/hiawatha.dir/src/send.c.o CMakeFiles/hiawatha.dir/src/serverconfig.c.o CMakeFiles/hiawatha.dir/src/session.c.o CMakeFiles/hiawatha.dir/src/target.c.o CMakeFiles/hiawatha.dir/src/tomahawk.c.o CMakeFiles/hiawatha.dir/src/toolkit.c.o CMakeFiles/hiawatha.dir/src/userconfig.c.o CMakeFiles/hiawatha.dir/src/xslt.c.o -o hiawatha -rdynamic -lcrypt -lpthread -lz -lpolarssl -lxml2 -lxslt -Wl,-rpath,:::::::::::::::::::
CMakeFiles/hiawatha.dir/src/xslt.c.o: In function `show_index':
/home/m/rpmbuild/BUILD/hiawatha-8.6/src/xslt.c:709: undefined reference to `check_free'
/home/m/rpmbuild/BUILD/hiawatha-8.6/src/xslt.c:726: undefined reference to `check_free'
/home/m/rpmbuild/BUILD/hiawatha-8.6/src/xslt.c:722: undefined reference to `check_free'
collect2: error: ld returned 1 exit status
Hugo Leisink
21 November 2012, 11:42
Try redownloading the xslt file. I've made some changes. The problem was that in the meantime some changes has been made to the rest of the code, so the first xslt.c file required the rest of the 8.7 beta code.
Dmitry Mikhirev
21 November 2012, 12:03
Thank you again! Now build finished successfully.
27 November 2012, 23:50
This patch fixes the build error for me, too.

Now I get an error about libpolarssl not being found in runtime path. I'm thinking it's due to my build framework tho. Is it supposed to land at ${PREFIX}/lib?

(Adding some more text so the forum doesn't see me as a spammer.)
Hugo Leisink
28 November 2012, 00:48
There is some issue with the cmake build script if you change the prefix path after you already have run cmake. Remove the entire source directory, re-unzip the source tarball and run cmake only once with the prefix setting. Let me know if that works.
This topic has been closed.