Archived

This forum has been archived. Please start a new discussion on GitHub.

Can't build ICE 1.5.1 in cygwin

I can't build Ice 1.5.1 in cygwin (CYGWIN_NT-5.1 1.5.11)

when I use make to build , the error is :
$ make
config/Make.rules:166: config/Make.rules.CYGWIN_NT-5.1: No such file or directory
config/Make.rules:284: *** You need to define mkshlib in Make.rules.CYGWIN_NT-5.1. Stop.

then I copy Make.rules.Linux to Make.rules.CYGWIN_NT-5.1
but it occured another error:

$ make
making all in src
make[1]: Entering directory `/cygdrive/d/Ice-1.5.1/src'
making all in IceUtil
make[2]: Entering directory `/cygdrive/d/Ice-1.5.1/src/IceUtil'
c++ -c -I../../include -DICE_UTIL_API_EXPORTS -I.. -g -ftemplate-depth-128 -fPIC -Wall -D_REENTRANT Unicode.cpp
cc1plus: warning: -fPIC ignored for target (all code is position independent)
In file included from Unicode.cpp:10:
../../include/IceUtil/Unicode.h:57: error: parse error before `&' token
../../include/IceUtil/Unicode.h:58: error: syntax error before `(' token
Unicode.cpp:23: error: parse error before `&' token
Unicode.cpp: In function `std::string IceUtil::wstringToString(...)':
Unicode.cpp:26: error: `str' undeclared (first use this function)
Unicode.cpp:26: error: (Each undeclared identifier is reported only once for
each function it appears in.)
Unicode.cpp:42: warning: comparison is always true due to limited range of data
type
Unicode.cpp:48: warning: comparison is always true due to limited range of data
type
Unicode.cpp: At global scope:
Unicode.cpp:65: error: syntax error before `::' token
Unicode.cpp:68: error: syntax error before `.' token
Unicode.cpp:71: error: parse error before `for'
Unicode.cpp:71: error: parse error before `;' token
Unicode.cpp:71: error: syntax error before `+=' token
Unicode.cpp:77: error: parse error before `if'
Unicode.cpp:80: error: ISO C++ forbids declaration of `len' with no type
Unicode.cpp:80: error: conflicting types for `int len'
Unicode.cpp:70: error: previous declaration as `unsigned int len'
Unicode.cpp:81: error: ISO C++ forbids declaration of `minval' with no type
Unicode.cpp:81: error: redefinition of `int minval'
Unicode.cpp:75: error: `int minval' previously declared here
Unicode.cpp:82: error: parse error before `}' token
Unicode.cpp:90: error: ISO C++ forbids declaration of `len' with no type
Unicode.cpp:90: error: redefinition of `int len'
Unicode.cpp:80: error: `int len' previously defined here
Unicode.cpp:91: error: ISO C++ forbids declaration of `minval' with no type
Unicode.cpp:91: error: redefinition of `int minval'
Unicode.cpp:81: error: `int minval' previously defined here
Unicode.cpp:92: error: parse error before `}' token
Unicode.cpp:96: error: ISO C++ forbids declaration of `len' with no type
Unicode.cpp:96: error: redefinition of `int len'
Unicode.cpp:90: error: `int len' previously defined here
Unicode.cpp:97: error: ISO C++ forbids declaration of `minval' with no type
Unicode.cpp:97: error: redefinition of `int minval'
Unicode.cpp:91: error: `int minval' previously defined here
Unicode.cpp:98: error: parse error before `}' token
Unicode.cpp:128: error: parse error before `;' token
Unicode.cpp:135: error: syntax error before `<<=' token
Unicode.cpp:136: error: syntax error before `|=' token
make[2]: *** [Unicode.o] Error 1
make[2]: Leaving directory `/cygdrive/d/Ice-1.5.1/src/IceUtil'
make[1]: *** [all] Error 1
make[1]: Leaving directory `/cygdrive/d/Ice-1.5.1/src'
make: *** [all] Error 1

How can I do to build Ice in cygwin?

Comments

  • mes
    mes California
    Hi,

    Cygwin isn't one of our supported platforms, so we can't guarantee that Ice will compile or work properly in that environment.

    The error message indicates that the compiler you are using does not support the std::wstring type. Which compiler and version are you using?

    If you cannot upgrade to a newer compiler, you can easily work around the errors by removing Unicode.cpp from the Makefile.

    Take care,
    - Mark
  • I see, thanks
    cygwin gcc 3.3.3 built by redhat really can't support wstring

    $ uname -a
    CYGWIN_NT-5.0 ch-szx-hbzhang 1.5.11(0.116/4/2) 2004-09-04 23:17 i686 unknown unknown Cygwin


    $ gcc -v
    Reading specs from /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/specs
    Configured with: /gcc/gcc-3.3.3-3/configure --verbose --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc --libdir=/usr/lib --
    libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --enable-languages=c,ada,c++,d,f77,java,objc,pascal --e
    nable-nls --without-included-gettext --enable-libgcj --with-system-zlib --enable-interpreter --enable-threads=posix --enable-
    java-gc=boehm --enable-sjlj-exceptions --disable-version-specific-runtime-libs --disable-win32-registry
    Thread model: posix
    gcc version 3.3.3 (cygwin special)
  • Hi mes:

    Could you export ICE to cygwin , why said this?
    if that , we can use gcc to compile Ice all in windows and linux. I don't like windows, but many inherit program is running in windows. I must develop Ice program in windows. But I have not licence for VC++ and I think I can use automake and autoconf to configure program in all (windows and linux).

    why don't you automake and autoconf to configure Ice ? if that , I think it's very simple to export Ice to cygwin

    I think export ICE to cygwin must include stlport library (www.stlport.org) , because gcc built by redhat can't support wstring and wcout ....

    thanks
  • We currently have no plans to support gcc for cygwin, as there is no (commercial) demand for this compiler/platform combination.

    We used autoconf extensively in a former project. From the experience with this project, we do not want to use it for Ice. autconf is very impractical and complicated with respect to supporting many different C++ compilers, such the native Sun, HP, AIX, or MacOS C++ compilers and development environments. It's much easier to just use plain Makefiles with GNU make.
  • I think it is very simple for you to support Cygwin, but for us is very difficult. I have try it, but doesn't successful.
    Cygwin is very like linux, I think you only define Make.rules.CYGWIN and include stlport library

    another question , if I buy your minimun commercial licence($2,500), could you add this option?
  • Thank you very much for your proposal. Can you please contact us at sales@zeroc.com?
  • The full runtime environment of Mingw for test

    I don't know how long ICE can port to Mingw/cygwin?
    If you want to port to Mingw/cygwin, I think the following is good for you!

    I have built a runtime environment of Mingw that including the newest version of autoconf,
    automake,libtool , libiconv and gettext that have been tested, if you don't have full runtime environment of Mingw , you can donwload it from :
    http://sourceforge.net/project/showfiles.php?group_id=148008
    (http://sourceforge.net/projects/mingw-install)

    regards
  • hi, mes,
    My compiler is :

    c:\cygwin\bin>gcc -v
    Reading specs from /usr/lib/gcc/i686-pc-cygwin/3.4.4/specs
    Configured with: /gcc/gcc-3.4.4/gcc-3.4.4-1/configure --verbose --prefix=/usr --
    exec-prefix=/usr --sysconfdir=/etc --libdir=/usr/lib --libexecdir=/usr/lib --man
    dir=/usr/share/man --infodir=/usr/share/info --enable-languages=c,ada,c++,d,f77,
    java,objc --enable-nls --without-included-gettext --enable-version-specific-runt
    ime-libs --without-x --enable-libgcj --disable-java-awt --with-system-zlib --ena
    ble-interpreter --disable-libgcj-debug --enable-threads=posix --enable-java-gc=b
    oehm --disable-win32-registry --enable-sjlj-exceptions --enable-hash-synchroniza
    tion --enable-libstdcxx-debug : (reconfigured)
    Thread model: posix
    gcc version 3.4.4 (cygming special) (gdc 0.12, using dmd 0.125)



    It still does not work for Ice. If is there any flag which can turn on the function on the wstring? Or, so far the current ice implementaion (ice3.1.1), it is impossible to work on Cygwin platform without modification to the IceUtil source codes?

    Best regards.
    OrNot
  • marc
    marc Florida
    Sorry, but Ice is not supported on cygwin. We have never tested or tried Ice on cygwin, and therefore cannot offer you any advice. If you would like to sponsor the port of Ice to cygwin, please contact us at info@zeroc.com.
  • I don't know how much difference between your requirement environment and doing a linux vm simulation.