make/compile 1.3.11 fails

Issue #1159 closed
FanDjango created an issue

Hi - I downloaded 1.3.11 today and proceeded to compile it and get a gcc fail.

First, this configure:

 ./configure --localstatedir=/var --with-database=mysql

Then make produces:

Making all in src
make[1]: Entering directory '/mike/piler-1.3.11/src'
gcc -std=c99 -O2 -fPIC -Wall -Wextra -Wimplicit-fallthrough=2 -Wuninitialized -Wno-format-truncation -g  -I. -I..  -I/usr/include/mysql  -D_GNU_SOURCE -DHAVE_TRE -DNEED_MYSQL -c dirs.c -o dirs.o
gcc: error: unrecognized command line option ‘-Wimplicit-fallthrough=2’; did you mean ‘-Wno-fallthrough’?
Makefile:78: recipe for target 'dirs.o' failed
make[1]: *** [dirs.o] Error 1
make[1]: Leaving directory '/mike/piler-1.3.11/src'
Makefile:41: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1

This machine runs gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1) on Debian 9.13 aka “Stretch”

Looks like configure is the culprit:

gcc_version="$(gcc -dumpversion)"
extra_cflags=""
if [ "${gcc_version:0:1}" -gt 5 ]; then
   extra_cflags="-Wimplicit-fallthrough=2"
fi

I wonder if the assumption of the -Wimplicit-fallthrough being available for gcc 6+ is true?

Comments (9)

  1. Janos SUTO repo owner

    Then feel free to fix, I’ll make a patch and update 5 to 6. Btw. why aren’t you installing piler on a more recent version of debian?

  2. FanDjango reporter

    This system has been running nicely for many years now. I already had to upgrade debian once (to stretch) and planned to run it until end life, then skip buster. Hmmpf. So much for that.

    Yes, I changed the -gt 5 to -gt 6, because the option -Wimplicit-fallthrough was introduced later. Seems to work now and I checked all your switch statements - all but on do not fallthrough anyway.

  3. Log in to comment