My thoughts on Slackware, life and everything

Compiling vlc (and other software) with gcc 4.4.2

Last week, an upgraded gcc compiler suite (version 4.4.2) was added to slackware-current . The new Gnu C compiler reveals software compilation issues in several programs that did not occur with the previous version of the Gnu C compiler. A nice summary of issues you may encounter when building software using the scripts at can be found on Ponce’s blog, along with the solutions he found that fix these errors.

So far, I only ran into one compilation issue (actually it was reported first on LQ:, when compiling VLC and to be more specific, compiling the twolame library which I add to my VLC package for Slackware.

The error you will get is this:

?psycho_2.c:203: error: array subscript is above array bounds

The fix is simple. One file needs a patch:

--- twolame-0.3.12/libtwolame/psycho_2.c.orig   2008-01-09 12:06:21.000000000 +0100
+++ twolame-0.3.12/libtwolame/psycho_2.c        2010-01-11 15:15:28.000000000 +0100
@@ -121,7 +121,7 @@
        window = mem->window;
        ath = mem->ath;
        numlines = mem->numlines;
-       partition = mem->numlines;
+       partition = mem->partition;
        s = mem->s;
        tmn = mem->tmn;
        fthr = mem->fthr;

I have uploaded this patch as well as a modified vlc.SlackBuild script to my repository:


1 Comment

  1. alienbob

    Ponce’s blog article was moved over to


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

© 2024 Alien Pastures

Theme by Anders NorenUp ↑