Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error building native on OSX 13.1 Ventura **solved** #667

Open
JokerGT opened this issue Jan 9, 2023 · 6 comments
Open

Error building native on OSX 13.1 Ventura **solved** #667

JokerGT opened this issue Jan 9, 2023 · 6 comments

Comments

@JokerGT
Copy link

JokerGT commented Jan 9, 2023

even after installing all dependencies with
brew install ragel wget cvs yasm autogen automake autoconf cmake libtool xz pkg-config nasm bzip2 autoconf-archive p7zip coreutils meson llvm texinfo python

Could not find the following execs (svn is actually package subversion, makeinfo is actually package texinfo if you're missing them): python

when i search for python i found [email protected] installed and python-build also

when i comment the check out, the script runs... but not far

Making /Users/joker/Code/ffmpeg-windows-build-helpers/sandbox/zlib-1.2.11 as $ PATH=/Users/joker/Code/ffmpeg-windows-build-helpers/sandbox/cross_compilers/native/bin:$PATH make PREFIX=/Users/joker/Code/ffmpeg-windows-build-helpers/sandbox/cross_compilers/native ARFLAGS=rcs -j 16

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: /Library/Developer/CommandLineTools/usr/bin/libtool: no output file specified (specify with -o output)
Usage: /Library/Developer/CommandLineTools/usr/bin/libtool -static [-] file [...] [-filelist listfile[,dirname]] [-arch_only arch] [-sacLT] [-no_warning_for_no_symbols]
Usage: /Library/Developer/CommandLineTools/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

no output file specified ?

@JokerGT
Copy link
Author

JokerGT commented Jan 10, 2023

after removing the check for python (which is installed) i just removed
ARFLAGS=rcs
within build_zlib() function which let the script continue compiling until i run into

Libunistring was not found
failed configure gnutls-3.6.15

i also had to remove libflite: error: implicit declaration of function 'indic_digit_to_offset' is invalid in C99
i don't know if it would work to change the standard to 14/17/20 ?

@JokerGT
Copy link
Author

JokerGT commented Jan 10, 2023

i had to disable a few more modules to end up here:

LD	ffprobe_g
Undefined symbols for architecture x86_64:
  "_SecCopyErrorMessageString", referenced from:
Undefined symbols for architecture x86_64:
  "_SecCopyErrorMessageString", referenced from:
Undefined symbols for architecture x86_64:
  "_SecCopyErrorMessageString", referenced from:
      _gnutls_x509_trust_list_add_system_trust in libgnutls.a(certs.o)
      _gnutls_x509_trust_list_add_system_trust in libgnutls.a(certs.o)
      _gnutls_x509_trust_list_add_system_trust in libgnutls.a(certs.o)
  "_SecItemExport", referenced from:
  "_SecItemExport", referenced from:
  "_SecItemExport", referenced from:
      _gnutls_x509_trust_list_add_system_trust in libgnutls.a(certs.o)
      _gnutls_x509_trust_list_add_system_trust in libgnutls.a(certs.o)
      _gnutls_x509_trust_list_add_system_trust in libgnutls.a(certs.o)
  "_SecTrustSettingsCopyCertificates", referenced from:
  "_SecTrustSettingsCopyCertificates", referenced from:
  "_SecTrustSettingsCopyCertificates", referenced from:
      _gnutls_x509_trust_list_add_system_trust in libgnutls.a(certs.o)
      _gnutls_x509_trust_list_add_system_trust in libgnutls.a(certs.o)
      _gnutls_x509_trust_list_add_system_trust in libgnutls.a(certs.o)
ld: symbol(s) not found for architecture x86_64
ld: symbol(s) not found for architecture x86_64
ld: symbol(s) not found for architecture x86_64
clangclang: : error: error: linker command failed with exit code 1 (use -v to see invocation)linker command failed with exit code 1 (use -v to see invocation)

gettext, gnutls and some other mods got removed.

the build_ffmpeg() succeeded and produced a working static compile..
im not sure if the missing modules will make any problems in future since i only want todo some transcoding with it. if anyone interrested in a that final version which runs on my mac's, let me know

for some weired reason this only works on my intel mac machines. if i try to run this on my M1 machines i got

no C compiler found

message. maybe it is because of the arm architecture? or should this also work native ?

@JokerGT JokerGT changed the title Error building native on OSX 13.1 Ventura Error building native on OSX 13.1 Ventura **solved** Jan 10, 2023
@JokerGT
Copy link
Author

JokerGT commented Jan 10, 2023

when i try to perform a shared build i get linker problems for the ffmpeg dylib's:

D	libswresample/libswresample.4.dylib
STRIP	libavcodec/x86/vp9itxfm.o
GEN	libavcodec/libavcodec.ver
LD	libavcodec/libavcodec.59.dylib
ld: warning: could not create compact unwind for _ff_cfhd_init_vlcs: stack subq instruction is too different from dwarf stack size
LD	libavformat/libavformat.59.dylib
ld: warning: disabling chained fixups because of unaligned pointers
ld: illegal text-relocation to '___gmpn_add_n' in /Users/tomtom/Code/ffmpeg-windows-build-helpers/sandbox/cross_compilers/native/lib/libgmp.a(add_n.o) from '___gmpn_add_n' in /Users/joker/Code/ffmpeg-windows-build-helpers/sandbox/cross_compilers/native/lib/libgmp.a(add_n.o) for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [libavformat/libavformat.59.dylib] Error 1

anyone know what is going on here? static builds fine, but not the shared version. i would like to use the dylib a c++ program i made.

@rdp
Copy link
Owner

rdp commented Feb 2, 2023

@mbechard
Copy link
Contributor

mbechard commented Dec 3, 2024

I solved the most recent post about illegal text-relocation to '___gmpn_add_n', which I got when compiling for macOS x64, by adding --disable-assembly to the config flags for libgmp. Seems reasonable since it's unlikely that is a performance critical path.

@rdp
Copy link
Owner

rdp commented Dec 5, 2024

what command line for the script? was this native?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants