Problem compiling Wired / libportaudio.so

Help
2008-01-20
2013-04-24
  • Gavin Roberts
    Gavin Roberts
    2008-01-20

    I have installed all listed dependencies but after I run ./autogen.sh and ./configure (both of which appear to go off without a hitch) and then run the 'make', it runs through a bit and then exits with the following error:

    libjack.so -ldl -lrt -lm -lpthread -Wl,--rpath -Wl,/usr/local/lib -Wl,--rpath -Wl,/usr/lib64
    lib/.libs/libportaudio.so: undefined reference to `jack_port_lock'
    lib/.libs/libportaudio.so: undefined reference to `jack_port_unlock'
    collect2: ld returned 1 exit status
    make[1]: *** [bin/paqa_devs] Error 1
    make[1]: Leaving directory `/home/gavin/wired-0.6/src/portaudio'
    make: *** [all-recursive] Error 1

    Now, up until this error, besides a few informational type warnings about -datarootdir being ignored, I've had no trouble.  I have jack installed and use it often to patch my USB audio gear to Ardour, so I would love to get this fixed so I can give Wired a test run.  Judging by the screenshots, it may very well be that one piece of software I was looking for.  Any help in figuring this out would be greatly appreciated.

    This is the full result of the make command:

    [root@localhost wired-0.6]# make
    Making all in intl
    make[1]: Entering directory `/home/gavin/wired-0.6/intl'
    make[1]: Nothing to be done for `all'.
    make[1]: Leaving directory `/home/gavin/wired-0.6/intl'
    Making all in po
    make[1]: Entering directory `/home/gavin/wired-0.6/po'
    make[1]: Nothing to be done for `all'.
    make[1]: Leaving directory `/home/gavin/wired-0.6/po'
    Making all in src/portaudio
    make[1]: Entering directory `/home/gavin/wired-0.6/src/portaudio'
    for dir in ; do make -C $dir all; done
    /bin/sh ./libtool --mode=link gcc -o bin/paqa_devs -g -O2 -DPA_LITTLE_ENDIAN   -pthread -I./include -I./src/common -I./src/os/unix -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DSIZEOF_SHORT=2 -DSIZEOF_INT=4 -DSIZEOF_LONG=8 -DHAVE_CLOCK_GETTIME=1 -DHAVE_NANOSLEEP=1 -DPA_USE_ALSA=1 -DPA_USE_JACK=1 -DPA_USE_OSS=1  ./test/paqa_devs.c lib/libportaudio.la -lm -lpthread
    gcc -o bin/.libs/paqa_devs -g -O2 -DPA_LITTLE_ENDIAN -pthread -I./include -I./src/common -I./src/os/unix -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DSIZEOF_SHORT=2 -DSIZEOF_INT=4 -DSIZEOF_LONG=8 -DHAVE_CLOCK_GETTIME=1 -DHAVE_NANOSLEEP=1 -DPA_USE_ALSA=1 -DPA_USE_JACK=1 -DPA_USE_OSS=1 ./test/paqa_devs.c  lib/.libs/libportaudio.so /usr/lib64/libasound.so /usr/lib64/libjack.so -ldl -lrt -lm -lpthread -Wl,--rpath -Wl,/usr/local/lib -Wl,--rpath -Wl,/usr/lib64
    lib/.libs/libportaudio.so: undefined reference to `jack_port_lock'
    lib/.libs/libportaudio.so: undefined reference to `jack_port_unlock'
    collect2: ld returned 1 exit status
    make[1]: *** [bin/paqa_devs] Error 1
    make[1]: Leaving directory `/home/gavin/wired-0.6/src/portaudio'
    make: *** [all-recursive] Error 1

    My specs are:

    Mandriva 2008.0 x86_64, kernel 2.6.22.12

    The following is the summary of my ./configure command:

    -=-=-=-=-=-=-=-=-=-= Configuration Complete =-=-=-=-=-=-=-=-=-=-=-

      Configuration summary :

        Version : ..................... 0.6
        Enable debugging : ............ No
        Enable optimizations : ........ Yes

       Tools :

         Compiler is GCC : ............. yes
         GCC major version : ........... 4

       Portaudio options :

        Jack : ........................ yes
        OSS : ......................... yes
        ALSA : ........................ yes

    WARNING: If you already have Portaudio in your System, it may be replaced by this one !

      Extra tools required :

        wxWidgets : ................... 2.6.4
        libsamplerate : ............... 0.1.3pre6
        libsndfile : .................. 1.0.18pre11

      Installation directories :
        Wired plugins directory: .............. /usr/local/lib/wired
        Wired binary directory : .............. /usr/local/bin
        Wired data directory   : .............. /usr/local/share
        Wired conf directory   : .............. /usr/local/etc/wired

    Let me know if you need any more information.

     
    • Doomsday
      Doomsday
      2008-02-29

      I think it's a incompatibility problem with two different version of PortAudio.

      The function _lock and _unlock maybe exists on your system, but not exists on the PortAudio of Wired.

      I know it's a little annoying, but can you test the same run without yours ?

      Thanks a lot.

       
    • ugo
      ugo
      2008-07-02

      Errors comes from libjack.

      Actually jack_port_lock/unlock seems to be deprecated:
      http://www.nabble.com/Portaudio-and-Jack-td15186484.html

      I looked at the last PortAudio version. They just removed the few annoying lines in pa_jack.c(RealStop).
      -----------------------------------------------------
           {
               for( i = 0; i < stream->num_incoming_connections; i++ )
               {
      -            UNLESS( !jack_port_lock( stream->jack_client, stream->local_input_ports[i] ),
      -                    paUnanticipatedHostError );
                   if( jack_port_connected( stream->local_input_ports[i] ) )
                   {
                       UNLESS( !jack_port_disconnect( stream->jack_client, stream->local_input_ports[i] ),
                               paUnanticipatedHostError );
                   }
      -            UNLESS( !jack_port_unlock( stream->jack_client, stream->local_input_ports[i] ),
      -                    paUnanticipatedHostError );
               }
               for( i = 0; i < stream->num_outgoing_connections; i++ )
               {
      -            UNLESS( !jack_port_lock( stream->jack_client, stream->local_output_ports[i] ),
      -                    paUnanticipatedHostError );
                   if( jack_port_connected( stream->local_output_ports[i] ) )
                   {
                       UNLESS( !jack_port_disconnect( stream->jack_client, stream->local_output_ports[i] ),
                               paUnanticipatedHostError );
                   }
      -            UNLESS( !jack_port_unlock( stream->jack_client, stream->local_output_ports[i] ),
      -                    paUnanticipatedHostError );
               }
           }
      -----------------------------------------------------
      It works for me but maybe it is not the best way to solve the problem.

      By the way, I faced few other compile errors under debian (Linux debian-system 2.6.24-1-686 #1 SMP Thu May 8 02:16:39 UTC 2008 i686 GNU/Linux)
      Like the use of strncmp and strstr (that doesn't exist under debian) in a plugin.
      I had to add mine in src/plugins/chorus/WvIn.cpp

      +int    strncmp(const char    *s1,
      +               const char    *s2,
      +               unsigned int  n)
      +{
      +  int   i = 0;
      +  while ((s1[i] != '\0') && (s2[i] != '\0') && (--n>0))
      +    {
      +      if (s1[i] != s2[i])
      +        return (s1[i] - s2[i]);
      +      i++;
      +    }
      +  return (s1[i] - s2[i]);
      +}
      +
      +const char * strstr(const char   *big,
      +                    const char   *little)
      +{
      +  int           i = 0;
      +  int           j = 0;

      +  if (little == "")
      +    return (big);

      +  while (big[i])
      +  {
      +    j = 0;
      +    while (little[j] && (big[i+j] == little[j]))
      +      j++;
      +    if (!little[j])
      +      return (big + i);
      +    i++;
      +  }
      +  return (NULL);
      +}
      One more time maybe it is not the better way. I don't know portable equivalent for these functions :/

      Finally I had
      + #include <algorithm>
      in ./src/midi/MidiFile.

      And it compiles :)

       
      • ugo
        ugo
        2008-07-11

        arf sorry
        strncmp and strstr are standard
        just need to add #include <cstring>

         
    • gorgon
      gorgon
      2008-07-11

      Hi, I'm getting the same error described here but I'm not very handy with code. Did you get it to compile in the end? If so, could you explain how? Thanks!

      Grgon

       
    • Robin
      Robin
      2008-08-14

      Just download the latest version of portaudio (pa_stable_v19_20071207.tar.gz) and cp the source into wired0.6/src

      Robin

       
    • gorgon
      gorgon
      2008-08-26

      thanks, compiled!
      i then got this error:
      libWiredWidgets.so: cannot open shared object file: No such file or directory
      following this thread http://64studio.com/node/202
      doing a  'export LD_LIBRARY_PATH=/usr/local/lib'
      solved that too.

       
    • Timo Hinz
      Timo Hinz
      2009-05-25

      the thread at 64studio doesn't work =(

      where i can find the pa_jack.c (from ugo's thread) and what should i do with it?

      thx for help