[Rpm-maint] [rpm-software-management/rpm] How to compile debugedit? (#1581)

Vanessasaurus notifications at github.com
Tue Mar 16 22:28:53 UTC 2021


Okay it's now attempting to compile - here is the error I'm getting:

```

7 errors found in build log:
     1368    mv -f $depbase.Tpo $depbase.Po
     1369    config.status: creating ./rpmpopt-4.16.1.2
     1370    depbase=`echo tools/rpmdeps.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
     1371    /home/vanessa/Desktop/Code/spack-dev/lib/spack/env/gcc/gcc -DHAVE_CONFIG_H   -I. -I. -I./include/ -I./build -I./lib -I./rpmio -I./misc -DLOC
             ALEDIR="\"/home/vanessa/Desktop/Code/spack-dev/opt/spack/linux-ubuntu20.04-skylake/gcc-9.3.0/rpm-4.16.1.2-xzye7hzexx3d4cwyss3q3ikozfiyadno/s
             hare/locale\"" -DLIBRPMALIAS_FILENAME="\"rpmpopt-4.16.1.2\""  -D_REENTRANT -Wall -Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes  -
             fno-strict-aliasing -fstack-protector -Wempty-body -g -O2 -MT tools/rpmdeps.o -MD -MP -MF $depbase.Tpo -c -o tools/rpmdeps.o tools/rpmdeps.c
              &&\
     1372    mv -f $depbase.Tpo $depbase.Po
     1373    tools/debugedit.c: In function 'edit_dwarf2':
  >> 1374    tools/debugedit.c:2390:9: error: 'DW_MACRO_GNU_define' undeclared (first use in this function); did you mean 'DW_MACRO_define'?
```
Should my build be different? I'm trying to create the package for spack, here is what I have so far:

```python
# 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 at 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 at 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 at 1.0.2:', when='+openssl')

    # RPM needs some database, ndb requires no extra dependencies but sqlite does
    depends_on('sqlite at 3.22.0:', when='+sqlite')

    # Python 2.x support is being deprecated
    depends_on('python at 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"""
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/1581#issuecomment-800655339
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20210316/b5e844d1/attachment-0001.html>


More information about the Rpm-maint mailing list