Giter Site home page Giter Site logo

Comments (6)

Vargol avatar Vargol commented on July 28, 2024

HI
If the patch was the ""they're trying to install the man stuff into system man directories" patch, that was committed, then Brotli broke it again but provided a way to set where to install the man pages, so my script was changed to use that instead of the patch. Seems strange that you need it, how did you get my script, the releases page or a git clone, or the 'Code' button download option.

I'm running a full rebuild to see if I get the same error, my last re-run was May 1st which was fine.

EDIT The fresh build completed successfully for me.

compile brotli
took 5s
...
compile fontconfig
took 16s
...
compile ffmpeg
took 174s
compilation finished successfully
took 889s

bundle result
  adding: ffmpeg (deflated 58%)
  adding: ffprobe (deflated 58%)

run tests
tests executed successfully

Error wise, brotli frequently move stuff around between decoder and common libraries, it's a pain to keep up with.
make sure the tool/lib/pkgconfig/libbrotlidec.pc
has references to libbrotlicommon in them

Libs: -L${libdir} -lbrotlidec -lbrotlicommon
Requires.private: libbrotlicommon >= 1.1.0

from ffmpeg-apple-arm64-build.

Vargol avatar Vargol commented on July 28, 2024

BTW I guess I should point out this script is close to being obsolete, as all the bits needed are now in the release versions of the libraries. There's pretty much just the handbrake threading patch, I've no idea if that actually makes a differences though as I'm on a base M3 and thats targeting the Max/Pro/Ultra variations of the M series.

from ffmpeg-apple-arm64-build.

aikinai avatar aikinai commented on July 28, 2024

Thanks for the super quick response! I used git clone to get the script. Here's exactly what I'm running:

diskutil erasevolume APFS 'RAMdisk' `hdiutil attach -nobrowse -nomount ram://8388608` #4GB
cd /Volumes/RAMdisk
git clone https://github.com/Vargol/ffmpeg-apple-arm64-build.git
cd ffmpeg-apple-arm64-build
./build.sh
sudo rsync -vaX /Volumes/RAMdisk/ffmpeg-apple-arm64-build/out/* /usr/local/

And here is the patch I got for brotli

diff --git a/build/build-brotli.sh b/build/build-brotli.sh
index c52f350..d7de60f 100755
--- a/build/build-brotli.sh
+++ b/build/build-brotli.sh
@@ -40,6 +40,8 @@ configure_build () {

   cd "$2/${SOFTWARE}/${SOFTWARE}/"
   checkStatus $? "change directory failed"
+#  git apply $1/brotli_man_fix.patch
+#  checkStatus $? "git apply patch failed"

   cd "$2/${SOFTWARE}/build-${SOFTWARE}/"
   checkStatus $? "change directory failed"
@@ -71,9 +73,6 @@ make_compile () {
   # install
   make install
   checkStatus $? "installation of ${SOFTWARE} failed"
-
-  #fix up the pkgconfig.
-  sed -i '' "s/lbrotlidec$/lbrotlidec -lbrotlicommon/" $3/lib/pkgconfig/libbrotlidec.pc

 }

There's pretty much just the handbrake threading patch, I've no idea if that actually makes a differences though as I'm on a base M3 and thats targeting the Max/Pro/Ultra variations of the M series.

That's the libx265 patch right? It made a huge difference for me on my M1 Max. That's how I originally found my way to your script. But if everything except that is in release versions, maybe I could just use Homebrew builds of everything and manually build libx265 with that patch and then ffmpeg.

from ffmpeg-apple-arm64-build.

aikinai avatar aikinai commented on July 28, 2024

make sure the tool/lib/pkgconfig/libbrotlidec.pc has references to libbrotlicommon in them

This was it! I just added -lbrotlicommon and it fontconfig works now. 👍🏻

But now libbluray is getting this error:

  CCLD     sound_dump
 /opt/homebrew/opt/coreutils/libexec/gnubin/mkdir -p '/Volumes/RAMdisk/ffmpeg-apple-arm64-build/tool/lib'
 /bin/sh ./libtool   --mode=install /opt/homebrew/opt/coreutils/libexec/gnubin/install -c   libbluray.la '/Volumes/RAMdisk/ffmpeg-apple-arm64-build/tool/lib'
libtool: install: /opt/homebrew/opt/coreutils/libexec/gnubin/install -c .libs/libbluray.lai /Volumes/RAMdisk/ffmpeg-apple-arm64-build/tool/lib/libbluray.la
libtool: install: /opt/homebrew/opt/coreutils/libexec/gnubin/install -c .libs/libbluray.a /Volumes/RAMdisk/ffmpeg-apple-arm64-build/tool/lib/libbluray.a
libtool: install: chmod 644 /Volumes/RAMdisk/ffmpeg-apple-arm64-build/tool/lib/libbluray.a
libtool: install: ranlib /Volumes/RAMdisk/ffmpeg-apple-arm64-build/tool/lib/libbluray.a
 /opt/homebrew/opt/coreutils/libexec/gnubin/mkdir -p '/Volumes/RAMdisk/ffmpeg-apple-arm64-build/tool/bin'
  /bin/sh ./libtool   --mode=install /opt/homebrew/opt/coreutils/libexec/gnubin/install -c bd_list_titles bd_splice bd_info '/Volumes/RAMdisk/ffmpeg-apple-arm64-build/tool/bin'
libtool: install: /opt/homebrew/opt/coreutils/libexec/gnubin/install -c bd_list_titles /Volumes/RAMdisk/ffmpeg-apple-arm64-build/tool/bin/bd_list_titles        libtool: install: /opt/homebrew/opt/coreutils/libexec/gnubin/install -c bd_splice /Volumes/RAMdisk/ffmpeg-apple-arm64-build/tool/bin/bd_splice
libtool: install: /opt/homebrew/opt/coreutils/libexec/gnubin/install -c bd_info /Volumes/RAMdisk/ffmpeg-apple-arm64-build/tool/bin/bd_info
 /opt/homebrew/opt/coreutils/libexec/gnubin/mkdir -p '/Volumes/RAMdisk/ffmpeg-apple-arm64-build/tool/lib/pkgconfig'
 /opt/homebrew/opt/coreutils/libexec/gnubin/install -c -m 644 src/libbluray.pc '/Volumes/RAMdisk/ffmpeg-apple-arm64-build/tool/lib/pkgconfig'
 /opt/homebrew/opt/coreutils/libexec/gnubin/mkdir -p '/Volumes/RAMdisk/ffmpeg-apple-arm64-build/tool/include/libbluray'
 /opt/homebrew/opt/coreutils/libexec/gnubin/install -c -m 644 ../libbluray-1.3.4/src/file/filesystem.h ../libbluray-1.3.4/src/libbluray/bluray.h src/libbluray/bluray-version.h ../libbluray-1.3.4/src/libbluray/keys.h ../libbluray-1.3.4/src/libbluray/player_settings.h ../libbluray-1.3.4/src/libbluray/bdnav/clpi_data.h ../libbluray-1.3.4/src/libbluray/bdnav/meta_data.h ../libbluray-1.3.4/src/libbluray/decoders/overlay.h ../libbluray-1.3.4/src/util/log_control.h '/Volumes/RAMdisk/ffmpeg-apple-arm64-build/tool/include/libbluray'                               sed: can't read s/libxml-2.0 >= 2.6//: No such file or directory
sed: can't read s/lbluray/lbluray -lxml2/: No such file or directory

from ffmpeg-apple-arm64-build.

Vargol avatar Vargol commented on July 28, 2024

That interesting the brotlicommon thing should get done in the build-brotli.sh script as a sed, and now there's a sed failing here too, and they are both pkgconfig scripts too.

I wonder if the way I'm using sed doesn't work with hombrew's sed (I'm guessing homebrew's sed is being used as all the other bits are homebrews in your output ), the script is built around the tools installed by Apple.

build-libbluray.sh has these lines

  sed -i '' "s/libxml-2.0 >= 2.6//" $3/lib/pkgconfig/libbluray.pc
  sed -i '' "s/lbluray/lbluray -lxml2/" $3/lib/pkgconfig/libbluray.pc

try changing them to use /usr/bin/sed

  /usr/bin/sed -i '' "s/libxml-2.0 >= 2.6//" $3/lib/pkgconfig/libbluray.pc
  /usr/bin/sed -i '' "s/lbluray/lbluray -lxml2/" $3/lib/pkgconfig/libbluray.pc

from ffmpeg-apple-arm64-build.

aikinai avatar aikinai commented on July 28, 2024

Oh, gnu sed is what was causing all of my issues! I removed it from my PATH and started everything from scratch. All goes well now except that I run into this issue with a duplicate symbol from libbluray. I don't really need libbluray anyway, so I disabled it and everything compiled fine again.

Thanks for the help!

from ffmpeg-apple-arm64-build.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.