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 332173 - Adjustments for libexslt/date.c necessary on IBM AIX
Adjustments for libexslt/date.c necessary on IBM AIX
Status: RESOLVED FIXED
Product: libxslt
Classification: Platform
Component: general
1.1.15
Other All
: Normal normal
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2006-02-22 13:11 UTC by Björn Wiberg
Modified: 2007-08-23 09:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Diff file for libexslt/date.c (335 bytes, patch)
2006-02-22 14:04 UTC, Björn Wiberg
none Details | Review
Diff file for libexslt/date.c (libxslt 1.1.20) (377 bytes, patch)
2007-03-19 17:37 UTC, Björn Wiberg
none Details | Review

Description Björn Wiberg 2006-02-22 13:11:52 UTC
Please describe the problem:
In order for libexslt to compile correctly on IBM AIX, a small patch has to be
applied to libexslt/date.c.

Steps to reproduce:
1. Configure e.g. with 'CC=/usr/local/bin/gcc ./configure --disable-static
--without-python'.
2. Run make, e.g. with '/opt/freeware/bin/make'.
3. Watch the error message. :-)


Actual results:
I get the following error message:

/../

 /usr/local/bin/gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../libxslt -I../libexslt
-I.. -I../libxslt -I../libexslt -I/usr/local/include/libxml2 -g -O2 -Wall -g -O2
-Wall -MT date.lo -MD -MP -MF .deps/date.Tpo -c date.c  -DPIC -o .libs/date.o
In file included from /usr/local/include/libxml2/libxml/parser.h:796,
                 from /usr/local/include/libxml2/libxml/globals.h:18,
                 from /usr/local/include/libxml2/libxml/threads.h:35,
                 from /usr/local/include/libxml2/libxml/xmlmemory.h:216,
                 from /usr/local/include/libxml2/libxml/tree.h:1150,
                 from date.c:35:
/usr/local/include/libxml2/libxml/encoding.h:136: error: parse error before
"iconv_t"
/usr/local/include/libxml2/libxml/encoding.h:136: warning: no semicolon at end
of struct or union
/usr/local/include/libxml2/libxml/encoding.h:137: warning: type defaults to
`int' in declaration of `iconv_out'
/usr/local/include/libxml2/libxml/encoding.h:137: warning: data definition has
no type or storage class
date.c: In function `exsltDateCurrent':
date.c:764: warning: implicit declaration of function `localtime_r'
date.c:783: warning: implicit declaration of function `gmtime_r'
make[2]: *** [date.lo] Error 1
make[2]: Leaving directory `/usr/local/src/libxslt-1.1.15-bug/libexslt'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/libxslt-1.1.15-bug'
make: *** [all] Error 2
root@spinus:/usr/local/src/libxslt-1.1.15-bug# 

Expected results:
No error message.

Does this happen every time?
Yes.

Other information:
To resolve the bug, patch libexslt/date.c with the following diff (generated
using diff -c):

---8<--- cut here ---
*** date.c.ORIGINAL     Mon Nov  8 16:35:03 2004
--- date.c      Wed Feb 22 10:41:47 2006
***************
*** 29,35 ****
--- 29,37 ----
  #endif
  
  #if HAVE_LOCALTIME_R  /* _POSIX_SOURCE required by gnu libc */
+ #ifndef _AIX51                /* but on AIX we're not using gnu libc */
  #define _POSIX_SOURCE
+ #endif
  #endif
  
  #include <libxml/tree.h>
--->8--- cut here ---

The patch was originally made by IBM, available at:
ftp://ftp.software.ibm.com/aix/freeSoftware/aixtoolbox/PATCHES/libxslt-date.patch

I wanted to submit it so that it has the chance of making it into future libxslt
releases.

(IBM has applied this patch to their RPM version of libxslt, libxslt-1.1.5, but
I needed to compile a newer version, som came across this.)
Comment 1 Björn Wiberg 2006-02-22 14:04:14 UTC
Created attachment 59931 [details] [review]
Diff file for libexslt/date.c
Comment 2 Björn Wiberg 2007-03-19 17:35:58 UTC
This is still true (for 1.1.20). Attaching patch for 1.1.20.
Comment 3 Björn Wiberg 2007-03-19 17:37:04 UTC
Created attachment 84896 [details] [review]
Diff file for libexslt/date.c (libxslt 1.1.20)
Comment 4 Daniel Veillard 2007-08-23 09:48:46 UTC
Okay, makes sense, applied and commited to SVN,

  thanks !

Daniel