riscv-software-src / homebrew-riscv

homebrew (macOS) packages for RISC-V toolchain
https://riscv.org
310 stars 50 forks source link

Missing "texinfo" build dependency in riscv-gnu-toolchain #94

Closed eyolfson closed 1 year ago

eyolfson commented 1 year ago

When building on the latest macOS 13.0 you get the following error when building:

makeinfo: command not found
WARNING: 'makeinfo' is missing on your system.

This patch adds the "texinfo" build dependency that contains the 'makeinfo' command.

Signed-off-by: Jon Eyolfson jon@eyolfson.com

x14ngch3n commented 1 year ago

Hi, I'm also trying to build from source in MacOS 13.0 on my M1 MacBook Pro, but I failed to build gcc after applying your changes, and the terminal didn't show any wrong log, do you know why?

eyolfson commented 1 year ago

I'm not sure. That's the only change I made and I was able to build successfully. I'm also. on an M1 MacBook Pro. There was no additional output, or a log file that might indicate what went wrong?

x14ngch3n commented 1 year ago

The build process stopped with a bunch of /usr/bin/install xxx and mkdir -p stamps/ && touch stamps/build-gcc-newlib-stage1, which is followed by the homebrew's output:

``` ==> Formula Tap: riscv-software-src/riscv Path: /opt/homebrew/Library/Taps/riscv-software-src/homebrew-riscv/riscv-gnu-toolchain.rb ==> Configuration HOMEBREW_VERSION: 3.6.8-10-g73d535a ORIGIN: https://mirrors.sjtug.sjtu.edu.cn/git/brew.git HEAD: 73d535a206d86c06e6ebc266351a53e28692dace Last commit: 14 hours ago Core tap ORIGIN: https://github.com/Homebrew/homebrew-core Core tap HEAD: 618830a6dd9ded1b6a92806a6a835a6f595f19d3 Core tap last commit: 2 hours ago Core tap branch: master HOMEBREW_PREFIX: /opt/homebrew HOMEBREW_BOTTLE_DOMAIN: https://mirror.sjtu.edu.cn/homebrew-bottles/bottles HOMEBREW_CASK_OPTS: [] HOMEBREW_DISPLAY: :0 HOMEBREW_MAKE_JOBS: 4 all_proxy: socks5://127.0.0.1:7890 http_proxy: http://127.0.0.1:7890 https_proxy: http://127.0.0.1:7890 Homebrew Ruby: 2.6.10 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby CPU: 10-core 64-bit arm_firestorm_icestorm Clang: 14.0.0 build 1400 Git: 2.37.1 => /Applications/Xcode.app/Contents/Developer/usr/bin/git Curl: 7.84.0 => /usr/bin/curl macOS: 13.0-arm64 CLT: 14.1.0.0.1.1666437224 Xcode: 14.1 Rosetta 2: false ==> ENV HOMEBREW_CC: clang HOMEBREW_CXX: clang++ MAKEFLAGS: -j4 CMAKE_PREFIX_PATH: /opt/homebrew/opt/texinfo:/opt/homebrew CMAKE_INCLUDE_PATH: /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers CMAKE_LIBRARY_PATH: /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries PKG_CONFIG_PATH: /opt/homebrew/opt/gmp/lib/pkgconfig:/opt/homebrew/opt/isl/lib/pkgconfig:/opt/homebrew/opt/mpfr/lib/pkgconfig:/opt/homebrew/opt/lz4/lib/pkgconfig:/opt/homebrew/opt/xz/lib/pkgconfig:/opt/homebrew/opt/zstd/lib/pkgconfig PKG_CONFIG_LIBDIR: /usr/lib/pkgconfig:/opt/homebrew/Library/Homebrew/os/mac/pkgconfig/13 HOMEBREW_MAKE_JOBS: 4 HOMEBREW_GIT: git HOMEBREW_SDKROOT: /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk ACLOCAL_PATH: /opt/homebrew/share/aclocal PATH: /opt/homebrew/Library/Homebrew/shims/mac/super:/opt/homebrew/opt/gawk/bin:/opt/homebrew/opt/gnu-sed/bin:/opt/homebrew/opt/flock/bin:/opt/homebrew/opt/texinfo/bin:/opt/homebrew/opt/lz4/bin:/opt/homebrew/opt/xz/bin:/opt/homebrew/opt/zstd/bin:/usr/bin:/bin:/usr/sbin:/sbin Error: riscv-software-src/riscv/riscv-gnu-toolchain main did not build Logs: /Users/chenxiang/Library/Logs/Homebrew/riscv-gnu-toolchain/build-binutils-newlib /Users/chenxiang/Library/Logs/Homebrew/riscv-gnu-toolchain/00.options.out /Users/chenxiang/Library/Logs/Homebrew/riscv-gnu-toolchain/04.sed /Users/chenxiang/Library/Logs/Homebrew/riscv-gnu-toolchain/07.make /Users/chenxiang/Library/Logs/Homebrew/riscv-gnu-toolchain/05.sed /Users/chenxiang/Library/Logs/Homebrew/riscv-gnu-toolchain/07.make.cc /Users/chenxiang/Library/Logs/Homebrew/riscv-gnu-toolchain/build-gcc-newlib-stage1 /Users/chenxiang/Library/Logs/Homebrew/riscv-gnu-toolchain/06.configure.cc /Users/chenxiang/Library/Logs/Homebrew/riscv-gnu-toolchain/06.configure /Users/chenxiang/Library/Logs/Homebrew/riscv-gnu-toolchain/config.log /Users/chenxiang/Library/Logs/Homebrew/riscv-gnu-toolchain/01.git /Users/chenxiang/Library/Logs/Homebrew/riscv-gnu-toolchain/build-gdb-newlib /Users/chenxiang/Library/Logs/Homebrew/riscv-gnu-toolchain/02.git /Users/chenxiang/Library/Logs/Homebrew/riscv-gnu-toolchain/03.git Do not report this issue to Homebrew/brew or Homebrew/core! These open issues may also help: Missing "texinfo" build dependency in riscv-gnu-toolchain https://github.com/riscv-software-src/homebrew-riscv/pull/94 ```

There're too many logs attached, do you know which to look?

x14ngch3n commented 1 year ago

I'd appreciate it if you can share your command to build-from-source using homebrew!

Here's my command:

brew install --build-from-source riscv-gnu-toolchain --verbose
eyolfson commented 1 year ago

I just did:

brew edit riscv-gnu-toolchain
# add the entry for "texinfo", as in the diff
brew install riscv-tools

My brew config is pretty much the same as you, minus Xcode:

HOMEBREW_VERSION: 3.6.8-10-g73d535a
ORIGIN: https://github.com/Homebrew/brew
HEAD: 73d535a206d86c06e6ebc266351a53e28692dace
Last commit: 18 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 618830a6dd9ded1b6a92806a6a835a6f595f19d3
Core tap last commit: 7 hours ago
Core tap branch: master
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_MAKE_JOBS: 10
Homebrew Ruby: 2.6.10 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
CPU: 10-core 64-bit arm_firestorm_icestorm
Clang: 14.0.0 build 1400
Git: 2.38.1 => /opt/homebrew/bin/git
Curl: 7.84.0 => /usr/bin/curl
macOS: 13.0-arm64
CLT: 14.1.0.0.1.1666437224
Xcode: N/A
Rosetta 2: false
x14ngch3n commented 1 year ago

Thanks, I'll remove Xcode and try again!

It works!

After I recalled the whole process, I find that the real reason of previous failure is the poor network connection. I was manually git clone those submodules but forgot to do it recursively, so there're some submodules missed when building.

eyolfson commented 1 year ago

Glad to see it works now! Hopefully it gets merged soon :)

sbeamer commented 1 year ago

I'm still running macOS 12, so I can't confirm makeinfo got removed, but it makes sense. Apple was avoiding GPL3 code, so they ran very old versions of many GNU programs. They finally decided bash was too old (thus the shift to zsh default). On my system, makeinfo is Apple provided, but version 4.8 from 2004, so way outdated.

Thanks for the PR!