I am trying to build log4cxx under Cygwin but it fails with an error that ant 
can't find gcc.
Could not launch gcc: java.io.IOException: Cannot run program "gcc"

$ cd /src/log4cxx/apache-log4cxx-0.10.0

$ ant -Dos.family=cygwin    -Dwith-apr=/cygwin/lib    
-Dwith-apr-util=/cygwin/lib    -Denable-wchar_t=0

$ which gcc
/usr/bin/gcc

Output from ant run:

Buildfile: build.xml
os-detect:
win-init:
mac-init:
unix-init:
common-init:
init:
     [echo] force-ant: ${force-ant}
find-apr-src:
find-apr-lib:
find-apr:
     [echo] apr-find:
     [echo] apr.dir=/cygwin/lib
     [echo] apr.include.dir=/cygwin/lib/../usr/include/apr-1
     [echo] apr.src.dir=${apr.src.dir}
     [echo] apr.lib.file=/cygwin/lib/libapr-1.la
     [echo] apr.lib.file.dir=/cygwin/lib
     [echo] apr.lib.dir=/cygwin/lib
     [echo] apr.lib.prefix=
     [echo] apr.lib.suffix=
     [echo] apr.lib.type=shared
build-apr:
find-apr-util-src:
find-apr-util-lib:
find-apr-util:
     [echo] apr-util-find:
     [echo] apr-util.dir=/cygwin/lib
     [echo] apr-util.include.dir=/cygwin/lib/../usr/include/apr-1
     [echo] apr-util.src.dir=${apr-util.src.dir}
     [echo] apr-util.lib.file=/cygwin/lib/libaprutil-1.la
     [echo] apr-util.lib.file.dir=/cygwin/lib
     [echo] apr-util.lib.dir=/cygwin/lib
     [echo] apr-util.lib.prefix=
     [echo] apr-util.lib.suffix=
     [echo] apr-util.lib.type=shared
build-apr-util:
find-esmtp-src:
find-esmtp-lib:
find-esmtp:
     [echo] esmtp-find:
     [echo] esmtp.dir=${esmtp.dir}
     [echo] esmtp.include.dir=${esmtp.include.dir}
     [echo] esmtp.src.dir=${esmtp.src.dir}
     [echo] esmtp.lib.file=${esmtp.lib.file}
     [echo] esmtp.lib.file.dir=${esmtp.lib.file.dir}
     [echo] esmtp.lib.dir=${esmtp.lib.dir}
     [echo] esmtp.lib.prefix=${esmtp.lib.prefix}
     [echo] esmtp.lib.suffix=${esmtp.lib.suffix}
     [echo] esmtp.lib.type=${esmtp.lib.type}
build-libesmtp:
unix-configure:
     [copy] Copying 1 file to 
C:\cygwin\src\log4cxx\apache-log4cxx-0.10.0\src\main\include\log4cxx
     [copy] Copying 1 file to 
C:\cygwin\src\log4cxx\apache-log4cxx-0.10.0\src\main\include\log4cxx\private
win-configure:
configure:
     [echo] Configuring with-logchar=utf-8
     [echo] Configuring with-charset=auto
     [echo] Configuring with-SMTP=no
     [echo] Configuring with-ODBC=no
     [echo] Configuring enable-char=1
     [echo] Configuring enable-wchar_t=0
     [echo] Configuring enable-unichar=0
     [echo] Configuring enable-cfstring=0
copy-if-changed-compare:
copy-if-changed:
   [delete] Deleting: 
C:\cygwin\src\log4cxx\apache-log4cxx-0.10.0\src\main\include\log4cxx\log4cxx.tmp
copy-if-changed-compare:
copy-if-changed:
   [delete] Deleting: 
C:\cygwin\src\log4cxx\apache-log4cxx-0.10.0\src\main\include\log4cxx\private\log4cxx_private.tmp
build-lib:
       [cc] 148 total files to be compiled.
BUILD FAILED
C:\cygwin\src\log4cxx\apache-log4cxx-0.10.0\build.xml:548: Could not launch 
gcc: java.io.IOException: Cannot run program "gcc" (in directory 
"C:\cygwin\src\log4cxx\apache-log4cxx-0.10.0\target\debug\shared\log4cxx_obj"): 
CreateProcess error=2, The system cannot find the file specified
Total time: 1 second


My host OS is Windows XP SP3.

Lars


     

Reply via email to