cannot build libgpg-error-1.36 on Solaris 10

Bruno Haible bruno at
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/ >code-to-errno.h
gawk -f ../../src/mkerrcodes1.awk ../../src/ >_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-sym.h
gawk -f ../../src/mkstrtable.awk -v textidx=2 -v nogettext=1 \
        ../../src/ >err-codes-sym.h
gawk -f ../../src/mkstrtable.awk -v textidx=2 -v nogettext=1 \
        -v prefix=GPG_ERR_ -v namespace=errnos_ \
        ../../src/ >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/ bad substitution
FAIL: ../../src/
1 of 1 test failed
Please report to
*** Error code 1

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


More information about the Gnupg-devel mailing list