Quantcast

epsonds won't build with is_release=yes

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

epsonds won't build with is_release=yes

m. allan noah-3
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.


/bin/sh ../libtool --silent  --tag=CC   --mode=compile gcc
-DHAVE_CONFIG_H -I. -I../include/sane  -I. -I. -I../include
-I../include -DLIBDIR="\"/usr/lib64/sane\"" -DBACKEND_NAME=epsonds
-D_REENTRANT -DPATH_SANE_CONFIG_DIR=/etc/sane.d
-DPATH_SANE_DATA_DIR=/usr/share
-DPATH_SANE_LOCK_DIR=/usr/var/lock/sane       -DV_MAJOR=1 -DV_MINOR=0
-g -O2 -W -Wall -MT libepsonds_la-epsonds-jpeg.lo -MD -MP -MF
.deps/libepsonds_la-epsonds-jpeg.Tpo -c -o
libepsonds_la-epsonds-jpeg.lo `test -f 'epsonds-jpeg.c' || echo
'./'`epsonds-jpeg.c
In file included from epsonds.h:41:0,
                 from epsonds-jpeg.c:18:
../include/sane/sanei_backend.h:99:33: error: two or more data types
in declaration specifiers
 # define sigset_t               int
                                 ^
make[2]: *** [libepsonds_la-epsonds-jpeg.lo] Error 1
make[2]: Leaving directory `/home/anoah/sane/sane-backends/backend'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/anoah/sane/sane-backends/backend'
make: *** [all-recursive] Error 1

allan


--
"well, I stand up next to a mountain- and I chop it down with the edge
of my hand"

--
sane-devel mailing list: [hidden email]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
             to [hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: epsonds won't build with is_release=yes

Olaf Meeuwissen-4
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.

> /bin/sh ../libtool --silent  --tag=CC   --mode=compile gcc
> -DHAVE_CONFIG_H -I. -I../include/sane  -I. -I. -I../include
> -I../include -DLIBDIR="\"/usr/lib64/sane\"" -DBACKEND_NAME=epsonds
> -D_REENTRANT -DPATH_SANE_CONFIG_DIR=/etc/sane.d
> -DPATH_SANE_DATA_DIR=/usr/share
> -DPATH_SANE_LOCK_DIR=/usr/var/lock/sane       -DV_MAJOR=1 -DV_MINOR=0
> -g -O2 -W -Wall -MT libepsonds_la-epsonds-jpeg.lo -MD -MP -MF
> .deps/libepsonds_la-epsonds-jpeg.Tpo -c -o
> libepsonds_la-epsonds-jpeg.lo `test -f 'epsonds-jpeg.c' || echo
> './'`epsonds-jpeg.c
> In file included from epsonds.h:41:0,
>                  from epsonds-jpeg.c:18:
> ../include/sane/sanei_backend.h:99:33: error: two or more data types
> in declaration specifiers
>  # define sigset_t               int
>                                  ^
> make[2]: *** [libepsonds_la-epsonds-jpeg.lo] Error 1
> make[2]: Leaving directory `/home/anoah/sane/sane-backends/backend'
> make[1]: *** [all] Error 2
> make[1]: Leaving directory `/home/anoah/sane/sane-backends/backend'
> make: *** [all-recursive] Error 1

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


--
sane-devel mailing list: [hidden email]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
             to [hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: epsonds won't build with is_release=yes

Olaf Meeuwissen-4

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

--
sane-devel mailing list: [hidden email]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
             to [hidden email]

0001-Keep-ansi-flag-in-release-version.patch (637 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: epsonds won't build with is_release=yes

Alessandro Zummo
On Sat, 03 Oct 2015 12:59:56 +0900
Olaf Meeuwissen <[hidden email]> wrote:

> 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.

 Now that it's released, can we switch to c99, if not c11? :)

--

 Best regards,

 Alessandro Zummo - CEO,
  Tower Technologies - Torino, Italy

  http://www.towertech.it


--
sane-devel mailing list: [hidden email]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
             to [hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: epsonds won't build with is_release=yes

m. allan noah-3
I think we should switch to C99 now.

allan

On Wed, Oct 7, 2015 at 1:53 PM, Alessandro Zummo
<[hidden email]> wrote:

> On Sat, 03 Oct 2015 12:59:56 +0900
> Olaf Meeuwissen <[hidden email]> wrote:
>
>> 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.
>
>  Now that it's released, can we switch to c99, if not c11? :)
>
> --
>
>  Best regards,
>
>  Alessandro Zummo - CEO,
>   Tower Technologies - Torino, Italy
>
>   http://www.towertech.it
>



--
"well, I stand up next to a mountain- and I chop it down with the edge
of my hand"

--
sane-devel mailing list: [hidden email]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
             to [hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: epsonds won't build with is_release=yes

Olaf Meeuwissen-4
Hi Devs,

m. allan noah writes:

> I think we should switch to C99 now.
>
> On Wed, Oct 7, 2015 at 1:53 PM, Alessandro Zummo
> <[hidden email]> wrote:
>> On Sat, 03 Oct 2015 12:59:56 +0900
>> Olaf Meeuwissen <[hidden email]> wrote:
>>
>>> 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.
>>
>>  Now that it's released, can we switch to c99, if not c11? :)

You won't hear me complain about switching to C99 (*without* GNU
extensions in the interest of portability).  Switching to C11 is
probably still a bit too early (although I don't mind).

However, before we decide to switch, wouldn't it be a good idea to list
the "overwhelming" benefits of switching and "disabling" drawbacks of
not doing so?  Here's something to get started:

Benefits:
 - allows declarations after statements (which I consider a mixed
   blessing)
 - allows C++-style // comments (not sure if they are also allowed in
   C preprocessor code though)
 - has snprintf()
 - additional standardized headers (which ones?)

Drawbacks:
 - ISO has withdrawn C99 (in favour of C11)

Also, if there's developers out there that object, now is probably a
good idea to do so.

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
 GnuPG key: F84A2DD9/B3C0 2F47 EA19 64F4 9F13  F43E B8A4 A88A F84A 2DD9


--
sane-devel mailing list: [hidden email]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
             to [hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: epsonds won't build with is_release=yes

Alessandro Zummo
On Mon, 12 Oct 2015 21:07:01 +0900
Olaf Meeuwissen <[hidden email]> wrote:

> >>  Now that it's released, can we switch to c99, if not c11? :)
>
> You won't hear me complain about switching to C99 (*without* GNU
> extensions in the interest of portability).  Switching to C11 is
> probably still a bit too early (although I don't mind).

 agreed for no gnu extensions.

 after all, we are in 2015 ;)

> Benefits:
>  - allows declarations after statements (which I consider a mixed
>    blessing)

 for (int a = 0; ... love them

>  - allows C++-style // comments (not sure if they are also allowed in
>    C preprocessor code though)

 love them too.

--

 Best regards,

 Alessandro Zummo - CEO,
  Tower Technologies - Torino, Italy

  http://www.towertech.it


--
sane-devel mailing list: [hidden email]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
             to [hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Switching to C99 (was Fwd: Re: epsonds won't build with is_release=yes)

Olaf Meeuwissen-4
In reply to this post by Olaf Meeuwissen-4
Hi Devs,

I figured I'd better change the Subject: so you actually notice that
we're talking about bumping the C language standard level for SANE to
ISO C99.  Until now, sane-backends code was supposed to be ANSI C (C89),
which, for all intents and purposes, is the same as ISO C90.

Below, I suggest compiling a list of pros and cons and invite the SANE
developers to support or object to the change.

Olaf Meeuwissen writes:

> Hi Devs,
>
> m. allan noah writes:
>
>> I think we should switch to C99 now.
>>
>> On Wed, Oct 7, 2015 at 1:53 PM, Alessandro Zummo
>> <[hidden email]> wrote:
>>> On Sat, 03 Oct 2015 12:59:56 +0900
>>> Olaf Meeuwissen <[hidden email]> wrote:
>>>
>>>> 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.
>>>
>>>  Now that it's released, can we switch to c99, if not c11? :)
>
> You won't hear me complain about switching to C99 (*without* GNU
> extensions in the interest of portability).  Switching to C11 is
> probably still a bit too early (although I don't mind).
>
> However, before we decide to switch, wouldn't it be a good idea to list
> the "overwhelming" benefits of switching and "disabling" drawbacks of
> not doing so?  Here's something to get started:
>
> Benefits:
>  - allows declarations after statements (which I consider a mixed
>    blessing)
>  - allows C++-style // comments (not sure if they are also allowed in
>    C preprocessor code though)
>  - has snprintf()
>  - additional standardized headers (which ones?)
>
> Drawbacks:
>  - ISO has withdrawn C99 (in favour of C11)
>
> Also, if there's developers out there that object, now is probably a
> good idea to do so.
>
> 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
 GnuPG key: F84A2DD9/B3C0 2F47 EA19 64F4 9F13  F43E B8A4 A88A F84A 2DD9


--
sane-devel mailing list: [hidden email]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
             to [hidden email]
Loading...