Skip to content

Hot/Cold build problems on Linux with GCC 9.2.0 #176

@TixoRebel

Description

@TixoRebel

Expected Behavior:

Project should build with Hot/Cold linking enabled.

Actual Behavior:

Project fails to build when Hot/Cold linking is enabled with the following errors:

Creating cold package with libpros,libc,libm [ERRORS]
/usr/lib/gcc/arm-none-eabi/9.2.0/../../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/9.2.0/../../../../arm-none-eabi/lib/libstdc++.a(cow-fs_ops.o): in function `std::filesystem::current_path(std::error_code&)':
/builddir/build/BUILD/arm-none-eabi-gcc-cs-9.2.0/gcc-arm-none-eabi/arm-none-eabi/libstdc++-v3/src/c++17/../../../../../gcc-9.2.0/libstdc++-v3/src/c++17/fs_ops.cc:748: undefined reference to `pathconf'
/usr/lib/gcc/arm-none-eabi/9.2.0/../../../../arm-none-eabi/bin/ld: /builddir/build/BUILD/arm-none-eabi-gcc-cs-9.2.0/gcc-arm-none-eabi/arm-none-eabi/libstdc++-v3/src/c++17/../../../../../gcc-9.2.0/libstdc++-v3/src/c++17/fs_ops.cc:767: undefined reference to `getcwd'
/usr/lib/gcc/arm-none-eabi/9.2.0/../../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/9.2.0/../../../../arm-none-eabi/lib/libstdc++.a(cow-fs_ops.o): in function `std::filesystem::current_path(std::filesystem::path const&, std::error_code&)':
/builddir/build/BUILD/arm-none-eabi-gcc-cs-9.2.0/gcc-arm-none-eabi/arm-none-eabi/libstdc++-v3/src/c++17/../../../../../gcc-9.2.0/libstdc++-v3/src/c++17/fs_ops.cc:804: undefined reference to `chdir'
/usr/lib/gcc/arm-none-eabi/9.2.0/../../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/9.2.0/../../../../arm-none-eabi/lib/libstdc++.a(cow-fs_ops.o): in function `(anonymous namespace)::create_dir(std::filesystem::path const&, std::filesystem::perms, std::error_code&)':
/builddir/build/BUILD/arm-none-eabi-gcc-cs-9.2.0/gcc-arm-none-eabi/arm-none-eabi/libstdc++-v3/src/c++17/../../../../../gcc-9.2.0/libstdc++-v3/src/c++17/fs_ops.cc:581: undefined reference to `mkdir'
/usr/lib/gcc/arm-none-eabi/9.2.0/../../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/9.2.0/../../../../arm-none-eabi/lib/libstdc++.a(cow-fs_ops.o): in function `std::filesystem::permissions(std::filesystem::path const&, std::filesystem::perms, std::filesystem::perm_options, std::error_code&)':
/builddir/build/BUILD/arm-none-eabi-gcc-cs-9.2.0/gcc-arm-none-eabi/arm-none-eabi/libstdc++-v3/src/c++17/../../../../../gcc-9.2.0/libstdc++-v3/src/c++17/fs_ops.cc:1132: undefined reference to `chmod'
/usr/lib/gcc/arm-none-eabi/9.2.0/../../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/9.2.0/../../../../arm-none-eabi/lib/libstdc++.a(fs_ops.o): in function `std::filesystem::current_path(std::filesystem::__cxx11::path const&, std::error_code&)':
/builddir/build/BUILD/arm-none-eabi-gcc-cs-9.2.0/gcc-arm-none-eabi/arm-none-eabi/libstdc++-v3/src/c++17/../../../../../gcc-9.2.0/libstdc++-v3/src/c++17/fs_ops.cc:804: undefined reference to `chdir'
/usr/lib/gcc/arm-none-eabi/9.2.0/../../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/9.2.0/../../../../arm-none-eabi/lib/libstdc++.a(fs_ops.o): in function `(anonymous namespace)::create_dir(std::filesystem::__cxx11::path const&, std::filesystem::perms, std::error_code&)':
/builddir/build/BUILD/arm-none-eabi-gcc-cs-9.2.0/gcc-arm-none-eabi/arm-none-eabi/libstdc++-v3/src/c++17/../../../../../gcc-9.2.0/libstdc++-v3/src/c++17/fs_ops.cc:581: undefined reference to `mkdir'
/usr/lib/gcc/arm-none-eabi/9.2.0/../../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/9.2.0/../../../../arm-none-eabi/lib/libstdc++.a(fs_ops.o): in function `std::filesystem::permissions(std::filesystem::__cxx11::path const&, std::filesystem::perms, std::filesystem::perm_options, std::error_code&)':
/builddir/build/BUILD/arm-none-eabi-gcc-cs-9.2.0/gcc-arm-none-eabi/arm-none-eabi/libstdc++-v3/src/c++17/../../../../../gcc-9.2.0/libstdc++-v3/src/c++17/fs_ops.cc:1132: undefined reference to `chmod'
/usr/lib/gcc/arm-none-eabi/9.2.0/../../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/9.2.0/../../../../arm-none-eabi/lib/libstdc++.a(fs_ops.o): in function `std::filesystem::do_copy_file(char const*, char const*, std::filesystem::copy_options_existing_file, stat*, stat*, std::error_code&)':
/builddir/build/BUILD/arm-none-eabi-gcc-cs-9.2.0/gcc-arm-none-eabi/arm-none-eabi/libstdc++-v3/src/c++17/../../../../../gcc-9.2.0/libstdc++-v3/src/c++17/../filesystem/ops-common.h:439: undefined reference to `chmod'
/usr/lib/gcc/arm-none-eabi/9.2.0/../../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/9.2.0/../../../../arm-none-eabi/lib/libstdc++.a(fs_ops.o): in function `std::filesystem::current_path[abi:cxx11](std::error_code&)':
/builddir/build/BUILD/arm-none-eabi-gcc-cs-9.2.0/gcc-arm-none-eabi/arm-none-eabi/libstdc++-v3/src/c++17/../../../../../gcc-9.2.0/libstdc++-v3/src/c++17/fs_ops.cc:748: undefined reference to `pathconf'
/usr/lib/gcc/arm-none-eabi/9.2.0/../../../../arm-none-eabi/bin/ld: /builddir/build/BUILD/arm-none-eabi-gcc-cs-9.2.0/gcc-arm-none-eabi/arm-none-eabi/libstdc++-v3/src/c++17/../../../../../gcc-9.2.0/libstdc++-v3/src/c++17/fs_ops.cc:767: undefined reference to `getcwd'
/usr/lib/gcc/arm-none-eabi/9.2.0/../../../../arm-none-eabi/bin/ld: ./firmware/libc.a(lib_a-unlinkr.o): in function `_unlink_r':
unlinkr.c:(.text._unlink_r+0x12): undefined reference to `_unlink'
/usr/lib/gcc/arm-none-eabi/9.2.0/../../../../arm-none-eabi/bin/ld: ./firmware/libc.a(lib_a-linkr.o): in function `_link_r':
linkr.c:(.text._link_r+0x16): undefined reference to `_link'
/usr/lib/gcc/arm-none-eabi/9.2.0/../../../../arm-none-eabi/bin/ld: ./firmware/libc.a(lib_a-statr.o): in function `_stat_r':
statr.c:(.text._stat_r+0x16): undefined reference to `_stat'
collect2: error: ld returned 1 exit status

Steps to reproduce:

Create a new project with our without Okapi and optionally remove the starting LLEMU code from main.cpp. Disabling Hot/Cold linking will allow the project to build as expected.

System information:

Platform: V5
PROS Kernel Version: 3.2.0
Operating System: Fedora 30
GCC Version: 9.2.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingp: normalNormal priorityworkaround availableThere is a workaround available for this bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions