Closed Checkumeito closed 4 years ago
May I know if these are installed autoconf automake libtool
yum install autoconf automake libtool -y
also run the script with tee command and provide me full log file
./ffmpeginstaller.sh | tee /home/ffmpeg-install.log
Apologies for the confusing wording. I mean when I try to compile them manually using the command above, then recompile FFmpeg manually as well as followed
cd /root/ffmpeg-sources/ffmpeg
PKG_CONFIG_PATH="/usr/local/ffmpeg/lib/pkgconfig" ./configure --prefix="/usr/local/ffmpeg" --pkg-config-flags="--static" --extra-cflags="-I/usr/local/ffmpeg/include -I/usr/local/cuda/include" --extra-ldflags="-L/usr/local/ffmpeg/lib -L/usr/local/cuda/lib64" --extra-libs="-lpthread -lm" --bindir="/usr/local/bin" --enable-gpl --enable-nonfree --enable-libnpp --enable-gpl --enable-libfdk_aac --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libtheora --enable-libx265 --enable-libaom --enable-libfribidi --enable-libass --enable-libfreetype --enable-nvenc --enable-libzimg --enable-ffplay
make && make install
it works perfectly.
The autoconf automake libtool packages were installed successfully, as specified by the bash script. (else nothing would be able to compile at all)
I attached the tee log. ffmpeginstaller.log
I'm actually clueless why the bash script failed to compile both opus and zimg (at the config stage) but if I run them manually as exactly as the bash script, it works.
Your installation ends here for OPUS `checking if gcc -std=gnu99 supports -fstack-protector-strong... yes checking whether to add -D_FORTIFY_SOURCE=2 to CFLAGS... yes checking if gcc -std=gnu99 supports -Wall -Wextra -Wcast-align -Wnested-externs -Wshadow -Wstrict-prototypes... yes checking for lrintf... yes checking for lrint... yes checking for __malloc_hook... yes checking that generated files are newer than configure... done configure: creating ./config.status
[93mOPUS Installation Completed[0m`
I cant see if the below commands are executed after that
make make install make distclean
Its same happening for ZIMG
I want to know if you modified the script?
The line end with:
config.status: error: cannot find input file: 'Makefile.in'
As such, make failed, bash, then output OPUS Installation Completed and moved on to the next functions. The same goes for ZIMG.
However, manually recompile both OPUS and ZIMG, by running the exact command that bash ran works perfectly.
I haven't modified your script in the test case. I git clone from yours directly.
It would be nice without having to manually compile OPUS, ZIMG, (and afterward, FFMPEG)
Hello,
I cant find the error in the file you provided. I am providing you a script and run it and tell me if there is same error as above.
wget https://github.com/Brijendrasial/FFmpeg-Installer-Centos7/files/4467669/closed-ffmpeg.txt -O closed-ffmpeg chmod 0777 closed-ffmpeg dos2unix closed-ffmpeg ./closed-ffmpeg 2>&1 | tee /home/logs.txt
After the compilation provide provide me logs.txt
Failed.
After that I tried the manual just in case:
[root@local2 ~]# cd ~/ffmpeg-sources/opus/
[root@local2 opus]# autoreconf -fiv
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I m4
autoreconf: configure.ac: tracing
autoreconf: running: libtoolize --copy --force
libtoolize: putting auxiliary files in `.'.
libtoolize: copying file `./ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
libtoolize: copying file `m4/libtool.m4'
libtoolize: copying file `m4/ltoptions.m4'
libtoolize: copying file `m4/ltsugar.m4'
libtoolize: copying file `m4/ltversion.m4'
libtoolize: copying file `m4/lt~obsolete.m4'
autoreconf: running: /usr/bin/autoconf --force
autoreconf: running: /usr/bin/autoheader --force
autoreconf: running: automake --add-missing --copy --force-missing
Makefile.am:317: warning: '%'-style pattern rules are a GNU make extension
Makefile.am:320: warning: '%'-style pattern rules are a GNU make extension
autoreconf: Leaving directory `.'
[root@local2 opus]# ./configure --prefix="/usr/local/ffmpeg" --disable-shared
checking whether make supports nested variables... yes
checking for a BSD-compatible install... /usr/bin/install -c
...
...
Type "make; make install" to compile and install
Type "make check" to run the test suite
Works. And Of course
Package autoconf-2.69-11.el7.noarch already installed and latest version
Package automake-1.13.4-3.el7.noarch already installed and latest version
Package libtool-2.4.2-22.el7_3.x86_64 already installed and latest version
wget https://github.com/Brijendrasial/FFmpeg-Installer-Centos7/files/4471953/ffmpeg.txt -O closed-ffmpeg chmod 0777 closed-ffmpeg dos2unix closed-ffmpeg ./closed-ffmpeg 2>&1 | tee /home/logs.txt
Now try to run the above script and provide output
...
parallel-tests: installing './test-driver'
autoreconf: automake failed with exit status: 1
The script still failed closed-ffmpeg2.txt
Also I checked getenforce (just in case), and it is disabled. I'm very puzzled why manually typing the command works but not with the bash script. Such a mystery.
The script is failing because configure.ac:38: error: required file './ltmain.sh' not found
Well on top enable debug script by setting set -x and then run the script we will know what exactly happening there.
Well, here it is with set -x closed-ffmpeg3.txt If I manually run the command, below are the full output:
[root@local2 opus]# libtoolize
libtoolize: putting auxiliary files in `.'.
libtoolize: linking file `./ltmain.sh'
[root@local2 opus]# autoreconf -fiv
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I m4
autoreconf: configure.ac: tracing
autoreconf: running: libtoolize --copy --force
libtoolize: putting auxiliary files in `.'.
libtoolize: copying file `./ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
libtoolize: copying file `m4/libtool.m4'
libtoolize: copying file `m4/ltoptions.m4'
libtoolize: copying file `m4/ltsugar.m4'
libtoolize: copying file `m4/ltversion.m4'
libtoolize: copying file `m4/lt~obsolete.m4'
autoreconf: running: /usr/bin/autoconf --force
autoreconf: running: /usr/bin/autoheader --force
autoreconf: running: automake --add-missing --copy --force-missing
Makefile.am:317: warning: '%'-style pattern rules are a GNU make extension
Makefile.am:320: warning: '%'-style pattern rules are a GNU make extension
autoreconf: Leaving directory `.'
[root@local2 opus]#
No error
This is the issue you are facing https://www.gnu.org/software/automake/manual/html_node/Error-required-file-ltmain_002esh-not-found.html
You can try something in script replace "libtoolize" with "libtoolize --automake --copy --debug --force" and re run the script.
So, according to that:
Libtool comes with a tool called libtoolize that will install libtool’s supporting files into a package. Running this command will install ltmain.sh. You should execute it before aclocal and automake.
Of which the bash script execute prior autoreconf. However, the bash script still fail, whereas typing the exact command manually works. This is more and more like CentOS package bug.
Here's the log: closed-ffmpeg4.txt
One thing I do notice is that if I run the autoreconf command manually:
autoreconf: running: libtoolize --copy --force
libtoolize: putting auxiliary files in `.'.
libtoolize: copying file `./ltmain.sh'
libtoolize: copied ltmain.sh file but libtoolize never copy it while being executed in the bash script.
Even I cant understand why this is happening with script it doesnt work and manually it does work. I have tested it on different machines it works very well.
Last thing you can do is reinstalling packages yum reinstall autoconf automake libtool -y
Yeah, it didn't work either. It's alright. Thank you for your effort. It could be CentOS 7 upstream package but I don't think it's worth it to poke deeper.
I guess you can mark this as non-fix and put an advisory note in the readme like: Occasionally, OPUS and ZIMG failed to compile within the bash script, so the user should compile them manually using the command listed in this first post.
I again compiled on my other machine and cant reproduce the error.
Hello,
First of all, thank you for your work. Fantastic for beginners like me to compile FFmpeg on CentOS.
Unfortunately, somehow this script failed to compile both OPUS and ZIMG automatically, both result in error:
However, when I try to compile them manually deprived of your code, e.g.: For OPUS:
For ZIMG:
I tried on both clean CentOS 7. They had this same error