Strange Symphonies Don’t worry, be happy

26Feb/100

MacPorts lame: output buffer too small

I've run into a small problem working with MacPorts ffmpeg port.

Trying to convert a file I get the error:

lame: output buffer too small

Now this isn't a problem with ffmpeg, but more specifically the MacPorts lame port.

As of today, the latest version of lame in MacPorts is v3.98.2. I needed to easily rollback to a previous version of lame, one which worked.

I scoured the MacPorts for the previous version of the lame Portfile. I found one for lame v3.98.0, and decided to give it a try.

Installing Older Port

Inside the command line I had to enter the following:

svn checkout -r 39480 http://svn.macports.org/repository/macports/trunk/dports/audio/lame

This would checkout the revision of lame I wanted. I entered the directory and executed:

cd lame
sudo port install

After installation, I gave it a try and everything worked!

Prevent lame From Being Upgraded

Now if you generally update your MacPorts via port upgrade outdated or port -u upgrade, you'll have to becareful.

Running those two commands will upgrade your lame to the current revision, which may break your setup again.

Instead you are required to upgrade your MacPorts like so:

sudo port upgrade outdated and not lame

There you have it! Hope you enjoy your lame!

11Jan/081

Installing do_postgres on MacPorts

Ensure that pg_config is in your $PATH.

[block:important]This expects you are using PostgreSQL 8.2. Alter the directories as required.[/block]

To test if pg_config is included, execute which pg_config [image16x16:terminal]:

Expected Result:
[block:terminal]/opt/local/lib/postgresql82/bin/pg_config[/block]

Including pg_config into your $PATH

If you don't get anything, then it isn't in your path. Append the following to your ~/.profile file:
[block:terminal]export PATH=$PATH:/opt/local/lib/postgresql82/bin[/block]

Now it will be included in all new terminal sessions.

Installing do_postgres

Now feel free to install the do_postgres gem.
[block:terminal]sudo gem install do_postgres -- \
--with-pgsql-include-dir=/opt/local/include/postgresql82/ \
--with-pgsql-lib-dir=/opt/local/lib/postgresql82/[/block]

26Nov/070

Building RubyCocoa with Ruby MacPorts Installation

First I tried installing RubyCocoa via MacPorts, but that failed. Unbothered, I went straight to the RubyCocoa page, and noticed it was running a newer version, v0.13.

So I happily downloaded the tar ball, and followed their installation guide, but ran into a little problem:

/Developer/usr/bin/gcc-4.0 -o /Users/aizat/Downloads/RubyCocoa-0.13.0/framework/build/Default/RubyCocoa.framework/Versions/A/RubyCocoa -L/Users/aizat/Downloads/RubyCocoa-0.13.0/framework/build/Default -L/opt/local/lib -F/Users/aizat/Downloads/RubyCocoa-0.13.0/framework/build/Default -filelist /Users/aizat/Downloads/RubyCocoa-0.13.0/framework/build/RubyCocoa.build/Default/RubyCocoa.build/Objects-normal/i386/RubyCocoa.LinkFileList -framework Foundation -arch i386 -Wl,-single_module -compatibility_version 1 -current_version 1 -install_name @executable_path/../Frameworks/RubyCocoa.framework/Versions/A/RubyCocoa -dynamiclib -mmacosx-version-min=10.5 -undefined suppress -flat_namespace -arch ppc -arch i386 -arch ppc64 -arch x86_64 -lxml2 -lffi /opt/local/lib/libruby.1.8.6.dylib
ld: warning in /opt/local/lib/libxml2.dylib, file is not of required architecture
ld: warning in /opt/local/lib/libruby.1.8.6.dylib, file is not of required architecture
ld: in /opt/local/lib/libxml2.2.dylib, file is not of required architecture
collect2: ld returned 1 exit status
ld: warning in /opt/local/lib/libxml2.dylib, file is not of required architecture
ld: warning in /opt/local/lib/libruby.1.8.6.dylib, file is not of required architecture
ld: in /opt/local/lib/libxml2.2.dylib, file is not of required architecture
collect2: ld returned 1 exit status
ld: warning in /opt/local/lib/libxml2.dylib, file is not of required architecture
ld: warning in /opt/local/lib/libruby.1.8.6.dylib, file is not of required architecture
ld: in /opt/local/lib/libxml2.2.dylib, file is not of required architecture
collect2: ld returned 1 exit status
ld: warning, duplicate dylib /opt/local/lib/libxml2.2.dylib
lipo: can't open input file: /var/folders/Pz/Pz+BnoKJHVOVErgN6VsRJk+++TI/-Tmp-//cc7uvHOl.out (No such file or directory)
** BUILD FAILED **
setup failed
'system /usr/bin/xcodebuild' failed

"file is not of required architecture", what in the world?

Well no worries, I was still able to get pass it, just turn on the --build-universal=no flag when you configure.

ruby install.rb config --build-universal=no
ruby install.rb setup
sudo ruby install.rb install