From mboxrd@z Thu Jan 1 00:00:00 1970
Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail
From: Philipp Stephani
Newsgroups: gmane.emacs.devel
Subject: Re: Build failure: 'seccomp-filter'
Date: Sun, 11 Apr 2021 16:52:16 +0200
Message-ID:
References: <871rbhs4jk.fsf@yandex.com> <83mtu546b0.fsf@gnu.org>
<87wnt9qmxz.fsf@yandex.com>
<87pmz1p0ag.fsf@yandex.com> <87C5F4EB-28C7-467C-A6CB-80D6AE861ABA@gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214";
logging-data="6477"; mail-complaints-to="usenet@ciao.gmane.io"
Cc: Eli Zaretskii , Emacs developers
To: Colin Baxter
Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Apr 11 16:53:24 2021
Return-path:
Envelope-to: ged-emacs-devel@m.gmane-mx.org
Original-Received: from lists.gnu.org ([209.51.188.17])
by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.92)
(envelope-from )
id 1lVbSl-0001X7-Dn
for ged-emacs-devel@m.gmane-mx.org; Sun, 11 Apr 2021 16:53:23 +0200
Original-Received: from localhost ([::1]:57628 helo=lists1p.gnu.org)
by lists.gnu.org with esmtp (Exim 4.90_1)
(envelope-from )
id 1lVbSk-000280-F1
for ged-emacs-devel@m.gmane-mx.org; Sun, 11 Apr 2021 10:53:22 -0400
Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47498)
by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.90_1) (envelope-from )
id 1lVbRx-0001ht-9U
for emacs-devel@gnu.org; Sun, 11 Apr 2021 10:52:33 -0400
Original-Received: from mail-ot1-x32e.google.com ([2607:f8b0:4864:20::32e]:36432)
by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
(Exim 4.90_1) (envelope-from )
id 1lVbRt-0006Zm-BB; Sun, 11 Apr 2021 10:52:33 -0400
Original-Received: by mail-ot1-x32e.google.com with SMTP id
g8-20020a9d6c480000b02901b65ca2432cso10368901otq.3;
Sun, 11 Apr 2021 07:52:28 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
h=mime-version:references:in-reply-to:from:date:message-id:subject:to
:cc:content-transfer-encoding;
bh=M4LemiUYOkjH1mNdDkjWcnMOlzjxfoqfoILgnDkvkkI=;
b=Vxydv+AbdABq82y5ofsj8I1R0jm8nsbGY1F587mxXTcIjBnMCzCIAckZZ9QWa8nnS5
CVw1/BJw6xYKsJ4/XJkBQryif6pP12wH8KAxoq9zFdCWcqVdp7D2IidV/wpJ+yx4rizD
+enwSRhZlmcXLD2AsWnimYBnGBs/1XA2eB9PqtMHZybhmCW2yuHUcjk0++IQWXeFWnS6
J3Sd19o3b1W83QEbDPN8g20CvCsdv06uYsotfjWt2Xdi8hrpt8EuIOce1sV2aaxWRNUg
pkGAaX4JBIZT7FxHpMymA95xjwC9wyMCI+XjFQZD1O7KMIoZkEvAfrSpEeFbtORxwGzE
wxhQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:mime-version:references:in-reply-to:from:date
:message-id:subject:to:cc:content-transfer-encoding;
bh=M4LemiUYOkjH1mNdDkjWcnMOlzjxfoqfoILgnDkvkkI=;
b=W49YQ79w4JK1Ye+e9rrud4aXUik63KXKtAEinQ6de4C7bPIzKElQkMD1vIuAxEkmoU
55ZawgBXDC/WTTGtsPQt+fOKq2SVNuGd9zCBln1mKmJdm/3X/18dPEcHjEY1+X5lYn4T
WxVyqSgDahBwTZcRzN9lKKPJdMjjRO7gWTzORFD5cjvGvqs70PRRO5d3az/OmbPcYfY/
Z/a4mcKMzMN+w201KVOQzhFobqmELOG7CFGID3g+18t9sdNSlN9PupSHQLVOZm2hS3Kc
VCZv0+7qZI+DzHa/AME5WSlV8B8QrWpDnFmmTReXg3dsZaRvhIz6TjyAeEYV+g13ZmnZ
It7Q==
X-Gm-Message-State: AOAM5339ersbCokp4ymnSbvuOLVB5R/riKj7NUF7C5Je2udq5HJKy9ji
xaAp/0vaeAUGYVWv9DhEfotJhjt0yNzUoA47LEA=
X-Google-Smtp-Source: ABdhPJzGeN3vRsarpcRGux6wP4a0WZg2EqCpATKFJ0GFgBd6M+FdwOuJZB0n6R40fgMABKroZYwOQzJpNfgz8V7iB0E=
X-Received: by 2002:a05:6830:1590:: with SMTP id
i16mr20692402otr.12.1618152747891;
Sun, 11 Apr 2021 07:52:27 -0700 (PDT)
In-Reply-To:
Received-SPF: pass client-ip=2607:f8b0:4864:20::32e;
envelope-from=p.stephani2@gmail.com; helo=mail-ot1-x32e.google.com
X-Spam_score_int: -17
X-Spam_score: -1.8
X-Spam_bar: -
X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001,
RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-BeenThere: emacs-devel@gnu.org
X-Mailman-Version: 2.1.23
Precedence: list
List-Id: "Emacs development discussions."
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org
Original-Sender: "Emacs-devel"
Xref: news.gmane.io gmane.emacs.devel:267883
Archived-At:
Am So., 11. Apr. 2021 um 16:40 Uhr schrieb Philipp Stephani
:
>
> Am So., 11. Apr. 2021 um 16:31 Uhr schrieb Philipp :
> >
> >
> >
> > > Am 11.04.2021 um 12:45 schrieb Colin Baxter :
> > >
> > >>>>>> Philipp Stephani writes:
> > >
> > >> Am So., 11. Apr. 2021 um 09:51 Uhr schrieb Colin Baxter
> > >> :
> > >>>
> > >>>>>>>> Eli Zaretskii writes:
> > >>>
> > >>>>> From: Colin Baxter Cc: Date: Sun, 11 Apr
> > >>> 2021 >> 07:45:19 +0100
> > >>>>>
> > >>>>> I get a build with the latest pull of emacs:
> > >>>>>
> > >>>>> Makefile:415: recipe for target 'seccomp-filter' failed
> > >>> make[1]: >> *** [seccomp-filter] Error 1 make[1]: Leaving
> > >>> directory >> '/home/redknight/git/emacs/lib-src' Makefile:396:
> > >>> recipe for >> target 'lib-src' failed make: *** [lib-src] Error 2
> > >>>
> > >>>> Are there no error or warning messages before the
> > >>> "Makefile:415" > one? If there are, please show all the
> > >>> messages.
> > >>>
> > >>> Yes, sorry, I missed the earlier errors. Here is the full list
> > >>> beginning after the attempt to compile seccomp-filter:
> > >>>
> > >>> ---------- Begin error list ------------
> > >>>
> > >>> CCLD seccomp-filter seccomp-filter.c: In function =E2=80=98main=E2=
=80=99:
> > >>> seccomp-filter.c:142:23: error: =E2=80=98SCMP_ACT_KILL_PROCESS=E2=
=80=99
> > >>> undeclared (first use in this function) ctx =3D seccomp_init
> > >>> (SCMP_ACT_KILL_PROCESS); ^~~~~~~~~~~~~~~~~~~~~
> > >
> > >
> > >> This is an interesting failure. Looks like seccomp.h exists on
> > >> your system, but doesn't contain the right definitions? What does
> > >> your config.log say about seccomp.h (not linux/seccomp.h) and
> > >> seccomp_init?
> > >
> > > I have appended below the occurrences in config.log for seccomp.h. (D=
o
> > > you want me to attach the whole config.log in a second email?) The on=
ly
> > > other mentions are multiple lines of the form
> > >
> > > 5090:| #define HAVE_LINUX_SECCOMP_H 1
> > >
> > > ending with
> > >
> > > 27758:ac_cv_header_linux_seccomp_h=3Dyes
> > > 27771:ac_cv_header_seccomp_h=3Dyes
> > > 29332:#define HAVE_LINUX_SECCOMP_H 1
> > >
> > > Hope this helps.
> > >
> > > ---------- Begin relevant portion of config.log -----------
> > >
> > > configure:17719: checking linux/seccomp.h usability
> > > configure:17719: gcc -c -g3 -O2 -pthread -isystem /usr/include/librs=
vg-2.0 -isystem /usr/include/gdk-pixbuf-2.0 -isystem /usr/include/libpng16 =
-isystem /usr/include/cairo -isystem /usr/include/glib-2.0 -isystem /usr/li=
b/i386-linux-gnu/glib-2.0/include -isystem /usr/include/pixman-1 -isystem /=
usr/include/freetype2 -isystem /usr/include/libpng16 -isystem /usr/include/=
cairo -isystem /usr/include/glib-2.0 -isystem /usr/lib/i386-linux-gnu/glib-=
2.0/include -isystem /usr/include/pixman-1 -isystem /usr/include/freetype2 =
-isystem /usr/include/libpng16 conftest.c >&5
> > > configure:17719: $? =3D 0
> > > configure:17719: result: yes
> > > configure:17719: checking linux/seccomp.h presence
> > > configure:17719: gcc -E conftest.c
> > > configure:17719: $? =3D 0
> > > configure:17719: result: yes
> > > configure:17719: checking for linux/seccomp.h
> > > configure:17719: result: yes
> > > configure:17731: checking seccomp.h usability
> > > configure:17731: gcc -c -g3 -O2 -pthread -isystem /usr/include/librs=
vg-2.0 -isystem /usr/include/gdk-pixbuf-2.0 -isystem /usr/include/libpng16 =
-isystem /usr/include/cairo -isystem /usr/include/glib-2.0 -isystem /usr/li=
b/i386-linux-gnu/glib-2.0/include -isystem /usr/include/pixman-1 -isystem /=
usr/include/freetype2 -isystem /usr/include/libpng16 -isystem /usr/include/=
cairo -isystem /usr/include/glib-2.0 -isystem /usr/lib/i386-linux-gnu/glib-=
2.0/include -isystem /usr/include/pixman-1 -isystem /usr/include/freetype2 =
-isystem /usr/include/libpng16 conftest.c >&5
> > > configure:17731: $? =3D 0
> > > configure:17731: result: yes
> > > configure:17731: checking seccomp.h presence
> > > configure:17731: gcc -E conftest.c
> > > configure:17731: $? =3D 0
> > > configure:17731: result: yes
> > > configure:17731: checking for seccomp.h
> > > configure:17731: result: yes
> > > configure:17733: checking for seccomp_init in -lseccomp
> > > configure:17758: gcc -o conftest -g3 -O2 -pthread -isystem /usr/incl=
ude/librsvg-2.0 -isystem /usr/include/gdk-pixbuf-2.0 -isystem /usr/include/=
libpng16 -isystem /usr/include/cairo -isystem /usr/include/glib-2.0 -isyste=
m /usr/lib/i386-linux-gnu/glib-2.0/include -isystem /usr/include/pixman-1 -=
isystem /usr/include/freetype2 -isystem /usr/include/libpng16 -isystem /usr=
/include/cairo -isystem /usr/include/glib-2.0 -isystem /usr/lib/i386-linux-=
gnu/glib-2.0/include -isystem /usr/include/pixman-1 -isystem /usr/include/f=
reetype2 -isystem /usr/include/libpng16 conftest.c -lseccomp -lX11 =
-lcairo >&5
> > > configure:17758: $? =3D 0
> > > configure:17767: result: yes
> > >
> > > ---------- End relevant portion of config.log ----
> > >
> > >
> >
> >
> > OK, looks like libseccomp is available and should be working. Does /us=
r/include/seccomp.h contain at least some of the symbols the compiler compl=
ains about?
> >
>
> Looking at https://github.com/seccomp/libseccomp/blob/main/CHANGELOG,
> I guess we need at least version 2.4.0 of libseccomp. I'll see that I
> can add a few more checks to configure.ac.
With commit 725fc96b706c57ef8ceca5e7d82b175d9a72e845, I've now
switched to using pkg-config, which seems cleaner anyway.