[Debian-med-packaging] Bug#824368: fsm-lite: uses bad CPPFLAGS; always tries to build with -msse4.2

Aaron M. Ucko amu at alum.mit.edu
Sun May 15 03:23:17 UTC 2016


Source: fsm-lite
Version: 1.0-1
Severity: important
Justification: fails to build from source

Hi, Andreas.

Builds of fsm-lite for non-x86 architectures have been failing:

  g++: error: unrecognized command line option '-msse4.2'
  <builtin>: recipe for target 'configuration.o' failed

The issue turns out to be with the CPPFLAGS setting in the upstream
Makefile, which I found to be problematic in various ways.  From most
to least severe (at least arguably):

* It insists on building with -msse4.2, which is only an option on
  x86, and even there results in binaries that don't run on older
  hardware.

* It loses any preexisting CPPFLAGS setting, thereby missing the usual
  -D_FORTIFY_SOURCE=2.

* It insists on building with -O3, even in noopt builds.

* It pulls in ~/software/include, which could theoretically have bogus
  content.

* It generally contains flags that would be more appropriate for
  CXXFLAGS.

As such, I'd suggest replacing that setting with

CPPFLAGS += -DNDEBUG
CXXFLAGS += -std=c++11

Also, the depend target should use CPPFLAGS and CXXFLAGS rather than
duplicating any of their contents, but that's less of a big deal.

Could you please take a look?

Thanks!



More information about the Debian-med-packaging mailing list