After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 687701 - libxml2-2.9.0 on AIX6.1 using XL C "threads.c", line 918
libxml2-2.9.0 on AIX6.1 using XL C "threads.c", line 918
Status: RESOLVED OBSOLETE
Product: libxml2
Classification: Platform
Component: general
git master
Other Windows
: Normal normal
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2012-11-05 23:51 UTC by Dave Horner
Modified: 2021-07-05 13:26 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Dave Horner 2012-11-05 23:51:05 UTC
I'm using ftp://xmlsoft.org/libxml2/libxml2-2.9.0.tar.gz

AIX 6.1.0.0 with XL C/C++ using C++ compiler xlC_r

specifics:
export CC="xlC_r -ma -O3 -qstrict -qoptimize=3 -qmaxmem=16384"
export CXX="xlC_r -ma -O3 -qstrict -qoptimize=3 -qmaxmem=16384"
export CFLAGS="-I /usr/local/include"
export LDFLAGS="-L /usr/local/lib -lm -ldecNumber"
export CPPFLAGS=$CFLAGS
export CXXFLAGS=$CFLAGS
cd libxml2-2.9.0
./configure
make clean;make;make install;

I get the following:
        make  all-recursive
Making all in include
Making all in libxml
Target "all" is up to date.
Target "all-am" is up to date.
Target "all" is up to date.
Making all in .
  CC     threads.lo
"threads.c", line 918.20: 1506-046 (S) Syntax error.
"threads.c", line 918.20: 1506-277 (S) Syntax error: possible missing ';' or ','?
make: 1254-004 The error code from the last command is 1.

which is:
#ifdef HAVE_PTHREAD_H
    if ((libxml_is_threaded)  && (pthread_key_delete != NULL))
        pthread_key_delete(globalkey);
918:    once_control = PTHREAD_ONCE_INIT;


It does look like configure is using pthreads...

Thanks,
--dave
http://dave.thehorners.com/
Comment 1 donotspammemail 2012-11-13 04:12:17 UTC
Same thing:
threads.c:918:20: error: expected expression
    once_control = PTHREAD_ONCE_INIT;
                   ^
/usr/include/pthread.h:245:27: note: expanded from macro 'PTHREAD_ONCE_INIT'
#define PTHREAD_ONCE_INIT {_PTHREAD_ONCE_SIG_init, {0}}

OS X: 10.7.5-i386
Xcode: 4.5.2
CLT: 4.5.0.0.1.1249367152
LLVM-GCC: build 2336
Clang: 4.1 build 421
Comment 2 Dave Horner 2012-11-13 18:15:22 UTC
the aix docs even reference the pthread_once_t structure, and the PTHREAD_ONCE_INIT structural init macro...
http://pic.dhe.ibm.com/infocenter/aix/v6r1/index.jsp?topic=%2Fcom.ibm.aix.genprogc%2Fdoc%2Fgenprogc%2F1time_initializations.htm

on line 148 you can see we are already setting the once_control to PTHEAD_ONCE_INIT..

+148  static pthread_once_t once_control = PTHREAD_ONCE_INIT;

So, I commented out line 918, and it seems to be working!

Good luck,
--dave
http://dave.thehorners.com/
Comment 3 Daniel Veillard 2012-12-21 06:49:21 UTC
We have a patch for this in git, that will be fixed in 2.9.1 :

http://git.gnome.org/browse/libxml2/commit/?id=3f6cfbd1d38d0634a2ddcb9a0a13e1b5a2195a5e

Could you confirm that fixes your problem on AIX ?

Daniel
Comment 4 David E. Wheeler 2014-05-20 20:40:42 UTC
I can confirm that Daniel's patch worked for me on Mac OS X 10.9.3 and:

> clang --version
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.2.0
Thread model: posix
Comment 5 GNOME Infrastructure Team 2021-07-05 13:26:20 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version, then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new ticket at
  https://gitlab.gnome.org/GNOME/libxml2/-/issues/

Thank you for your understanding and your help.