Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

libvpx 1.1.0 failing to install #12567

Closed
alexzautke opened this issue Jun 2, 2012 · 16 comments
Closed

libvpx 1.1.0 failing to install #12567

alexzautke opened this issue Jun 2, 2012 · 16 comments

Comments

@alexzautke
Copy link

I'm trying to install ffmpeg, but its dependency libvpx keeps failing to install.
It looks like libvpx is compiled successfully, but trying to install it via make install results in an error.

brew install: https://gist.github.com/2859662
brew --config: https://gist.github.com/2859669
brew doctor: https://gist.github.com/2859683

@2bits
Copy link
Contributor

2bits commented Jun 3, 2012

OSX 10.8, XCode-4.4.

@2bits
Copy link
Contributor

2bits commented Jun 5, 2012

I noticed a lot of these messages in your gist - egrep: repetition-operator operand invalid
But those may not be the real issue. It almost seems like yasm is having a problem creating one of the assembly files. You might try to uninstall yasm and build yasm --HEAD, then do the libvpx install again. Let us know if that fixes this. You might also try to brew install -v --use-llvm libvpx, but I don't even know if you have llvm-gcc. You could also try to edit the libvpx formula and change this

args << "--target=x86_64-darwin#{osver}-gcc"

to force darwin11 and see if that work, like this

args << "--target=x86_64-darwin11-gcc"

The problem is most likely upstream, but I'm trying to help us figure out what is causing it. I can't find any configure option that produces verbose output. So that's a drag.

@alexzautke
Copy link
Author

brew install yasm --HEAD did not fix the error.
After changing the formula to --target=x86_64-darwin11-gcc, one more line is added to the output
[AS] vp8/encoder/x86/temporal_filter_apply_sse2.asm.o.
But it still fails with the same error.

@2bits
Copy link
Contributor

2bits commented Jun 6, 2012

Hmm. I guess this will have to be reported to the libvpx developers then. If you did a brew install -vd libvpx so that you could shell out and verify that asm_enc_offsets.asm exists and make that available to them it would help. I don't think any of the admins here have 10.8 & XCode-4.4 yet. So we can't be much help reporting this.

@alexzautke
Copy link
Author

When building libvpx with brew install -vd, a folder named /vp8/ is mentioned in the output, where all the .asm.d files should be.
But the only folder I can find is /usr/local/Cellar/libvpx/1.1.0/include/vpx/ with a few .h files in it.
Do you have any idea how I can verify that those .asm.d files exits?

@2bits
Copy link
Contributor

2bits commented Jun 8, 2012

When you use brew install -vd libvpx and it has an error, you be left at a command prompt inside the temporary build directory. The prompt should look something like this bash-3.2$. At that point, you should be able to

bash-3.2$ find . -name asm\*
./examples/includes/geshi/geshi/asm.php
./vp8/common/asm_com_offsets.c
./vp8/decoder/asm_dec_offsets.c
./vp8/encoder/asm_enc_offsets.c
./vpx_ports/asm_offsets.h

In addition to the files that I listed, you should see some other files created during the install including the one we seem to be missing. You can then inspect the file in question similar to this way (but use the right name and path):

ls -l ./vp8/encoder/asm_enc_offsets.c
file ./vp8/encoder/asm_enc_offsets.c

At that point, you would probably copy the file into your home directory so that you can attach it to a libvpx bug report if the file exists. After you are done with everything, you type exit 1 at that bash prompt to exit out of the broken install, where that exit code tells Homebrew that you want to bail out without installing anything. Thanks for helping!

@frobbnik
Copy link

frobbnik commented Jun 9, 2012

it compiles cleanly when the regexp in build/make/gen_asm_deps.sh:45 is fixed, there's a stray repetition operator immediately before the brackets: ?+

definitely needs to be reported upstream

@alexzautke
Copy link
Author

@2bits
Copy link
Contributor

2bits commented Jun 10, 2012

@frobbnik Thanks for finding that. I'll work up a patch and ask @alexzautke to try it.

@2bits
Copy link
Contributor

2bits commented Jun 10, 2012

@frobbnik Because I don't know REs, let me double check that I have this right:

Original build/make/gen_asm_deps.sh:45
includes=$(LC_ALL=C egrep -i "include +\"?+[a-z0-9_/]+\.${sfx}" $srcfile |

Proposed fix for that line
includes=$(LC_ALL=C egrep -i "include +\"[a-z0-9_/]+\.${sfx}" $srcfile |

@rhobot
Copy link

rhobot commented Jun 19, 2012

I have the exact same error with similar configurations on OSX 10.8 and Xcode 4.5. No luck here yet, but I hope there is a solution soon.

@alexzautke
Copy link
Author

As a workaround just run
brew install -vd libvpx
After failing to build enter
cd macbuild
and
clang -S -DINLINE_ASM ../vp8/encoder/asm_enc_offsets.c  -I. -I.. -o -
| grep -w EQU | tr -d '$$#' > asm_enc_offsets.asm (the command is supposed to be one line)
and the run make install.

@2bits
Copy link
Contributor

2bits commented Jun 19, 2012

@alexzautke Could you post a follow message to your bug report and mention what @frobbnik found? You can include this url to help them see what he said: #12567 (comment)
Thanks.

@frobbnik
Copy link

@2bits only one of the operators needs to be removed, either the question mark or the plus. I ended up just patching it in the libvpx formula, thusly:

require 'formula'

class Libvpx < Formula
  homepage 'http://www.webmproject.org/code/'
  url 'http://webm.googlecode.com/files/libvpx-v1.1.0.tar.bz2'
  sha1 '356af5f770c50cd021c60863203d8f30164f6021'

  depends_on 'yasm' => :build

  def patches; DATA; end

  def options
    [
      ['--gcov', 'Enable code coverage'],
      ['--mem-tracker', 'Enable tracking memory usage'],
      ['--visualizer', 'Enable post processing visualizer']
    ]
  end

  def install
    args = ["--prefix=#{prefix}",
            "--enable-pic",
            "--enable-vp8",
            "--disable-debug",
            "--disable-examples",
            "--disable-runtime-cpu-detect"]
    args << "--enable-gcov" if ARGV.include? "--gcov" and not ENV.compiler == :clang
    args << "--enable-mem-tracker" if ARGV.include? "--mem-tracker"
    args << "--enable-postproc-visualizer" if ARGV.include? "--visualizer"

    # see http://code.google.com/p/webm/issues/detail?id=401
    # Configure misdetects 32-bit 10.6.
    # Determine if the computer runs Darwin 9, 10, or 11 using uname -r.
    osver = %x[uname -r | cut -d. -f1].chomp
    if MacOS.prefer_64_bit? then
      args << "--target=x86_64-darwin#{osver}-gcc"
    else
      args << "--target=x86-darwin#{osver}-gcc"
    end

    mkdir 'macbuild' do
      system "../configure", *args
      system "make install"
    end
  end
end

__END__
--- a/build/make/gen_asm_deps.sh    2012-05-08 18:14:00.000000000 -0500
+++ b/build/make/gen_asm_deps.sh    2012-06-09 17:51:45.000000000 -0500
@@ -42,7 +42,7 @@

 [ -n "$srcfile" ] || show_help
 sfx=${sfx:-asm}
-includes=$(LC_ALL=C egrep -i "include +\"?+[a-z0-9_/]+\.${sfx}" $srcfile |
+includes=$(LC_ALL=C egrep -i "include +\"+[a-z0-9_/]+\.${sfx}" $srcfile |
            perl -p -e "s;.*?([a-z0-9_/]+.${sfx}).*;\1;")
 #" restore editor state
 for inc in ${includes}; do

@2bits
Copy link
Contributor

2bits commented Jun 20, 2012

Awesome, thanks for posting that. I tested yourt fix on Lion and Snow Leopard and got no problems using it. I will make a pull request and see what they say. Is there anyone with a google account who can post this fix to the libvpx bug report please?

2bits pushed a commit to 2bits/homebrew that referenced this issue Jun 20, 2012
libvpx-1.1.0 has a problem on Mt. Lion where an asm file is not
created due to an extra operator in a regular expression, where
the file `asm_enc_offsets.asm` goes missing.

Add a patch to fix the regular expression.  See the issue and
formula comments for links to the analysis.

Remove the unneeded `--disable-debug` and `--enable-vp8` flags
because they are the default.

Tested on Snow Leopard, Lion, and Mt. Lion using XCode-4.0.2, 4.3.3,
and 4.5.

Fixes Homebrew#12567
@alexzautke
Copy link
Author

I posted the fix to the bug report.

@adamv adamv closed this as completed in 36d603d Jun 23, 2012
eproxus pushed a commit to eproxus/homebrew that referenced this issue Jul 18, 2012
libvpx-1.1.0 has a problem on Mt. Lion where an asm file is not
created due to an extra operator in a regular expression, where
the file `asm_enc_offsets.asm` goes missing.

Add a patch to fix the regular expression.  See the issue and
formula comments for links to the analysis.

Remove the unneeded `--disable-debug` and `--enable-vp8` flags
because they are the default.

Tested on Snow Leopard, Lion, and Mt. Lion using XCode-4.0.2, 4.3.3,
and 4.5.

Fixes Homebrew#12567

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Sharpie pushed a commit to Sharpie/homebrew that referenced this issue Sep 12, 2012
libvpx-1.1.0 has a problem on Mt. Lion where an asm file is not
created due to an extra operator in a regular expression, where
the file `asm_enc_offsets.asm` goes missing.

Add a patch to fix the regular expression.  See the issue and
formula comments for links to the analysis.

Remove the unneeded `--disable-debug` and `--enable-vp8` flags
because they are the default.

Tested on Snow Leopard, Lion, and Mt. Lion using XCode-4.0.2, 4.3.3,
and 4.5.

Fixes Homebrew#12567

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
snakeyroc3 pushed a commit to snakeyroc3/homebrew that referenced this issue Dec 17, 2012
libvpx-1.1.0 has a problem on Mt. Lion where an asm file is not
created due to an extra operator in a regular expression, where
the file `asm_enc_offsets.asm` goes missing.

Add a patch to fix the regular expression.  See the issue and
formula comments for links to the analysis.

Remove the unneeded `--disable-debug` and `--enable-vp8` flags
because they are the default.

Tested on Snow Leopard, Lion, and Mt. Lion using XCode-4.0.2, 4.3.3,
and 4.5.

Fixes Homebrew#12567

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
yellowdoge pushed a commit to WebRTC-Labs/libvpx that referenced this issue Mar 10, 2014
Fixed the quantifier that optionally matches a quote before the
filename. This was originally reported in the homebrew project[1].
Note that this fix is different than patch posted there, as there are
some platforms that don't have the quote, so it needs to be included
in the expression optionally.

[1]: Homebrew/legacy-homebrew#12567 (comment)

Change-Id: Ibf2ed93ce169d80932e877f942dc4eeb03867f8b
forivall pushed a commit to freedesktop-unofficial-mirror/gstreamer-sdk__libvpx that referenced this issue Apr 21, 2015
Fixed the quantifier that optionally matches a quote before the
filename. This was originally reported in the homebrew project[1].
Note that this fix is different than patch posted there, as there are
some platforms that don't have the quote, so it needs to be included
in the expression optionally.

[1]: Homebrew/legacy-homebrew#12567 (comment)

Change-Id: Ibf2ed93ce169d80932e877f942dc4eeb03867f8b
@Homebrew Homebrew locked and limited conversation to collaborators Feb 16, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants