Loading ...
Sorry, an error occurred while loading the content.

Compilation of client server in EnsemblServer

Expand Messages
  • luca.toldo@merck.de
    dear all, I have tried to compile v30 under Irix and under Linux and it failed in both circumstances, with different errors of course. a) Linux g++ version
    Message 1 of 5 , Jun 5, 2002
    • 0 Attachment
      dear all,
      I have tried to compile v30 under Irix and under Linux and it failed in
      both circumstances, with different errors of course.

      a) Linux g++ version 2.96
      the ssaha standalone and ssaha.a compiled fine, however the make client
      server in EnsemblServer failed due to:
      - conflicting types for typedef long unsigned int socklen_t
      - ClientServerUtils.cpp MSG_NONBLOCK undeclared and other messages

      b) Irix g++ version 2.95.2
      the ssaha standalone and ssaha.a compiled fine, however the make client
      server in EnsemblServer failed due to:
      -ClientServerUtils.cpp: In function 'void (*signal(int,void(*)(int))(int)'
      assigment of voids ...
      -ClientServerUtils.cpp: MSG_NONBLOCK undeclared

      Might that be due to the version of g++ ? It seems to me as if it has been
      built with version g++ version 3.0.3.

      Luca
    • luca.toldo@merck.de
      dear All, I have tried to compile v30 under Irix6.5, using the following versions of the GNU environment: GNU Compiler Suite 3.0.4 GNU Make 3.79.1
      Message 2 of 5 , Jun 10, 2002
      • 0 Attachment
        dear All,
        I have tried to compile v30 under Irix6.5, using the following versions of
        the GNU environment:

        GNU Compiler Suite 3.0.4
        GNU Make 3.79.1

        Unfortunately, still fails with the errors:

        ClientServerUtils.cpp: In function `void (* signal(int, void
        (*)(int)))(int)':
        ClientServerUtils.cpp:116: cannot convert `void (*)(int)' to `void (*)()'
        in assignment
        ClientServerUtils.cpp:129: cannot convert `void (*)()' to `void (*)(int)'
        in return
        ClientServerUtils.cpp:130: cannot convert `void (*)()' to `void (*)(int)'
        in return
        ClientServerUtils.cpp: In function `void (* Signal(int, void
        (*)(int)))(int)':
        ClientServerUtils.cpp:137: comparison between distinct pointer types `void
        (*)(int)' and `void (*)()' lacks a cast
        ClientServerUtils.cpp: In member function `void
        SocketInterface::checkSocketEmpty()':
        ClientServerUtils.cpp:439: `MSG_NONBLOCK' undeclared (first use this
        function)
        ClientServerUtils.cpp:439: (Each undeclared identifier is reported only
        once for each function it appears in.)
        *** Error code 1 (bu21)

        any change to get it fixed ?
        regards
        luca
      • coxtonyj
        Hi Luca, The problem in both cases is due to the fact that client/server code tends to include flags that are platform-specific. This is partly why I put them
        Message 3 of 5 , Jun 12, 2002
        • 0 Attachment
          Hi Luca,

          The problem in both cases is due to the fact that client/server code
          tends to include flags that are platform-specific. This is partly
          why I put them in a separate module, to leave a core that is hopefully
          reasonably portable.

          I might be able to produce a fix for the Linux version but I don't
          have access to an SGI machine. It would be a question of looking
          through your system's versions of standard header files such as
          unistd.h to see what would need to be changed.

          Regards,

          Tony Cox


          --- In ssahausers@y..., luca.toldo@m... wrote:
          > dear all,
          > I have tried to compile v30 under Irix and under Linux and it
          failed in
          > both circumstances, with different errors of course.
          >
          > a) Linux g++ version 2.96
          > the ssaha standalone and ssaha.a compiled fine, however the make
          client
          > server in EnsemblServer failed due to:
          > - conflicting types for typedef long unsigned int socklen_t
          > - ClientServerUtils.cpp MSG_NONBLOCK undeclared and other messages
          >
          > b) Irix g++ version 2.95.2
          > the ssaha standalone and ssaha.a compiled fine, however the make
          client
          > server in EnsemblServer failed due to:
          > -ClientServerUtils.cpp: In function 'void (*signal(int,void(*)(int))
          (int)'
          > assigment of voids ...
          > -ClientServerUtils.cpp: MSG_NONBLOCK undeclared
          >
          > Might that be due to the version of g++ ? It seems to me as if it
          has been
          > built with version g++ version 3.0.3.
          >
          > Luca
        • coxtonyj
          Hi Luca, I can t fix the code myself because I don t have access to an IRIX machine, but it looks like the problem is again caused by the header files etc. for
          Message 4 of 5 , Jun 12, 2002
          • 0 Attachment
            Hi Luca,

            I can't fix the code myself because I don't have access to an IRIX
            machine, but it looks like the problem is again caused by the header
            files etc. for socket code being slightly platform specific.

            Looks like the first few are caused by the fact that signal functions
            under IRIX take a void argument instead of an int. Try the following
            changes:

            ClientServerUtils.h, line 53: change the ( int ) to ( void )
            SSAHAServer.cpp, lines 108 and 118: change the (int signo) to (void)

            The last one is caused by the MSG_NONBLOCK flag not being defined
            under IRIX. Either delete the '|MSG_NONBLOCK' in line 439 of
            ClientServerUtils.cpp, or just comment out lines 439 to 445
            inclusive - that part of the code is not vital.

            Hope that helps.

            --- In ssahausers@y..., luca.toldo@m... wrote:
            > dear All,
            > I have tried to compile v30 under Irix6.5, using the following
            versions of
            > the GNU environment:
            >
            > GNU Compiler Suite 3.0.4
            > GNU Make 3.79.1
            >
            > Unfortunately, still fails with the errors:
            >
            > ClientServerUtils.cpp: In function `void (* signal(int, void
            > (*)(int)))(int)':
            > ClientServerUtils.cpp:116: cannot convert `void (*)(int)' to `void
            (*)()'
            > in assignment
            > ClientServerUtils.cpp:129: cannot convert `void (*)()' to `void (*)
            (int)'
            > in return
            > ClientServerUtils.cpp:130: cannot convert `void (*)()' to `void (*)
            (int)'
            > in return
            > ClientServerUtils.cpp: In function `void (* Signal(int, void
            > (*)(int)))(int)':
            > ClientServerUtils.cpp:137: comparison between distinct pointer
            types `void
            > (*)(int)' and `void (*)()' lacks a cast
            > ClientServerUtils.cpp: In member function `void
            > SocketInterface::checkSocketEmpty()':
            > ClientServerUtils.cpp:439: `MSG_NONBLOCK' undeclared (first use this
            > function)
            > ClientServerUtils.cpp:439: (Each undeclared identifier is reported
            only
            > once for each function it appears in.)
            > *** Error code 1 (bu21)
            >
            > any change to get it fixed ?
            > regards
            > luca
          • luca.toldo@merck.de
            Dear Anthony, thankyou for your support and advice. I have changed the lines as you suggested and then it compiled almost fine. The problem is now with
            Message 5 of 5 , Jun 13, 2002
            • 0 Attachment
              Dear Anthony,
              thankyou for your support and advice.
              I have changed the lines as you suggested and then it compiled almost fine.
              The problem is now with SSAHAServer.cpp which delivers the following error
              :

              SSAHAServer.cpp: In function 'int main(int,char**)':
              769: cannot convert "void (*)(int) to void(*)() for argument 2 to void
              (*Signal(int, void(*)()))()"
              770: cannot convert "void (*)(int) to void(*)() for argument 2 to void
              (*Signal(int, void(*)()))()"

              I had a look there and the lines are

              769:Signal (SIGCHLD, sig_chld);
              770:Signal (SIGPIPE,sig_pipe);

              According to the compiler's error I guess that the problem is in sig_chld
              and sig_pipe respectively.

              These have the following signature:

              107:void sig_chld (void) {...}
              118:void sig_pipe (void) {...}

              Signal is defined in the man page as:

              void (*signal ( int sig, void(*func)(int)))(int);

              any advice appreciated.
              luca
            Your message has been successfully submitted and would be delivered to recipients shortly.