GNU bug report logs - #56549
28.1; Compilation failure for lib-src/seccomp-filter.c on x86_64 with 32 bit userspace

Previous Next

Package: emacs;

Reported by: Ulrich Mueller <ulm <at> gentoo.org>

Date: Thu, 14 Jul 2022 06:47:02 UTC

Severity: normal

Found in version 28.1

Done: Philipp Stephani <p.stephani2 <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 56549 in the body.
You can then email your comments to 56549 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#56549; Package emacs. (Thu, 14 Jul 2022 06:47:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ulrich Mueller <ulm <at> gentoo.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 14 Jul 2022 06:47:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ulrich Mueller <ulm <at> gentoo.org>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.1; Compilation failure for lib-src/seccomp-filter.c on x86_64
 with 32 bit userspace
Date: Thu, 14 Jul 2022 08:46:25 +0200
Forwarding Gentoo bug https://bugs.gentoo.org/857906:

i686-pc-linux-gnu-gcc     -I. -I../src -I../lib -I. -I./../src -I./../lib  -Wl,-O1 -Wl,--as-needed  -mtune=i686 -O2 -pipe  seccomp-filter.c \                           
  -lseccomp  -o seccomp-filter                                                                                                                                          
In file included from seccomp-filter.c:62:                                                                                                                              
seccomp-filter.c: In function 'main':                                                                                                                                   
../lib/verify.h:213:41: error: static assertion failed: "verify (sizeof (long) == 8 && LONG_MIN == INT64_MIN && LONG_MAX == INT64_MAX)"                                 
  213 | # define _GL_VERIFY(R, DIAGNOSTIC, ...) _Static_assert (R, DIAGNOSTIC)                                                                                          
      |                                         ^~~~~~~~~~~~~~                                                                                                          
../lib/verify.h:273:20: note: in expansion of macro '_GL_VERIFY'                                                                                                        
  273 | # define verify(R) _GL_VERIFY (R, "verify (" #R ")", -)                                                                                                         
      |                    ^~~~~~~~~~                                                                                                                                   
seccomp-filter.c:173:3: note: in expansion of macro 'verify'                                                                                                            
  173 |   verify (sizeof (long) == 8 && LONG_MIN == INT64_MIN                                                                                                           
      |   ^~~~~~                                                                                                                                                        
../lib/verify.h:213:41: error: static assertion failed: "verify (sizeof (void *) == 8)"                                                                                 
  213 | # define _GL_VERIFY(R, DIAGNOSTIC, ...) _Static_assert (R, DIAGNOSTIC)                                                                                          
      |                                         ^~~~~~~~~~~~~~
...
seccomp-filter.c:175:3: note: in expansion of macro 'verify'                                                                                                            
  175 |   verify (sizeof (void *) == 8);                                                                                                                                
      |   ^~~~~~                                                                                                                                                        
make[1]: *** [Makefile:435: seccomp-filter] Error 1                                                                                                                     
make[1]: *** Waiting for unfinished jobs....                                                                                                                            
make[1]: Leaving directory '/var/tmp/portage/app-editors/emacs-28.1/work/emacs-28.1/lib-src'                                                                            
make: *** [Makefile:436: lib-src] Error 2

This is on an x86_64 machine with 32 bit userspace.


AFAICS, the problem is that lib-src/seccomp-filter.c (line 173) tests
for a 64 bit userspace:

  verify (sizeof (long) == 8 && LONG_MIN == INT64_MIN
          && LONG_MAX == INT64_MAX);

However, lib_src/Makefile.in (line 203) tests for 64 bit hardware:

ifeq ($(shell uname -m),x86_64)
[...]
SECCOMP_FILTER=1
endif




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#56549; Package emacs. (Fri, 15 Jul 2022 15:44:02 GMT) Full text and rfc822 format available.

Message #8 received at 56549 <at> debbugs.gnu.org (full text, mbox):

From: Philipp Stephani <p.stephani2 <at> gmail.com>
To: Ulrich Mueller <ulm <at> gentoo.org>
Cc: 56549 <at> debbugs.gnu.org
Subject: Re: bug#56549: 28.1; Compilation failure for lib-src/seccomp-filter.c
 on x86_64 with 32 bit userspace
Date: Fri, 15 Jul 2022 17:42:44 +0200
Am Do., 14. Juli 2022 um 08:47 Uhr schrieb Ulrich Mueller <ulm <at> gentoo.org>:
>
> Forwarding Gentoo bug https://bugs.gentoo.org/857906:
>
> i686-pc-linux-gnu-gcc     -I. -I../src -I../lib -I. -I./../src -I./../lib  -Wl,-O1 -Wl,--as-needed  -mtune=i686 -O2 -pipe  seccomp-filter.c \
>   -lseccomp  -o seccomp-filter
> In file included from seccomp-filter.c:62:
> seccomp-filter.c: In function 'main':
> ../lib/verify.h:213:41: error: static assertion failed: "verify (sizeof (long) == 8 && LONG_MIN == INT64_MIN && LONG_MAX == INT64_MAX)"
>   213 | # define _GL_VERIFY(R, DIAGNOSTIC, ...) _Static_assert (R, DIAGNOSTIC)
>       |                                         ^~~~~~~~~~~~~~
> ../lib/verify.h:273:20: note: in expansion of macro '_GL_VERIFY'
>   273 | # define verify(R) _GL_VERIFY (R, "verify (" #R ")", -)
>       |                    ^~~~~~~~~~
> seccomp-filter.c:173:3: note: in expansion of macro 'verify'
>   173 |   verify (sizeof (long) == 8 && LONG_MIN == INT64_MIN
>       |   ^~~~~~
> ../lib/verify.h:213:41: error: static assertion failed: "verify (sizeof (void *) == 8)"
>   213 | # define _GL_VERIFY(R, DIAGNOSTIC, ...) _Static_assert (R, DIAGNOSTIC)
>       |                                         ^~~~~~~~~~~~~~
> ...
> seccomp-filter.c:175:3: note: in expansion of macro 'verify'
>   175 |   verify (sizeof (void *) == 8);
>       |   ^~~~~~
> make[1]: *** [Makefile:435: seccomp-filter] Error 1
> make[1]: *** Waiting for unfinished jobs....
> make[1]: Leaving directory '/var/tmp/portage/app-editors/emacs-28.1/work/emacs-28.1/lib-src'
> make: *** [Makefile:436: lib-src] Error 2
>
> This is on an x86_64 machine with 32 bit userspace.
>
>
> AFAICS, the problem is that lib-src/seccomp-filter.c (line 173) tests
> for a 64 bit userspace:
>
>   verify (sizeof (long) == 8 && LONG_MIN == INT64_MIN
>           && LONG_MAX == INT64_MAX);
>
> However, lib_src/Makefile.in (line 203) tests for 64 bit hardware:
>
> ifeq ($(shell uname -m),x86_64)
> [...]
> SECCOMP_FILTER=1
> endif

Thanks for the report. Is there a good way to test for a 64-bit
userspace? Probably we want both tests.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#56549; Package emacs. (Fri, 15 Jul 2022 16:00:02 GMT) Full text and rfc822 format available.

Message #11 received at 56549 <at> debbugs.gnu.org (full text, mbox):

From: Philipp Stephani <p.stephani2 <at> gmail.com>
To: Ulrich Mueller <ulm <at> gentoo.org>
Cc: 56549 <at> debbugs.gnu.org
Subject: Re: bug#56549: 28.1; Compilation failure for lib-src/seccomp-filter.c
 on x86_64 with 32 bit userspace
Date: Fri, 15 Jul 2022 17:58:45 +0200
Am Fr., 15. Juli 2022 um 17:42 Uhr schrieb Philipp Stephani
<p.stephani2 <at> gmail.com>:
>
> Am Do., 14. Juli 2022 um 08:47 Uhr schrieb Ulrich Mueller <ulm <at> gentoo.org>:
> >
> > Forwarding Gentoo bug https://bugs.gentoo.org/857906:
> >
> > i686-pc-linux-gnu-gcc     -I. -I../src -I../lib -I. -I./../src -I./../lib  -Wl,-O1 -Wl,--as-needed  -mtune=i686 -O2 -pipe  seccomp-filter.c \
> >   -lseccomp  -o seccomp-filter
> > In file included from seccomp-filter.c:62:
> > seccomp-filter.c: In function 'main':
> > ../lib/verify.h:213:41: error: static assertion failed: "verify (sizeof (long) == 8 && LONG_MIN == INT64_MIN && LONG_MAX == INT64_MAX)"
> >   213 | # define _GL_VERIFY(R, DIAGNOSTIC, ...) _Static_assert (R, DIAGNOSTIC)
> >       |                                         ^~~~~~~~~~~~~~
> > ../lib/verify.h:273:20: note: in expansion of macro '_GL_VERIFY'
> >   273 | # define verify(R) _GL_VERIFY (R, "verify (" #R ")", -)
> >       |                    ^~~~~~~~~~
> > seccomp-filter.c:173:3: note: in expansion of macro 'verify'
> >   173 |   verify (sizeof (long) == 8 && LONG_MIN == INT64_MIN
> >       |   ^~~~~~
> > ../lib/verify.h:213:41: error: static assertion failed: "verify (sizeof (void *) == 8)"
> >   213 | # define _GL_VERIFY(R, DIAGNOSTIC, ...) _Static_assert (R, DIAGNOSTIC)
> >       |                                         ^~~~~~~~~~~~~~
> > ...
> > seccomp-filter.c:175:3: note: in expansion of macro 'verify'
> >   175 |   verify (sizeof (void *) == 8);
> >       |   ^~~~~~
> > make[1]: *** [Makefile:435: seccomp-filter] Error 1
> > make[1]: *** Waiting for unfinished jobs....
> > make[1]: Leaving directory '/var/tmp/portage/app-editors/emacs-28.1/work/emacs-28.1/lib-src'
> > make: *** [Makefile:436: lib-src] Error 2
> >
> > This is on an x86_64 machine with 32 bit userspace.
> >
> >
> > AFAICS, the problem is that lib-src/seccomp-filter.c (line 173) tests
> > for a 64 bit userspace:
> >
> >   verify (sizeof (long) == 8 && LONG_MIN == INT64_MIN
> >           && LONG_MAX == INT64_MAX);
> >
> > However, lib_src/Makefile.in (line 203) tests for 64 bit hardware:
> >
> > ifeq ($(shell uname -m),x86_64)
> > [...]
> > SECCOMP_FILTER=1
> > endif
>
> Thanks for the report. Is there a good way to test for a 64-bit
> userspace? Probably we want both tests.

I've now tried fixing this with commit db259d8fd369e6036df782d5fe51723a68220074.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#56549; Package emacs. (Fri, 15 Jul 2022 16:03:01 GMT) Full text and rfc822 format available.

Message #14 received at 56549 <at> debbugs.gnu.org (full text, mbox):

From: Ulrich Mueller <ulm <at> gentoo.org>
To: Philipp Stephani <p.stephani2 <at> gmail.com>
Cc: 56549 <at> debbugs.gnu.org
Subject: Re: bug#56549: 28.1; Compilation failure for
 lib-src/seccomp-filter.c on x86_64 with 32 bit userspace
Date: Fri, 15 Jul 2022 18:02:12 +0200
>>>>> On Fri, 15 Jul 2022, Philipp Stephani wrote:

> Thanks for the report. Is there a good way to test for a 64-bit
> userspace? Probably we want both tests.

Autoconf has AC_CHECK_SIZEOF, so you could check for the size of either
long or void *.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#56549; Package emacs. (Fri, 15 Jul 2022 19:43:01 GMT) Full text and rfc822 format available.

Message #17 received at 56549 <at> debbugs.gnu.org (full text, mbox):

From: Ulrich Mueller <ulm <at> gentoo.org>
To: Philipp Stephani <p.stephani2 <at> gmail.com>
Cc: 56549 <at> debbugs.gnu.org
Subject: Re: bug#56549: 28.1; Compilation failure for
 lib-src/seccomp-filter.c on x86_64 with 32 bit userspace
Date: Fri, 15 Jul 2022 21:42:31 +0200
>>>>> On Fri, 15 Jul 2022, Philipp Stephani wrote:

> I've now tried fixing this with commit db259d8fd369e6036df782d5fe51723a68220074.

Thank you, this fixes the problem for me.

I have tested it on the same system where the bug was originally seen.
This is an amd64 system with 64 bit kernel but 32 bit userspace:

In GNU Emacs 28.1.90 (build 1, i686-pc-linux-gnu)
 of 2022-07-15 built on woodpecker
Repository revision: db259d8fd369e6036df782d5fe51723a68220074
Repository branch: emacs-28
System Description: Gentoo/Linux




Reply sent to Philipp Stephani <p.stephani2 <at> gmail.com>:
You have taken responsibility. (Sat, 16 Jul 2022 10:51:02 GMT) Full text and rfc822 format available.

Notification sent to Ulrich Mueller <ulm <at> gentoo.org>:
bug acknowledged by developer. (Sat, 16 Jul 2022 10:51:02 GMT) Full text and rfc822 format available.

Message #22 received at 56549-done <at> debbugs.gnu.org (full text, mbox):

From: Philipp Stephani <p.stephani2 <at> gmail.com>
To: Ulrich Mueller <ulm <at> gentoo.org>
Cc: 56549-done <at> debbugs.gnu.org
Subject: Re: bug#56549: 28.1; Compilation failure for lib-src/seccomp-filter.c
 on x86_64 with 32 bit userspace
Date: Sat, 16 Jul 2022 12:50:44 +0200

> Am 15.07.2022 um 21:42 schrieb Ulrich Mueller <ulm <at> gentoo.org>:
> 
>>>>>> On Fri, 15 Jul 2022, Philipp Stephani wrote:
> 
>> I've now tried fixing this with commit db259d8fd369e6036df782d5fe51723a68220074.
> 
> Thank you, this fixes the problem for me.

Thanks, closing this bug then.



bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 13 Aug 2022 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 265 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.