[haiku-development] Building Haiku and tools: configure script bugs

  • From: "Thomas Mueller" <mueller6723@xxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Sat, 26 Jul 2014 05:59:37 +0000

I first had the problem that, when I typed "./configure --help", it wouldn't 
help: "gcc: not found"

Now I get, from FreeBSD in an xterm

[arlene1164@amelia2 ~/haiku/haiku/generated.473-nodl]$ ../configure 
HAIKU_CC_x86_gcc2=gcc47 --build-crosstools x86_gcc2 ../../buildtools 
--build-crosstools x86 --use-xattr-ref --include-gpl-addons --include 3rdparty
../configure: gcc: not found

Command line is

../configure HAIKU_CC_x86_gcc2=gcc47 --build-crosstools x86_gcc2 
../../buildtools --build-crosstools x86 --use-xattr-ref --include-gpl-addons 
--include 3rdparty

I thought it would be sufficient to tell configure where the gcc was.  What if 
I use clang and there is no gcc?

Does HAIKU_CC_x86_gcc2 have no meaning?  I can't set it to 
/usr/local/bin/gcc47?  I tried

export HAIKU_CC_x86_gcc2=/usr/local/bin/gcc47

I saw no further references to HAIKU_CC_x86_gcc2 in the "configure" file, so 
maybe everything I did was just an exercise in futility.

Then I tried prefixing the command with env 
HAIKU_CC_x86_gcc2=/usr/local/bin/gcc47 

still no good, I again got

../configure: gcc: not found

I've built open-source software packages before; usually there was a variable 
CC that would be gcc most of the time but could be something else like icc, 
bcc, etc.

I finally got configure to run by cd to 
/home/arlene1164/haiku/haiku/generated.473-nodl and
ln -s /usr/local/bin/gcc47 gcc

I was expecting only a configure, not a compile, so didn't add anything like 
"2>&1 | tee build.log", but it tried to compile, but unsuccessfully, ending with

libtool: compile:  gcc -DTIME_WITH_SYS_TIME=1 -DHAVE_INTTYPES_H=1 
-DHAVE_STDINT_H=1 -DHAVE_LOCALE_H=1 -DHAVE_WCHAR_H=1 -DHAVE_STDARG=1 
-DHAVE_SYS_TIME_H=1 -DHAVE_STDINT_H=1 -DHAVE_VA_COPY=1 -DHAVE_SETLOCALE=1 
-DHAVE_GETTIMEOFDAY=1 -DHAVE_LONG_LONG=1 -DHAVE_INTMAX_T=1 
-DMPFR_HAVE_INTMAX_MAX=1 -DMPFR_HAVE_FESETROUND=1 -DHAVE_DENORMS=1 
-DHAVE_ROUND=1 -DHAVE_TRUNC=1 -DHAVE_FLOOR=1 -DHAVE_CEIL=1 -DHAVE_NEARBYINT=1 
-DHAVE_LDOUBLE_IEEE_EXT_LITTLE=1 -DMPFR_USE_THREAD_SAFE=1 
-DHAVE_CLOCK_GETTIME=1 -DLT_OBJDIR=\".libs/\" -DHAVE_ATTRIBUTE_MODE=1 
-DHAVE___GMPN_ROOTREM=1 -DHAVE___GMPN_SBPI1_DIVAPPR_Q=1 -I. 
-I/home/arlene1164/haiku/buildtools/gcc/mpfr/src 
-I/home/arlene1164/haiku/haiku/generated.473-nodl/cross-tools-x86-build/gcc/./gmp
 -O2 -MT vasprintf.lo -MD -MP -MF .deps/vasprintf.Tpo -c 
/home/arlene1164/haiku/buildtools/gcc/mpfr/src/vasprintf.c -o vasprintf.o
In file included from 
/home/arlene1164/haiku/buildtools/gcc/mpfr/src/vasprintf.c:45:0:
/usr/local/lib/gcc47/gcc/x86_64-portbld-freebsd11.0/4.7.3/include-fixed/wchar.h:90:1:
 error: unknown type name '__wchar_t'
gmake[4]: *** [vasprintf.lo] Error 1
gmake[4]: Leaving directory 
`/home/arlene1164/haiku/haiku/generated.473-nodl/cross-tools-x86-build/gcc/mpfr/src'
gmake[3]: *** [all] Error 2
gmake[3]: Leaving directory 
`/home/arlene1164/haiku/haiku/generated.473-nodl/cross-tools-x86-build/gcc/mpfr/src'
Making all in tests
gmake[3]: Entering directory 
`/home/arlene1164/haiku/haiku/generated.473-nodl/cross-tools-x86-build/gcc/mpfr/tests'
gmake[3]: Nothing to be done for `all'.
gmake[3]: Leaving directory 
`/home/arlene1164/haiku/haiku/generated.473-nodl/cross-tools-x86-build/gcc/mpfr/tests'
Making all in tune
gmake[3]: Entering directory 
`/home/arlene1164/haiku/haiku/generated.473-nodl/cross-tools-x86-build/gcc/mpfr/tune'
gmake[3]: Nothing to be done for `all'.
gmake[3]: Leaving directory 
`/home/arlene1164/haiku/haiku/generated.473-nodl/cross-tools-x86-build/gcc/mpfr/tune'
gmake[3]: Entering directory 
`/home/arlene1164/haiku/haiku/generated.473-nodl/cross-tools-x86-build/gcc/mpfr'
gmake[3]: Nothing to be done for `all-am'.
gmake[3]: Leaving directory 
`/home/arlene1164/haiku/haiku/generated.473-nodl/cross-tools-x86-build/gcc/mpfr'
gmake[2]: *** [all-recursive] Error 1
gmake[2]: Leaving directory 
`/home/arlene1164/haiku/haiku/generated.473-nodl/cross-tools-x86-build/gcc/mpfr'
gmake[1]: *** [all-mpfr] Error 2
gmake[1]: Leaving directory 
`/home/arlene1164/haiku/haiku/generated.473-nodl/cross-tools-x86-build/gcc'
gmake: *** [all] Error 2
ERROR: Building gcc failed.


I guess I'm stuck now, try NetBSD with line added to configure

 NetBSD) HOST_PLATFORM=netbsd ;;

That would be my own experiment.

Has Haiku been built from OpenBSD but NetBSD failed, or is NetBSD just untested?

Tom


Other related posts: