Menu

Errors compiling t38modem

Help
2019-10-08
2021-10-25
  • Jeremy Walker

    Jeremy Walker - 2019-10-08

    Hi,

    I am trying to compile the latest t38modem from https://github.com/PeteDavidson/t38modem, but I'm running into some trouble. Here are the steps I've followed so far:

    OS
    A clean Ubuntu 18.04.3 LTS Server image.

    Installed dependencies

    $ apt install build-essential flex bison libexpat1-dev libgsm1-dev libspeex-dev libopus-dev libavcodec-dev libx264-dev libvpx-dev libtheora-dev libspandsp-dev capiutils dahdi

    Built PTLIB & OPAL
    Downloaded sources for ptlib-2.16.2 and opal-3.16.2 from https://sourceforge.net/projects/opalvoip/files/V3.16%20Procyon/Stable%202/ and successfully compiled both libraries.

    T38Modem
    Downloaded sourcecode from https://github.com/PeteDavidson/t38modem. Followed instructions in ReadMe.txt, i.e.

    $ export PTLIBDIR=/usr/local/lib/ptlib-2.16.2
    $ export OPALDIR=/usr/local/lib/opal-3.16.2
    $ make USE_OPAL=1 opt

    The last command throws following error:

    make: *** No rule to make target 'opt'.  Stop.
    

    So I ran make USE_OPAL=1 instead, and that throws the following errors:

    g++ -c  `pkg-config --cflags opal` -DUSE_UNIX98_PTY -o pmutils.o pmutils.cxx
    g++ -c  `pkg-config --cflags opal` -DUSE_UNIX98_PTY -o dle.o dle.cxx
    g++ -c  `pkg-config --cflags opal` -DUSE_UNIX98_PTY -o pmodem.o pmodem.cxx
    g++ -c  `pkg-config --cflags opal` -DUSE_UNIX98_PTY -o pmodemi.o pmodemi.cxx
    g++ -c  `pkg-config --cflags opal` -DUSE_UNIX98_PTY -o drivers.o drivers.cxx
    g++ -c  `pkg-config --cflags opal` -DUSE_UNIX98_PTY -o t30.o t30.cxx
    g++ -c  `pkg-config --cflags opal` -DUSE_UNIX98_PTY -o hdlc.o hdlc.cxx
    g++ -c  `pkg-config --cflags opal` -DUSE_UNIX98_PTY -o fcs.o fcs.cxx
    g++ -c  `pkg-config --cflags opal` -DUSE_UNIX98_PTY -o pmodeme.o pmodeme.cxx
    g++ -c  `pkg-config --cflags opal` -DUSE_UNIX98_PTY -o enginebase.o enginebase.cxx
    g++ -c  `pkg-config --cflags opal` -DUSE_UNIX98_PTY -o t38engine.o t38engine.cxx
    g++ -c  `pkg-config --cflags opal` -DUSE_UNIX98_PTY -o drv_pty.o drv_pty.cxx
    g++ -c  `pkg-config --cflags opal` -DUSE_UNIX98_PTY -o opal/opalutils.o opal/opalutils.cxx
    g++ -c  `pkg-config --cflags opal` -DUSE_UNIX98_PTY -o opal/modemep.o opal/modemep.cxx
    opal/modemep.cxx: In member functionvirtual PSafePtr<OpalConnection> ModemEndPoint::MakeConnection(OpalCall&, const PString&, void*, unsigned int, OpalConnection::StringOptions*)’:
    opal/modemep.cxx:409:10: error: ‘m_connectionsActivewas not declared in this scope
    opal/modemep.cxx:409:10: note: suggested alternative: ‘connectionsActiveopal/modemep.cxx: In member functionvirtual PBoolean ModemConnection::SetUpConnection()’:
    opal/modemep.cxx:461:10: error: ‘m_remotePartyNumberwas not declared in this scope
    opal/modemep.cxx:461:10: note: suggested alternative: ‘remotePartyNumberopal/modemep.cxx: In constructorModemConnection::ModemConnection(OpalCall&, ModemEndPoint&, const PString&, void*, bool, bool, OpalConnection::StringOptions*)’:
    opal/modemep.cxx:580:3: error: ‘m_remotePartyNumberwas not declared in this scope
    opal/modemep.cxx:580:3: note: suggested alternative: ‘remotePartyNumberopal/modemep.cxx: In destructorvirtual ModemConnection::~ModemConnection()’:
    opal/modemep.cxx:620:45: error: ‘m_remotePartyNumberwas not declared in this scope
    opal/modemep.cxx:620:45: note: suggested alternative: ‘remotePartyNumberMakefile:116: recipe for target 'opal/modemep.o' failed
    make: *** [opal/modemep.o] Error 1
    

    Can anyone point me in the right direction? What am I missing here?

    thanks,
    -Jeremy

     

    Last edit: Jeremy Walker 2019-10-08
  • Jeremy Walker

    Jeremy Walker - 2019-10-09

    I started the whole process again with a fresh Ubuntu 18.04.3 LTS server, this time downloading the sources from:

    https://github.com/PeteDavidson/ptlib
    https://github.com/PeteDavidson/opal
    https://github.com/PeteDavidson/t38modem

    After installing dependencies,

    $ apt install build-essential flex bison libexpat1-dev libgsm1-dev libspeex-dev libopus-dev libavcodec-dev libx264-dev libvpx-dev libtheora-dev libspandsp-dev capiutils dahdi
    

    I extracted ptlib-master.zip to /usr/src, then ran

    $ export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
    $ export LD_LIBRARY_PATH=/usr/local/lib
    $ export PTLIBPLUGINDIR=/usr/local/lib/ptlib-2.10.15
    
    $ ./configure
    $ make
    

    I get a bunch of warnings, followed by:

    ptlib/unix/svcproc.cxx: In member functionint PServiceProcess::InitialiseService()’:
    ptlib/unix/svcproc.cxx:220:35: error: call of overloadedbasic_ifstream(PString&)is ambiguous
           ifstream pidfile(pidfilename);
                                       ^
    In file included from ptlib/unix/svcproc.cxx:57:0:
    /usr/include/c++/7/fstream:511:7: note: candidate: std::basic_ifstream<_CharT, _Traits>::basic_ifstream(const string&, std::ios_base::openmode) [with _CharT = char; _Traits = std::char_traits<char>; std::__cxx11::string = std::__cxx11::basic_string<char>; std::ios_base::openmode = std::_Ios_Openmode]
           basic_ifstream(const std::string& __s,
           ^~~~~~~~~~~~~~
    /usr/include/c++/7/fstream:495:7: note: candidate: std::basic_ifstream<_CharT, _Traits>::basic_ifstream(const char*, std::ios_base::openmode) [with _CharT = char; _Traits = std::char_traits<char>; std::io
    s_base::openmode = std::_Ios_Openmode]
           basic_ifstream(const char* __s, ios_base::openmode __mode = ios_base::in)
           ^~~~~~~~~~~~~~
    ptlib/unix/svcproc.cxx:387:33: error: call of overloadedbasic_ifstream(PString&)is ambiguous
         ifstream pidfile(pidfilename);
                                     ^
    In file included from ptlib/unix/svcproc.cxx:57:0:
    /usr/include/c++/7/fstream:511:7: note: candidate: std::basic_ifstream<_CharT, _Traits>::basic_ifstream(const string&, std::ios_base::openmode) [with _CharT = char; _Traits = std::char_traits<char>; std::__cxx11::string = std::__cxx11::basic_string<char>; std::ios_base::openmode = std::_Ios_Openmode]
           basic_ifstream(const std::string& __s,
           ^~~~~~~~~~~~~~
    /usr/include/c++/7/fstream:495:7: note: candidate: std::basic_ifstream<_CharT, _Traits>::basic_ifstream(const char*, std::ios_base::openmode) [with _CharT = char; _Traits = std::char_traits<char>; std::ios_base::openmode = std::_Ios_Openmode]
           basic_ifstream(const char* __s, ios_base::openmode __mode = ios_base::in)
           ^~~~~~~~~~~~~~
    ptlib/unix/svcproc.cxx:415:37: error: call of overloadedbasic_ofstream(PString&)is ambiguous
             ofstream pidfile(pidfilename);
                                         ^
    In file included from ptlib/unix/svcproc.cxx:57:0:
    /usr/include/c++/7/fstream:715:7: note: candidate: std::basic_ofstream<_CharT, _Traits>::basic_ofstream(const string&, std::ios_base::openmode) [with _CharT = char; _Traits = std::char_traits<char>; std::__cxx11::string = std::__cxx11::basic_string<char>; std::ios_base::openmode = std::_Ios_Openmode]
           basic_ofstream(const std::string& __s,
           ^~~~~~~~~~~~~~
    /usr/include/c++/7/fstream:697:7: note: candidate: std::basic_ofstream<_CharT, _Traits>::basic_ofstream(const char*, std::ios_base::openmode) [with _CharT = char; _Traits = std::char_traits<char>; std::ios_base::openmode = std::_Ios_Openmode]
           basic_ofstream(const char* __s,
           ^~~~~~~~~~~~~~
    ptlib/unix/svcproc.cxx:353:12: warning: ignoring return value ofint seteuid(__uid_t)’, declared with attribute warn_unused_result [-Wunused-result]
         seteuid(getuid()); // Switch back to starting uid for next call
         ~~~~~~~^~~~~~~~~~
    ptlib/unix/svcproc.cxx:355:12: warning: ignoring return value ofint seteuid(__uid_t)’, declared with attribute warn_unused_result [-Wunused-result]
         seteuid(uid);
         ~~~~~~~^~~~~
    ptlib/unix/svcproc.cxx:366:14: warning: ignoring return value ofint seteuid(__uid_t)’, declared with attribute warn_unused_result [-Wunused-result]
           seteuid(getuid()); // Switch back to starting uid for next call
    ptlib/unix/svcproc.cxx:375:14: warning: ignoring return value ofint seteuid(__uid_t)’, declared with attribute warn_unused_result [-Wunused-result]
           seteuid(uid);
           ~~~~~~~^~~~~
    ../make/common.mak:96: recipe for target '/usr/src/ptlib-master/lib_linux_x86_64/obj/svcproc.o' failed
    make[2]: *** [/usr/src/ptlib-master/lib_linux_x86_64/obj/svcproc.o] Error 1
    make[2]: Leaving directory '/usr/src/ptlib-master/src'
    ../make/common.mak:292: recipe for target 'optshared' failed
    make[1]: *** [optshared] Error 2 
    make[1]: Leaving directory '/usr/src/ptlib-master/src'
    Makefile:91: recipe for target 'optshared' failed
    make: *** [optshared] Error 2
    

    Any help would be greatly appreciated.

    thanks -Jeremy

     

    Last edit: Jeremy Walker 2019-10-09
  • Jeremy Walker

    Jeremy Walker - 2019-10-09

    BUMP

    The silence is deafening!

     
    • Bartosz Supcziński

      Repaired and tested on Ubuntu 18.04.3

      T38modem 3.15.3 (in attachment):
      No changes required

      OPAL 3.10.15 (in attachment) compile:
      ./configure CXXFLAGS='-std=gnu++98'

      PTlib 2.10.15 (in attachment) patches:

      --- svcproc.cxx 2020-01-09 02:33:42.363332334 +0100
      +++ svcproc.cxx_patch   2020-01-08 15:16:34.346921577 +0100
      @@ -217,7 +217,7 @@
           pid_t pid;
      
           {
      -      ifstream pidfile(pidfilename);
      +      ifstream pidfile((const char *)pidfilename);
             if (!pidfile.is_open()) {
               cout << "Could not open pid file: \"" << pidfilename << "\""
                       " - " << strerror(errno) << endl;
      @@ -384,7 +384,7 @@
         // Run as a daemon, ie fork
      
         if (!pidfilename) {
      -    ifstream pidfile(pidfilename);
      +    ifstream pidfile((const char *)pidfilename);
           if (pidfile.is_open()) {
             pid_t pid;
             pidfile >> pid;
      @@ -412,7 +412,7 @@
             cout << "Daemon started with pid " << pid << endl;
             if (!pidfilename) {
               // Write out the child pid to magic file in /var/run (at least for linux)
      -        ofstream pidfile(pidfilename);
      +        ofstream pidfile((const char *)pidfilename);
               if (pidfile.is_open())
                 pidfile << pid;
               else
      
      
      --- channel.cxx 2020-01-09 02:33:42.355332257 +0100
      +++ channel.cxx_patch   2020-01-08 15:35:42.461901748 +0100
      @@ -34,6 +34,7 @@
       #pragma implementation "channel.h"
       #pragma implementation "indchan.h"
      
      +#include <sys/uio.h>
       #include <ptlib.h>
       #include <sys/ioctl.h>
      

      Build order:

      cd ~/ptlib
      ./configure
      make
      make install
      cd ~/opal
      ./configure CXXFLAGS='-std=gnu++98'
      make
      make install
      cd ~/t38modem
      export PTLIBDIR=~/ptlib
      export OPALDIR=~/opal
      make USE_OPAL=1
      mv t38modem /usr/local/bin/
      ldconfig

       

      Last edit: Bartosz Supcziński 2020-01-09
  • DrO

    DrO - 2020-01-19

    I tried the to build/install the .tgz in the attachment above under MinGW/GCC 7.3, using the build steps as stated (after applying the patch).

    PTLib .configure'd, but the Make step crashed on "undefined reference to PPlugin_PVideoOutputDevice_Window_link()", though I suspect if it continued it would have crashed on other "PPlugin ..." bits that appear in the *.dtf MSVC files.

    ... PVideoOutputDevice seems to be an OPAL element, so not sure if I got the build order wrong.

    1) Should that happen? I am using MinGW/Linux install process (not MSVC), and so why is it referencing Win based files?

    2) The PTLib here is stated 2.10.15 dated 2020, but on online the highest ver is 2.10.11 from 2015 ... is that significant?

    3) It's not clear if bison of flex are/are not required.

    4) Not sure how this version of T38Modem should be treated in relation to the 2.0 version more commonly available. Should I be sticking with 2.0?

    5) Would it make sense to provide a refresh/updated summary page as to the current statuts, dependencies, version control, etc, and a more or less bullet proof build mechanism?

    Many thanks

     
  • Ab7

    Ab7 - 2021-10-25

    I'm trying to get the T38modem to work, but am unsuccessful thusfar.
    I'm using the following packages:

    PTLib 2.10.15
    https://github.com/T38Modem/ptlib/archive/refs/tags/v2.10.15.tar.gz

    Opal 3.10.15
    https://github.com/T38Modem/opal/archive/refs/tags/v3.10.15.tar.gz

    T38modem 3.15.3
    https://sourceforge.net/p/t38modem/discussion/508603/thread/e5a314251c/13a9/1697/attachment/t38modem.tgz

    I start with PTLib:

    cd ptlib-2.10.15
    ./configure
    make
    

    I then get the following errors:

        make[2]: *** [../make/common.mak:97: /home/user/ptlib-2.10.15/lib_linux_x86_64/obj/svcproc.o] Error 1
        make[2]: Leaving directory '/home/user/ptlib-2.10.15/src'
        make[1]: *** [../make/common.mak:292: optshared] Error 2
        make[1]: Leaving directory '/home/user/ptlib-2.10.15/src'
        make: *** [Makefile:91: optshared] Error 2
    

    I try "make install" after this, and he seems to get through this, without new error messages.

    Then I try to install Opal:

    cd opal-3.10.15
    ./configure CXXFLAGS='-std=gnu++98'
    

    message: checking linkable PTLib... not found

    make
    

    message: make: *** No targets specified and no makefile found. Stop.

    I've been trying for days, with different packages/github pages.

    Does someone know what I'm doing wrong? Can you point me in the right direction?

    Thanks in advance!

     

    Last edit: Ab7 2021-10-25

Log in to post a comment.