[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Build errors in GNATS 4.2.0 on Ubuntu 20.04.2 LTS
From: |
John P. Willis |
Subject: |
Build errors in GNATS 4.2.0 on Ubuntu 20.04.2 LTS |
Date: |
Sun, 22 Aug 2021 09:30:54 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 |
Hello all,
When attempting to build GNATS 4.2.0 on Ubuntu 20.04.2 LTS, I get the
following error:
mail.c: In function ‘get_responsible_address’:
mail.c:70:40: error: comparison between pointer and zero character
constant [-Werror=pointer-compare]
70 | res->admFields[ResponsibleAdmAlias] == '\0')
| ^~
mail.c:70:4: note: did you mean to dereference the pointer?
70 | res->admFields[ResponsibleAdmAlias] == '\0')
| ^
cc1: all warnings being treated as errors
make[3]: *** [Makefile:862: mail.o] Error 1
make[3]: Leaving directory '/usr/local/src/gnats-4.2.0/gnats'
make[2]: *** [Makefile:953: all-recursive] Error 1
make[2]: Leaving directory '/usr/local/src/gnats-4.2.0/gnats'
make[1]: *** [Makefile:583: all] Error 2
make[1]: Leaving directory '/usr/local/src/gnats-4.2.0/gnats'
make: *** [Makefile:453: all-recursive] Error 1
The GCC version info is as follows:
root@test:/usr/local/src/gnats-4.2.0# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:hsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu
9.3.0-17ubuntu1~20.04'
--with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs
--enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2
--prefix=/usr --with-gcc-major-version-only --program-suffix=-9
--program-prefix=x86_64-linux-gnu- --enable-shared
--enable-linker-build-id --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --libdir=/usr/lib
--enable-nls --enable-clocale=gnu --enable-libstdcxx-debug
--enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new
--enable-gnu-unique-object --disable-vtable-verify --enable-plugin
--enable-default-pie --with-system-zlib --with-target-system-zlib=auto
--enable-objc-gc=auto --enable-multiarch --disable-werror
--with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32
--enable-multilib --with-tune=generic
--enable-offload-targets=nvptx-none=/build/gcc-9-HskZEa/gcc-9-9.3.0/debian/tmp-nvptx/usr,hsa
--without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu
--host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)
The system info is as follows:
root@test:/usr/local/src/gnats-4.2.0# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.2 LTS
Release: 20.04
Codename: focal
I attempted changing gnats/mail.c:70 to the following, casting the '\0'
to a char * (as res->admFields is a char **):
res->admFields[ResponsibleAdmAlias] == (char *) '\0')
And attempted compiling again. This got through mail.c, but resulted in
the following error:
misc.c: In function ‘log_msg’:
misc.c:106:7: error: this statement may fall through
[-Werror=implicit-fallthrough=]
106 | if (gnats_logfile != (FILE *)NULL)
| ^
At this point, I figured that the modern GCC's -Wall -Werror, etc. have
gotten pickier since 2015 (I have encountered this in my own projects),
thus I tried changing line 284 of configure.ac to the following:
GCC_CFLAGS="-ansi"
(removing -Werror and -Wall)
and running "autoreconf" in the root of the repository, followed by the
usual ./configure; make clean; make incantation. That results in the
following:
make[4]: Entering directory '/usr/local/src/gnats-4.2.0/gnats/ds-file'
depbase=`echo gen-index.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H
-DGNATSD_USER_ACCESS_FILE=\"/usr/local/etc/gnats/gnatsd.user_access\"
-DGNATSD_HOST_ACCESS_FILE=\"/usr/local/etc/gnats/gnatsd.host_access\"
-DDEFAULT_GNATS_SERVICE=\"\"
-DGLOBAL_DB_LIST_FILE=\"/usr/local/etc/gnats/databases\"
-DGNATS_USER=\"gnats\" -I. -I../../gnats -I ../../gnats -ansi -Wextra
-Wpedantic -Wno-error=format -Wno-unused-result -Wwrite-strings
-Wmissing-prototypes -Wstrict-prototypes -g -O2 -fno-unit-at-a-time -MT
gen-index.o -MD -MP -MF $depbase.Tpo -c -o gen-index.o gen-index.c &&\
mv -f $depbase.Tpo $depbase.Po
make[4]: *** No rule to make target '../libgnats.a', needed by
'gen-index'. Stop.
make[4]: Leaving directory '/usr/local/src/gnats-4.2.0/gnats/ds-file'
make[3]: *** [Makefile:1347: query-pr.o] Error 2
make[3]: Leaving directory '/usr/local/src/gnats-4.2.0/gnats'
make[2]: *** [Makefile:985: all-recursive] Error 1
make[2]: Leaving directory '/usr/local/src/gnats-4.2.0/gnats'
make[1]: *** [Makefile:610: all] Error 2
make[1]: Leaving directory '/usr/local/src/gnats-4.2.0/gnats'
make: *** [Makefile:465: all-recursive] Error 1
So it appears that a good deal of work needs to be done to bring GNATS
forward and make it compile properly on current systems.
Should I attempt to go further, or are the GNATS developers already
working on something in an official capacity? I noticed that GNATS is
also gone from the Debian and Ubuntu apt repositories, since Jessie.
Cheers,
--
/*
* John P. Willis
* Coherent Logic Development LLC
*
* 905 Alamo St.
* Las Cruces, NM 88001-3803
*
* Tel: 575.520.9542
*
* jpw@coherent-logic.com
* http://www.coherent-logic.com/
*
*/
- Build errors in GNATS 4.2.0 on Ubuntu 20.04.2 LTS,
John P. Willis <=