bug-recutils
[Top][All Lists]
Advanced

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

[bug-recutils] Re: recutils 1.1 and portability


From: Bruno Haible
Subject: [bug-recutils] Re: recutils 1.1 and portability
Date: Tue, 21 Dec 2010 04:36:02 +0100
User-agent: KMail/1.9.9

Hello José,

> Please find the updated sources in the git repo.    

Thanks.

The README-dev says that I should run ./autogen.sh, so I do that, then
the configuration bails out:

  $ ./configure CPPFLAGS=-Wall
  ...
  checking for mdb_init in -lmdb... no
  ./configure: line 31538: syntax error near unexpected token `GLIB,'
  ./configure: line 31538: `PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.0.0,'

If your policy is to put all macro sources into the repository so that a
hacker only needs to have autoconf, automake, libtool, m4 installed, then
please also add the source for the PKG_CHECK_MODULES macro to the repository.

A bit later, I get a build failure:
$ make
...
/bin/sh ../build-aux/ylwrap rec-sex-lex.l lex.yy.c rec-sex-lex.c -- flex  -d
"/home/bruno/data/develop/RECUTILS/recutils/src/rec-sex-lex.l", line 31: 
unrecognized %option: reentrant
"/home/bruno/data/develop/RECUTILS/recutils/src/rec-sex-lex.l", line 32: 
unrecognized %option: bison-bridge
"/home/bruno/data/develop/RECUTILS/recutils/src/rec-sex-lex.l", line 33: 
unrecognized %option: extra-type
"/home/bruno/data/develop/RECUTILS/recutils/src/rec-sex-lex.l", line 35: 
unrecognized '%' directive
"/home/bruno/data/develop/RECUTILS/recutils/src/rec-sex-lex.l", line 38: bad 
character: }
make[2]: *** [rec-sex-lex.c] Error 1

I'm using flex version 2.5.4. With flex version 2.5.35 it works fine.
Maybe you can mention this requirement in README-dev?

1) After doing "make dist", I compare the contents of the generated tarball
with the contents of the git repository.
  - The file po/Makevars.template is not needed, neither in the tarball nor
    in the git repository. You can "git rm po/Makevars.template" without
    problems.
  - The file torture/rec-comment/#rec-comment-new.c# looks also like it could
    be removed.
  - lib/getdate.c is obsolete, it was renamed to lib/parse-datetime.c.

2) Test on MacOS X:

Build failure:
$ make
...
libtool: link: gcc -dynamiclib  -o .libs/librec.0.dylib  .libs/rec.o 
.libs/rec-mset.o .libs/rec-utils.o .libs/rec-comment.o .libs/rec-field-name.o 
.libs/rec-field.o .libs/rec-record.o .libs/rec-rset.o .libs/rec-db.o 
.libs/rec-parser.o .libs/rec-writer.o .libs/rec-int.o .libs/rec-sex-parser.o 
.libs/rec-sex-ast.o .libs/rec-sex-tab.o .libs/rec-sex-lex.o .libs/rec-sex.o 
.libs/rec-fex.o .libs/rec-types.o .libs/rec-buf.o   
.libs/librec.lax/libgnu.a/asnprintf.o .libs/librec.lax/libgnu.a/c-ctype.o 
.libs/librec.lax/libgnu.a/cloexec.o .libs/librec.lax/libgnu.a/close-stream.o 
.libs/librec.lax/libgnu.a/closeout.o .libs/librec.lax/libgnu.a/error.o 
.libs/librec.lax/libgnu.a/execute.o .libs/librec.lax/libgnu.a/exitfail.o 
.libs/librec.lax/libgnu.a/fatal-signal.o .libs/librec.lax/libgnu.a/fcntl.o 
.libs/librec.lax/libgnu.a/fpending.o .libs/librec.lax/libgnu.a/getopt.o 
.libs/librec.lax/libgnu.a/getopt1.o .libs/librec.lax/libgnu.a/gettime.o 
.libs/librec.lax/libgnu.a/gl_array_list.o .libs/librec.lax/libgnu.a/gl_list.o 
.libs/librec.lax/libgnu.a/isnanl.o .libs/librec.lax/libgnu.a/localcharset.o 
.libs/librec.lax/libgnu.a/lstat.o .libs/librec.lax/libgnu.a/malloca.o 
.libs/librec.lax/libgnu.a/open.o .libs/librec.lax/libgnu.a/parse-datetime.o 
.libs/librec.lax/libgnu.a/printf-args.o 
.libs/librec.lax/libgnu.a/printf-frexp.o 
.libs/librec.lax/libgnu.a/printf-frexpl.o 
.libs/librec.lax/libgnu.a/printf-parse.o .libs/librec.lax/libgnu.a/quotearg.o 
.libs/librec.lax/libgnu.a/rawmemchr.o .libs/librec.lax/libgnu.a/regex.o 
.libs/librec.lax/libgnu.a/setenv.o .libs/librec.lax/libgnu.a/stat.o 
.libs/librec.lax/libgnu.a/strchrnul.o .libs/librec.lax/libgnu.a/tempname.o 
.libs/librec.lax/libgnu.a/vasnprintf.o .libs/librec.lax/libgnu.a/wait-process.o 
.libs/librec.lax/libgnu.a/xalloc-die.o .libs/librec.lax/libgnu.a/xmalloc.o   
-L/Users/bruno/data/local-macos/lib 
/Users/bruno/data/local-macos/lib/libintl.dylib 
/Users/bruno/data/local-macos/lib/libiconv.dylib -lc -lcurl  -O2   
-install_name  /Users/bruno/data/local-macos/lib/librec.0.dylib 
-compatibility_version 1 -current_version 1.0 -Wl,-single_module
Undefined symbols:
  "_program_name", referenced from:
      _program_name$non_lazy_ptr in error.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[2]: *** [librec.la] Error 1
make[1]: *** [all] Error 2
make: *** [all-recursive] Error 1

A possible fix: Add module 'progname' to the librec library, and invoke
set_program_name (argv[0]) in the main() function of every program.

3) Test on FreeBSD 6.4:

Builds, checks, and installs fine.

4) Test on AIX 5.1:

$ export CC="xlc -D_ALL_SOURCE -O" CXX="xlC -D_ALL_SOURCE -O"
$ configure
$ make
...
        source='rec.c' object='rec.lo' libtool=yes  DEPDIR=.deps depmode=aix 
/bin/sh ../build-aux/depcomp  /bin/sh ../libtool --tag=CC    --mode=compile xlc 
-D_ALL_SOURCE -O -DHAVE_CONFIG_H -I.   -I../lib 
-DLOCALEDIR=\"/home/haible/prefix-aix51-cc/share/locale\"    -Wall 
-fno-strict-aliasing  -g -c -o rec.lo rec.c
libtool: compile:  xlc -D_ALL_SOURCE -O -DHAVE_CONFIG_H -I. -I../lib 
-DLOCALEDIR=\"/home/haible/prefix-aix51-cc/share/locale\" -Wall 
-fno-strict-aliasing -g -c -M rec.c  -DPIC -o .libs/rec.o
xlc: 1501-210 command option Wall contains an incorrect subargument
make: 1254-004 The error code from the last command is 1.

The src/Makefile.am and utils/Makefile.am contain the lines
  AM_CFLAGS = -Wall -fno-strict-aliasing
This works only with GCC. Other C compilers have different ways to specify
warning and code generation options.

Recommended fix: Either remove these options, and use them only privately on
your machine (and possibly recommend them in README or README-dev). Or use the
gnulib modules 'warnings' and 'manywarnings', documented at
<http://www.gnu.org/software/gnulib/manual/html_node/warnings.html>
<http://www.gnu.org/software/gnulib/manual/html_node/manywarnings.html>

Then, a link failure:
$ make
...
libtool: link: xlc -D_ALL_SOURCE -O -Wl,-bM:SRE -o .libs/librec.so.0  
.libs/rec.o .libs/rec-mset.o .libs/rec-utils.o .libs/rec-comment.o 
.libs/rec-field-name.o .libs/rec-field.o .libs/rec-record.o .libs/rec-rset.o 
.libs/rec-db.o .libs/rec-parser.o .libs/rec-writer.o .libs/rec-int.o 
.libs/rec-sex-parser.o .libs/rec-sex-ast.o .libs/rec-sex-tab.o 
.libs/rec-sex-lex.o .libs/rec-sex.o .libs/rec-fex.o .libs/rec-types.o 
.libs/rec-buf.o   ../lib/.libs/libgnu.a  -lc -Wl,-bnoentry  -O   
-Wl,-bE:.libs/librec.exp -Wl,-bernotok
ld: 0711-317 ERROR: Undefined symbol: program_name
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
make: 1254-004 The error code from the last command is 8.

Same error as on MacOS X.

5) Test on HP-UX 11.00:

A build failure:
$ make
...
Making all in po
Make: line 255: syntax error.  Stop.
*** Error exit code 1

Reason: POFILES is empty. It is apparently an interoperability bug in gettext:
it does not work with this 'make' program when no translations are present.

Workaround: Use GNU make.

Then it builds, checks, installs fine.

6) Test on IRIX 6.5:

Same build failure:
$ make
...
Making all in po
UX:make: ERROR: make: file `Makefile' line 255: Syntax error
*** Error code 1 (bu21)

Workaround: Use GNU make.

Then it builds, checks, installs fine.

7) Test on Solaris 8:

Link failure:
$ make
...
libtool: link: cc -O -G -z defs -h librec.so.0 -o .libs/librec.so.0.0.0  
.libs/rec.o .libs/rec-mset.o .libs/rec-utils.o .libs/rec-comment.o 
.libs/rec-field-name.o .libs/rec-field.o .libs/rec-record.o .libs/rec-rset.o 
.libs/rec-db.o .libs/rec-parser.o .libs/rec-writer.o .libs/rec-int.o 
.libs/rec-sex-parser.o .libs/rec-sex-ast.o .libs/rec-sex-tab.o 
.libs/rec-sex-lex.o .libs/rec-sex.o .libs/rec-fex.o .libs/rec-types.o 
.libs/rec-buf.o  -z allextract ../lib/.libs/libgnu.a -z defaultextract  -lrt 
-lc  -O  
Undefined                       first referenced
 symbol                             in file
program_name                        ../lib/.libs/libgnu.a(error.o)
ld: fatal: Symbol referencing errors. No output written to .libs/librec.so.0.0.0
*** Error code 1

Same error as on MacOS X.

8) Test on Tru64 (OSF/1 5.1):

Builds, checks, and installs fine.

9) Test on Cygwin 1.7:

Link failure:
$ make
...
libtool: link: gcc -shared  .libs/rec.o .libs/rec-mset.o .libs/rec-utils.o 
.libs/rec-comment.o .libs/rec-field-name.o .libs/rec-field.o .libs/rec-record.o 
.libs/rec-rset.o .libs/rec-db.o .libs/rec-parser.o .libs/rec-writer.o 
.libs/rec-int.o .libs/rec-sex-parser.o .libs/rec-sex-ast.o .libs/rec-sex-tab.o 
.libs/rec-sex-lex.o .libs/rec-sex.o .libs/rec-fex.o .libs/rec-types.o 
.libs/rec-buf.o  -Wl,--whole-archive ../lib/.libs/libgnu.a 
-Wl,--no-whole-archive  -L/usr/local/cygwin/lib 
/usr/local/cygwin/lib/libintl.dll.a /usr/local/cygwin/lib/libiconv.dll.a  -O2   
-o .libs/cygrec-0.dll -Wl,--enable-auto-image-base -Xlinker --out-implib 
-Xlinker .libs/librec.dll.a
Creating library file: .libs/librec.dll.a../lib/.libs/libgnu.a(error.o): In 
function `error_at_line':
/home/bruno/recutils-1.0.20101220/lib/error.c:365: undefined reference to 
`_program_name'
../lib/.libs/libgnu.a(error.o): In function `error':
/home/bruno/recutils-1.0.20101220/lib/error.c:306: undefined reference to 
`_program_name'
collect2: ld returned 1 exit status

make[2]: *** [librec.la] Error 1

Same error as on MacOS X.

10) Test on mingw:

Builds and installs fine.

Tests show error messages but pass nevertheless:

Running recinf test(s): 
  recinf-empty ok
./testutils.sh: line 143: bc: command not found
  recinf-one-record fail (see recinf-one-record.diff)
./testutils.sh: line 143: bc: command not found
  recinf-multiple-records fail (see recinf-multiple-records.diff)
./testutils.sh: line 143: bc: command not found
  recinf-multiple-named fail (see recinf-multiple-named.diff)
./testutils.sh: line 143: bc: command not found
  recinf-multiple-named-descriptors fail (see 
recinf-multiple-named-descriptors.diff)
./testutils.sh: line 143: bc: command not found
  recinf-multiple-types fail (see recinf-multiple-types.diff)
./testutils.sh: line 143: bc: command not found
  recinf-names-only fail (see recinf-names-only.diff)
./testutils.sh: line 143: bc: command not found
PASS: recinf.sh
Running recsel test(s): 
  recsel-all-fields fail (see recsel-all-fields.diff)
./testutils.sh: line 143: bc: command not found
  recsel-one-field fail (see recsel-one-field.diff)
./testutils.sh: line 143: bc: command not found
  recsel-two-fields fail (see recsel-two-fields.diff)
./testutils.sh: line 143: bc: command not found
  recsel-values fail (see recsel-values.diff)
./testutils.sh: line 143: bc: command not found
  recsel-multiple-values fail (see recsel-multiple-values.diff)
./testutils.sh: line 143: bc: command not found
  recsel-collapsed fail (see recsel-collapsed.diff)
./testutils.sh: line 143: bc: command not found
  recsel-values-collapsed fail (see recsel-values-collapsed.diff)
./testutils.sh: line 143: bc: command not found
  recsel-row fail (see recsel-row.diff)
./testutils.sh: line 143: bc: command not found
  recsel-collapsed-row fail (see recsel-collapsed-row.diff)
./testutils.sh: line 143: bc: command not found
  recsel-multi-all-fields fail (see recsel-multi-all-fields.diff)
./testutils.sh: line 143: bc: command not found
  recsel-multi-values fail (see recsel-multi-values.diff)
./testutils.sh: line 143: bc: command not found
  recsel-multi-collapsed-values fail (see recsel-multi-collapsed-values.diff)
./testutils.sh: line 143: bc: command not found
  recsel-count fail (see recsel-count.diff)
./testutils.sh: line 143: bc: command not found
  recsel-subs fail (see recsel-subs.diff)
./testutils.sh: line 143: bc: command not found
  recsel-subs-2 fail (see recsel-subs-2.diff)
./testutils.sh: line 143: bc: command not found
  recsel-index fail (see recsel-index.diff)
./testutils.sh: line 143: bc: command not found
  recsel-index fail (see recsel-index.diff)
./testutils.sh: line 143: bc: command not found
  recsel-type fail (see recsel-type.diff)
./testutils.sh: line 143: bc: command not found
  recsel-type-2 fail (see recsel-type-2.diff)
./testutils.sh: line 143: bc: command not found
  recsel-type-3 fail (see recsel-type-3.diff)
./testutils.sh: line 143: bc: command not found
  recsel-type-4 fail (see recsel-type-4.diff)
./testutils.sh: line 143: bc: command not found
  recsel-sex-field-names fail (see recsel-sex-field-names.diff)
./testutils.sh: line 143: bc: command not found
  recsel-sex-field-names-2 fail (see recsel-sex-field-names-2.diff)
./testutils.sh: line 143: bc: command not found
  recsel-sex-integer-equal fail (see recsel-sex-integer-equal.diff)
./testutils.sh: line 143: bc: command not found
  recsel-sex-integer-nonequal fail (see recsel-sex-integer-nonequal.diff)
./testutils.sh: line 143: bc: command not found
  recsel-sex-integer-lessthan fail (see recsel-sex-integer-lessthan.diff)
./testutils.sh: line 143: bc: command not found
  recsel-sex-integer-biggerthan fail (see recsel-sex-integer-biggerthan.diff)
./testutils.sh: line 143: bc: command not found
  recsel-sex-integer-plus fail (see recsel-sex-integer-plus.diff)
./testutils.sh: line 143: bc: command not found
  recsel-sex-integer-minus fail (see recsel-sex-integer-minus.diff)
./testutils.sh: line 143: bc: command not found
  recsel-sex-integer-mul fail (see recsel-sex-integer-mul.diff)
./testutils.sh: line 143: bc: command not found
  recsel-sex-integer-div fail (see recsel-sex-integer-div.diff)
./testutils.sh: line 143: bc: command not found
  recsel-sex-integer-mod fail (see recsel-sex-integer-mod.diff)
./testutils.sh: line 143: bc: command not found
  recsel-sex-integer-not fail (see recsel-sex-integer-not.diff)
./testutils.sh: line 143: bc: command not found
  recsel-sex-integer-and fail (see recsel-sex-integer-and.diff)
./testutils.sh: line 143: bc: command not found
  recsel-sex-integer-or fail (see recsel-sex-integer-or.diff)
./testutils.sh: line 143: bc: command not found
  recsel-sex-real-equal error: testutils: test_tool: running recsel.
  recsel-sex-real-nonequal error: testutils: test_tool: running recsel.
  recsel-sex-real-lessthan error: testutils: test_tool: running recsel.
  recsel-sex-real-biggerthan error: testutils: test_tool: running recsel.
  recsel-sex-real-plus error: testutils: test_tool: running recsel.
  recsel-sex-real-mul error: testutils: test_tool: running recsel.
  recsel-sex-sharp-zero fail (see recsel-sex-sharp-zero.diff)
./testutils.sh: line 143: bc: command not found
  recsel-sex-sharp-one fail (see recsel-sex-sharp-one.diff)
./testutils.sh: line 143: bc: command not found
  recsel-sex-sharp-multiple fail (see recsel-sex-sharp-multiple.diff)
./testutils.sh: line 143: bc: command not found
  recsel-sex-match fail (see recsel-sex-match.diff)
./testutils.sh: line 143: bc: command not found
  recsel-sex-date-sametime fail (see recsel-sex-date-sametime.diff)
./testutils.sh: line 143: bc: command not found
  recsel-sex-date-before fail (see recsel-sex-date-before.diff)
./testutils.sh: line 143: bc: command not found
  recsel-sex-date-after fail (see recsel-sex-date-after.diff)
./testutils.sh: line 143: bc: command not found
PASS: recsel.sh
Running recdel test(s): 
  recdel-first fail (see recdel-first.diff)
./testutils.sh: line 143: bc: command not found
  recdel-second fail (see recdel-second.diff)
./testutils.sh: line 143: bc: command not found
  recdel-last fail (see recdel-last.diff)
./testutils.sh: line 143: bc: command not found
  recdel-comment fail (see recdel-comment.diff)
./testutils.sh: line 143: bc: command not found
  recdel-sex fail (see recdel-sex.diff)
./testutils.sh: line 143: bc: command not found
  recdel-try-type xfail
./testutils.sh: line 143: bc: command not found
  recdel-type fail (see recdel-type.diff)
./testutils.sh: line 143: bc: command not found
  recdel-request-all xfail
./testutils.sh: line 143: bc: command not found
  recdel-force-all ok
./testutils.sh: line 143: bc: command not found
PASS: recdel.sh
Running recins test(s): 
  recins-empty fail (see recins-empty.diff)
./testutils.sh: line 143: bc: command not found
  recins-empty-with-type fail (see recins-empty-with-type.diff)
./testutils.sh: line 143: bc: command not found
  recins-several-fields fail (see recins-several-fields.diff)
./testutils.sh: line 143: bc: command not found
  recins-append fail (see recins-append.diff)
./testutils.sh: line 143: bc: command not found
  recins-append-in-type fail (see recins-append-in-type.diff)
./testutils.sh: line 143: bc: command not found
  recins-append-new-type fail (see recins-append-new-type.diff)
./testutils.sh: line 143: bc: command not found
  recins-replace fail (see recins-replace.diff)
./testutils.sh: line 143: bc: command not found
  recins-replace-sex fail (see recins-replace-sex.diff)
./testutils.sh: line 143: bc: command not found
  recins-violate-restrictions xfail
./testutils.sh: line 143: bc: command not found
  recins-force-restrictions fail (see recins-force-restrictions.diff)
./testutils.sh: line 143: bc: command not found
  recins-only-descriptor fail (see recins-only-descriptor.diff)
./testutils.sh: line 143: bc: command not found
  recins-comments-and-descriptor fail (see recins-comments-and-descriptor.diff)
./testutils.sh: line 143: bc: command not found
PASS: recins.sh
Running recset test(s): 
  recset-append-field fail (see recset-append-field.diff)
./testutils.sh: line 143: bc: command not found
  recset-set-field fail (see recset-set-field.diff)
./testutils.sh: line 143: bc: command not found
  recset-delete-field fail (see recset-delete-field.diff)
./testutils.sh: line 143: bc: command not found
  recset-comment-out-field fail (see recset-comment-out-field.diff)
./testutils.sh: line 143: bc: command not found
  recset-delete-non-existant fail (see recset-delete-non-existant.diff)
./testutils.sh: line 143: bc: command not found
  recset-comment-out-fex-first fail (see recset-comment-out-fex-first.diff)
./testutils.sh: line 143: bc: command not found
  recset-comment-out-fex-last fail (see recset-comment-out-fex-last.diff)
./testutils.sh: line 143: bc: command not found
  recset-violate-integrity xfail
./testutils.sh: line 143: bc: command not found
  recset-force-integrity fail (see recset-force-integrity.diff)
./testutils.sh: line 143: bc: command not found
  recset-rename fail (see recset-rename.diff)
./testutils.sh: line 143: bc: command not found
  recset-rename-first fail (see recset-rename-first.diff)
./testutils.sh: line 143: bc: command not found
  recset-rename-middle fail (see recset-rename-middle.diff)
./testutils.sh: line 143: bc: command not found
  recset-rename-last fail (see recset-rename-last.diff)
./testutils.sh: line 143: bc: command not found
  recset-rename-range-first fail (see recset-rename-range-first.diff)
./testutils.sh: line 143: bc: command not found
  recset-rename-range-last fail (see recset-rename-range-last.diff)
./testutils.sh: line 143: bc: command not found
  recset-rename-range-all fail (see recset-rename-range-all.diff)
./testutils.sh: line 143: bc: command not found
  recset-rename-all fail (see recset-rename-all.diff)
./testutils.sh: line 143: bc: command not found
  recset-rename-all-descriptor fail (see recset-rename-all-descriptor.diff)
./testutils.sh: line 143: bc: command not found
  recset-rename-all-key fail (see recset-rename-all-key.diff)
./testutils.sh: line 143: bc: command not found
  recset-rename-invalid-fex xfail
./testutils.sh: line 143: bc: command not found
PASS: recset.sh
Running recfix test(s): 
  recfix-type-int-valid ok
./testutils.sh: line 143: bc: command not found
  recfix-type-int-invalid xfail
./testutils.sh: line 143: bc: command not found
  recfix-type-real-valid ok
./testutils.sh: line 143: bc: command not found
  recfix-type-real-invalid xfail
./testutils.sh: line 143: bc: command not found
  recfix-duplicated-keys xfail
./testutils.sh: line 143: bc: command not found
  recfix-missing-mandatory xfail
./testutils.sh: line 143: bc: command not found
  recfix-several-unique xfail
./testutils.sh: line 143: bc: command not found
  recfix-referred-type ok
./testutils.sh: line 143: bc: command not found
  recfix-hidden-type ok
./testutils.sh: line 143: bc: command not found
  recfix-ranges-ok ok
./testutils.sh: line 143: bc: command not found
  recfix-ranges-xfail-1 xfail
./testutils.sh: line 143: bc: command not found
  recfix-ranges-xfail-2 xfail
./testutils.sh: line 143: bc: command not found
  recfix-one-rec ok
./testutils.sh: line 143: bc: command not found
  recfix-multiple-rec-in-descriptor xfail
./testutils.sh: line 143: bc: command not found
PASS: recfix.sh
==================
All 6 tests passed
==================

Note that 'bc' is not among the utilities that can be assumed to be present
on an end-user's machine (see
<http://www.gnu.org/prep/standards/html_node/Utilities-in-Makefiles.html>).

Bruno

reply via email to

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