Closed akira304moto closed 3 years ago
I think installing pkg-config at the first step of compiling can solve this issue because there already is a pkg-config build process, only libtool would be required to proceed. What do you think?
I think installing pkg-config at the first step of compiling can solve this issue because there already is a pkg-config build process, only libtool would be required to proceed. What do you think?
That makes sense. Maybe it's just the matter of order.
But I can't think of exactly where pkg-config is required during the process. Unable to reproduce the error because the nasm.us website is probably down, and the package on their GitHub repository seems not the same as the one on nasm.us.
The website of nasm.us restored, and I was able to reproduce the error just now with every package removed from Homebrew:
+ build_ass
+ [[ ! -e /Users/andyw/Downloads/workdir/sw/lib/pkgconfig/libass.pc ]]
+ cd /Users/andyw/Downloads/workdir/compile
+ cd libass-0.15.0
+ autoreconf -i
Can't exec "glibtoolize": No such file or directory at /opt/homebrew/Cellar/autoconf/2.69/share/autoconf/Autom4te/FileUtils.pm line 345, <GEN3> line 4.
autoreconf: failed to run glibtoolize: No such file or directory
autoreconf: glibtoolize is needed because this package uses Libtool
After brew install libtool
:
+ build_ass
+ [[ ! -e /Users/andyw/Downloads/workdir/sw/lib/pkgconfig/libass.pc ]]
+ cd /Users/andyw/Downloads/workdir/compile
+ cd libass-0.15.0
+ autoreconf -i
configure.ac:125: error: possibly undefined macro: AC_DEFINE
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
autoreconf: /opt/homebrew/Cellar/autoconf/2.69/bin/autoconf failed with exit status: 1
The compilation finally succeeded after brew install pkgconfig
.
Both errors appeared when building libass after building pkgconfig. So I think the easiest solution is to have libtool and pkg-config installed with brew in advance, as what I've modified in the script.
I'm sorry about getting back to you so late. I am already using M1 Mac Mini but I will get my M1 MacBook Air next week so I'll test this out in the next week within the clean state of the Mac.
Hello! Now I can confirm that this PR works with the clean state of the Mac equipped with Apple Silicon. I am going to merge this PR. Thank you!
libtool and pkgconfig are required in the building process. For newly installed Homebrew, there would be errors without these two dependencies.