richfelker / musl-cross-make

Simple makefile-based build for musl cross compiler

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cowpatch.sh: line 103: patch: not found

magicse opened this issue · comments

make TARGET=arm-linux-musleabihf GCC_CONFIG="--with-arch=armv7-a --with-fpu=vfpv3-d16"
case "gcc-9.4.0" in /) exit 1 ;; esac
rm -rf gcc-9.4.0.tmp
mkdir gcc-9.4.0.tmp
( cd gcc-9.4.0.tmp && /home/musl-cross-make/cowpatch.sh -I ../gcc-9.4.0.orig )
test ! -d patches/gcc-9.4.0 || cat patches/gcc-9.4.0/* | ( cd gcc-9.4.0.tmp && /home/musl-cross-make/cowpatch.sh -p1 )
/home/musl-cross-make/cowpatch.sh: line 103: patch: not found
make: *** [Makefile:139: gcc-9.4.0] Error 127

commented

You need to install patch, gcc, binutils, etc., development tools.

  • debian/ubuntu/etc:
    • sudo apt install build-essential
  • rhel/centos/alma/rocky/fedora:
    • sudo yum group install "Development Tools" # for rhel/centos/... <= 7
    • sudo dnf group install "Development Tools" # for rhel/alma/rocky/... >= 8

Alpine linux don't have build-essential

The patch command is found in the patch package
apk add patch

But many other packages might be mising
apk add build-base

If packages are still missing, this may help
apk add linux-headers autoconf automake libtool bison

I recommend using gcc cross compilers from musl.cc, completely static and work on any distro and x86 cpu