#173 sgi output module requires patch

1.13.x
closed-fixed
nobody
mpg123 (103)
5
2012-05-01
2012-04-15
canavan
No

The sgi output module requires the patch below to compile (and work) with IRIX 6.5 and the native C/C++ compiler. I'm not certain where this patch originated, but it was included at least in the mpg123 1.6.2 package from http://www.nekochan.net/what-is-nekowar.html

Discussion

  • canavan
    canavan
    2012-04-15

    patch for sgi output module

     
  • Thomas Orgis
    Thomas Orgis
    2012-04-15

    This patch is strange. I can see one point where it fixes an obvious typo with audio_output_t, but the other changes don't mage sense to me,

    Can you test the current http://mpg123.org/snapshot if it builds? I just included the fix for the wrong type. If not, the build error you get would be very helpful.

     
  • canavan
    canavan
    2012-04-15

    The snapshot doesn't compile:

    cc-1196 c99: WARNING File = sgi.c, Line = 126
    The indicated function is declared implicitly.

    error1("Unable to open audio channel: %s", alGetErrorString(oser
    ror()));
    ^

    cc-1565 c99: ERROR File = sgi.c, Line = 130
    The struct "audio_output_struct" has no field "handle".

    ao->handle = (void*)port;
    ^

    cc-1565 c99: ERROR File = sgi.c, Line = 152
    The struct "audio_output_struct" has no field "handle".

    ALport port = (ALport)ao->handle;
    ^

    cc-1565 c99: ERROR File = sgi.c, Line = 165
    The struct "audio_output_struct" has no field "handle".

    ALport port = (ALport)ao->handle;
    ^

    cc-1565 c99: ERROR File = sgi.c, Line = 170
    The struct "audio_output_struct" has no field "handle".

    ao->handle=NULL;
    ^

    4 errors detected in the compilation of "sgi.c".

     
  • canavan
    canavan
    2012-04-15

    replacing handle wth userptr seems to help, although the resulting binary doesn't run:

    mpg123: rld: Error: unresolvable symbol in [...]src/.libs/mpg123: mpg123_meta_free

     
  • Thomas Orgis
    Thomas Orgis
    2012-04-15

    Damn, sorry, I was not really awake today... yes, one should fix the output module to actually use the current API.

    The module never worked in vanilla form for IRIX, as we never had a system to test with. The current snapshot contains the change to userptr and should build now.

    Your error message indicates that your mpg123 binary is not using the library just built, but an older version. The named function has been recently added.

    Normally, src/mpg123 is a script taking care of forcing the linker to use the libmpg123 in the source tree. You need to set LD_LIBRARY_PATH (or whatever), or build with --disable-shared to link libmpg123 statically in (along with sgi as the only output module built-in).

    Easiest way to test with dynamic lib and module would be to
    ./configure --prefix=/some/were && make && make install
    and then run from the installed location.

    Can you check that with the current snapshot? If we have it worked out eventually, I would include the obvious fixes into the next release (1.14).

     
  • canavan
    canavan
    2012-04-15

    The current snapshot builds and works. The wrapper script doesn't pick up the new libmpg123 because I link almost everything with an -rpath that points to the install location of the older libmpg123.

     
  • Thomas Orgis
    Thomas Orgis
    2012-05-01

    Fix released in 1.14.0 .

     
  • Thomas Orgis
    Thomas Orgis
    2012-05-01

    • status: open --> closed-fixed