Giter Site home page Giter Site logo

MacBook Pro M1 Max - error compiling FFmpeg - libpng16.dylib arm64 but attempting to link with file built for macOS-x86_64 about ffmpeg-apple-arm64-build HOT 22 CLOSED

vargol avatar vargol commented on July 28, 2024
MacBook Pro M1 Max - error compiling FFmpeg - libpng16.dylib arm64 but attempting to link with file built for macOS-x86_64

from ffmpeg-apple-arm64-build.

Comments (22)

Vargol avatar Vargol commented on July 28, 2024

I'n not getting the same error but a different one but it seems that either libass have changed the png decency or libpng have changed their file naming so that the ffmpeg check for libass fails as libpng16.a has not been created.

I suspect for you as the linker doesn't find libpng16.a in <build_dir>/tool/lib and continues searching and finds an old x86 version elsewhere in the search path where as for me there is no other version so mine fails with no library found for
-lpng16 instead

a quick fix for this would to create a link and build using the skip option so it doesn't rebuild everything (assuming to haven't deleted the build directory)

cd tool/lib 
ln -s png16.a libpng16.a
cd ../..
rm -rf ffmpeg
../ffmpeg-apple-arm64-build/build.sh skip

While I've been typing this a quick test of the above fix has finished compiling, so now I need to add the linking into the libpng build script and build from scratch again.

from ffmpeg-apple-arm64-build.

Vargol avatar Vargol commented on July 28, 2024

okay I've now committed the change the repo's master branch to fix the issue I had, can you see if that fixes your issue too.

ee3a71a

from ffmpeg-apple-arm64-build.

DJRMPY avatar DJRMPY commented on July 28, 2024

I have an encode going on in the background so this may take a bit, but I'll post back shortly.

from ffmpeg-apple-arm64-build.

DJRMPY avatar DJRMPY commented on July 28, 2024

This is odd. I'm getting a failure on libass now. It looks like it's failing to simply create teh subfolders? The permissions on the folder are correct.

  • [[ -d /Users/User/desktop/tmp/libass ]]

  • [[ -d /Users/User/desktop/tmp/libass ]]

  • [[ ! -d /Users/User/desktop/tmp/libass ]]

  • make_directories /Users/User/desktop/tmp/build /Users/User/desktop/tmp /Users/User/desktop/tmp/tool 10 0.15.1

  • cd /Users/User/desktop/tmp

  • checkStatus 0 'change directory failed'

  • '[' 0 -ne 0 ']'

  • mkdir libass

  • checkStatus 0 'create directory failed'

  • '[' 0 -ne 0 ']'

  • cd libass

  • checkStatus 0 'change directory failed'

  • '[' 0 -ne 0 ']'

  • download_code /Users/User/desktop/tmp/build /Users/User/desktop/tmp /Users/User/desktop/tmp/tool 10 0.15.1

  • cd /Users/User/desktop/tmp/libass

  • checkStatus 0 'change directory failed'

  • '[' 0 -ne 0 ']'

  • curl -O -L https://github.com/libass/libass/releases/download/0.15.1/libass-0.15.1.tar.xz
    % Total % Received % Xferd Average Speed Time Time Time Current
    Dload Upload Total Spent Left Speed

    0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
    0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0

100 361k 100 361k 0 0 662k 0 --:--:-- --:--:-- --:--:-- 662k

  • checkStatus 0 'download of libass failed'
  • '[' 0 -ne 0 ']'
  • tar xf libass-0.15.1.tar.xz
  • checkStatus 0 'download of libass failed'
  • '[' 0 -ne 0 ']'
  • configure_build /Users/User/desktop/tmp/build /Users/User/desktop/tmp /Users/User/desktop/tmp/tool 10 0.15.1
  • cd /Users/User/desktop/tmp/libass/libass-0.15.1
  • checkStatus 0 'change directory failed'
  • '[' 0 -ne 0 ']'
  • LDFLAGS='-L/Users/User/desktop/tmp/tool/lib -lc++ -lpng -lbz2 -lz -lbrotlidec-static -lbrotlicommon-static'
  • ./configure --prefix=/Users/User/desktop/tmp/tool --enable-static --disable-shared --disable-fontconfig --disable-dependency-tracking
    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether build environment is sane... yes
    checking for a thread-safe mkdir -p... ./install-sh -c -d
    checking for gawk... no
    checking for mawk... no
    checking for nawk... no
    checking for awk... awk
    checking whether make sets $(MAKE)... yes
    checking whether make supports nested variables... yes
    checking build system type... arm-apple-darwin22.2.0
    checking host system type... arm-apple-darwin22.2.0
    checking how to print strings... printf
    checking whether make supports the include directive... yes (GNU style)
    checking for gcc... gcc
    checking whether the C compiler works... no
    configure: error: in /Users/User/desktop/tmp/libass/libass-0.15.1': configure: error: C compiler cannot create executables See config.log' for more details
  • checkStatus 77 'configuration of libass failed'
  • '[' 77 -ne 0 ']'
  • echo 'check failed: configuration of libass failed'
    check failed: configuration of libass failed
  • exit 1

from ffmpeg-apple-arm64-build.

Vargol avatar Vargol commented on July 28, 2024

I'll need libass/libass-0.15.1/config.log to check what that issue is.

from ffmpeg-apple-arm64-build.

DJRMPY avatar DJRMPY commented on July 28, 2024

See attached.
config.log

from ffmpeg-apple-arm64-build.

Vargol avatar Vargol commented on July 28, 2024

look in ffmpeg-apple-arm64-build/build/build-libass.sh
for this section

  # prepare build
  LDFLAGS="-L$3/lib -lc++ -lpng -lbz2 -lz -lbrotlidec -lbrotlicommon"  ./configure --prefix="$3" --enable-static --disable-shared --disable-fontconfig --disable-dependency-tracking
  checkStatus $? "configuration of ${SOFTWARE} failed"

it seems you've may have an old build-libass.sh that has
-lbrotlidec-static -lbrotlicommon-static in the LD_FLAGS.
If so how did you download the script ?

from ffmpeg-apple-arm64-build.

DJRMPY avatar DJRMPY commented on July 28, 2024

I do see that in the build script.

LDFLAGS="-L$3/lib -lc++ -lpng -lbz2 -lz -lbrotlidec-static -lbrotlicommon-static" ./configure --prefix="$3" --enable-static --disable-shared --disable-fontconfig --disable-dependency-tracking
checkStatus $? "configuration of ${SOFTWARE} failed"

I just downloaded this from the "Code" section, and then clicked 'Latest' and then downloaded source.

https://github.com/Vargol/ffmpeg-apple-arm64-build/archive/refs/tags/2.5.zip

from ffmpeg-apple-arm64-build.

Vargol avatar Vargol commented on July 28, 2024

okay the 2.5 you've just linked is brand new as in 1 minute after my previous reply, so it would have been 2.0 when you last downloaded.
2.5 should have the latest fixes in but I haven't tested it yet as I'm working on a standard M1 so the build hasn't finished :-)

from ffmpeg-apple-arm64-build.

DJRMPY avatar DJRMPY commented on July 28, 2024

Lol. Point taken. I’ll wait a bit and download it again and start with a new folder.

from ffmpeg-apple-arm64-build.

Vargol avatar Vargol commented on July 28, 2024

okay, so thats random, the testing failed as this time the png build actually built libpng16.a ???

from ffmpeg-apple-arm64-build.

DJRMPY avatar DJRMPY commented on July 28, 2024

Running the 2.5 download now to see what I get. I verified the downloaded zip is actually 2.5. I'll post the results shortly.

from ffmpeg-apple-arm64-build.

Vargol avatar Vargol commented on July 28, 2024

Ah, they've backed out a change, I guessing it broke more than my build, give me a minute and I'll knock up release 2.5.1

from ffmpeg-apple-arm64-build.

Vargol avatar Vargol commented on July 28, 2024

I'll see what you get first before I check it in

from ffmpeg-apple-arm64-build.

DJRMPY avatar DJRMPY commented on July 28, 2024

Mine failed in libpng16.a

Install the project...
-- Install configuration: ""
-- Installing: /Users/Ron/desktop/tmp/tool/lib/libpng16.a
-- Installing: /Users/Ron/desktop/tmp/tool/lib/libpng.a
-- Installing: /Users/Ron/desktop/tmp/tool/include/png.h
-- Installing: /Users/Ron/desktop/tmp/tool/include/pngconf.h
-- Installing: /Users/Ron/desktop/tmp/tool/include/pnglibconf.h
-- Installing: /Users/Ron/desktop/tmp/tool/include/libpng16/png.h
-- Installing: /Users/Ron/desktop/tmp/tool/include/libpng16/pngconf.h
-- Installing: /Users/Ron/desktop/tmp/tool/include/libpng16/pnglibconf.h
-- Installing: /Users/Ron/desktop/tmp/tool/bin/libpng-config
-- Installing: /Users/Ron/desktop/tmp/tool/bin/libpng16-config
-- Installing: /Users/Ron/desktop/tmp/tool/share/man/man3/libpng.3
-- Installing: /Users/Ron/desktop/tmp/tool/share/man/man3/libpngpf.3
-- Installing: /Users/Ron/desktop/tmp/tool/share/man/man5/png.5
-- Installing: /Users/Ron/desktop/tmp/tool/lib/pkgconfig/libpng.pc
-- Up-to-date: /Users/Ron/desktop/tmp/tool/bin/libpng-config
-- Installing: /Users/Ron/desktop/tmp/tool/lib/pkgconfig/libpng16.pc
-- Up-to-date: /Users/Ron/desktop/tmp/tool/bin/libpng16-config
-- Installing: /Users/Ron/desktop/tmp/tool/lib/libpng/libpng16.cmake
-- Installing: /Users/Ron/desktop/tmp/tool/lib/libpng/libpng16-noconfig.cmake
ln: /Users/Ron/desktop/tmp/tool/lib/libpng16.a: File exists
check failed: linking libpng16.a failed

from ffmpeg-apple-arm64-build.

Vargol avatar Vargol commented on July 28, 2024

Yep..matches what I got, I'm compiling with original fix removed

from ffmpeg-apple-arm64-build.

Vargol avatar Vargol commented on July 28, 2024

Okay 2.5.1 released and tested to "works for me" level :-)

from ffmpeg-apple-arm64-build.

DJRMPY avatar DJRMPY commented on July 28, 2024

Executed successfully here too. Excellent :)

from ffmpeg-apple-arm64-build.

DJRMPY avatar DJRMPY commented on July 28, 2024

from ffmpeg-apple-arm64-build.

Vargol avatar Vargol commented on July 28, 2024

I don't really do much audio stuff, other than -c:a copy

Maybe this will help

https://www.reddit.com/r/ffmpeg/comments/s7scqu/audio_loudness_after_downmixing_from_51_to_stereo/

from ffmpeg-apple-arm64-build.

DJRMPY avatar DJRMPY commented on July 28, 2024

from ffmpeg-apple-arm64-build.

Vargol avatar Vargol commented on July 28, 2024

I think you start the -af argument with [0:a:0 ] (Video 0, audio track 0, yes ffmpeg indexing starts at 0 :-) )

"[0:a:0]lowpass=c=LF....

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.