Jump to content

Compiling on Ubuntu 9.10


Recommended Posts

Hmm, sounds similar to this on OS X. (People have built successfully on Ubuntu before, but maybe an older version (perhaps this changed in 9.10?), and also our code has changed some threading stuff recently.)

Could you look in /usr/include/libxml2/libxml/xmlversion.h for the block of code that sets LIBXML_THREAD_ENABLED? Also, could you run

echo '_REENTRANT' | g++ -E -pthread -

and copy the output? Hopefully one of those should show why it's not working.

Link to comment
Share on other sites

Hmm, sounds similar to this on OS X. (People have built successfully on Ubuntu before, but maybe an older version (perhaps this changed in 9.10?), and also our code has changed some threading stuff recently.)

Well that is exactly the problem. I don't know when they turned it off...

Could you look in /usr/include/libxml2/libxml/xmlversion.h for the block of code that sets LIBXML_THREAD_ENABLED?


#if 0
#if defined(_REENTRANT) || defined(__MT__) || \
(defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE - 0 >= 199506L))
#define LIBXML_THREAD_ENABLED
#endif
#endif

as I said, this was disabled...

The output:

Also, could you run
echo '_REENTRANT' | g++ -E -pthread -

and copy the output?


# 1 "<stdin>"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "<stdin>"
1

Link to comment
Share on other sites

Thanks, just wanted to check :). Looks like it's a newly introduced problem in 9.10, given that nobody has hit that error before. I can't find any indication of why it changed, though.

We use libxml2 across multiple threads, so it really needs to be compiled with thread support. I'm not particularly familiar with how these things work on Ubuntu - I guess the options are to wait for them to fix the bug, or to use their source package and tweak it to configure with --with-threads, or to download and install the normal upstream version, or for us to bundle the upstream version and compile it automatically. None of those seem ideal :P

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...