rdp / ffmpeg-windows-build-helpers

Helper script for cross compiling some media tools for windows, like customizable ffmpeg.exe (with or without non-free components, etc), and some other bonuses like mplayer, mp4box, mxf, etc.
GNU General Public License v3.0
1.08k stars 414 forks source link

compiling native on osx #622

Open JokerGT opened 2 years ago

JokerGT commented 2 years ago

i try to compile it native on osx monterey / intel and get this error:

./cross_compile_ffmpeg.sh --compiler-flavors=native
..
..
gcc -mtune=generic -O3 -fPIC -DHAVE_HIDDEN -I. -c -o minigzip.o test/minigzip.c
/usr/bin/libtool rcs libz.a adler32.o crc32.o deflate.o infback.o inffast.o inflate.o inftrees.o trees.o zutil.o compress.o uncompr.o gzclose.o gzlib.o gzread.o gzwrite.o
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: no output file specified (specify with -o output)
Usage: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool -static [-] file [...] [-filelist listfile[,dirname]] [-arch_only arch] [-sacLT] [-no_warning_for_no_symbols]
Usage: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool -dynamic [-] file [...] [-filelist listfile[,dirname]] [-arch_only arch] [-o output] [-install_name name] [-compatibility_version #] [-current_version #] [-seg1addr 0x#] [-segs_read_only_addr 0x#] [-segs_read_write_addr 0x#] [-seg_addr_table <filename>] [-seg_addr_table_filename <file_system_path>] [-all_load] [-noall_load]
make: *** [libz.a] Error 1

after editing in build_zlib() replacing the line do_make_and_make_install "$make_prefix_options ARFLAGS=rcs" with do_make_and_make_install "$make_prefix_options"

it continue....

gnutls was not able to compile because it cannot find libunistring for some reason.. after changing in build_gnutls() generic_configure "--disable-doc --disable-tools --disable-cxx --disable-tests --disable-gtk-doc-html --disable-libdane --disable-nls --enable-local-libopts --disable-guile --with-included-libtasn1 --without-p11-kit" to generic_configure "--disable-doc --disable-tools --disable-cxx --disable-tests --disable-gtk-doc-html --disable-libdane --disable-nls --enable-local-libopts --disable-guile --with-included-libtasn1 --without-p11-kit --with-included-unistring"

it worked

libflite does not compile either:

making in lang/cmu_indic_lex ...
gcc    -I../../include -g -O2 -Wall -no-cpp-precomp     -c cmu_indic_lex.c -o ../../build/x86_64-darwin21.3.0/obj/lang/cmu_indic_lex/cmu_indic_lex.o
cmu_indic_lex.c:305:13: error: implicit declaration of function 'indic_digit_to_offset' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    flag = (indic_digit_to_offset(ccc) == -1)? !(indic_digit_to_offset(ddd) == -1):
            ^
1 error generated.
make[2]: *** [../../build/x86_64-darwin21.3.0/obj/lang/cmu_indic_lex/cmu_indic_lex.o] Error 1
make[1]: *** [../build/x86_64-darwin21.3.0/obj/lang/.make_build_dirs] Error 2
make: *** [build/x86_64-darwin21.3.0/obj//.make_build_dirs] Error 2

so i removed it to try to finish the compile

fftw3 is also not compiling.. so i used the modules provided by brew SVT-VP9 seems to be not supported on osx

rdp commented 2 years ago

did you get it to work in the end?

JokerGT commented 1 year ago

i gave up in march.. but this time, im successful. i only have some problems on M1

rdp commented 9 months ago

PR's might be good, I don't have a mac to test with easily unfortunately...

Biswa96 commented 9 months ago

I don't have a mac to test with easily unfortunately...

GitHub provides one for 6 hours https://github.com/mxschmitt/action-tmate

rdp commented 9 months ago

whoa, price is right! :)

On Mon, Jan 22, 2024 at 10:26 PM Biswapriyo Nath @.***> wrote:

I don't have a mac to test with easily unfortunately...

GitHub provides one for 6 hours https://github.com/mxschmitt/action-tmate

— Reply to this email directly, view it on GitHub https://github.com/rdp/ffmpeg-windows-build-helpers/issues/622#issuecomment-1905316283, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAADBUCOKA3WYJOQWRQAB7DYP5CXLAVCNFSM5PYQAFOKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJQGUZTCNRSHAZQ . You are receiving this because you commented.Message ID: @.***>