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
How to compile debugedit? #1581
Comments
Oh I think this might answer my question - we need libdwarf and elfutils? https://bugs.launchpad.net/ubuntu/+source/rpm/+bug/341891. Testing now! |
Okay it's now attempting to compile - here is the error I'm getting:
Should my build be different? I'm trying to create the package for spack, here is what I have so far: # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
import llnl.util.tty as tty
class Rpm(AutotoolsPackage):
"""
The RPM package manager and supported tools
https://github.com/rpm-software-management/rpm/blob/master/INSTALL
"""
homepage = "https://github.com/rpm-software-management/rpm"
url = "https://github.com/rpm-software-management/rpm/archive/rpm-4.16.1.2-release.tar.gz"
version('4.16.1.2', sha256='3d2807807a8ccaa92a8ced74e09b5bf5b2417a5bbf9bee4abc7c6aa497547bf3')
variant('openssl', default=False, description='use openssl for cryptographic library')
variant('sqlite', default=False, description='use sqlite instead of ndb')
variant('bdb_ro', default=False, description='standalone support for read-only BDB databases')
variant('selinux', default=False, description="enable support for SELinux")
variant('python', default=False, description="build Python bindings to RPM library")
variant('posix', default=False, description="enable POSIX.1e draft 15 file capabilities support")
variant('gpg', default=False, description="install gpg for using cryptographic signatures")
variant('openmp', default=True, description="OpenMP multithreading support (default).")
# Always required
depends_on('popt')
# This should be 5.2.+ It tells me it's not present or too old?
depends_on('lua@5.2.0:')
depends_on('autoconf', type='build')
depends_on('automake', type='build')
depends_on('libtool', type='build')
# required for debugedit
depends_on('elfutils')
depends_on('libdwarf')
# Enable POSIX.1e draft 15 file capabilities support
depends_on('libcap', when="+posix")
depends_on('berkeley-db@4.5:')
# Required for National Language Support, if not present autopoint error
depends_on('gettext')
depends_on('file') # provides magic.h
depends_on('libarchive')
# suppot for cryptographic signatures
depends_on('gnupg', when="+gpg")
# cryptographic library to support digests and signatures
depends_on('libgcrypt', when='-openssl')
depends_on('openssl@1.0.2:', when='+openssl')
# RPM needs some database, ndb requires no extra dependencies but sqlite does
depends_on('sqlite@3.22.0:', when='+sqlite')
# Python 2.x support is being deprecated
depends_on('python@3.1:', when='+sqlite')
# compression support
depends_on('zlib')
# Desired to install these formats for use
depends_on('bzip2')
depends_on('gzip')
depends_on('xz')
# java jara dependency analysis (already requirement for lua)
depends_on('unzip', type='run')
def autoreconf(self, spec, prefix):
sh = which('sh')
# This somehow does not detect lua
sh('./autogen.sh', "--without-lua")
def configure_args(self):
spec = self.spec
# We shouldn't need to add without-lua here or in autoreconf
args = ["--enable-ndb", "--without-lua"]
# cryptography library defaults to libgcrypt, but doesn't hurt to specify
if "+openssl" in spec:
args.append("--with-crypto=openssl")
tty.warning(openssl_warning)
else:
args.append("--with-crypto=libgcrypt")
# Default to ndb (no deps) if sqlite not wanted
if "+sqlite" in spec:
args.append("--enable-sqlite")
if "+bdb_ro" in spec:
args.append("--bdb-ro")
# Enable support for selinux
if "+selinux" in spec:
args.append('--with-selinux')
if "+python" in spec:
args.append("--enable-python")
# enable POSIX.1e draft 15 file capabilities support
if "+posix" in spec:
args.append('--with-cap')
# OpenMP multithreading support automatically enabled if C compiler has
# support for OpenMP version 4.5 or higher
if "-openmp" in spec:
args.append("--disable-openmp")
return args
# This warning is from the INSTALL about licensing when using openssl.
# We need to show it to the user if they choose the openssl variant.
openssl_warning = """
When compiling against OpenSSL, there is a possible license incompatibility.
For more details on this, see https://people.gnome.org/~markmc/openssl-and-the-gpl.html
Some Linux distributions have different legal interpretations of this
possible incompatibility. It is recommended to consult with a lawyer before
building RPM against OpenSSL.
Fedora: https://fedoraproject.org/wiki/Licensing:FAQ#What.27s_the_deal_with_the_OpenSSL_license.3F
Debian: https://lists.debian.org/debian-legal/2002/10/msg00113.html""" |
@vsoch Lua is now required unconditionally, and has been de facto required for a while. Also, GPG is needed to sign packages, but not to verify them. |
@DemiMarie thank you! What version of lua? I had 5.2.0 and it told me it wasn't recent enough. Should I try a more recent one (which one?) |
here is what I ran into (that led me to disable it before) - when I add lua, it actually fails in the autogen.sh step, because it tells me it's not found / too old: ==> No patches needed for rpm
==> rpm: Executing phase: 'autoreconf'
==> Error: ProcessError: Command exited with status 1:
'/bin/bash' './autogen.sh'
1 error found in build log:
361 checking for localtime_r... yes
362 checking for statvfs... yes
363 checking for getaddrinfo... yes
364 checking for doxygen... no
365 checking for dot... YES
366 checking for LUA... no
>> 367 configure: error: lua not present or too old (--without-lua to disable) What environment variables / other need to be set for the Lua to be found? Sorry for my naive-ty, I'm pretty new to this library. |
You need 5.4.0, IIRC. 5.3.0 might work. |
No no, Lua 5.2 is the oldest supported version, as it says in INSTALL and configure.ac. On some distros (eg Debian and derivates) lua.pc is versioned and our configure.ac wont find it. |
Could it be an issue with not finding lua.pc? I was looking at this post, and that seems to be important: I've been trying all morning to get this to work with various variables pointing to the lua libraries and no go. I can confirm they are there:
This is always the result:
Does this not compile on Ubuntu? |
Is there a patch we can use maybe here to patch our lua install to have this file? |
Ok, I found a patch to generate lua.pc, added to PKG_CONFIG_PATH, and it starts the build, but then errors out:
What am I missing? |
okay I think I'm beyond that error - now I have:
I hope someone can help me :( |
These functions have been deprecated but the debugedit library is not updated? https://github.com/rpm-software-management/rpm/blob/635edd95230e17e8ada5793719d7e385e729df30/rpmio/rpmlua.h |
They were removed here 376fef1#diff-c9a9cfdfa5b80aab803ef1466d35d0b6ef4d7435b2663cd789e50493ace95857. |
Okay so I went back and used this older version, and installed binutils to get the first set of missing symbols, and now I have this:
I'll stop posting so you have a chance to respond! I can't imagine that no one has ever tried to build this... |
hey @DemiMarie and @pmatilai ! I wanted to give you an update that we found debugedit here 👉 https://code.wildebeest.org/git/user/mjw/debugedit/ and although it's likely a WIP, it already compiles beautifully and we've been able to use it as a separate package. I'm good to close this issue - but I do have one more question! @DemiMarie you mentioned:
Do you use openssl / something else? Could you point me to where you do that? I think we'd be interested in doing something similar for spack. |
Did you see my question in the last comment above? 👆 |
Hi! I have a bit of a noob question - I just built rpm from source following instructions in INSTALL, but I don't see debugedit in the bin. Are there instructions anywhere about flags/other I need to provide to compile it? Thank you!
The text was updated successfully, but these errors were encountered: