3

Trying to build the boost libraries, I followed the steps:

  1. open cmd in boost_1_72_0 folder
  2. bootstrap.bat gcc
  3. set cfalgs, cxxflags and linker flags to use the sysroot folder that came with the compiler:

cflags="-std=c11 -O2 --sysroot=C:\toolchain\sysroot-newlib-arm-2019.01-aarch64-elf -Wall -O0 -std=c11 -D_GLIBC_USE_NANOSLEEP -DLINUX -std=c11 -g"

cxxflags="-std=c++11 -O2 --sysroot=C:\toolchain\sysroot-newlib-arm-2019.01-aarch64-elf -Wall -O0 -std=c++11 -static-libstdc++ -D_GLIBCXX_USE_NANOSLEEP -DLINUX -std=c++11 -g"

linkerflags="--sysroot=C:\toolchain\sysroot-newlib-arm-2019.01-aarch64-elf"

  1. run the b2 command with the following options:

    .\b2.exe -d+3 --debug-configuration target-os=linux toolset=gcc-aarch64 architecture=arm address-model=64 cflags="%cflags%" cxxflags="%cxxflags%" linkflags="%linkerflags%" --with-iostreams --with-filesystem --with-regex --with-locale --with-headers --with-date_time --with-random --with-thread --with-timer --with-system -q threading=multi variant=release link=static --prefix=../boost-test/ install

I used the 8.2-2019.01, AArch64 ELF bare-metal target (aarch64-elf), compiler from this website.

After running the b2 command, I get the following message: "...failed updating 8 targets..." and the boost-test/lib folder is empty. Do you have any idea what might be the problem?

  • 1
    Are you sure you want a bare metal target? I can imagine filesystem/threading/... depends on an OS. Btw. you are writing you want a linux target but use a bare-metal target compiler. – akira hinoshiro Sep 12 '22 at 09:37
  • @akirahinoshiro I am not sure what bare metal means, can you explain me please? I know that it somehow doesn't depend on the OS, but I it is not very clear to me. Also, what I know is that I have to cross-compile the boost libraries on windows for a linux aarch64 target using that version of the compiler. I had only the bare metal and linux options, no compiler version for windows download, that is why I chose bare metal. – Vulsan Bianca Sep 12 '22 at 10:17
  • 1
    "In computer science, bare machine (or bare metal) refers to a computer executing instructions directly on logic hardware without an intervening operating system." this sentence can be found on Wikipedia. What I think you want is Windows host and Linux target. – akira hinoshiro Sep 12 '22 at 10:21
  • @akirahinoshiro Thank you! Yes, I need Windows host for Linux target, but unfortunately, I don't think that the version of the compiler that I have to use is available in this format, so I will try to find another one. – Vulsan Bianca Sep 12 '22 at 10:30

0 Answers0