bug-recutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-recutils] [Platform-testers] Pre-release recutils 1.4.92 in alp


From: Bruno Haible
Subject: Re: [bug-recutils] [Platform-testers] Pre-release recutils 1.4.92 in alpha.gnu.org
Date: Thu, 12 Jan 2012 14:17:43 +0100
User-agent: KMail/4.7.4 (Linux/3.1.0-1.2-desktop; KDE/4.7.4; x86_64; ; )

Jose E. Marchesi wrote:
> The pre-release recutils-1.4.92.tar.gz is now available at
> ftp://alpha.gnu.org/gnu/recutils.

Results:

------------------------------------------------------------------------------

* Linux/x86_64
* Linux/IA-64
* Linux/hppa
* Linux/PowerPC (both 32-bit and 64-bit)
* Linux/SPARC (both 32-bit and 64-bit)
* MacOS X 10.5 (both 32-bit and 64-bit)
* OpenBSD 4.9
* NetBSD 5.1
* AIX 5.3
* HP-UX 11.00
* OSF/1 5.1
* Solaris 9, 10
* Cygwin 1.7.9

All 9 tests passed

------------------------------------------------------------------------------

* IRIX 6.5 with cc

Compilation errors:

cc-1040 cc: ERROR File = rec-int.c, Line = 75
  An identifier is expected.

  #define ADD_ERROR(buf,str,...)                          \
                            ^

cc-1055 cc: ERROR File = rec-int.c, Line = 173
  A macro invocation has too many arguments.

                       rec_rset_source (rset), rec_rset_type (rset), 
min_records);
                       ^

cc-1020 cc: ERROR File = rec-int.c, Line = 171
  The identifier "__VA_ARGS__" is undefined.

            ADD_ERROR (errors,
            ^

and so on.

This C compiler does not understand C99 macro syntax by default. But it
does it when "cc -c99" is used. To this effect, AC_PROG_CC_C99 must be used.
This patch fixes the problem and leads to "All 9 tests passed":

--- configure.ac.bak    2012-01-12 14:16:44.000000000 +0100
+++ configure.ac        2012-01-12 02:52:01.000000000 +0100
@@ -33,6 +33,7 @@
 
 AC_PROG_LIBTOOL
 AC_PROG_CC
+AC_PROG_CC_C99
 AM_PROG_CC_C_O
 
 dnl Both lex and yacc are required to generate the lexer/parser source

------------------------------------------------------------------------------

* mingw

Link error:
libtool: link: gcc-3 -mno-cygwin -g -O2 -o .libs/recinf.exe recutl.o recinf.o  
-L/usr/local/mingw/lib ../lib/.libs/libgnu.a ../src/.libs/librec.dll.a 
/usr/local/mingw/lib/libintl.dll.a /usr/local/mingw/lib/libiconv.dll.a 
-L/usr/local/mingw/lib
recutl.o: In function `recutl_index_add_random':
/home/bruno/multibuild-1571/mingw2009/recutils-1.4.92/utils/recutl.c:654: 
undefined reference to `_srandom'
/home/bruno/multibuild-1571/mingw2009/recutils-1.4.92/utils/recutl.c:657: 
undefined reference to `_random'
collect2: ld returned 1 exit status
make[1]: *** [recinf.exe] Error 1

Bad luck: Gnulib has no replacement for the functions random(), srandom().

BUT Gnulib has a portable replacement for the function random_r() and
srandom_r(). So I would rewrite the code to use these functions and
import 'random_r' from Gnulib.

------------------------------------------------------------------------------

Bruno




reply via email to

[Prev in Thread] Current Thread [Next in Thread]