cannot build libgpg-error-1.36 on Solaris 10

Bruno Haible bruno at clisp.org
Mon Jan 6 15:08:08 CET 2020


Building libgpg-error-1.36 on Solaris 10 with cc (CC="cc -xarch=generic64 -O")
fails like this:

Making all in src
gawk -f ../../src/mkerrnos.awk ../../src/errnos.in >code-to-errno.h
gawk -f ../../src/mkerrcodes1.awk ../../src/errnos.in >_mkerrcodes.h
cc -xarch=generic64 -O -E -I/home/haible/prefix-x86_64/include  -D_REENTRANT  -P _mkerrcodes.h | grep GPG_ERR_ | \
               gawk -f ../../src/mkerrcodes.awk >mkerrcodes.h
rm _mkerrcodes.h
cc -xarch=generic64 -O -I. -I../../src -o mkerrcodes ../../src/mkerrcodes.c
./mkerrcodes | gawk -f ../../src/mkerrcodes2.awk >code-from-errno.h
gawk -f ../../src/mkstrtable.awk -v textidx=2 -v nogettext=1 \
        ../../src/err-sources.h.in >err-sources-sym.h
gawk -f ../../src/mkstrtable.awk -v textidx=2 -v nogettext=1 \
        ../../src/err-codes.h.in >err-codes-sym.h
gawk -f ../../src/mkstrtable.awk -v textidx=2 -v nogettext=1 \
        -v prefix=GPG_ERR_ -v namespace=errnos_ \
        ../../src/errnos.in >errnos-sym.h
cc -xarch=generic64 -O -g -O0 -I. -I../../src -o mkheader ../../src/mkheader.c
cc: Warning: option -0 passed to ld
ld: fatal: unrecognized option '-0'
ld: fatal: use the -z help option for usage information
*** Error code 1
make: Fatal error: Command failed for target `mkheader'

The option -O0 is only understood by GCC and compatible compilers.

Building with gcc (CC="gcc -m64 -O2"), on the other hand, works fine.
The test then fails, though:

Making check in src
make  check-am
make  check-TESTS
./../../src/gpg-error-config-test.sh: bad substitution
FAIL: ../../src/gpg-error-config-test.sh
=======================================
1 of 1 test failed
Please report to https://bugs.gnupg.org
=======================================
*** Error code 1

That's because /bin/sh on this platform is not POSIX compliant.

Bruno




More information about the Gnupg-devel mailing list