Skip to content

Build failure: mpack #369083

Closed
Closed

Description

@MarkRijckenberg

Steps To Reproduce

Steps to reproduce the behavior:

  1. build mpack

Build log

Details

nix log /nix/store/0wkirmcl34c978r1199vskgw4m4cbgmb-mpack-1.6.drv
Running phase: unpackPhase
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking source archive /nix/store/1ccd1r0lfrmvn44xzy24l0hby96hva08-mpack-1.6.tar.gz
source root is mpack-1.6
setting SOURCE_DATE_EPOCH to timestamp 1058831360 of file mpack-1.6/configure
Running phase: patchPhase
@nix { "action": "setPhase", "phase": "patchPhase" }
applying patch /nix/store/0xm8ixqq2fccw54pp336qsv5285ifz69-build-fix.patch
patching file unixos.c
patching file xmalloc.c
applying patch /nix/store/cn88xhvg54f915kklzfgr4v6y0c6sdlq-sendmail-via-execvp.diff
patching file unixpk.c
applying patch /nix/store/fz36vimg59yc9qh2a92dvd9yqkjvlygx-CVE-2011-4919.patch
patching file unixos.c
Hunk #1 succeeded at 133 (offset -1 lines).
substituteStream() in derivation mpack-1.6: WARNING: '--replace' is deprecated, use --replace-{fail,warn,quiet}. (file 'codes.c')
substituteStream() in derivation mpack-1.6: WARNING: pattern /usr/tmp doesn't match anything in file 'codes.c'
substituteStream() in derivation mpack-1.6: WARNING: pattern /usr/tmp doesn't match anything in file 'decode.c'
substituteStream() in derivation mpack-1.6: WARNING: pattern /usr/tmp doesn't match anything in file 'encode.c'
substituteStream() in derivation mpack-1.6: WARNING: pattern /usr/tmp doesn't match anything in file 'getopt.c'
substituteStream() in derivation mpack-1.6: WARNING: pattern /usr/tmp doesn't match anything in file 'macbhex.c'
substituteStream() in derivation mpack-1.6: WARNING: pattern /usr/tmp doesn't match anything in file 'macfile.c'
substituteStream() in derivation mpack-1.6: WARNING: pattern /usr/tmp doesn't match anything in file 'macmpack.c'
substituteStream() in derivation mpack-1.6: WARNING: pattern /usr/tmp doesn't match anything in file 'macnapp.c'
substituteStream() in derivation mpack-1.6: WARNING: pattern /usr/tmp doesn't match anything in file 'macndlog.c'
substituteStream() in derivation mpack-1.6: WARNING: pattern /usr/tmp doesn't match anything in file 'macnfile.c'
substituteStream() in derivation mpack-1.6: WARNING: pattern /usr/tmp doesn't match anything in file 'macninit.c'
substituteStream() in derivation mpack-1.6: WARNING: pattern /usr/tmp doesn't match anything in file 'macnsmtp.c'
substituteStream() in derivation mpack-1.6: WARNING: pattern /usr/tmp doesn't match anything in file 'macntcp.c'
substituteStream() in derivation mpack-1.6: WARNING: pattern /usr/tmp doesn't match anything in file 'macnte.c'
substituteStream() in derivation mpack-1.6: WARNING: pattern /usr/tmp doesn't match anything in file 'macos.c'
substituteStream() in derivation mpack-1.6: WARNING: pattern /usr/tmp doesn't match anything in file 'macpcstr.c'
substituteStream() in derivation mpack-1.6: WARNING: pattern /usr/tmp doesn't match anything in file 'magic.c'
substituteStream() in derivation mpack-1.6: WARNING: pattern /usr/tmp doesn't match anything in file 'md5c.c'
substituteStream() in derivation mpack-1.6: WARNING: pattern /usr/tmp doesn't match anything in file 'part.c'
substituteStream() in derivation mpack-1.6: WARNING: pattern /usr/tmp doesn't match anything in file 'strcasecmp.c'
substituteStream() in derivation mpack-1.6: WARNING: pattern /usr/tmp doesn't match anything in file 'unixunpk.c'
substituteStream() in derivation mpack-1.6: WARNING: pattern /usr/tmp doesn't match anything in file 'uudecode.c'
substituteStream() in derivation mpack-1.6: WARNING: pattern /usr/tmp doesn't match anything in file 'xmalloc.c'
Running phase: updateAutotoolsGnuConfigScriptsPhase
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
Running phase: configurePhase
@nix { "action": "setPhase", "phase": "configurePhase" }
patching script interpreter paths in ./configure
./configure: interpreter directive changed from "#! /bin/sh" to "/nix/store/5mh7kaj2fyv8mk4sfq1brwxgc02884wi-bash-5.2p37/bin/sh"
configure flags: --prefix=/nix/store/5clp17ji4hhwzwzf5pnr8bss4abnw2v8-mpack-1.6
creating cache ./config.cache
checking for a BSD compatible install... /nix/store/4s9rah4cwaxflicsk5cndnknqlk9n4p3-coreutils-9.5/bin/install -c
checking whether build environment is sane... yes
checking whether make sets ${MAKE}... yes
checking for working aclocal... missing
checking for working autoconf... missing
checking for working automake... missing
checking for working autoheader... missing
checking for working makeinfo... missing
checking for gcc... gcc
checking whether the C compiler (gcc ) works... no
configure: error: installation or configuration problem: C compiler cannot create executables.

Additional context

⋉ gcc --version
gcc (GCC) 13.3.0
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

So gcc is installed and working outside of the build process for mpack.

Metadata

⋉ nix-shell -p nix-info --run "nix-info -m"

  • system: "x86_64-linux"
  • host os: Linux 6.12.5, NixOS, 25.05 (Warbler), 25.05.20241219.d70bd19
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.25.3
  • channels(root): "nixpkgs"
  • nixpkgs: /etc/nix/path/nixpkgs

Extra details:

 OS -> NixOS
├ -> warbler 25.05 (Warbler)
├ -> Linux 6.12.5
├󰏖 -> 2302 (nix-system), 170 (nix-user), 48 (nix-default), 11 (flatpak)
└ -> bash 5.2.37

 DE/WM -> Muffin (X11)
├󰧨 -> lightdm 1.32.0 (X11)
├󰉼 -> New-Minty (Mint-Y)
├󰀻 -> Numix-Circle-Light [GTK2/3/4]
├ -> .gnome-terminal

󰌢 PC -> MS-7E12 (1.0)
├󰻠 -> AMD Ryzen 7 7800X3D (16) @ 5.05 GHz
├󰍛 -> NVIDIA GeForce RTX 4070 [Discrete]
├󰍛 -> AMD Raphael [Integrated]

 SOUND -> Blackwire C5220 headset (remote control and 3.5mm audio adapter) Ana)

Linux ulysses-desktop 6.12.5 #1-NixOS SMP PREEMPT_DYNAMIC Sat Dec 14 19:04:17 UTC 2024 x86_64 GNU/Linux
| NVIDIA-SMI 565.77 Driver Version: 565.77 CUDA Version: 12.7 |
x11
cinnamon
nix (Nix) 2.25.3

Notify maintainers

@tomodachi94
@nicoo

Note for maintainers: Please tag this issue in your PR.


Add a 👍 reaction to issues you find important.

Activity

  1. paparodeo commented on Dec 29, 2024

    @paparodeo
    Contributor

    this diff should fix it -- add autoreconfHook and then pull in most of Debian's patches:

    https://salsa.debian.org/debian/mpack/-/tree/debian/main/debian/patches

    and fixed a buffer overflow warning with an additional substitute in postPatch

    feel free to open a PR

    fixes.diff
    diff --git a/pkgs/by-name/mp/mpack/CVE-2011-4919.patch b/pkgs/by-name/mp/mpack/CVE-2011-4919.patch
    deleted file mode 100644
    index 10b9a1116ef3..000000000000
    --- a/pkgs/by-name/mp/mpack/CVE-2011-4919.patch
    +++ /dev/null
    @@ -1,23 +0,0 @@
    -commit 0c87201f64491575350b18d04c62ec142e119d1f
    -Author: Sebastian Pipping <[email protected]>
    -Date:   Sat, 31 Dec 2011 19:17:20 +0000 (20:17 +0100)
    -Source: https://web.archive.org/web/20120128080247/http://git.goodpoint.de/?p=mpack.git;a=commitdiff;h=0c87201f64491575350b18d04c62ec142e119d1f
    -
    -    Fix permissions
    -
    -diff --git a/unixos.c b/unixos.c
    -index fa6d0a7..0e2f469 100644 (file)
    ---- a/unixos.c
    -+++ b/unixos.c
    -@@ -134,9 +134,9 @@ FILE *os_createnewfile(char *fname)
    -     FILE *ret;
    -      
    - #ifdef O_EXCL
    --    fd=open(fname, O_RDWR|O_CREAT|O_EXCL, 0644);
    -+    fd=open(fname, O_RDWR|O_CREAT|O_EXCL, 0600);
    - #else
    --    fd=open(fname, O_RDWR|O_CREAT|O_TRUNC, 0644);
    -+    fd=open(fname, O_RDWR|O_CREAT|O_TRUNC, 0600);
    - #endif
    - 
    -     if (fd == -1)
    diff --git a/pkgs/by-name/mp/mpack/build-fix.patch b/pkgs/by-name/mp/mpack/build-fix.patch
    deleted file mode 100644
    index 0329bedd07f3..000000000000
    --- a/pkgs/by-name/mp/mpack/build-fix.patch
    +++ /dev/null
    @@ -1,29 +0,0 @@
    -diff -ubr mpack-1.6-orig/unixos.c mpack-1.6/unixos.c
    ---- mpack-1.6-orig/unixos.c	2013-08-17 14:32:38.102772775 +0200
    -+++ mpack-1.6/unixos.c	2013-08-17 14:32:43.180792505 +0200
    -@@ -38,10 +38,6 @@
    - #define MAXHOSTNAMELEN 64
    - #endif
    - 
    --extern int errno;
    --extern char *malloc();
    --extern char *getenv();
    --
    - int overwrite_files = 0;
    - int didchat;
    - 
    -Only in mpack-1.6: unixos.o
    -Only in mpack-1.6: unixunpk.o
    -Only in mpack-1.6: uudecode.o
    -diff -ubr mpack-1.6-orig/xmalloc.c mpack-1.6/xmalloc.c
    ---- mpack-1.6-orig/xmalloc.c	2013-08-17 14:32:38.102772775 +0200
    -+++ mpack-1.6/xmalloc.c	2013-08-17 14:33:08.900892319 +0200
    -@@ -24,7 +24,6 @@
    -  */
    - #include <stdio.h>
    - #include <string.h>
    --extern char *malloc(), *realloc();
    - 
    - char *xmalloc (int size)
    - {
    -Only in mpack-1.6: xmalloc.o
    diff --git a/pkgs/by-name/mp/mpack/package.nix b/pkgs/by-name/mp/mpack/package.nix
    index 5f2fa1124dee..9b5226ad1ace 100644
    --- a/pkgs/by-name/mp/mpack/package.nix
    +++ b/pkgs/by-name/mp/mpack/package.nix
    @@ -2,6 +2,8 @@
       lib,
       stdenv,
       fetchurl,
    +  fetchpatch,
    +  autoreconfHook,
       testers,
       mpack,
     }:
    @@ -15,23 +17,37 @@ stdenv.mkDerivation rec {
         hash = "sha256-J0EIuzo5mCpO/BT7OmUpjmbI5xNnw9q/STOBYtIHqUw=";
       };
     
    -  patches = [
    -    ./build-fix.patch
    +  patches = let
    +    # https://salsa.debian.org/debian/mpack/-/tree/debian/main/debian/patches
    +    fetchDebPatch = { name, hash }:
    +      fetchpatch {
    +        inherit name  hash;
    +        url = "https://salsa.debian.org/debian/mpack/-/raw/7d6514b314a7341614ec8275b03acfcb6a854a6f/debian/patches/${name}";
    +      };
    +  in
    +  [
         ./sendmail-via-execvp.diff
    -    ./CVE-2011-4919.patch
    -  ];
    +  ] ++ (map fetchDebPatch [
    +    { name = "01_legacy.patch"; hash = "sha256-v2pZUXecgxJqoHadBhpAAoferQNSeYE+m7qzEiggeO4="; }
    +    { name = "02_fix-permissions.patch"; hash = "sha256-sltnIqgv7+pwwSFQRCDeCwnjoo2OrvmGFm+SM9U/HB4="; }
    +    { name = "03_specify-filename-replacement-character.patch"; hash = "sha256-vmLIGFSqKK/qSsltzhdLQGoekew3r25EwAu56umeXlU="; }
    +    { name = "04_fix-return-error-code.patch"; hash = "sha256-l23D6xhkgtkEsErzUy/q6U3aPf5N7YUw2PEToU1YXKI="; }
    +    { name = "06_fix-makefile.patch"; hash = "sha256-69plDqy2sLzO1O4mqjJIlTRCw5ZeVySiqwo93ZkX3Ho="; }
    +    { name = "07_fix-decode-base64-attachment.patch"; hash = "sha256-hzSCrEg0j6dJNLbfwRNn+rWGRnyUBLjJUlORJS9aDD4="; }
    +    { name = "08_fix-mime-version.patch"; hash = "sha256-l2rBqbyKmnz5tEPeuX6HCqw7rSV8pDb7ijpCHsdh57g="; }
    +    { name = "09_remove-debugging-message.patch"; hash = "sha256-dtq6BHgH4ciho0+TNW/rU3KWoeKs/1jwJafnHTr9ebI="; }
    +  ]);
     
       postPatch = ''
    -    for f in *.{c,man,pl,unix} ; do
    -      substituteInPlace $f --replace /usr/tmp /tmp
    -    done
    -
    -    # this just shuts up some warnings
    -    for f in {decode,encode,part,unixos,unixpk,unixunpk,xmalloc}.c ; do
    -      sed -i 'i#include <stdlib.h>' $f
    -    done
    +    substituteInPlace *.{c,man,pl,unix} --replace-quiet /usr/tmp /tmp
    +
    +    # silence a buffer overflow warning
    +    substituteInPlace uudecode.c \
    +      --replace-fail "char buf[1024], buf2[1024];" "char buf[1024], buf2[1066];"
       '';
     
    +  nativeBuildInputs = [ autoreconfHook ];
    +
       postInstall = ''
         install -Dm644 -t $out/share/doc/mpack INSTALL README.*
       '';
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: build failure

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions