Skip to content

Build error on ubuntu18 armv7 #200

Description

@trittsv

Compilation error for version 0.7.3 on ubuntu 18 armv7 gnu 7.5.0

/foonathan/memory/detail/debug_helpers.hpp:175:69: error: conversion to ‘unsigned int’ from ‘std::__atomic_base<int>::__int_type {aka int}’ may change the sign of the result [-Werror=sign-conversion]

[2025-10-23T11:38:04.660Z] -- The C compiler identification is GNU 7.5.0
[2025-10-23T11:38:04.660Z] -- The CXX compiler identification is GNU 7.5.0
[2025-10-23T11:38:04.660Z] -- Detecting C compiler ABI info
[2025-10-23T11:38:04.660Z] -- Detecting C compiler ABI info - done
[2025-10-23T11:38:04.660Z] -- Check for working C compiler: /usr/bin/arm-linux-gnueabihf-gcc-7 - skipped
[2025-10-23T11:38:04.660Z] -- Detecting C compile features
[2025-10-23T11:38:04.660Z] -- Detecting C compile features - done
[2025-10-23T11:38:04.660Z] -- Detecting CXX compiler ABI info
[2025-10-23T11:38:04.915Z] -- Detecting CXX compiler ABI info - done
[2025-10-23T11:38:04.915Z] -- Check for working CXX compiler: /usr/bin/arm-linux-gnueabihf-g++-7 - skipped
[2025-10-23T11:38:04.915Z] -- Detecting CXX compile features
[2025-10-23T11:38:04.915Z] -- Detecting CXX compile features - done
[2025-10-23T11:38:04.915Z] -- Performing Test HAVE_CXX_ATOMIC_NOFLAG
[2025-10-23T11:38:04.915Z] -- Performing Test HAVE_CXX_ATOMIC_NOFLAG - Success
[2025-10-23T11:38:04.915Z] -- Getting container node sizes
[2025-10-23T11:38:14.886Z] -- Configuring done (8.7s)
[2025-10-23T11:38:14.886Z] -- Generating done (0.0s)
[2025-10-23T11:38:14.886Z] CMake Warning:
[2025-10-23T11:38:14.886Z]   Manually-specified variables were not used by the project:
[2025-10-23T11:38:14.886Z] 
[2025-10-23T11:38:14.886Z]     CMAKE_EXPORT_NO_PACKAGE_REGISTRY
[2025-10-23T11:38:14.886Z]     CONAN_CMAKE_CXX_EXTENSIONS
[2025-10-23T11:38:14.886Z]     CONAN_CMAKE_CXX_STANDARD
[2025-10-23T11:38:14.886Z]     CONAN_CMAKE_POSITION_INDEPENDENT_CODE
[2025-10-23T11:38:14.886Z]     CONAN_COMPILER
[2025-10-23T11:38:14.886Z]     CONAN_COMPILER_VERSION
[2025-10-23T11:38:14.886Z]     CONAN_EXPORTED
[2025-10-23T11:38:14.886Z]     CONAN_IN_LOCAL_CACHE
[2025-10-23T11:38:14.886Z]     CONAN_LIBCXX
[2025-10-23T11:38:14.886Z]     CONAN_STD_CXX_FLAG
[2025-10-23T11:38:14.886Z] 
[2025-10-23T11:38:14.886Z] 
[2025-10-23T11:38:14.886Z] -- Build files have been written to: /build_subfolder
[2025-10-23T11:38:14.886Z] [  5%] Building CXX object src/CMakeFiles/foonathan_memory.dir/detail/align.cpp.o
[2025-10-23T11:38:14.886Z] [ 10%] Building CXX object src/CMakeFiles/foonathan_memory.dir/detail/free_list_array.cpp.o
[2025-10-23T11:38:14.886Z] [ 15%] Building CXX object src/CMakeFiles/foonathan_memory.dir/detail/debug_helpers.cpp.o
[2025-10-23T11:38:14.886Z] [ 20%] Building CXX object src/CMakeFiles/foonathan_memory.dir/detail/small_free_list.cpp.o
[2025-10-23T11:38:14.886Z] [ 25%] Building CXX object src/CMakeFiles/foonathan_memory.dir/detail/free_list.cpp.o
[2025-10-23T11:38:14.886Z] [ 30%] Building CXX object src/CMakeFiles/foonathan_memory.dir/detail/assert.cpp.o
[2025-10-23T11:38:14.886Z] [ 35%] Building CXX object src/CMakeFiles/foonathan_memory.dir/debugging.cpp.o
[2025-10-23T11:38:14.886Z] [ 40%] Building CXX object src/CMakeFiles/foonathan_memory.dir/error.cpp.o
[2025-10-23T11:38:14.886Z] [ 45%] Building CXX object src/CMakeFiles/foonathan_memory.dir/heap_allocator.cpp.o
[2025-10-23T11:38:14.886Z] [ 50%] Building CXX object src/CMakeFiles/foonathan_memory.dir/iteration_allocator.cpp.o
[2025-10-23T11:38:14.886Z] [ 55%] Building CXX object src/CMakeFiles/foonathan_memory.dir/malloc_allocator.cpp.o
[2025-10-23T11:38:14.886Z] [ 60%] Building CXX object src/CMakeFiles/foonathan_memory.dir/memory_arena.cpp.o
[2025-10-23T11:38:14.886Z] In file included from /source_subfolder/include/foonathan/memory/detail/lowlevel_allocator.hpp:12:0,
[2025-10-23T11:38:14.886Z]                  from /source_subfolder/include/foonathan/memory/heap_allocator.hpp:10,
[2025-10-23T11:38:14.886Z]                  from /source_subfolder/src/heap_allocator.cpp:4:
[2025-10-23T11:38:14.886Z] /source_subfolder/include/foonathan/memory/detail/debug_helpers.hpp: In instantiation of ‘foonathan::memory::detail::global_leak_checker_impl<Handler>::counter::~counter() [with Handler = foonathan::memory::detail::lowlevel_allocator_leak_handler<foonathan::memory::detail::heap_allocator_impl>]’:
[2025-10-23T11:38:14.886Z] /source_subfolder/include/foonathan/memory/heap_allocator.hpp:64:13:   required from here
[2025-10-23T11:38:14.886Z] /source_subfolder/include/foonathan/memory/detail/debug_helpers.hpp:175:69: error: conversion to ‘unsigned int’ from ‘std::__atomic_base<int>::__int_type {aka int}’ may change the sign of the result [-Werror=sign-conversion]
[2025-10-23T11:38:14.886Z]                          if (no_counter_objects_ == 0u && allocated_ != 0u)
[2025-10-23T11:38:14.886Z]                                                           ~~~~~~~~~~~^~~~~
[2025-10-23T11:38:14.886Z] [ 65%] Building CXX object src/CMakeFiles/foonathan_memory.dir/memory_pool.cpp.o
[2025-10-23T11:38:14.886Z] cc1plus: all warnings being treated as errors
[2025-10-23T11:38:14.887Z] [ 70%] Building CXX object src/CMakeFiles/foonathan_memory.dir/memory_pool_collection.cpp.o
[2025-10-23T11:38:14.887Z] src/CMakeFiles/foonathan_memory.dir/build.make:190: recipe for target 'src/CMakeFiles/foonathan_memory.dir/heap_allocator.cpp.o' failed
[2025-10-23T11:38:14.887Z] make[2]: *** [src/CMakeFiles/foonathan_memory.dir/heap_allocator.cpp.o] Error 1
[2025-10-23T11:38:14.887Z] make[2]: *** Waiting for unfinished jobs....
[2025-10-23T11:38:14.887Z] In file included from /source_subfolder/include/foonathan/memory/iteration_allocator.hpp:10:0,
[2025-10-23T11:38:14.887Z]                  from /source_subfolder/src/iteration_allocator.cpp:4:
[2025-10-23T11:38:14.887Z] /source_subfolder/include/foonathan/memory/detail/debug_helpers.hpp: In instantiation of ‘foonathan::memory::detail::global_leak_checker_impl<Handler>::counter::~counter() [with Handler = foonathan::memory::detail::lowlevel_allocator_leak_handler<foonathan::memory::detail::heap_allocator_impl>]’:
[2025-10-23T11:38:14.887Z] /source_subfolder/include/foonathan/memory/heap_allocator.hpp:64:13:   required from here
[2025-10-23T11:38:14.887Z] /source_subfolder/include/foonathan/memory/detail/debug_helpers.hpp:175:69: error: conversion to ‘unsigned int’ from ‘std::__atomic_base<int>::__int_type {aka int}’ may change the sign of the result [-Werror=sign-conversion]
[2025-10-23T11:38:14.887Z]                          if (no_counter_objects_ == 0u && allocated_ != 0u)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions