2

Beginner trying to compile ffmpeg on a PowerMac G4, Mac OS X 10.4.11, Xcode 2.5 for use on this Mac (not iOS).

I started out with Stephen Jungels tutorial (link), although it doesn't cover Mac OS X 10.4 per se. I install LAME, FAAC/FAAD and x264 without errors. All goes well until I use ./configure for ffmpeg:

./configure --enable-shared --enable-libmp3lame --enable-libfaac --enable-libx264 --enable-gpl --enable-nonfree

After some crunching, I get "Creating config.mak and config.h..." and an error "WARNING: GNU assembler not found, install gas-preprocessor". So I look for it online (https://github.com/yuvi/gas-preprocessor), move "gas-preprocessor.pl" to /usr/local/bin as instructed. Apparently it isn't doing anything, as repeated configure gives the same error. Having gas-preprocessor.pl in the ffmpeg dir doesn't seem to help either.

Am I missing something that I should be doing with gas-preprocessor.pl?

Paul R
  • 208,748
  • 37
  • 389
  • 560
Tom
  • 21
  • 1
  • 2

2 Answers2

4

Well i had the same problem "GNU assembler not found, install gas-preprocessor"

Later it turned out that i didnt had the correct file because i copy pasted the code in text editor

The correct way to do it is:

(a) Use the download button at https://github.com/yuvi/gas-preprocessor

(b) Extract the archive

(c) Remove any other file by same name which you have downloaded and you were experimenting with.

(d) copy the file gas-preprocessor.pl at /usr/local/bin

(e) Set permission of the file to Read and write by all (777) if a -> d doesn't work

I figured out this problem when i read config.log during compilation of ffmpeg

xySVerma
  • 941
  • 9
  • 12
  • You must use special version of gas-preprocessor.pl for ffmpeg compilation: git://git.libav.org/gas-preprocessor.git Version from yuvi (https://github.com/yuvi/gas-preprocessor) is outdated (3 years without changes) and doesn't work with modern ffmpeg versions – Alexander Ushakov Jan 27 '16 at 17:41
0

It's possible you need to compile with the architecture "--arch" flag included, as in adding the following option to your configure statement:

"--arch=ppc"

Note the target architecture list in the configure file in the Git repository:

http://git.ffmpeg.org/?p=ffmpeg;a=blob;f=configure;h=a882501c676c6bef9fae53140e6c053a4c7c3c99;hb=HEAD

Line
 935 ARCH_LIST='
 936     alpha
 937     arm
 938     avr32
 939     avr32_ap
 940     avr32_uc
 941     bfin
 942     ia64
 943     m68k
 944     mips
 945     mips64
 946     parisc
 947     ppc
 948     ppc64
 949     s390
 950     sh4
 951     sparc
 952     sparc64
 953     tomi
 954     x86
 955     x86_32
 956     x86_64'

Also, you may have done this already, but peruse the options for the configure file by typing "configure --help" at the command line. It did take a bunch of trial and error for me to get it to work.

Instead of "--enable-shared", try: "--disable-shared --enable-static"... I believe this will not try to compile other libraries that are already compiled, which can be a good thing if there is no need to try to recompile them (which can result in errors).

Also, another thing is "--disable-asm" which will "disable all assembler optimizations", which may relate to the "Parameter syntax error"... I Googled this error and found someone having a similar issue in building something else for PowerPC: gcc.gnu.org/ml/gcc/2006-08/msg00591.html

And, there is a way to set GCC options within the configure command... use "--extra-cflags=" followed by the option from GCC: gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html I'm not sure how many of these options work, but you can try "--extra-cflags=-fno-common", which I believe affects how variables are treated in the compilation process by keeping them in separate blocks per target instead of lumping them together in one big block. Don't really know much about it, but it seemed to quiet some errors for me.

Chris Livdahl
  • 4,662
  • 2
  • 38
  • 33
  • Hi Chris, thanks for your comment. Adding --arch=ppc to the configure list didn't change anything, unfortunately. From reading the configure help text, I found that possibly --cc=(compiler) and --as=(assembler) could be meaningful to change the outcome of my attempts. cc should default to 'gcc', which seems right? I wonder if and how I should incorporate gas-preprocessor in the ./configure line? – Tom Dec 02 '10 at 21:35
  • The error "WARNING: GNU assembler not found, install gas-preprocessor" went away after putting a copy of gas-preprocessor.pl in /opt/local/bin . Well, I tried changing a lot of things, and I *think* this change made it happen. – Tom Dec 10 '10 at 17:21
  • Next thing, 'make' gave me fatal errors: unterminated call to function `foreach': missing `)'. Stop. Googling the error msg brought me to an ffmpeg mailing list archive, where one of the developers said 'make' was to old. So I upgraded 'make' to the current version 3.82. – Tom Dec 10 '10 at 17:29
  • Still errors: AS libavcodec/ppc/fft_altivec_s.o libavcodec/ppc/fft_altivec_s.S:747:Parameter syntax error (parameter 2) libavcodec/ppc/fft_altivec_s.S:747:Invalid mnemonic 'got(r2)' :787: :794: :1282: :1322: :1329: make: *** [libavcodec/ppc/fft_altivec_s.o] Error 1 – Tom Dec 10 '10 at 17:34