Thread overview
Test if errno.h is available for some platforms
Jun 22, 2008
Vincent Richomme
Jun 22, 2008
Vincent Richomme
Jun 22, 2008
Vincent Richomme
Jun 22, 2008
David Friedman
Jun 22, 2008
David Friedman
June 22, 2008
Hi,

when  trying to cross-compile gdc for wince platform I get an error due to errno.h (errno.h is not available on mingw32ce).
From what I see a test is done via a d\phobos2\config\errno.x3.

Could it be possible to check if platform has errno.h before to start a test.







ake[3]: Entering directory `/d/Professionnel/Projets/cegcc/src/build-mingw32ce/gcc/arm-mingw32ce/libphobos'
true "AR_FLAGS=rc" "CC_FOR_BUILD=gcc" "CC_FOR_TARGET=/d/Professionnel/Projets/cegcc/src/build-mingw32ce/gcc/./gcc/xgcc -B/d/Professionnel/Projets/cegcc/src/build-mingw32ce/gcc/./gcc/ -B/opt/mingw32ce/arm-mingw32ce/bin/ -B/opt/mingw32ce/arm-mingw32ce/lib/ -isystem /opt/mingw32ce/arm-mingw32ce/include -isystem /opt/mingw32ce/arm-mingw32ce/sys-include" "CFLAGS=-O2 -g -O2 " "CXXFLAGS=-g -O2 " "CFLAGS_FOR_BUILD=-g -O2" "CFLAGS_FOR_TARGET=-O2 -g -O2 " "INSTALL=/usr/bin/install -c" "INSTALL_DATA=/usr/bin/install -c -m 644" "INSTALL_PROGRAM=/usr/bin/install -c" "INSTALL_SCRIPT=/usr/bin/install -c" "LDFLAGS=" "LIBCFLAGS=-O2 -g -O2 " "LIBCFLAGS_FOR_TARGET=-O2 -g -O2 " "MAKE=make" "MAKEINFO=makeinfo --split-size=5000000 --split-size=5000000  " "PICFLAG=" "PICFLAG_FOR_TARGET=" "SHELL=/bin/sh" "RUNTESTFLAGS=" "exec_prefix=/opt/mingw32ce" "infodir=/opt/mingw32ce/info" "libdir=/opt/mingw32ce/lib" "includedir=/opt/mingw32ce/include" "prefix=/opt/mingw32ce" "tooldir=/opt/mingw32ce/arm-mingw32ce" "gdc_include_dir=/opt/mingw32ce/include/d2/4.1.0" "AR=arm-mingw32ce-ar" "AS=/d/Professionnel/Projets/cegcc/src/build-mingw32ce/gcc/./gcc/as" "LD=/d/Professionnel/Projets/cegcc/src/build-mingw32ce/gcc/./gcc/collect-ld" "RANLIB=arm-mingw32ce-ranlib" "NM=/d/Professionnel/Projets/cegcc/src/build-mingw32ce/gcc/./gcc/nm" "NM_FOR_BUILD=" "NM_FOR_TARGET=arm-mingw32ce-nm" "DESTDIR=" "WERROR=" DO=all multi-do # make
CC_FOR_BUILD="gcc -I /d/Professionnel/Projets/cegcc/src/gcc/libphobos/config" BUILD_LIBIBERTY=../../build-i686-pc-cygwin/libiberty/libiberty.a /d/Professionnel/Projets/cegcc/src/gcc/libphobos/config/x3 /d/Professionnel/Projets/cegcc/src/gcc/libphobos/config/errno.x3 -o arm-mingw32ce/gcc/config/errno.d /d/Professionnel/Projets/cegcc/src/build-mingw32ce/gcc/./gcc/xgcc -B/d/Professionnel/Projets/cegcc/src/build-mingw32ce/gcc/./gcc/ -B/opt/mingw32ce/arm-mingw32ce/bin/ -B/opt/mingw32ce/arm-mingw32ce/lib/ -isystem /opt/mingw32ce/arm-mingw32ce/include -isystem /opt/mingw32ce/arm-mingw32ce/sys-include -DHAVE_CONFIG_H -I . -I /d/Professionnel/Projets/cegcc/src/gcc/libphobos/gcc
** x3: running ./errno.x3.exe -o arm-mingw32ce/gcc/config/errno.d /d/Professionnel/Projets/cegcc/src/build-mingw32ce/gcc/./gcc/xgcc -B/d/Professionnel/Projets/cegcc/src/build-mingw32ce/gcc/./gcc/ -B/opt/mingw32ce/arm-mingw32ce/bin/ -B/opt/mingw32ce/arm-mingw32ce/lib/ -isystem /opt/mingw32ce/arm-mingw32ce/include -isystem /opt/mingw32ce/arm-mingw32ce/sys-include -DHAVE_CONFIG_H -I . -I /d/Professionnel/Projets/cegcc/src/gcc/libphobos/gcc
x3: failed to get macros.
make[3]: *** [arm-mingw32ce/gcc/config/errno.d] Error 1
make[3]: Leaving directory `/d/Professionnel/Projets/cegcc/src/build-mingw32ce/gcc/arm-mingw32ce/libphobos'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/d/Professionnel/Projets/cegcc/src/build-mingw32ce/gcc/arm-mingw32ce/libphobos'
make[1]: *** [all-target-libphobos] Error 2
make[1]: Leaving directory `/d/Professionnel/Projets/cegcc/src/build-mingw32ce/gcc'
make: *** [all] Error 2
June 22, 2008
For now I have commented everything in d\phobos2\config\errno.x3 and I am getting an other error about not finding gcc/config/fpcls.d:

make[3]: Entering directory `/d/Professionnel/Projets/cegcc/src/build-mingw32ce/gcc/arm-mingw32ce/libphobos'
true "AR_FLAGS=rc" "CC_FOR_BUILD=gcc" "CC_FOR_TARGET=/d/Professionnel/Projets/cegcc/src/build-mingw32ce/gcc/./gcc/xgcc -B/d/Professionnel/Projets/cegcc/src/build-mingw32ce/gcc/./gcc/ -B/opt/mingw32ce/arm-mingw32ce/bin/ -B/opt/mingw32ce/arm-mingw32ce/lib/ -isystem /opt/mingw32ce/arm-mingw32ce/include -isystem /opt/mingw32ce/arm-mingw32ce/sys-include" "CFLAGS=-O2 -g -O2 " "CXXFLAGS=-g -O2 " "CFLAGS_FOR_BUILD=-g -O2" "CFLAGS_FOR_TARGET=-O2 -g -O2 " "INSTALL=/usr/bin/install -c" "INSTALL_DATA=/usr/bin/install -c -m 644" "INSTALL_PROGRAM=/usr/bin/install -c" "INSTALL_SCRIPT=/usr/bin/install -c" "LDFLAGS=" "LIBCFLAGS=-O2 -g -O2 " "LIBCFLAGS_FOR_TARGET=-O2 -g -O2 " "MAKE=make" "MAKEINFO=makeinfo --split-size=5000000 --split-size=5000000  " "PICFLAG=" "PICFLAG_FOR_TARGET=" "SHELL=/bin/sh" "RUNTESTFLAGS=" "exec_prefix=/opt/mingw32ce" "infodir=/opt/mingw32ce/info" "libdir=/opt/mingw32ce/lib" "includedir=/opt/mingw32ce/include" "prefix=/opt/mingw32ce" "tooldir=/opt/mingw32ce/arm-mingw32ce" "gdc_include_dir=/opt/mingw32ce/include/d2/4.1.0" "AR=arm-mingw32ce-ar" "AS=/d/Professionnel/Projets/cegcc/src/build-mingw32ce/gcc/./gcc/as" "LD=/d/Professionnel/Projets/cegcc/src/build-mingw32ce/gcc/./gcc/collect-ld" "RANLIB=arm-mingw32ce-ranlib" "NM=/d/Professionnel/Projets/cegcc/src/build-mingw32ce/gcc/./gcc/nm" "NM_FOR_BUILD=" "NM_FOR_TARGET=arm-mingw32ce-nm" "DESTDIR=" "WERROR=" DO=all multi-do # make
/d/Professionnel/Projets/cegcc/src/build-mingw32ce/gcc/./gcc/gdc -B/d/Professionnel/Projets/cegcc/src/build-mingw32ce/gcc/./gcc/ -B/opt/mingw32ce/arm-mingw32ce/bin/ -B/opt/mingw32ce/arm-mingw32ce/lib/ -isystem /opt/mingw32ce/arm-mingw32ce/include -isystem /opt/mingw32ce/arm-mingw32ce/sys-include -o std/boxer.o -g -frelease -O2  -nostdinc -pipe   \
	-I /d/Professionnel/Projets/cegcc/src/gcc/libphobos -I /d/Professionnel/Projets/cegcc/src/gcc/libphobos/internal/gc -I ./arm-mingw32ce -c /d/Professionnel/Projets/cegcc/src/gcc/libphobos/std/boxer.d
/d/Professionnel/Projets/cegcc/src/gcc/libphobos/gcc/fpcls.d:19: module fpcls cannot read file 'gcc/config/fpcls.d'
make[3]: *** [std/boxer.o] Error 1
make[3]: Leaving directory `/d/Professionnel/Projets/cegcc/src/build-mingw32ce/gcc/arm-mingw32ce/libphobos'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/d/Professionnel/Projets/cegcc/src/build-mingw32ce/gcc/arm-mingw32ce/libphobos'
make[1]: *** [all-target-libphobos] Error 2
make[1]: Leaving directory `/d/Professionnel/Projets/cegcc/src/build-mingw32ce/gcc'
make: *** [all] Error 2


June 22, 2008
I have also tried to cross-compile cegcc and I get a configure error in libphobos :

checking for snprintf... no
configure: error: No variant of snprintf.
make[1]: *** [configure-target-libphobos] Erreur 1


I don't understand how libphobos check if there is snprintf because other gcc lib (binutils, intl, libiberty, ...) can find it.
June 22, 2008
errno.h and snprintf (or _snprintf) should be available -- I just downloaded the mingw32ce package and checked.  Can you delete Makefile, config.status, and config.cache in the phobos build directory, then try building again?  Please email me the resulting config.log

David
dvdfrdmn@users.sf.net

Vincent Richomme wrote:
> Hi,
> 
> when  trying to cross-compile gdc for wince platform I get an error due to errno.h (errno.h is not available on mingw32ce).
>  From what I see a test is done via a d\phobos2\config\errno.x3.
> 
> Could it be possible to check if platform has errno.h before to start a test.
> 
> 
> 
> 
> 
> 
> 
> ake[3]: Entering directory `/d/Professionnel/Projets/cegcc/src/build-mingw32ce/gcc/arm-mingw32ce/libphobos' 
> 
> true "AR_FLAGS=rc" "CC_FOR_BUILD=gcc" "CC_FOR_TARGET=/d/Professionnel/Projets/cegcc/src/build-mingw32ce/gcc/./gcc/xgcc -B/d/Professionnel/Projets/cegcc/src/build-mingw32ce/gcc/./gcc/ -B/opt/mingw32ce/arm-mingw32ce/bin/ -B/opt/mingw32ce/arm-mingw32ce/lib/ -isystem /opt/mingw32ce/arm-mingw32ce/include -isystem /opt/mingw32ce/arm-mingw32ce/sys-include" "CFLAGS=-O2 -g -O2 " "CXXFLAGS=-g -O2 " "CFLAGS_FOR_BUILD=-g -O2" "CFLAGS_FOR_TARGET=-O2 -g -O2 " "INSTALL=/usr/bin/install -c" "INSTALL_DATA=/usr/bin/install -c -m 644" "INSTALL_PROGRAM=/usr/bin/install -c" "INSTALL_SCRIPT=/usr/bin/install -c" "LDFLAGS=" "LIBCFLAGS=-O2 -g -O2 " "LIBCFLAGS_FOR_TARGET=-O2 -g -O2 " "MAKE=make" "MAKEINFO=makeinfo --split-size=5000000 --split-size=5000000  " "PICFLAG=" "PICFLAG_FOR_TARGET=" "SHELL=/bin/sh" "RUNTESTFLAGS=" "exec_prefix=/opt/mingw32ce" "infodir=/opt/mingw32ce/info" "libdir=/opt/mingw32ce/lib" "includedir=/opt/mingw32ce/include" "prefix=/opt/mingw32ce" "tooldir=/opt/mingw32ce/arm-mingw32ce" "gdc_include_dir=/opt/mingw32ce/include/d2/4.1.0" "AR=arm-mingw32ce-ar" "AS=/d/Professionnel/Projets/cegcc/src/build-mingw32ce/gcc/./gcc/as" "LD=/d/Professionnel/Projets/cegcc/src/build-mingw32ce/gcc/./gcc/collect-ld" "RANLIB=arm-mingw32ce-ranlib" "NM=/d/Professionnel/Projets/cegcc/src/build-mingw32ce/gcc/./gcc/nm" "NM_FOR_BUILD=" "NM_FOR_TARGET=arm-mingw32ce-nm" "DESTDIR=" "WERROR=" DO=all multi-do # make
> CC_FOR_BUILD="gcc -I /d/Professionnel/Projets/cegcc/src/gcc/libphobos/config" BUILD_LIBIBERTY=../../build-i686-pc-cygwin/libiberty/libiberty.a /d/Professionnel/Projets/cegcc/src/gcc/libphobos/config/x3 /d/Professionnel/Projets/cegcc/src/gcc/libphobos/config/errno.x3 -o arm-mingw32ce/gcc/config/errno.d /d/Professionnel/Projets/cegcc/src/build-mingw32ce/gcc/./gcc/xgcc -B/d/Professionnel/Projets/cegcc/src/build-mingw32ce/gcc/./gcc/ -B/opt/mingw32ce/arm-mingw32ce/bin/ -B/opt/mingw32ce/arm-mingw32ce/lib/ -isystem /opt/mingw32ce/arm-mingw32ce/include -isystem /opt/mingw32ce/arm-mingw32ce/sys-include -DHAVE_CONFIG_H -I . -I /d/Professionnel/Projets/cegcc/src/gcc/libphobos/gcc
> ** x3: running ./errno.x3.exe -o arm-mingw32ce/gcc/config/errno.d /d/Professionnel/Projets/cegcc/src/build-mingw32ce/gcc/./gcc/xgcc -B/d/Professionnel/Projets/cegcc/src/build-mingw32ce/gcc/./gcc/ -B/opt/mingw32ce/arm-mingw32ce/bin/ -B/opt/mingw32ce/arm-mingw32ce/lib/ -isystem /opt/mingw32ce/arm-mingw32ce/include -isystem /opt/mingw32ce/arm-mingw32ce/sys-include -DHAVE_CONFIG_H -I . -I /d/Professionnel/Projets/cegcc/src/gcc/libphobos/gcc
> x3: failed to get macros.
> make[3]: *** [arm-mingw32ce/gcc/config/errno.d] Error 1
> make[3]: Leaving directory `/d/Professionnel/Projets/cegcc/src/build-mingw32ce/gcc/arm-mingw32ce/libphobos' 
> 
> make[2]: *** [all] Error 2
> make[2]: Leaving directory `/d/Professionnel/Projets/cegcc/src/build-mingw32ce/gcc/arm-mingw32ce/libphobos' 
> 
> make[1]: *** [all-target-libphobos] Error 2
> make[1]: Leaving directory `/d/Professionnel/Projets/cegcc/src/build-mingw32ce/gcc'
> make: *** [all] Error 2
June 22, 2008
This one is a bug in the Makefile.

Vincent Richomme wrote:
> For now I have commented everything in d\phobos2\config\errno.x3 and I am getting an other error about not finding gcc/config/fpcls.d:
> 
> make[3]: Entering directory `/d/Professionnel/Projets/cegcc/src/build-mingw32ce/gcc/arm-mingw32ce/libphobos' 
> 
> true "AR_FLAGS=rc" "CC_FOR_BUILD=gcc" "CC_FOR_TARGET=/d/Professionnel/Projets/cegcc/src/build-mingw32ce/gcc/./gcc/xgcc -B/d/Professionnel/Projets/cegcc/src/build-mingw32ce/gcc/./gcc/ -B/opt/mingw32ce/arm-mingw32ce/bin/ -B/opt/mingw32ce/arm-mingw32ce/lib/ -isystem /opt/mingw32ce/arm-mingw32ce/include -isystem /opt/mingw32ce/arm-mingw32ce/sys-include" "CFLAGS=-O2 -g -O2 " "CXXFLAGS=-g -O2 " "CFLAGS_FOR_BUILD=-g -O2" "CFLAGS_FOR_TARGET=-O2 -g -O2 " "INSTALL=/usr/bin/install -c" "INSTALL_DATA=/usr/bin/install -c -m 644" "INSTALL_PROGRAM=/usr/bin/install -c" "INSTALL_SCRIPT=/usr/bin/install -c" "LDFLAGS=" "LIBCFLAGS=-O2 -g -O2 " "LIBCFLAGS_FOR_TARGET=-O2 -g -O2 " "MAKE=make" "MAKEINFO=makeinfo --split-size=5000000 --split-size=5000000  " "PICFLAG=" "PICFLAG_FOR_TARGET=" "SHELL=/bin/sh" "RUNTESTFLAGS=" "exec_prefix=/opt/mingw32ce" "infodir=/opt/mingw32ce/info" "libdir=/opt/mingw32ce/lib" "includedir=/opt/mingw32ce/include" "prefix=/opt/mingw32ce" "tooldir=/opt/mingw32ce/arm-mingw32ce" "gdc_include_dir=/opt/mingw32ce/include/d2/4.1.0" "AR=arm-mingw32ce-ar" "AS=/d/Professionnel/Projets/cegcc/src/build-mingw32ce/gcc/./gcc/as" "LD=/d/Professionnel/Projets/cegcc/src/build-mingw32ce/gcc/./gcc/collect-ld" "RANLIB=arm-mingw32ce-ranlib" "NM=/d/Professionnel/Projets/cegcc/src/build-mingw32ce/gcc/./gcc/nm" "NM_FOR_BUILD=" "NM_FOR_TARGET=arm-mingw32ce-nm" "DESTDIR=" "WERROR=" DO=all multi-do # make
> /d/Professionnel/Projets/cegcc/src/build-mingw32ce/gcc/./gcc/gdc -B/d/Professionnel/Projets/cegcc/src/build-mingw32ce/gcc/./gcc/ -B/opt/mingw32ce/arm-mingw32ce/bin/ -B/opt/mingw32ce/arm-mingw32ce/lib/ -isystem /opt/mingw32ce/arm-mingw32ce/include -isystem /opt/mingw32ce/arm-mingw32ce/sys-include -o std/boxer.o -g -frelease -O2  -nostdinc -pipe   \
>     -I /d/Professionnel/Projets/cegcc/src/gcc/libphobos -I /d/Professionnel/Projets/cegcc/src/gcc/libphobos/internal/gc -I ./arm-mingw32ce -c /d/Professionnel/Projets/cegcc/src/gcc/libphobos/std/boxer.d
> /d/Professionnel/Projets/cegcc/src/gcc/libphobos/gcc/fpcls.d:19: module fpcls cannot read file 'gcc/config/fpcls.d'
> make[3]: *** [std/boxer.o] Error 1
> make[3]: Leaving directory `/d/Professionnel/Projets/cegcc/src/build-mingw32ce/gcc/arm-mingw32ce/libphobos' 
> 
> make[2]: *** [all] Error 2
> make[2]: Leaving directory `/d/Professionnel/Projets/cegcc/src/build-mingw32ce/gcc/arm-mingw32ce/libphobos' 
> 
> make[1]: *** [all-target-libphobos] Error 2
> make[1]: Leaving directory `/d/Professionnel/Projets/cegcc/src/build-mingw32ce/gcc'
> make: *** [all] Error 2
> 
>