stefanberger / swtpm

Libtpms-based TPM emulator with socket, character device, and Linux CUSE interface.
Other
567 stars 136 forks source link

On Fedora the libseccomp-devel was missing in dependencies to build #808

Closed dombrowa closed 1 year ago

dombrowa commented 1 year ago

Describe the bug

On Fedora the libseccomp-devel was missing in the dependencies to build the code with default checkout and configure. Also autoconf package providing /usr//bin/autoreconf has to be installed.

configure: error: "Is libseccomp-devel installed? -- could not get cflags for libseccomp"

Required: To Reproduce (without these steps your issue may be deleted)

git clone https://github.com/stefanberger/swtpm.git
pushd swtpm
# Install dependencies using dnf (RHEL, Fedora)
sudo dnf -y install libtasn1-devel expect socat python3-twisted fuse-devel glib2-devel gnutls-devel gnutls-utils gnutls json-glib-devel
./autogen.sh --with-openssl --prefix=/usr
make -j4
# Depending on how many CPUs you have, choose the -j parameter
# carefully for the next command. The tests work on Raspberry PI 2
# for example but only if run with '-j1', otherwise timeouts may
# occur.
make -j4 check
sudo make install

Expected behavior

No error regarding missing libs to compile

Desktop (please complete the following information):

Versions of relevant components

Log files Please attach any log files. If using a VM and it was started with libvirt, attach the logfile found in /var/log/swtpm/libvirt/qemu/VM-NAME-swtpm.log.

Additional context The package to install was sudo dnf install libseccomp-devel

stefanberger commented 1 year ago

The package to install was sudo dnf install libseccomp-devel

Yes, and this is what the developer would be expected to do following the message reported by configure. What would you expect to happen?

You can also build it without seccomp support if you don't need/want it:

$ ./configure --prefix=/usr --without-seccomp
...
with_seccomp    :    no  (no = no seccomp profile; Linux only)
...
dombrowa commented 1 year ago

Most people use default, and as such without customization, the default configure results in a failed compile.

On Tue, Jul 11, 2023 at 8:26 AM Stefan Berger @.***> wrote:

The package to install was sudo dnf install libseccomp-devel

Yes, and this is what the developer would be expected to do following the message reported by configure. What would you expect to happen?

You can also build it without seccomp support if you don't need/want it:

$ ./configure --prefix=/usr --without-seccomp ... with_seccomp : no (no = no seccomp profile; Linux only) ...

— Reply to this email directly, view it on GitHub https://github.com/stefanberger/swtpm/issues/808#issuecomment-1630732190, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEVHKXYX2Q45TTHR7UZAET3XPVA7DANCNFSM6AAAAAA2FD4ROI . You are receiving this because you authored the thread.Message ID: @.***>

dombrowa commented 1 year ago

It is not a bug, but a feature.

stefanberger commented 1 year ago

On Linux it forces the user to install seccomp devel support...