error compiling cclfox-0.7.1

Help
Pramono
2007-07-03
2013-04-17
  • Pramono
    Pramono
    2007-07-03

    I've been upgrading to Mandriva 2007.1 x86_64 with cclfox packages deps :
    - lib64fox1.6-1.6.20
    - lib64fox1.6-devel-1.6.20
    - lib64sqlite3_0-3.3.8
    - lib64sqlite3_0-devel-3.3.8
    - lib64glib2.0_0-2.12.11
    - lib64glib2.0_0-devel-2.12.11
    - gcc-4.1.2
    - gcc-c++-4.1.2
    - gcc-cpp-4.1.2
    - libgcc1-4.1.2
    i don't know what missing, cmiiw plz...

    i tried compiled with "./configure && make" but error occurs while "make" session :

    Making all in m4
    make[1]: Entering directory `/usr/local/src/ccl/Server/cclfox-0.7.1/m4'
    make[1]: Nothing to be done for `all'.
    make[1]: Leaving directory `/usr/local/src/ccl/Server/cclfox-0.7.1/m4'
    Making all in src
    make[1]: Entering directory `/usr/local/src/ccl/Server/cclfox-0.7.1/src'
    if g++ -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"cclfox\" -DVERSION=\"0.7.1\" -DENABLE_NLS=1 -DHAVE_GETTEXT=1 -DHAVE_DCGETTEXT=1 -DHAVE_LIBFOX_1_6=1 -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_LIBCCLS=1 -I. -I. -I/usr/local/include    -g -O2 -MT CCLWin.o -MD -MP -MF ".deps/CCLWin.Tpo" -c -o CCLWin.o CCLWin.cpp; \         then mv -f ".deps/CCLWin.Tpo" ".deps/CCLWin.Po"; else rm -f ".deps/CCLWin.Tpo"; exit 1; fi
    CCLWin.cpp: In function ‘int citemSortFunc(const FX::FXIconItem*, const FX::FXIconItem*)’:
    CCLWin.cpp:57: error: cast from ‘void*’ to ‘int’ loses precision
    CCLWin.cpp:58: error: cast from ‘void*’ to ‘int’ loses precision
    CCLWin.cpp: In member function ‘int CCLWin::getSelectedClient()’:
    CCLWin.cpp:358: error: cast from ‘void*’ to ‘int’ loses precision
    CCLWin.cpp: In member function ‘long int CCLWin::onCommand(FX::FXObject*, FX::FXSelector, void*)’:
    CCLWin.cpp:563: error: cast from ‘void*’ to ‘int’ loses precision
    CCLWin.cpp: In member function ‘long int CCLWin::onSwap(FX::FXObject*, FX::FXSelector, void*)’:
    CCLWin.cpp:671: error: cast from ‘void*’ to ‘int’ loses precision
    CCLWin.cpp: In member function ‘long int CCLWin::onTime(FX::FXObject*, FX::FXSelector, void*)’:
    CCLWin.cpp:684: error: cast from ‘void*’ to ‘int’ loses precision
    CCLWin.cpp: In member function ‘long int CCLWin::onAllowUserLogin(FX::FXObject*, FX::FXSelector, void*)’:
    CCLWin.cpp:712: error: cast from ‘void*’ to ‘int’ loses precision
    CCLWin.cpp: In member function ‘long int CCLWin::onAllowMemberLogin(FX::FXObject*, FX::FXSelector, void*)’:
    CCLWin.cpp:729: error: cast from ‘void*’ to ‘int’ loses precision
    CCLWin.cpp: In member function ‘long int CCLWin::onDelClient(FX::FXObject*, FX::FXSelector, void*)’:
    CCLWin.cpp:763: error: cast from ‘void*’ to ‘int’ loses precision
    CCLWin.cpp: In member function ‘long int CCLWin::onClientSelected(FX::FXObject*, FX::FXSelector, void*)’:
    CCLWin.cpp:777: error: cast from ‘void*’ to ‘int’ loses precision
    CCLWin.cpp:778: error: cast from ‘void*’ to ‘int’ loses precision
    CCLWin.cpp:792: error: cast from ‘void*’ to ‘int’ loses precision
    CCLWin.cpp: In member function ‘long int CCLWin::onShowClientMenu(FX::FXObject*, FX::FXSelector, void*)’:
    CCLWin.cpp:807: error: cast from ‘void*’ to ‘int’ loses precision
    CCLWin.cpp: In member function ‘long int CCLWin::onTimerTick(FX::FXObject*, FX::FXSelector, void*)’:
    CCLWin.cpp:831: error: cast from ‘void*’ to ‘int’ loses precision
    CCLWin.cpp:835: error: cast from ‘void*’ to ‘int’ loses precision
    CCLWin.cpp: In member function ‘long int CCLWin::onProductAdd(FX::FXObject*, FX::FXSelector, void*)’:
    CCLWin.cpp:904: error: cast from ‘void*’ to ‘int’ loses precision
    CCLWin.cpp:909: error: cast from ‘void*’ to ‘int’ loses precision
    CCLWin.cpp: In member function ‘long int CCLWin::onProductRemove(FX::FXObject*, FX::FXSelector, void*)’:
    CCLWin.cpp:926: error: cast from ‘void*’ to ‘int’ loses precision
    CCLWin.cpp:931: error: cast from ‘void*’ to ‘int’ loses precision
    make[1]: *** [CCLWin.o] Error 1
    make[1]: Leaving directory `/usr/local/src/ccl/Server/cclfox-0.7.1/src'
    make: *** [all-recursive] Error 1

    anyone could help me plz.....

    thx

     
    • Pramono
      Pramono
      2007-07-03

      oh ya i used libccls-0.7.1 with compiled fine on my box

       
    • Larry
      Larry
      2007-07-09

      Hello Pramono,

      the problem with an x86_64 distribution is that the integer is not 64bit, as the void is.

      You will have to cast from void to long to int by making the following change:

      here is line 57 of cclwin.cpp

          OLD = const FXString lname = CCL_client_name_get((int) l->getData());
          NEW = const FXString lname = CCL_client_name_get((int)(long) l->getData());

      Make this change for all error you get with make, in all source files ".cpp"

      It worked with Fedora7 x86_64 on 2007-07-08

      Good luck

       
    • k4rp3t
      k4rp3t
      2007-11-11

      hello vegasoft_ca

      i have same problem..
      i use fedora core 7.. end use cclfox-0.7.1
      how to chnage this script ?

      OLD = const FXString lname = CCL_client_name_get((int) l->getData());
      NEW = const FXString lname = CCL_client_name_get((int)(long) l->getData());

      i don't understand

      oh .. what ccl do you use?
      thx

       
    • LuckAs
      LuckAs
      2007-11-13

      This is not script. It is the patch for source files.
      Do edit the every file "*.cpp" which compiled whith errors. Replace strings in this files from "OLD" to "NEW"