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
>From 7f853e593b7282fa0077af82174e80af96bfb62e Mon Sep 17 00:00:00 2001 From: Olaf Meeuwissen <paddy-h...@member.fsf.org> Date: Sat, 3 Oct 2015 12:49:25 +0900 Subject: [PATCH] Keep -ansi flag in release version --- acinclude.m4 | 1 + 1 file changed, 1 insertion(+) diff --git a/acinclude.m4 b/acinclude.m4 index 06687fc..7a86a0b 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -48,6 +48,7 @@ if test "${ac_cv_c_compiler_gnu}" = "yes"; then ANSI_FLAG= ;; esac + NORMAL_CFLAGS="${NORMAL_CFLAGS} ${ANSI_FLAG}" WARN_CFLAGS="${WARN_CFLAGS} ${ANSI_FLAG}" AC_ARG_ENABLE(warnings, -- 2.5.3
-- sane-devel mailing list: sane-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel Unsubscribe: Send mail with subject "unsubscribe your_password" to sane-devel-requ...@lists.alioth.debian.org