Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EMANE Pre-built Distribution Package for RHEL 8 lxc.init.static error #216

Open
roymatchuu opened this issue May 5, 2022 · 6 comments
Open

Comments

@roymatchuu
Copy link

I am trying to build EMANE v1.3.3 on a vanilla RHEL 8 machine and have ran into a few troubles. I have been following the steps detailed here to build on a vanilla RHEL 8 machine.

I am able to follow the steps until I get to the dnf config-manager --set-enabled powertools step where I have used this resource to solve the problem by performing a sudo subscription-manager repos --enable codeready-builder-for-rhel-8-x86_64-rpms instead.

I also encounter problems on the dnf install *.rpm where I am not able to install python3-pynodestatviz due to an incorrect dependency name (expected as: python3-pmw). I am able to build pynodestatviz from source and install pmw by performing a python3 -m pip install pmw call.

I then clone emane-tutorial and try to run demo 0 to verify that everything works. I then install bridge-utils to get the olsrlinvkview.py to work, but the demo logs show a No such file or directory - unable to open lxc.init.static error in the lxc-execute.log.1

When looking up this problem, I found this bug report: https://bugzilla.redhat.com/show_bug.cgi?id=1654366

The bug report then prompted me to start from scratch and perform yum install glibc libcap before running the dnf install *.rpm step. The same lxc.init.static error persists even after rebuilding with the supposed libraries needed to configure HAVE_STATIC_LIBCAP to yes. What steps should I take to solve this problem in a Vanilla RHEL 8 system?

@sgalgano
Copy link
Member

sgalgano commented May 5, 2022

This is an lxc rpm spec issue. Download the lxc source rpm, modify the spec similar to below, rebuild, and update.

--- lxc.spec.orig	2022-05-05 16:58:12.932812621 -0400
+++ lxc.spec.new	2022-05-05 16:44:50.353538858 -0400
@@ -1,3 +1,5 @@
+%define buildid .static_init
+
 %if 0%{?fedora}
 %global with_seccomp 1
 %global with_static_init 1
@@ -6,12 +8,13 @@
 %if 0%{?rhel} >= 7
 %ifarch %{ix86} x86_64 %{arm} aarch64
 %global with_seccomp 1
+%global with_static_init 1
 %endif
 %endif
 
 Name:           lxc
 Version:        3.0.4
-Release:        2%{?dist}
+Release:        2%{?buildid}%{?dist}
 Summary:        Linux Resource Containers
 License:        LGPLv2+ and GPLv2
 URL:            http://linuxcontainers.org/lxc

@roymatchuu
Copy link
Author

I was able to find the source RPM for lxc v3.0.4 from here: https://koji.fedoraproject.org/koji/buildinfo?buildID=1374546

I edited the SPEC file to reflect the changes you had specified but I am now having trouble rebuilding due to the following errors:

error: Failed build dependencies:
	libcap-static is needed by lxc-3.0.4-2.static_init.el8.x86_64
	pkgconfig(libseccomp) is needed by lxc-3.0.4-2.static_init.el8.x86_64

I cannot seem to find any reference online on how to install libcap-static especially for the RHEL 8 system. I am also having trouble finding the libseccomp.pc that is expected by the SPEC file in the /usr/share/pkgconfig folder after installation. Do you have any references on where I can find these dependencies?

@sgalgano
Copy link
Member

sgalgano commented May 6, 2022

You can download source rpms with dnf:

$ dnf download --source lxc

The dependencies were a bit more difficult to find -- we rebuilt them from fedora src rpms.

Pre-built lxc-3.0.4-2.static_init package bundles for convenience [Package Signature]:

Distro Bundle sha256sum
RHEL/Rocky 8 64-bit (sig) 0ae0cc7c858f49dede10ad22ab0f4d577ab6651b082383368fd7ad1a93c855c4

@roymatchuu
Copy link
Author

roymatchuu commented May 9, 2022

Would it be proper to download the Pre-built lxc-3.0.4-2.static_init package you had attached and install all the RPMs in the RPMs directory? After having installed everything:

  • lxc-templates-3.0.4-2.static_init.el8.x86_64.rpm
  • lxc-libs-3.0.4-2.static_init.el8.x86_64.rpm
  • lxc-devel-3.0.4-2.static_init.el8.x86_64.rpm
  • lxc-3.0.4-2.static_init.el8.x86_64.rpm

The No such file or directory - unable to open lxc.init.static error is gone but the Function not implemented - Failed to send signal through pidfd still persists.

Here are the steps that I take to get to that point:

  1. Start a fresh vanilla RHEL8 system and follow the steps to install the prebuilt packages: https://github.com/adjacentlink/emane/wiki/Install#rhelrocky-8-x86_64
  2. Install the RPMs specified above
  3. I had to build pynodestatviz from source due to the pmw issue as stated on my previous messages to run OLSR Link Viewer.

Unfortunately, there's no activity posted on the Link Viewer potentially because of the failed to signal error.

@sgalgano
Copy link
Member

sgalgano commented May 9, 2022

Yes.

$ sudo rpm -i lxc-libs-3.0.4-2.static_init.el8.x86_64.rpm lxc-3.0.4-2.static_init.el8.x86_64.rpm

Keep in mind the version of olsr used in the emane-turtorial is no longer maintained, so mileage will vary.

@roymatchuu
Copy link
Author

I still get the Function not implemented - Failed to send signal through pidfd after performing the command you had mentioned above. Even though the unable to open lxc.init.static error is resolved, the Function not implemented - Failed to send signal through pidfd still persists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants