djoos-cookbooks / ffmpeg

Installs and configures FFMPEG from source or package
http://community.opscode.com/cookbooks/ffmpeg
16 stars 30 forks source link

yasm minimum version fail #5

Closed JonasNielsen closed 10 years ago

JonasNielsen commented 11 years ago

Building from source fails saying the yasm version is too old:

[Tue, 03 Sep 2013 05:52:53 +0000] INFO: Processing bash[compile_x264] action run (x264::source line 60)
Found yasm 1.1.0.2352
Minimum version is yasm-1.2.0
If you really want to compile without asm, configure with --disable-asm.
./configure
Found yasm 1.1.0.2352
Minimum version is yasm-1.2.0
If you really want to compile without asm, configure with --disable-asm.

================================================================================
Error executing action `run` on resource 'bash[compile_x264]'
================================================================================

Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '2'
---- Begin output of "bash"  "/tmp/chef-script20130903-22422-1yy0c4y-0" ----
STDOUT: Found yasm 1.1.0.2352
Minimum version is yasm-1.2.0
If you really want to compile without asm, configure with --disable-asm.
./configure
Found yasm 1.1.0.2352
Minimum version is yasm-1.2.0
If you really want to compile without asm, configure with --disable-asm.
STDERR: Makefile:3: config.mak: No such file or directory
make: *** [config.mak] Error 1
---- End output of "bash"  "/tmp/chef-script20130903-22422-1yy0c4y-0" ----
Ran "bash"  "/tmp/chef-script20130903-22422-1yy0c4y-0" returned 2

Resource Declaration:
---------------------
# In /root/chef-solo/cookbooks-1/x264/recipes/source.rb

 60: bash "compile_x264" do
 61:   cwd "#{Chef::Config[:file_cache_path]}/x264"
 62:   code <<-EOH
 63:     ./configure --prefix=#{node[:x264][:prefix]} #{node[:x264][:compile_flags].join(' ')}
 64:     make clean && make && make install
 65:   EOH
 66:   creates "#{node[:x264][:prefix]}/bin/x264"
 67: end

Compiled Resource:
------------------
# Declared in /root/chef-solo/cookbooks-1/x264/recipes/source.rb:60:in `from_file'

bash("compile_x264") do
  creates "/usr/local/bin/x264"
  retry_delay 2
  code "    ./configure --prefix=/usr/local --enable-static\n    make clean && make && make install\n"
  command "\"bash\"  \"/tmp/chef-script20130903-22422-1yy0c4y-0\""
  interpreter "bash"
  cwd "/var/chef/cache/x264"
  retries 0
  recipe_name "source"
  backup 5
  cookbook_name :x264
  action "run"
  returns 0
end

I'm a bit green with this stuff. Is there anything I can do?

I also noted that yasm is not specified as a dependency in metadata.rb.

djoos commented 10 years ago

Hi @JonasNielsen,

I'm the new maintainer of the ffmpeg cookbook and I hope to get back to you on this issue within the next few weeks...

Kind regards, David

bodaodev-billydai commented 10 years ago

Looks like apt gives an old version. This could be fixed by download and rebuild yasm.

wget http://www.tortall.net/projects/yasm/re … 2.0.tar.gz tar xzvf yasm-1.2.0.tar.gz cd yasm-1.2.0 ./configure make make install # you may need root or sudo

I have done these by following http://forum.adultscriptpro.com/viewtopic.php?id=117&p=3

djoos commented 10 years ago

Hi guys,

the source-recipe now makes use of the yasm-cookbook, which by default upgrades to the latest package. It's possible to compile yasm from source as well, if needed. More information here: yasm cookbook.

Have a great evening!

Kind regards, David

allaire commented 10 years ago

This was still failing since yasm cookbook didn't install from source by default and the ffmpeg coobook does not set the default["yasm"]["install_method"] = "source" in its source recipe.

djoos commented 10 years ago

Hi @allaire,

it's up to the actual DevOp/implementation to decide where to install yasm from - just set the install_method attribute to 'source' in your setup (environment / role attribute) and it will work like a treat.

Do let me know if you have any further questions!

Kind regards, David