[haiku-bugs] Re: [Haiku] #11144: ARM bootstrap is broken (again)

  • From: "pulkomandy" <trac@xxxxxxxxxxxx>
  • Date: Fri, 22 Aug 2014 19:35:21 -0000

#11144: ARM bootstrap is broken (again)
----------------------------+----------------------------
   Reporter:  pulkomandy    |      Owner:  zooey
       Type:  bug           |     Status:  new
   Priority:  normal        |  Milestone:  Unscheduled
  Component:  Build System  |    Version:  R1/Development
 Resolution:                |   Keywords:
 Blocked By:                |   Blocking:
Has a Patch:  1             |   Platform:  arm
----------------------------+----------------------------

Comment (by pulkomandy):

 Ok, so here is the next step.

 {{{
 C++
 
/home/pulkomandy/haiku/generated.arm/objects/haiku/arm/debug_1/system/boot/loader/stdio.o
 C++
 
/home/pulkomandy/haiku/generated.arm/objects/haiku/arm/debug_1/system/boot/loader/vfs.o
 In file included from
 
/home/pulkomandy/haiku/generated.arm/build_packages/gcc_bootstrap_syslibs_devel-4.8.3_2014_08_03-1-arm/develop/headers/c++/random:39:0,
                  from
 
/home/pulkomandy/haiku/generated.arm/build_packages/gcc_bootstrap_syslibs_devel-4.8.3_2014_08_03-1-arm/develop/headers/c++/bits/stl_algo.h:65,
                  from
 
/home/pulkomandy/haiku/generated.arm/build_packages/gcc_bootstrap_syslibs_devel-4.8.3_2014_08_03-1-arm/develop/headers/c++/algorithm:62,
                  from
 /home/pulkomandy/haiku/haiku/src/system/boot/loader/stdio.cpp:14:
 
/home/pulkomandy/haiku/generated.arm/build_packages/gcc_bootstrap_syslibs_devel-4.8.3_2014_08_03-1-arm/develop/headers/c++/cstdio:97:11:
 error: '::fpos_t' has not been declared
    using ::fpos_t;
            ^
 
/home/pulkomandy/haiku/generated.arm/build_packages/gcc_bootstrap_syslibs_devel-4.8.3_2014_08_03-1-arm/develop/headers/c++/cstdio:99:11:
 error: '::clearerr' has not been declared
    using ::clearerr;
            ^
 
/home/pulkomandy/haiku/generated.arm/build_packages/gcc_bootstrap_syslibs_devel-4.8.3_2014_08_03-1-arm/develop/headers/c++/cstdio:100:11:
 error: '::fclose' has not been declared
    using ::fclose;
            ^
 
/home/pulkomandy/haiku/generated.arm/build_packages/gcc_bootstrap_syslibs_devel-4.8.3_2014_08_03-1-arm/develop/headers/c++/cstdio:101:11:
 error: '::feof' has not been declared
    using ::feof;
            ^
 
/home/pulkomandy/haiku/generated.arm/build_packages/gcc_bootstrap_syslibs_devel-4.8.3_2014_08_03-1-arm/develop/headers/c++/cstdio:102:11:
 error: '::ferror' has not been declared
    using ::ferror;
            ^
 
/home/pulkomandy/haiku/generated.arm/build_packages/gcc_bootstrap_syslibs_devel-4.8.3_2014_08_03-1-arm/develop/headers/c++/cstdio:103:11:
 error: '::fflush' has not been declared
    using ::fflush;
            ^
 
/home/pulkomandy/haiku/generated.arm/build_packages/gcc_bootstrap_syslibs_devel-4.8.3_2014_08_03-1-arm/develop/headers/c++/cstdio:105:11:
 error: '::fgetpos' has not been declared
    using ::fgetpos;
            ^
 
/home/pulkomandy/haiku/generated.arm/build_packages/gcc_bootstrap_syslibs_devel-4.8.3_2014_08_03-1-arm/develop/headers/c++/cstdio:107:11:
 error: '::fopen' has not been declared
    using ::fopen;
            ^
 
/home/pulkomandy/haiku/generated.arm/build_packages/gcc_bootstrap_syslibs_devel-4.8.3_2014_08_03-1-arm/develop/headers/c++/cstdio:111:11:
 error: '::fread' has not been declared
    using ::fread;
            ^
 
/home/pulkomandy/haiku/generated.arm/build_packages/gcc_bootstrap_syslibs_devel-4.8.3_2014_08_03-1-arm/develop/headers/c++/cstdio:112:11:
 error: '::freopen' has not been declared
    using ::freopen;
            ^
 
/home/pulkomandy/haiku/generated.arm/build_packages/gcc_bootstrap_syslibs_devel-4.8.3_2014_08_03-1-arm/develop/headers/c++/cstdio:113:11:
 error: '::fscanf' has not been declared
    using ::fscanf;
            ^
 
/home/pulkomandy/haiku/generated.arm/build_packages/gcc_bootstrap_syslibs_devel-4.8.3_2014_08_03-1-arm/develop/headers/c++/cstdio:114:11:
 error: '::fseek' has not been declared
    using ::fseek;
            ^
 
/home/pulkomandy/haiku/generated.arm/build_packages/gcc_bootstrap_syslibs_devel-4.8.3_2014_08_03-1-arm/develop/headers/c++/cstdio:115:11:
 error: '::fsetpos' has not been declared
    using ::fsetpos;
            ^
 
/home/pulkomandy/haiku/generated.arm/build_packages/gcc_bootstrap_syslibs_devel-4.8.3_2014_08_03-1-arm/develop/headers/c++/cstdio:116:11:
 error: '::ftell' has not been declared
    using ::ftell;
            ^
 
/home/pulkomandy/haiku/generated.arm/build_packages/gcc_bootstrap_syslibs_devel-4.8.3_2014_08_03-1-arm/develop/headers/c++/cstdio:117:11:
 error: '::fwrite' has not been declared
    using ::fwrite;
            ^
 
/home/pulkomandy/haiku/generated.arm/build_packages/gcc_bootstrap_syslibs_devel-4.8.3_2014_08_03-1-arm/develop/headers/c++/cstdio:121:11:
 error: '::perror' has not been declared
    using ::perror;
            ^
 
/home/pulkomandy/haiku/generated.arm/build_packages/gcc_bootstrap_syslibs_devel-4.8.3_2014_08_03-1-arm/develop/headers/c++/cstdio:127:11:
 error: '::rename' has not been declared
    using ::rename;
            ^
 
/home/pulkomandy/haiku/generated.arm/build_packages/gcc_bootstrap_syslibs_devel-4.8.3_2014_08_03-1-arm/develop/headers/c++/cstdio:128:11:
 error: '::rewind' has not been declared
    using ::rewind;
            ^
 
/home/pulkomandy/haiku/generated.arm/build_packages/gcc_bootstrap_syslibs_devel-4.8.3_2014_08_03-1-arm/develop/headers/c++/cstdio:129:11:
 error: '::scanf' has not been declared
    using ::scanf;
            ^
 
/home/pulkomandy/haiku/generated.arm/build_packages/gcc_bootstrap_syslibs_devel-4.8.3_2014_08_03-1-arm/develop/headers/c++/cstdio:130:11:
 error: '::setbuf' has not been declared
    using ::setbuf;
            ^
 
/home/pulkomandy/haiku/generated.arm/build_packages/gcc_bootstrap_syslibs_devel-4.8.3_2014_08_03-1-arm/develop/headers/c++/cstdio:131:11:
 error: '::setvbuf' has not been declared
    using ::setvbuf;
            ^
 
/home/pulkomandy/haiku/generated.arm/build_packages/gcc_bootstrap_syslibs_devel-4.8.3_2014_08_03-1-arm/develop/headers/c++/cstdio:133:11:
 error: '::sscanf' has not been declared
    using ::sscanf;
            ^
 
/home/pulkomandy/haiku/generated.arm/build_packages/gcc_bootstrap_syslibs_devel-4.8.3_2014_08_03-1-arm/develop/headers/c++/cstdio:134:11:
 error: '::tmpfile' has not been declared
    using ::tmpfile;
            ^
 
/home/pulkomandy/haiku/generated.arm/build_packages/gcc_bootstrap_syslibs_devel-4.8.3_2014_08_03-1-arm/develop/headers/c++/cstdio:135:11:
 error: '::tmpnam' has not been declared
    using ::tmpnam;
            ^
 
/home/pulkomandy/haiku/generated.arm/build_packages/gcc_bootstrap_syslibs_devel-4.8.3_2014_08_03-1-arm/develop/headers/c++/cstdio:136:11:
 error: '::ungetc' has not been declared
    using ::ungetc;
            ^
 C++
 
/home/pulkomandy/haiku/generated.arm/objects/haiku/arm/debug_1/system/boot/loader/vm.o
 C++
 
/home/pulkomandy/haiku/generated.arm/objects/haiku/arm/debug_1/system/boot/loader/driver_settings.o

 /home/pulkomandy/haiku/generated.arm-nb/cross-tools-arm/bin/arm-unknown-
 haiku-gcc -c
 "/home/pulkomandy/haiku/haiku/src/system/boot/loader/stdio.cpp" -O0 -Wall
 -Wno-trigraphs -Wno-multichar -std=c++11 -pipe -fno-strict-aliasing -fno-
 tree-vrp -Wno-array-bounds -mapcs-frame -nostdinc -Wno-deprecated
 -mcpu=cortex-a8 -mfpu=vfpv3 -mfloat-abi=hard
 -DHAIKU_BOARD_LOADER_STACK_BASE=0x81a00000
 -DHAIKU_BOARD_LOADER_UIBASE=0x82800000 -ggdb -DDEBUG=1 -fno-rtti -include
 /home/pulkomandy/haiku/haiku/headers/private/kernel/util/kernel_cpp.h
 -std=c++11 -pipe -fno-strict-aliasing -fno-tree-vrp -Wno-array-bounds
 -mapcs-frame -nostdinc -Wno-deprecated -mcpu=cortex-a8 -mfpu=vfpv3
 -mfloat-abi=hard -DHAIKU_BOARD_LOADER_STACK_BASE=0x81a00000
 -DHAIKU_BOARD_LOADER_UIBASE=0x82800000 -pipe -fno-strict-aliasing -fno-
 tree-vrp -Wno-array-bounds -mapcs-frame -finline -fno-builtin
 -ffreestanding -fno-exceptions -fno-use-cxa-atexit -fno-pic -D_BOOT_MODE
 -DBOOT_ARCH=\"arm\" -DKMESSAGE_CONTAINER_ONLY
 -DBOOT_SUPPORT_PARTITION_INTEL -DBOOT_SUPPORT_FILE_SYSTEM_BFS
 -DBOOT_SUPPORT_FILE_SYSTEM_TARFS -DBOOT_SUPPORT_FILE_SYSTEM_FAT
 -D_KERNEL_MODE -DARCH_arm -DBOOT_ARCHIVE_IMAGE_OFFSET=192
 -D__HAIKU_PRIMARY_PACKAGING_ARCH=\"arm\"
 -DHAIKU_DISTRO_COMPATIBILITY_DEFAULT -DHAIKU_INCLUDE_PATENTED_CODE=1
 -DHAIKU_TARGET_PLATFORM_HAIKU -DHAIKU_BOOTSTRAP_BUILD -iquote
 /home/pulkomandy/haiku/haiku/build/user_config_headers -iquote
 /home/pulkomandy/haiku/haiku/build/config_headers -iquote
 /home/pulkomandy/haiku/haiku/src/system/boot/loader -iquote
 /home/pulkomandy/haiku/generated.arm/objects/common/system/boot/loader
 -iquote
 
/home/pulkomandy/haiku/generated.arm/objects/linux/x86_64/common/system/boot/loader
 -iquote
 
/home/pulkomandy/haiku/generated.arm/objects/haiku/arm/common/system/boot/loader
 -iquote /home/pulkomandy/haiku/haiku/src/add-
 ons/kernel/partitioning_systems/amiga -iquote
 /home/pulkomandy/haiku/haiku/src/add-ons/kernel/partitioning_systems/apple
 -iquote /home/pulkomandy/haiku/haiku/src/add-
 ons/kernel/partitioning_systems/gpt -iquote
 /home/pulkomandy/haiku/haiku/src/add-ons/kernel/partitioning_systems/intel
 -I /home/pulkomandy/haiku/haiku/headers/private/. -I
 /home/pulkomandy/haiku/haiku/headers/private/kernel -I
 /home/pulkomandy/haiku/haiku/headers/private/libroot -I
 /home/pulkomandy/haiku/haiku/headers/private/shared -I
 /home/pulkomandy/haiku/haiku/headers/private/kernel/boot/platform/u-boot
 -I /home/pulkomandy/haiku/haiku/headers/private/kernel/arch/arm -I
 /home/pulkomandy/haiku/generated.arm/objects/haiku/arm/common/system/kernel
 -I /home/pulkomandy/haiku/haiku/headers/private/. -I
 /home/pulkomandy/haiku/haiku/headers/private/system -I
 /home/pulkomandy/haiku/haiku/headers/private/system/arch/arm -I
 /home/pulkomandy/haiku/haiku/headers/private/kernel/disk_device_manager -I
 /home/pulkomandy/haiku/haiku/headers/private/kernel/util -I
 /home/pulkomandy/haiku/haiku/headers/private/shared -I
 /home/pulkomandy/haiku/haiku/headers/private/storage -I
 
/home/pulkomandy/haiku/generated.arm/build_packages/gcc_bootstrap_syslibs_devel-4.8.3_2014_08_03-1-arm/develop/headers/c++
 -I
 
/home/pulkomandy/haiku/generated.arm/build_packages/gcc_bootstrap_syslibs_devel-4.8.3_2014_08_03-1-arm/develop/headers/c
 ++/arm-unknown-haiku -I
 
/home/pulkomandy/haiku/generated.arm/build_packages/gcc_bootstrap_syslibs_devel-4.8.3_2014_08_03-1-arm/develop/headers/c++/backward
 -I
 
/home/pulkomandy/haiku/generated.arm/build_packages/gcc_bootstrap_syslibs_devel-4.8.3_2014_08_03-1-arm/develop/headers/c++/ext
 -I
 
/home/pulkomandy/haiku/generated.arm/build_packages/gcc_bootstrap_syslibs_devel-4.8.3_2014_08_03-1-arm/develop/headers/gcc/include
 -I
 
/home/pulkomandy/haiku/generated.arm/build_packages/gcc_bootstrap_syslibs_devel-4.8.3_2014_08_03-1-arm/develop/headers/gcc
 /include-fixed -I /home/pulkomandy/haiku/haiku/headers -I
 /home/pulkomandy/haiku/haiku/headers/posix -I
 /home/pulkomandy/haiku/haiku/headers/glibc -I
 /home/pulkomandy/haiku/haiku/headers/os -I
 /home/pulkomandy/haiku/haiku/headers/os/add-ons -I
 /home/pulkomandy/haiku/haiku/headers/os/add-ons/file_system -I
 /home/pulkomandy/haiku/haiku/headers/os/add-ons/graphics -I
 /home/pulkomandy/haiku/haiku/headers/os/add-ons/input_server -I
 /home/pulkomandy/haiku/haiku/headers/os/add-ons/registrar -I
 /home/pulkomandy/haiku/haiku/headers/os/add-ons/screen_saver -I
 /home/pulkomandy/haiku/haiku/headers/os/add-ons/tracker -I
 /home/pulkomandy/haiku/haiku/headers/os/app -I
 /home/pulkomandy/haiku/haiku/headers/os/device -I
 /home/pulkomandy/haiku/haiku/headers/os/drivers -I
 /home/pulkomandy/haiku/haiku/headers/os/game -I
 /home/pulkomandy/haiku/haiku/headers/os/interface -I
 /home/pulkomandy/haiku/haiku/headers/os/kernel -I
 /home/pulkomandy/haiku/haiku/headers/os/locale -I
 /home/pulkomandy/haiku/haiku/headers/os/media -I
 /home/pulkomandy/haiku/haiku/headers/os/mail -I
 /home/pulkomandy/haiku/haiku/headers/os/midi -I
 /home/pulkomandy/haiku/haiku/headers/os/midi2 -I
 /home/pulkomandy/haiku/haiku/headers/os/net -I
 /home/pulkomandy/haiku/haiku/headers/os/storage -I
 /home/pulkomandy/haiku/haiku/headers/os/support -I
 /home/pulkomandy/haiku/haiku/headers/os/translation -I
 /home/pulkomandy/haiku/haiku/headers/private/. -o
 
"/home/pulkomandy/haiku/generated.arm/objects/haiku/arm/debug_1/system/boot/loader/stdio.o"
 ;

 ...failed C++
 
/home/pulkomandy/haiku/generated.arm/objects/haiku/arm/debug_1/system/boot/loader/stdio.o
 ...
 }}}

 cstdio fails to include the stdio.h that defines the expected functions.
 The following stdio.h files are found in the generated tree:

 {{{
 pulkomandy@Akina:~/haiku/generated.arm $ find . -name stdio.h
 
./build_packages/gcc_bootstrap_syslibs_devel-4.8.3_2014_08_03-1-arm/develop/headers/gcc/include/ssp/stdio.h
 
./build_packages/gcc_bootstrap_syslibs_devel-4.8.3_2014_08_03-1-arm/develop/headers/c++/tr1/stdio.h
 ./objects/haiku/arm/packaging/packages_build/bootstrap/hpkg_-
 haiku_cross_devel_sysroot_stage0_arm.hpkg/contents/develop/headers/bsd/stdio.h
 ./objects/haiku/arm/packaging/packages_build/bootstrap/hpkg_-
 
haiku_cross_devel_sysroot_stage0_arm.hpkg/contents/develop/headers/posix/stdio.h
 ./objects/haiku/arm/packaging/repositories/HaikuPortsCross-build/sys-
 
devel/gcc_bootstrap/work-4.8.3_2014_08_03/sources/gcc_bootstrap-4.8.3_2014_08_03-obj
 /arm-unknown-haiku/libstdc++-v3/include/tr1/stdio.h
 ./objects/haiku/arm/packaging/repositories/HaikuPortsCross-build/sys-
 devel/gcc_bootstrap/work-4.8.3_2014_08_03/sources/buildtools-
 
4947d64591fdd9764dad9ff6835ffbef1618e17f/libstdc++-v3/include/c_compatibility/stdio.h
 ./objects/haiku/arm/packaging/repositories/HaikuPortsCross-build/sys-
 devel/gcc_bootstrap/work-4.8.3_2014_08_03/sources/buildtools-
 4947d64591fdd9764dad9ff6835ffbef1618e17f/libstdc++-v3/include/tr1/stdio.h
 ./objects/haiku/arm/packaging/repositories/HaikuPortsCross-build/sys-
 devel/gcc_bootstrap/work-4.8.3_2014_08_03/sources/buildtools-
 4947d64591fdd9764dad9ff6835ffbef1618e17f/fixincludes/tests/base/rtldef/stdio.h
 ./objects/haiku/arm/packaging/repositories/HaikuPortsCross-build/sys-
 devel/gcc_bootstrap/work-4.8.3_2014_08_03/sources/buildtools-
 4947d64591fdd9764dad9ff6835ffbef1618e17f/fixincludes/tests/base/stdio.h
 ./objects/haiku/arm/packaging/repositories/HaikuPortsCross-build/sys-
 devel/gcc_bootstrap/work-4.8.3_2014_08_03/sources/buildtools-
 4947d64591fdd9764dad9ff6835ffbef1618e17f/libssp/ssp/stdio.h
 ./objects/haiku/arm/packaging/repositories/HaikuPortsCross-build/sys-
 devel/gcc_bootstrap/work-4.8.3_2014_08_03/sources/buildtools-
 
4947d64591fdd9764dad9ff6835ffbef1618e17f/gcc/testsuite/gcc.dg/cpp/usr/include/stdio.h
 }}}

  * The ssp one does a #include_next, then #undef and #define some of the
 functions. That looks ok.
  * The tr1 one only #includes cstdio. We may have a problem here if cstdio
 ends up including it.
  * The c_compatibility one #includes cstdio and adds some "using" clauses
 so the C++ functions are visible in the default namespace.
  * The two fixincludes one are empty or entirely #ifdefed out.

 None of those seem to be in the command line -I sections.

 I notice the following one is not included, but it seems to be the same on
 other platforms (this seems to be included directly from
 platform/generic/text_console.h):
 {{{
 headers/private/kernel/boot/stdio.h
 }}}

--
Ticket URL: <https://dev.haiku-os.org/ticket/11144#comment:8>
Haiku <https://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: