[sane-devel] epsonds won't build with is_release=yes

Olaf Meeuwissen paddy-hack at member.fsf.org
Sat Oct 3 03:59:56 UTC 2015


Olaf Meeuwissen writes:

> m. allan noah writes:
>
>> Trying to do a first pass at building sane-backends release package. I
>> have discovered that changing is_release to yes in configure will
>> prevent epsonds from building. Usually these are uninitialized
>> variable issues, but not always. This particular one looks like a
>> syntax error somewhere. I've not had time to dig into this, perhaps
>> someone else has a minute.
>
> I'll have a look.

Between is_release=no and is_release=yes, the compile command loses the
following options:

  -Wcast-align -Wcast-qual -Wmissing-declarations -Wmissing-prototypes
  -Wpointer-arith -Wreturn-type -Wstrict-prototypes -pedantic -ansi

Nothing else changes.  Warning options (-W and -pedantic) cannot have
any effect on the object files that the compiler produces.  So that
leaves the -ansi language level selector as the cause of this error.

I don't understand why during development with gcc -std=c90 (aka -ansi)
is in effect but when we release we no longer care and allow whatever
the compiler thinks is good for you.  In case of gcc that is -std=gnu90
or, as of gcc-5, -std=gnu11.

The GNU extensions may conflict with the C standard and may introduce
subtle changes to run-time behaviour that could invalidate whatever test
results you relied on to implement stuff.  IMNSHO, that's not the kind
of change you want to introduce one or two days before release ;-)

The SANE_SET_CFLAGS macro in acinclude.m4 controls this odd behaviour.
Attached is a patch that keeps the -ansi flag for releases as well.

Hope this helps,
-- 
Olaf Meeuwissen, LPIC-2            FSF Associate Member since 2004-01-27
Support Free Software               Support the Free Software Foundation
https://my.fsf.org/donate                        https://my.fsf.org/join
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Keep-ansi-flag-in-release-version.patch
Type: text/x-diff
Size: 614 bytes
Desc: Fix is_release=yes build
URL: <http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20151003/d3cd6349/attachment.patch>


More information about the sane-devel mailing list