News:

--

Main Menu

Howto install Avidemux 2.6 on OSX using Homebrew

Started by nibbles, November 05, 2011, 02:57:12 AM

Previous topic - Next topic

nibbles

I believe berlios svn access is shut off to deal with something odd.
There is a post on their bug tracker about a security assert.
What I saw happen was their web interface to the repo was off for a some hours, then came back.
This will probably come back also.  There is a mirror on sourceforge.net, but only for
the stable 2.5.6. I think I'll update the formula to fallback to that mirror if people
are trying to brew stable.

Torrent Surfer

Thanks nibbles. I look forward to the updated formula.


nibbles

I changed the 2.6 formula to use gitorious for the download.  It works great.

Torrent Surfer

Yes, 2.6 brews perfectly now with the latest formula. Thank you!  :)

maiux

First of all a big THANK YOU to nibbles.

My configuration is SL 10.6.8 and XCode 4.2 and I got errors compiling qt.

So I tried to use Qt SDK available here: http://qt.nokia.com/downloads and I got 2.5.6 compiled with QtSDK 4.8.0: and the best part is that it seems to work too ;)

Below are the steps, some of them quoting from nibbles' original post:

  • download QtSDK "Online installer" and launch it
  • in Installer choose "/Developer/QtSDK" as destination folder and "Custom Installation"
  • next deselect all components and select only "Qt 4.8.0 (Desktop)" under "Qt SDK" > "Development Tools" > "Desktop Qt"
  • once Qt SDK is installed, make sure the folder "/Developer/QtSDK/Desktop/Qt/4.8.0/gcc/ exists"
  • open Terminal and execute all the steps from nibbles' post, stopping BEFORE "brew install qt"
Copy avidemux formula downloaded from nibbles' link in /usr/local/Library/Formula/avidemux.rb and
issue the next commands to build and to link avidemux using the QtSDK just installed:
QTDIR=/Developer/QtSDK/Desktop/Qt/4.8.0/gcc brew install avidemux
brew linkapps


It should work: let me know if it doesn't :)

nibbles

Hello maiux.  You comments are appreciated.  You mentioned that you had problems building qt-4.8.0.  I have the same problem on 10.6.8, and this has not happened to me before.  On Homebrew's website, we are trying to figure this out.  While the method you used to install Qt might work, in general it is unsafe to install something like Qt that way when using Homebrew because of root ownership, sudo, permissions, and other unknowns.  I would not suggest other people do that, but I can understand it in these circumstances.  At the moment, this is the Homebrew issue tracking the Qt-4.8.0 build problems.

What we are seeing is the build trying to compile a c++ file using llvm-gcc instead of llvm-g++.  This leads to libstdc++ files not being found, causing the build error.  In general, the right compiler is chosen when the files being compiled end in .cpp rather than .c.  In the case of Qt4, the file it is choking on ends in .mm.  Good times indeed.

nibbles

Good news, Homebrew fixed the Qt issue.  A clause had been added to the formula in late February, but it was put in the wrong spot.  I'm able to compile Avidemux-2.5.6 or svn without any problems.  Thanks for you patience.

styrol

Thanks nibbles for your work, 2.6 brews perfectly with the latest formula. Thank you!

For Unix dummies like me ("Your Xcode is configured with an invalid path." "Warning: /usr/bin occurs before /usr/local/bin") this webpage did help a lot. You may integrate this link in your initial post.

After short testing I have some issues (mainly no audio decoder plugin like sdl, only dummy module); terminal output by opening ADM 2.6r7850:
[ADM_ad_plugin] Scanning directory /Users/username/.avidemux6/plugins6/audioDecoder/
[ADM_ad_plugin] Cannot parse plugin
[ADM_vf_plugin] Scanning directory /Users/username/.avidemux6/plugins6/videoFilter/
[ADM_vf_plugin] Cannot parse plugin
[..]
[AudioDevice Plugins] Found 0 plugins


I did the install of Avidemux 2.6 on a new fresh system with the latest Lion (10.7.3) and latest Xcode (4.3.2). I didn't install Avidemux 2.5.x via Homebrew before and after. So I brewed 2.6 with the following command:
brew -v install -d --use-llvm avidemux3
In your manual for 2.5.6 (but not for 2.6) you've also written the following command:
brew linkapps
I didn't type in this, is this crucial?

Any suggestions are appreciated.

nibbles

You're welcome.  I'm happy 2.6 is building for you.  The more we use it on OSX, the better it will become, mostly because OSX tries to be very compliant with standards.

I'll try to answer your questions.  I appreciate that link to Moncef's howto.  It is very well written, and I will put the link in the first post.  It fills in all the details I didn't want to get into because I felt they were beyond the scope of this howto.

SDL:  You bring up a valid point, there is no audio output device that builds using 2.6 on OSX at this time.  The reason is that Mean and someone else crafted a CoreAudio output device for Avidemux-2.5 in 2008.  Last December we got it working :-)  It has not been ported to 2.6 yet, and I have not made an effort to try because I haven't learned C++ well enough.  For all I know, it might drop right in.  I am interested in making it work, but it is a very low priority for Mean & Gruntster.  The reason it is at the bottom of their todo list is because Avidemux is not meant to be a video player.  At first that bothered me a little, but I realized I could use other players if I had to hear which frame the sound starts in.  Does that make sense?  But then you say, why not just build the SDL audio device?  Good question.  I tried once and got a build error.  I never tried again.  Ok I just tried again, and I still get a build error.  Here is the error log when using clang because it gives more accurate error, though they happen with llvm too.  It looks like it needs to link against the AppKit framework and needs to a missing header, maybe in avidemux/common/ADM_libraries/ADM_libsdl/SDLMain.h, #include <AppKit/NSQuickDrawView.h>  Basically it's ugly and I'm not sure how much help I'll get bringing this up.

You brewed 2.6 correctly.  Based on a recent Homebrew thread, building x264 with llvm-gcc is the only way to make it work well at this time.  So without knowing it, we have been avoiding at least one Segfault 11.

Linkapps:  That command is not useful in 2.6 because it does not build an "app".  Instead is builds a command line binary, /usr/local/bin/avidemux.  The 2.5.6 source code will create an app on the other hand.  Because it makes an app and people sometimes like that in their Launchpad, the linkapps command will create a symlink for the app in your user's ~/Applications directory.  That way it will appear in the Launchpad.

So if you want to bump my gentle request for CoreAudio support with a +1, that's cool.  But I would suspect that time/priorities will limit our success to whether we supply that patch.  As I don't know svn, only git, I am reticent to accept Mean's offer to be added to the list of people allowed to commit things.  But I'm sure he would appreciate if we figured it out.   And that's my wall-of-text for today, heh.

styrol

Thank you very much for your instructive reply and your retrying to solve the issue . And of course I supported your gentle request for CoreAudio support.

Om my former laptop with 10.5 I had MacPorts installed and did install ports via a GUI App (Porticus). Homebrew seems to me a bit more complex then MacPorts to use. I have rather more experience in homebrewing beer...  :)

nibbles

You're welcome, and thanks for the +1.  I did some more investigation on the SDL build error with NSQuickDrawView.  You can see from the header file that it's deprecated for 32bit builds and doesn't exist for 64bit builds.  So it will have to be coded a different way, I suppose with modern Cocoa functions.  I'll be happy to get a CoreAudio device when it makes the developers happy to work on it, but from a functionality standpoint, I'm more interested in addressing the myriad of warnings about incompatible pointers and control reaching the end of non-void functions that I get when I build 2.6 with clang.

bmills

I'm receiving an error when I try to execute "brew install avidemux'.

I believe the interesting part of this output is the following lines found in the configure step.

-- Found PkgConfig: /usr/local/bin/pkg-config (found version "0.25")
CMake Error at cmake/admCheckRequiredLibs.cmake:10 (MESSAGE):
  Could not find pkg-config
Call Stack (most recent call first):
  CMakeLists.txt:127 (INCLUDE)


The entire output of the attempt can be found here:
https://gist.github.com/2439201

I have confirmed that pkg-config is installed and appears to be working correctly.

Any advice would be appreciated.

Thanks.

-bryan


nibbles

Because Gruntster patched the 2.6 source code here in revision 7893 to work around the CMake-2.8.8 bug (thanks!), you should be able to successfully build Avidemux-2.6 if you just try it again, which will automatically update your files to the latest revision, 7894 as of today.

In case you'd like to revert to CMake-2.8.7 to save yourself other problems, the Homebrew code to see what versions are available is this:
$ brew versions cmake
2.8.8    git checkout 8392df5 /usr/local/Library/Formula/cmake.rb
2.8.7    git checkout 948c276 /usr/local/Library/Formula/cmake.rb


And you can see from the output the command to use.  For 2.8.7, you would do:
cd /usr/local
git checkout 948c276 /usr/local/Library/Formula/cmake.rb