#10241: ARM builds broken after PM ----------------------------+---------------------------- Reporter: kallisti5 | Owner: bonefish Type: bug | Status: new Priority: high | Milestone: Unscheduled Component: Build System | Version: R1/Development Resolution: | Keywords: arm bootstrap Blocked By: | Blocking: Has a Patch: 0 | Platform: arm ----------------------------+---------------------------- Old description: > Buildtools for arm work... > {{{ > ../configure -j8 --build-cross-tools arm ../../buildtools --bootstrap > /home/kallisti5/Code/haikuporter /home/kallisti5/Code/haikuports.cross > /home/kallisti5/Code/haikuports > }}} > > haiku loader fails: (it's Raspberry Pi in this example, but the error is > in arm common code) > {{{ > jam -q -sHAIKU_BOOT_BOARD=raspberry_pi > -sHAIKU_BOOT_PLATFORM=raspberrypi_arm haiku_loader > . > . > /home/kallisti5/Code/haiku/src/system/boot/platform/raspberrypi_arm/video.cpp:32:2: > warning: #warning IMPLEMENT platform_set_palette [-Wcpp] > /home/kallisti5/Code/haiku/src/system/boot/platform/raspberrypi_arm/video.cpp:39:2: > warning: #warning IMPLEMENT platform_switch_to_logo [-Wcpp] > /home/kallisti5/Code/haiku/src/system/boot/platform/raspberrypi_arm/video.cpp:46:2: > warning: #warning IMPLEMENT platform_switch_to_text_mode [-Wcpp] > C++ > /home/kallisti5/Code/haiku/generated.arm/objects/haiku/arm/release/system/boot/platform/raspberrypi_arm/arch_framebuffer_bcm2708.o > MkDir1 > /home/kallisti5/Code/haiku/generated.arm/objects/haiku/arm/release/system/boot/platform/generic > C++ > /home/kallisti5/Code/haiku/generated.arm/objects/haiku/arm/release/system/boot/platform/generic/text_menu.o > C++ > /home/kallisti5/Code/haiku/generated.arm/objects/haiku/arm/release/system/boot/platform/generic/video_blit.o > C++ > /home/kallisti5/Code/haiku/generated.arm/objects/haiku/arm/release/system/boot/platform/generic/video_splash.o > /home/kallisti5/Code/haiku/src/system/boot/platform/generic/video_splash.cpp:21:18: > fatal error: zlib.h: No such file or directory > compilation terminated. > > /home/kallisti5/Code/haiku/generated.arm/cross-tools-arm/bin/arm-unknown- > haiku-gcc -c > "/home/kallisti5/Code/haiku/src/system/boot/platform/generic/video_splash.cpp" > -O -Wall -Wno-trigraphs -Wno-multichar -fno-strict-aliasing -fno-tree-vrp > -Wno-array-bounds -mapcs-frame -nostdinc -Wno-deprecated > -mtune=arm1176jzf-s -D_BOOT_MODE -fno-rtti -fno-strict-aliasing -fno- > tree-vrp -Wno-array-bounds -mapcs-frame -nostdinc -Wno-deprecated > -mtune=arm1176jzf-s -fno-strict-aliasing -fno-tree-vrp -Wno-array-bounds > -mapcs-frame -finline -fno-builtin -ffreestanding -fno-exceptions -fno- > use-cxa-atexit -fno-pic -D_KERNEL_MODE -DARCH_arm > -DBOOT_ARCHIVE_IMAGE_OFFSET=192 -D__HAIKU_PRIMARY_PACKAGING_ARCH=\"arm\" > -DHAIKU_DISTRO_COMPATIBILITY_DEFAULT -DHAIKU_INCLUDE_PATENTED_CODE=0 > -DHAIKU_TARGET_PLATFORM_HAIKU -iquote > /home/kallisti5/Code/haiku/build/user_config_headers -iquote > /home/kallisti5/Code/haiku/build/config_headers -iquote > /home/kallisti5/Code/haiku/src/system/boot/platform/generic -iquote > /home/kallisti5/Code/haiku/generated.arm/objects/common/system/boot/platform/generic > -iquote > /home/kallisti5/Code/haiku/generated.arm/objects/linux/x86_64/common/system/boot/platform/generic > -iquote > /home/kallisti5/Code/haiku/generated.arm/objects/haiku/arm/common/system/boot/platform/generic > -I /home/kallisti5/Code/haiku/headers/private/. -I > /home/kallisti5/Code/haiku/headers/private/kernel -I > /home/kallisti5/Code/haiku/headers/private/libroot -I > /home/kallisti5/Code/haiku/headers/private/shared -I > /home/kallisti5/Code/haiku/headers/private/kernel/boot/platform/raspberrypi_arm > -I /home/kallisti5/Code/haiku/headers/private/kernel/arch/arm -I > /home/kallisti5/Code/haiku/generated.arm/objects/haiku/arm/common/system/kernel > -I /home/kallisti5/Code/haiku/headers/private/. -I > /home/kallisti5/Code/haiku/headers/private/system -I > /home/kallisti5/Code/haiku/headers/private/system/arch/arm -I > /home/kallisti5/Code/haiku/generated.arm/cross-tools-arm/lib/gcc/arm- > unknown-haiku/4.7.3/../../../../arm-unknown-haiku/include/c++/4.7.3 -I > /home/kallisti5/Code/haiku/generated.arm/cross-tools-arm/lib/gcc/arm- > unknown-haiku/4.7.3/../../../../arm-unknown-haiku/include/c++/4.7.3/arm- > unknown-haiku -I /home/kallisti5/Code/haiku/generated.arm/cross-tools- > arm/lib/gcc/arm-unknown-haiku/4.7.3/../../../../arm-unknown- > haiku/include/c++/4.7.3/backward -I > /home/kallisti5/Code/haiku/generated.arm/cross-tools-arm/lib/gcc/arm- > unknown-haiku/4.7.3/../../../../arm-unknown-haiku/include/c++/4.7.3/ext > -I /home/kallisti5/Code/haiku/generated.arm/cross-tools-arm/lib/gcc/arm- > unknown-haiku/4.7.3/include -I /home/kallisti5/Code/haiku/generated.arm > /cross-tools-arm/lib/gcc/arm-unknown-haiku/4.7.3/include-fixed -I > /home/kallisti5/Code/haiku/headers -I > /home/kallisti5/Code/haiku/headers/posix -I > /home/kallisti5/Code/haiku/headers/glibc -I > /home/kallisti5/Code/haiku/headers/os -I > /home/kallisti5/Code/haiku/headers/os/add-ons -I > /home/kallisti5/Code/haiku/headers/os/add-ons/file_system -I > /home/kallisti5/Code/haiku/headers/os/add-ons/graphics -I > /home/kallisti5/Code/haiku/headers/os/add-ons/input_server -I > /home/kallisti5/Code/haiku/headers/os/add-ons/registrar -I > /home/kallisti5/Code/haiku/headers/os/add-ons/screen_saver -I > /home/kallisti5/Code/haiku/headers/os/add-ons/tracker -I > /home/kallisti5/Code/haiku/headers/os/app -I > /home/kallisti5/Code/haiku/headers/os/device -I > /home/kallisti5/Code/haiku/headers/os/drivers -I > /home/kallisti5/Code/haiku/headers/os/game -I > /home/kallisti5/Code/haiku/headers/os/interface -I > /home/kallisti5/Code/haiku/headers/os/kernel -I > /home/kallisti5/Code/haiku/headers/os/locale -I > /home/kallisti5/Code/haiku/headers/os/media -I > /home/kallisti5/Code/haiku/headers/os/mail -I > /home/kallisti5/Code/haiku/headers/os/midi -I > /home/kallisti5/Code/haiku/headers/os/midi2 -I > /home/kallisti5/Code/haiku/headers/os/net -I > /home/kallisti5/Code/haiku/headers/os/opengl -I > /home/kallisti5/Code/haiku/headers/os/storage -I > /home/kallisti5/Code/haiku/headers/os/support -I > /home/kallisti5/Code/haiku/headers/os/translation -I > /home/kallisti5/Code/haiku/headers/private/. -o > "/home/kallisti5/Code/haiku/generated.arm/objects/haiku/arm/release/system/boot/platform/generic/video_splash.o" > ; > > ...failed C++ > /home/kallisti5/Code/haiku/generated.arm/objects/haiku/arm/release/system/boot/platform/generic/video_splash.o > ... > > BUILD FAILURE: > ...failed updating 1 target(s)... > ...skipped 4 target(s)... > ...updated 24 target(s)... > }}} New description: Buildtools for arm work... {{{ ../configure -j8 --build-cross-tools arm ../../buildtools --bootstrap /home/kallisti5/Code/haikuporter /home/kallisti5/Code/haikuports.cross /home/kallisti5/Code/haikuports }}} EDIT: I was building the wrong target. Now we are running into issues with the gcc_bootstrap build on arm. (jam -q -sHAIKU_BOOT_BOARD=verdex @bootstrap-raw) {{{ /bin/bash ../libtool --tag CXX --mode=link arm-unknown-haiku-c++ --sysroot=/home/kallisti5/Code/haiku/generated.arm/objects/haiku/arm/packaging/repositories /HaikuPortsCross-build/sys-devel/gcc_bootstrap/work-4.8.2_2014_02_27/boot /cross-sysroot/arm/ -DPIC -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi -fdiagnostics-show-location=once -ffunction-sections -fdata- sections -frandom-seed=libstdc++.la -o libstdc++.la -version-info 6:18:0 -lm -rpath /packages/gcc_bootstrap-4.8.2_2014_02_27-1/.self/develop/tools/lib compatibility.lo compatibility-debug_list.lo compatibility-debug_list-2.lo compatibility-c++0x.lo compatibility-atomic-c++0x.lo compatibility- thread-c++0x.lo compatibility-chrono.lo ../libsupc++/libsupc++convenience.la ../src/c++98/libc++98convenience.la ../src/c++11/libc++11convenience.la libtool: link: arm-unknown-haiku-c++ --sysroot=/home/kallisti5/Code/haiku/generated.arm/objects/haiku/arm/packaging/repositories /HaikuPortsCross-build/sys-devel/gcc_bootstrap/work-4.8.2_2014_02_27/boot /cross-sysroot/arm/ -shared -nostdlib /home/kallisti5/Code/haiku/generated.arm/objects/haiku/arm/packaging/repositories /HaikuPortsCross-build/sys-devel/gcc_bootstrap/work-4.8.2_2014_02_27/boot /cross-sysroot/arm/boot/system/develop/lib/crti.o /home/kallisti5/Code/haiku/generated.arm/cross-tools-arm/lib/gcc/arm- unknown-haiku/4.8.2/crtbegin.o /home/kallisti5/Code/haiku/generated.arm/objects/haiku/arm/packaging/repositories /HaikuPortsCross-build/sys-devel/gcc_bootstrap/work-4.8.2_2014_02_27/boot /cross-sysroot/arm/boot/system/develop/lib/init_term_dyn.o .libs/compatibility.o .libs/compatibility-debug_list.o .libs /compatibility-debug_list-2.o .libs/compatibility-c++0x.o .libs /compatibility-atomic-c++0x.o .libs/compatibility-thread-c++0x.o .libs /compatibility-chrono.o -Wl,--whole-archive ../libsupc++/.libs/libsupc++convenience.a ../src/c++98/.libs/libc++98convenience.a ../src/c++11/.libs/libc++11convenience.a -Wl,--no-whole-archive -L/home/kallisti5/Code/haiku/generated.arm/cross-tools-arm/lib/gcc/arm- unknown-haiku/4.8.2 -L/home/kallisti5/Code/haiku/generated.arm/cross- tools-arm/lib/gcc/arm-unknown-haiku/4.8.2/../../../../arm-unknown- haiku/lib -L/home/kallisti5/Code/haiku/generated.arm/objects/haiku/arm/packaging/repositories /HaikuPortsCross-build/sys-devel/gcc_bootstrap/work-4.8.2_2014_02_27/boot /cross-sysroot/arm/boot/system/develop/lib -lroot -lgcc /home/kallisti5/Code/haiku/generated.arm/cross-tools-arm/lib/gcc/arm- unknown-haiku/4.8.2/crtend.o /home/kallisti5/Code/haiku/generated.arm/objects/haiku/arm/packaging/repositories /HaikuPortsCross-build/sys-devel/gcc_bootstrap/work-4.8.2_2014_02_27/boot /cross-sysroot/arm/boot/system/develop/lib/crtn.o -Wl,-soname -Wl,libstdc++.so -o .libs/libstdc++.so .libs/compatibility-atomic-c++0x.o: In function `std::atomic_flag::test_and_set(std::memory_order)': /home/kallisti5/Code/haiku/generated.arm/objects/haiku/arm/packaging/repositories /HaikuPortsCross-build/sys- devel/gcc_bootstrap/work-4.8.2_2014_02_27/sources/gcc_bootstrap-4.8.2_2014_02_27-obj /arm-unknown-haiku/libstdc++-v3/include/bits/atomic_base.h:287: undefined reference to `__sync_val_compare_and_swap_1' collect2: error: ld returned 1 exit status make[5]: *** [libstdc++.la] Error 1 make[5]: Leaving directory `/home/kallisti5/Code/haiku/generated.arm/objects/haiku/arm/packaging/repositories /HaikuPortsCross-build/sys- devel/gcc_bootstrap/work-4.8.2_2014_02_27/sources/gcc_bootstrap-4.8.2_2014_02_27-obj /arm-unknown-haiku/libstdc++-v3/src' make[4]: *** [all-recursive] Error 1 make[4]: Leaving directory `/home/kallisti5/Code/haiku/generated.arm/objects/haiku/arm/packaging/repositories /HaikuPortsCross-build/sys- devel/gcc_bootstrap/work-4.8.2_2014_02_27/sources/gcc_bootstrap-4.8.2_2014_02_27-obj /arm-unknown-haiku/libstdc++-v3/src' make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory `/home/kallisti5/Code/haiku/generated.arm/objects/haiku/arm/packaging/repositories /HaikuPortsCross-build/sys- devel/gcc_bootstrap/work-4.8.2_2014_02_27/sources/gcc_bootstrap-4.8.2_2014_02_27-obj /arm-unknown-haiku/libstdc++-v3' make[2]: *** [all] Error 2 make[2]: Leaving directory `/home/kallisti5/Code/haiku/generated.arm/objects/haiku/arm/packaging/repositories /HaikuPortsCross-build/sys- devel/gcc_bootstrap/work-4.8.2_2014_02_27/sources/gcc_bootstrap-4.8.2_2014_02_27-obj /arm-unknown-haiku/libstdc++-v3' make[1]: *** [all-target-libstdc++-v3] Error 2 make[1]: Leaving directory `/home/kallisti5/Code/haiku/generated.arm/objects/haiku/arm/packaging/repositories /HaikuPortsCross-build/sys- devel/gcc_bootstrap/work-4.8.2_2014_02_27/sources/gcc_bootstrap-4.8.2_2014_02_27-obj' make: *** [all] Error 2 Command '['/bin/bash', '-c', '. /home/kallisti5/Code/haiku/generated.arm/objects/haiku/arm/packaging/repositories /HaikuPortsCross-build/sys-devel/gcc_bootstrap/work-4.8.2_2014_02_27 /wrapper-script']' returned non-zero exit status 2 }}} This seems to be due to a missing built-in atomic for Haiku. When gcc arm attempts to build gcc arm under Haiku this happens. -- Comment (by kallisti5): http://vincesoft.blogspot.com/2012/04/how-to-solve-undefined-reference- to.html The issue is due to this source missing for Haiku: http://cgit.haiku-os.org/buildtools/tree/gcc/libgcc/config/arm/linux- atomic.c This gets included via: http://cgit.haiku-os.org/buildtools/tree/gcc/libgcc/config/arm/t-linux- eabi Which gets included via: http://cgit.haiku-os.org/buildtools/tree/gcc/libgcc/config.host#n332 -- Ticket URL: <https://dev.haiku-os.org/ticket/10241#comment:3> Haiku <https://dev.haiku-os.org> Haiku - the operating system.