• No success compiling on Suse Linux Enterprise Server 10

    By Ramunas Berulis 1 decade ago

    # make -f linux.mak
    g++ -c -mcpu=i486 -DUNIX -DLINUX -DLINUX86 -DW -DW32 -DDTRACE -fcheck-new -DPTHREAD_KERNEL -D_REENTRANT -DUSE_THREADSAFE_INTERFACES -D_POSIX_THREAD_SAFE_FUNCTIONS  -DHANDLE_IS_32BITS -DHAS_IOCP -DHAS_BOOL -DHAS_DLOPEN -DUSE_PTHREAD_INTERFACES -DLARGE64_FILES -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE   -DPRODUCTION_VERSION -DOVERRIDEDEBUG  -fPIC -I/opt/ibm/lotus/notesapi/include r.c
    `-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.
    r.c:554:2: warning: no newline at end of file
    r.c:245: error: expected constructor, destructor, or type conversion before ā(ā token
    r.c:283: error: expected constructor, destructor, or type conversion before ā(ā token
    r.c:536: error: expected constructor, destructor, or type conversion before ā(ā token
    make: *** [r.o] Error 1
     

    Errors are thrown with such lines as:

    __declspec(dllexport) unsigned int FilterInit(FilterInitData* filterInitData)
    __declspec(dllexport) unsigned int TerminateFilter(unsigned int reserved)
    __declspec(dllexport) unsigned int HttpFilterProc(FilterContext* context, unsigned int eventType, void* eventData)

    Any success stories?

    • Another step

      By Ramunas Berulis 1 decade ago

      Changed to:

      __attribute__((dllexport)) unsigned int FilterInit(FilterInitData* filterInitData)
      __attribute__((dllexport)) unsigned int HttpFilterProc(FilterContext* context, unsigned int eventType, void* eventData)
      __attribute__((dllexport)) unsigned int TerminateFilter(unsigned int reserved)

       

       # make -f linux.mak
      g++ -c -mcpu=i486 -DUNIX -DLINUX -DLINUX86 -DW -DW32 -DDTRACE -fcheck-new -DPTHREAD_KERNEL -D_REENTRANT -DUSE_THREADSAFE_INTERFACES -D_POSIX_THREAD_SAFE_FUNCTIONS  -DHANDLE_IS_32BITS -DHAS_IOCP -DHAS_BOOL -DHAS_DLOPEN -DUSE_PTHREAD_INTERFACES -DLARGE64_FILES -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE   -DPRODUCTION_VERSION -DOVERRIDEDEBUG  -fPIC -I/opt/ibm/lotus/notesapi/include r.c
      `-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.
      r.c:245: warning: ādllexportā attribute directive ignored
      r.c:283: warning: ādllexportā attribute directive ignored
      r.c: In function āunsigned int HttpFilterProc(FilterContext*, unsigned int, void*)ā:
      r.c:296: error: invalid conversion from āvoid*ā to āFilterAuthenticate*ā
      r.c:296: error:   initializing argument 2 of āint Authenticate(FilterContext*, FilterAuthenticate*)ā
      r.c: At global scope:
      r.c:536: warning: ādllexportā attribute directive ignored
      make: *** [r.o] Error 1
       

      • Further step

        By Ramunas Berulis 1 decade ago

        # make -f linux.mak
        g++ -c -mcpu=i486 -DUNIX -DLINUX -DLINUX86 -DW -DW32 -DDTRACE -fcheck-new -DPTHREAD_KERNEL -D_REENTRANT -DUSE_THREADSAFE_INTERFACES -D_POSIX_THREAD_SAFE_FUNCTIONS  -DHANDLE_IS_32BITS -DHAS_IOCP -DHAS_BOOL -DHAS_DLOPEN -DUSE_PTHREAD_INTERFACES -DLARGE64_FILES -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE   -DPRODUCTION_VERSION -DOVERRIDEDEBUG  -fPIC -I/opt/ibm/lotus/notesapi/include r.c
        `-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.
        r.c:553:9: warning: no newline at end of file
        r.c:245: warning: ādllexportā attribute directive ignored
        r.c:283: warning: ādllexportā attribute directive ignored
        r.c:536: warning: ādllexportā attribute directive ignored
        g++ -o r r.o -L/opt/ibm/lotus/notes/latest/linux -Wl,-rpath-link/opt/ibm/lotus/notes/latest/linux -lnotes -lm -lnsl -lpthread -lc -lresolv -ldl
         

        # ls
        CZN2IEN.tar.Z  linux.mak   notesapi  r.c   r.o
        linux.def      r       
         

        load http:

        2011.09.30 14:18:22   HTTP Server: Using Internet Site Configuration View
        2011.09.30 14:18:26   JVM: Java Virtual Machine initialized.
        2011.09.30 14:18:26   HTTP Server: Java Virtual Machine loaded
        2011.09.30 14:18:26   HTTP Server: Failed to load DSAPI module r
        2011.09.30 14:18:26   Servlet engine initialization was successful
        2011.09.30 14:18:31   XSP Command Manager initialized
        2011.09.30 14:18:32   HTTP Server: Started
         

        Compiled but not working :(  "Failed to load DSAPI module r"

        Maybe compilation is wrong.