Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Build fails with -Werror on 32-bit platform #25

Closed
1 task done
barracuda156 opened this issue Jan 12, 2024 · 36 comments
Closed
1 task done

[Bug]: Build fails with -Werror on 32-bit platform #25

barracuda156 opened this issue Jan 12, 2024 · 36 comments
Assignees
Labels
bug Something isn't working

Comments

@barracuda156
Copy link
Contributor

Contact Details

No response

What happened?

Build fails on 32-bit platform when warnings are treated as errors.

In file included from /opt/local/include/gcc13/c++/atomic:41,
                 from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-1.2.0/dispenso/../dispenso/platform.h:14,
                 from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-1.2.0/dispenso/../dispenso/detail/small_buffer_allocator_impl.h:13,
                 from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-1.2.0/dispenso/small_buffer_allocator.cpp:8:
In member function 'std::__atomic_base<_IntTp>::__int_type std::__atomic_base<_IntTp>::load(std::memory_order) const [with _ITp = long unsigned int]',
    inlined from 'bool moodycamel::ConcurrentQueue<T, Traits>::ExplicitProducer::enqueue_bulk(It, moodycamel::ConcurrentQueue<T, Traits>::size_t) [with moodycamel::ConcurrentQueue<T, Traits>::AllocationMode allocMode = moodycamel::ConcurrentQueue<char*, moodycamel::ConcurrentQueueDefaultTraits>::CanAlloc; It = char**; T = char*; Traits = moodycamel::ConcurrentQueueDefaultTraits]' at /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-1.2.0/dispenso/third-party/moodycamel/concurrentqueue.h:2060:49,
    inlined from 'bool moodycamel::ConcurrentQueue<T, Traits>::inner_enqueue_bulk(const producer_token_t&, It, size_t) [with AllocationMode canAlloc = moodycamel::ConcurrentQueue<char*, moodycamel::ConcurrentQueueDefaultTraits>::CanAlloc; It = char**; T = char*; Traits = moodycamel::ConcurrentQueueDefaultTraits]' at /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-1.2.0/dispenso/third-party/moodycamel/concurrentqueue.h:1382:124,
    inlined from 'bool moodycamel::ConcurrentQueue<T, Traits>::enqueue_bulk(const producer_token_t&, It, size_t) [with It = char**; T = char*; Traits = moodycamel::ConcurrentQueueDefaultTraits]' at /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-1.2.0/dispenso/third-party/moodycamel/concurrentqueue.h:1052:38:
/opt/local/include/gcc13/c++/bits/atomic_base.h:505:31: error: 'unsigned int __atomic_load_4(const volatile void*, int)' writing 4 bytes into a region of size 0 overflows the destination [-Werror=stringop-overflow=]
  505 |         return __atomic_load_n(&_M_i, int(__m));
      |                ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
In function 'bool moodycamel::ConcurrentQueue<T, Traits>::enqueue_bulk(const producer_token_t&, It, size_t) [with It = char**; T = char*; Traits = moodycamel::ConcurrentQueueDefaultTraits]':
cc1plus: note: destination object is likely at address zero
cc1plus: all warnings being treated as errors
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-1.2.0/dispenso/timed_task.cpp: In member function 'void dispenso::TimedTaskScheduler::timeQueueRunLoop()':
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-1.2.0/dispenso/timed_task.cpp:86:28: error: redundant move in initialization [-Werror=redundant-move]
   86 |       auto next = std::move(tasks_.top());
      |                   ~~~~~~~~~^~~~~~~~~~~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-1.2.0/dispenso/timed_task.cpp:86:28: note: remove 'std::move' call
cc1plus: all warnings being treated as errors

Perhaps these are nothing critical, but if they are easily fixable, it may be worth addressing this.

Version

latest (Edge)

Code of Conduct

  • I agree to follow this project's Code of Conduct
@barracuda156 barracuda156 added the bug Something isn't working label Jan 12, 2024
@barracuda156
Copy link
Contributor Author

Also, it needs to link to libatomic on some 32-bit archs (ppc, arm, mips). Otherwise this happens:

[100%] Linking CXX shared library libdispenso.dylib
cd /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/build/dispenso && /opt/local/bin/cmake -E cmake_link_script CMakeFiles/dispenso.dir/link.txt --verbose=ON
/opt/local/bin/g++-mp-13 -pipe -Os -DNDEBUG -I/opt/local/include -D_GLIBCXX_USE_CXX11_ABI=0 -arch ppc -mmacosx-version-min=10.6 -dynamiclib -Wl,-headerpad_max_install_names -L/opt/local/lib -Wl,-headerpad_max_install_names -compatibility_version 1.0.0 -current_version 1.2.0 -o libdispenso.1.2.0.dylib -install_name @rpath/libdispenso.1.dylib CMakeFiles/dispenso.dir/detail/per_thread_info.cpp.o CMakeFiles/dispenso.dir/detail/quanta.cpp.o CMakeFiles/dispenso.dir/graph.cpp.o CMakeFiles/dispenso.dir/graph_executor.cpp.o CMakeFiles/dispenso.dir/pool_allocator.cpp.o CMakeFiles/dispenso.dir/priority.cpp.o CMakeFiles/dispenso.dir/schedulable.cpp.o CMakeFiles/dispenso.dir/small_buffer_allocator.cpp.o CMakeFiles/dispenso.dir/task_set.cpp.o CMakeFiles/dispenso.dir/thread_id.cpp.o CMakeFiles/dispenso.dir/thread_pool.cpp.o CMakeFiles/dispenso.dir/timed_task.cpp.o CMakeFiles/dispenso.dir/timing.cpp.o CMakeFiles/dispenso.dir/tsan_annotations.cpp.o  -Wl,-rpath,/opt/local/lib 
Undefined symbols:
  "___atomic_fetch_add_8", referenced from:
      __ZZN8dispenso12parallel_forINS_7TaskSetEmZNS_12parallel_forIS1_mZNS_12parallel_forIS1_mmZNS_19ParallelForExecutorclIS1_NS_6GraphTINS_10BiPropNodeEEEEEvRT_RKT0_EUlmE_Lb1ELb1ELb1EEEvSA_SB_T1_OT2_NS_13ParForOptionsEEUlmmE_EEvSA_RKNS_12ChunkedRangeISB_EEOSF_SI_EUliS9_SB_E_NS_6detail13NoOpContainerENSQ_12NoOpStateGenEEEvSA_RSG_RKT3_SN_SO_SI_ENKUlSA_E_clIiEEDaSA_.isra.0 in graph_executor.cpp.o
      __ZZN8dispenso12parallel_forINS_17ConcurrentTaskSetEmZNS_12parallel_forIS1_mZNS_12parallel_forIS1_mmZNS_19ParallelForExecutorclIS1_NS_6GraphTINS_10BiPropNodeEEEEEvRT_RKT0_EUlmE_Lb1ELb1ELb1EEEvSA_SB_T1_OT2_NS_13ParForOptionsEEUlmmE_EEvSA_RKNS_12ChunkedRangeISB_EEOSF_SI_EUliS9_SB_E_NS_6detail13NoOpContainerENSQ_12NoOpStateGenEEEvSA_RSG_RKT3_SN_SO_SI_ENKUlSA_E_clIiEEDaSA_.isra.0 in graph_executor.cpp.o
      __ZZN8dispenso12parallel_forINS_7TaskSetEmZNS_12parallel_forIS1_mZNS_12parallel_forIS1_mmZNS_19ParallelForExecutorclIS1_NS_6GraphTINS_4NodeEEEEEvRT_RKT0_EUlmE_Lb1ELb1ELb1EEEvSA_SB_T1_OT2_NS_13ParForOptionsEEUlmmE_EEvSA_RKNS_12ChunkedRangeISB_EEOSF_SI_EUliS9_SB_E_NS_6detail13NoOpContainerENSQ_12NoOpStateGenEEEvSA_RSG_RKT3_SN_SO_SI_ENKUlSA_E_clIiEEDaSA_.isra.0 in graph_executor.cpp.o
      __ZZN8dispenso12parallel_forINS_17ConcurrentTaskSetEmZNS_12parallel_forIS1_mZNS_12parallel_forIS1_mmZNS_19ParallelForExecutorclIS1_NS_6GraphTINS_4NodeEEEEEvRT_RKT0_EUlmE_Lb1ELb1ELb1EEEvSA_SB_T1_OT2_NS_13ParForOptionsEEUlmmE_EEvSA_RKNS_12ChunkedRangeISB_EEOSF_SI_EUliS9_SB_E_NS_6detail13NoOpContainerENSQ_12NoOpStateGenEEEvSA_RSG_RKT3_SN_SO_SI_ENKUlSA_E_clIiEEDaSA_.isra.0 in graph_executor.cpp.o
      __ZZN8dispenso11TaskSetBase11packageTaskIZNS_12parallel_forINS_7TaskSetEmZNS_12parallel_forIS3_mZNS_12parallel_forIS3_mmZNS_19ParallelForExecutorclIS3_NS_6GraphTINS_4NodeEEEEEvRT_RKT0_EUlmE_Lb1ELb1ELb1EEEvSC_SD_T1_OT2_NS_13ParForOptionsEEUlmmE_EEvSC_RKNS_12ChunkedRangeISD_EEOSH_SK_EUliSB_SD_E_NS_6detail13NoOpContainerENSS_12NoOpStateGenEEEvSC_RSI_RKT3_SP_SQ_SK_EUlvE1_EEDaOSB_ENUlvE_clEv in graph_executor.cpp.o
      __ZZN8dispenso11TaskSetBase11packageTaskIZNS_12parallel_forINS_7TaskSetEmZNS_12parallel_forIS3_mZNS_12parallel_forIS3_mmZNS_19ParallelForExecutorclIS3_NS_6GraphTINS_10BiPropNodeEEEEEvRT_RKT0_EUlmE_Lb1ELb1ELb1EEEvSC_SD_T1_OT2_NS_13ParForOptionsEEUlmmE_EEvSC_RKNS_12ChunkedRangeISD_EEOSH_SK_EUliSB_SD_E_NS_6detail13NoOpContainerENSS_12NoOpStateGenEEEvSC_RSI_RKT3_SP_SQ_SK_EUlvE1_EEDaOSB_ENUlvE_clEv in graph_executor.cpp.o
      __ZZN8dispenso11TaskSetBase11packageTaskIZNS_12parallel_forINS_17ConcurrentTaskSetEmZNS_12parallel_forIS3_mZNS_12parallel_forIS3_mmZNS_19ParallelForExecutorclIS3_NS_6GraphTINS_4NodeEEEEEvRT_RKT0_EUlmE_Lb1ELb1ELb1EEEvSC_SD_T1_OT2_NS_13ParForOptionsEEUlmmE_EEvSC_RKNS_12ChunkedRangeISD_EEOSH_SK_EUliSB_SD_E_NS_6detail13NoOpContainerENSS_12NoOpStateGenEEEvSC_RSI_RKT3_SP_SQ_SK_EUlvE1_EEDaOSB_ENUlvE_clEv in graph_executor.cpp.o
      __ZZN8dispenso11TaskSetBase11packageTaskIZNS_12parallel_forINS_17ConcurrentTaskSetEmZNS_12parallel_forIS3_mZNS_12parallel_forIS3_mmZNS_19ParallelForExecutorclIS3_NS_6GraphTINS_10BiPropNodeEEEEEvRT_RKT0_EUlmE_Lb1ELb1ELb1EEEvSC_SD_T1_OT2_NS_13ParForOptionsEEUlmmE_EEvSC_RKNS_12ChunkedRangeISD_EEOSH_SK_EUliSB_SD_E_NS_6detail13NoOpContainerENSS_12NoOpStateGenEEEvSC_RSI_RKT3_SP_SQ_SK_EUlvE1_EEDaOSB_ENUlvE_clEv in graph_executor.cpp.o
      __ZN8dispenso8threadIdEv in thread_id.cpp.o
ld: symbol(s) not found

@graphicsMan
Copy link
Contributor

Thanks very much for the report.

The timed_task move issue is fixed in mainline.

The other two issues may depend on platform and toolchain. Are these only PPC, ARM, MIPS 32-bit issues? Unfortunately I don't currently have any machines set up to replicate.

Would you be willing to try updating the moodycamel concurrentqueue library locally to see if that fixes the first problem? It may be that this is something that just popped up with newer versions of GCC (I've personally only tested up to GCC 11), and they may already have fixed it in moodycamel. If that is the case, I'll be happy to update the copy.

The second problem likely needs a CMakeLists.txt update to pull in libatomic. The trouble is that I don't have a clear sense of when that is required. Maybe if CMake can detect a 32-bit build we could always link.

@barracuda156
Copy link
Contributor Author

@graphicsMan Thank you for responding. For atomics, something to this effect should work: uxlfoundation/oneTBB#987
There are at least several major projects having those in the master branches too (I can check when on a desktop). Thankfully the problem is not exclusive to ppc, but also affects arm, which is considerably more common, so it keeps resurfacing.

I did not try other GCC versions, but it is easily doable, I have at least 6, 7, 10, 11 and 12 to test.

@barracuda156
Copy link
Contributor Author

Besides, I got some errors when trying to build with tests enabled, perhaps some compatibility issues, but did not dig into that yet. Will update on that once done.

Without tests I got the build working, though on 32-bit I had to patch out -Werror. On 64-bit it builds as is.

@graphicsMan
Copy link
Contributor

Wonderful. We currently do the vast majority of our work on 64-bit, and even with 32-bit, internal to the company we are not using CMake. Any way you can help is welcome. I'd love PRs or patches, but I'll try to get to these either way (biggest concern is setting up the correct cross-compiling toolchains, etc... which I don't have that much experience with).

@barracuda156
Copy link
Contributor Author

One PR is there #24 though it is orthogonal to issues discussed in this ticket.

@graphicsMan
Copy link
Contributor

Thanks very much @barracuda156 . Sorry about the long time lag on response here; January is a tough month for quick responses.

I'm attempting to get a cross-compile setup going so I can try building for Linux ARM32 (though I'm looking back and seeing a lot of Mac stuff in your ticket, would this need to be done on Mac?). Sorry, I'm pretty new to cross compilation. I have a Linux system (x86_64) CentOS 8 Stream with distrobox able to run e.g. Debian 12. I also have Mac M1 (and also a windows box, which is unlikely to be helpful). If you have suggestions for how to most quickly replicate your findings using the resources I have, I'd appreciate it.

@barracuda156
Copy link
Contributor Author

@graphicsMan Thank you for responding. While I have no setup to try building anything on Linux or arm32 in general, I think it should be a valid test-case for libatomic, based on what I have seen online. There are numerous reports with failures when -latomic is not passed:
https://bugs.gentoo.org/782811
https://bugs.gentoo.org/721344
arvidn/libtorrent#5117
etc.
From my side I can say for sure that ppc (32-bit) needs that (and it is not a MacOS-specific issue).

@graphicsMan
Copy link
Contributor

Okay, interesting . I just managed to successfully build and link libdispenso.so with x-compile arm32 on Linux. Now I'm able to repro the missing libatomic stuff. I've looked at various projects (TBB, taskflow, folly), and none of these seem to support arm32 or ppc32. I'm unsure the right way to add libatomic only as required, though I have been searching around and found this approach, which may or may not be sufficient: https://stackoverflow.com/questions/69281559/cmake-library-order-in-cmake-required-libraries-to-test-a-minimal-program-while

Do you have experience fixing this (with CMake in particular) for your projects?

@barracuda156
Copy link
Contributor Author

barracuda156 commented Feb 1, 2024

@graphicsMan There are PRs both to folly and oneTBB to fix libatomic linking:
facebook/folly#2126
The second one I refer above.

Yes, neither of them supports 32-bit platforms from their side and they are super-slow and/or reluctant in reviewing/merging PRs (perhaps due to no commercial interest), but I have about 90% of folly tests passing on ppc (slightly less than on arm64, 91% there), and oneTBB also works on ppc AFAICT (I did not try tests there for quite a while, there were some failures, I think larger part still passed).

For ppc and apparently arm (and mips, perhaps), we need to test for 8-byte atomics support; for RISC-V, according to that folly PR, 1-byte check is needed. I do not know if it makes sense to check 4-byte atomics for any existing platform.
It looks that StackOverflow post uses an old CMake syntax. With the current CMake library name can be passed, as atomic (in target_link_libraries). There is no need to quote the flag itself, CMake handles that.

@graphicsMan
Copy link
Contributor

graphicsMan commented Feb 1, 2024 via email

@barracuda156
Copy link
Contributor Author

barracuda156 commented Feb 1, 2024

@graphicsMan I have looked through earlier issues, maybe this can be borrowed?
https://github.com/PurpleI2P/i2pd/blob/openssl/build/cmake_modules/CheckAtomic.cmake

In Macports we can add needed flags conditionally via portfile code, that is how we fixed it for folly and friends, for example, though earlier I used CMake code: https://github.com/macports/macports-ports/blob/03289e4611ed4b387ce916214c7c6a6a105e25e0/devel/folly/files/patch-older-systems.diff#L17-L27
(just got tired of rebasing it)

P. S. And thank you by the way for reproducing it on Linux!

@graphicsMan
Copy link
Contributor

dispenso_atomic.PATCH
@barracuda156 I managed to get a reasonable/small fix for this to work on ARM32 x-compile env. Can you please test the patch on your env and make sure it works for you? I think given the limited set of test machines and environments we have where we use CMake, this functionality may need to be community updated as needed. (We do have quite a few environments used here at Meta, but we don't use CMake internally)

@barracuda156
Copy link
Contributor Author

@graphicsMan Thank you, I will test it tonight and let you know.

@barracuda156
Copy link
Contributor Author

@graphicsMan Yes, it works for me. Configure detects that without lib no full atomics:

--->  Configuring dispenso
Executing:  cd "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/build" && /opt/local/bin/cmake -G "CodeBlocks - Unix Makefiles" -DCMAKE_BUILD_TYPE=MacPorts -DCMAKE_INSTALL_PREFIX="/opt/local" -DCMAKE_INSTALL_NAME_DIR="/opt/local/lib" -DCMAKE_SYSTEM_PREFIX_PATH="/opt/local;/usr" -DCMAKE_C_COMPILER="$CC" -DCMAKE_CXX_COMPILER="$CXX" -DCMAKE_OBJC_COMPILER="$CC" -DCMAKE_OBJCXX_COMPILER="$CXX" -DCMAKE_POLICY_DEFAULT_CMP0025=NEW -DCMAKE_POLICY_DEFAULT_CMP0060=NEW -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_COLOR_MAKEFILE=ON -DCMAKE_FIND_FRAMEWORK=LAST -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_MAKE_PROGRAM=/usr/bin/make -DCMAKE_MODULE_PATH="/opt/local/share/cmake/Modules" -DCMAKE_PREFIX_PATH="/opt/local/share/cmake/Modules" -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON -DCMAKE_INSTALL_RPATH="/opt/local/lib" -Wno-dev -DDISPENSO_BUILD_BENCHMARKS=OFF -DDISPENSO_BUILD_TESTS=OFF -DCMAKE_OSX_ARCHITECTURES="ppc" -DCMAKE_OSX_DEPLOYMENT_TARGET="10.6" -DCMAKE_OSX_SYSROOT="/" /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-1.2.0 
-- The CXX compiler identification is GNU 13.2.0
-- Checking whether CXX compiler has -isysroot
-- Checking whether CXX compiler has -isysroot - yes
-- Checking whether CXX compiler supports OSX deployment target flag
-- Checking whether CXX compiler supports OSX deployment target flag - yes
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /opt/local/bin/g++-mp-13 - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
SOURCES:  /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-1.2.0/dispenso/detail/per_thread_info.cpp;/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-1.2.0/dispenso/detail/quanta.cpp;/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-1.2.0/dispenso/graph.cpp;/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-1.2.0/dispenso/graph_executor.cpp;/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-1.2.0/dispenso/pool_allocator.cpp;/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-1.2.0/dispenso/priority.cpp;/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-1.2.0/dispenso/schedulable.cpp;/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-1.2.0/dispenso/small_buffer_allocator.cpp;/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-1.2.0/dispenso/task_set.cpp;/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-1.2.0/dispenso/thread_id.cpp;/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-1.2.0/dispenso/thread_pool.cpp;/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-1.2.0/dispenso/timed_task.cpp;/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-1.2.0/dispenso/timing.cpp;/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-1.2.0/dispenso/tsan_annotations.cpp
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Performing Test DISPENSO_HAS_ATOMIC_WITHOUT_LIB
-- Performing Test DISPENSO_HAS_ATOMIC_WITHOUT_LIB - Failed
-- Configuring done (4.3s)
-- Generating done (0.0s)
CMake Warning:
  Manually-specified variables were not used by the project:

    CMAKE_C_COMPILER
    CMAKE_OBJCXX_COMPILER
    CMAKE_OBJC_COMPILER
    CMAKE_POLICY_DEFAULT_CMP0025
    CMAKE_POLICY_DEFAULT_CMP0060

And flag is passed:

[100%] Linking CXX shared library libdispenso.dylib
cd /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/build/dispenso && /opt/local/bin/cmake -E cmake_link_script CMakeFiles/dispenso.dir/link.txt --verbose=ON
/opt/local/bin/g++-mp-13 -pipe -Os -DNDEBUG -I/opt/local/include -D_GLIBCXX_USE_CXX11_ABI=0 -arch ppc -mmacosx-version-min=10.6 -dynamiclib -Wl,-headerpad_max_install_names -L/opt/local/lib -Wl,-headerpad_max_install_names -compatibility_version 1.0.0 -current_version 1.2.0 -o libdispenso.1.2.0.dylib -install_name @rpath/libdispenso.1.dylib CMakeFiles/dispenso.dir/detail/per_thread_info.cpp.o CMakeFiles/dispenso.dir/detail/quanta.cpp.o CMakeFiles/dispenso.dir/graph.cpp.o CMakeFiles/dispenso.dir/graph_executor.cpp.o CMakeFiles/dispenso.dir/pool_allocator.cpp.o CMakeFiles/dispenso.dir/priority.cpp.o CMakeFiles/dispenso.dir/schedulable.cpp.o CMakeFiles/dispenso.dir/small_buffer_allocator.cpp.o CMakeFiles/dispenso.dir/task_set.cpp.o CMakeFiles/dispenso.dir/thread_id.cpp.o CMakeFiles/dispenso.dir/thread_pool.cpp.o CMakeFiles/dispenso.dir/timed_task.cpp.o CMakeFiles/dispenso.dir/timing.cpp.o CMakeFiles/dispenso.dir/tsan_annotations.cpp.o  -Wl,-rpath,/opt/local/lib -latomic 
cd /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/build/dispenso && /opt/local/bin/cmake -E cmake_symlink_library libdispenso.1.2.0.dylib libdispenso.1.dylib libdispenso.dylib
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/build'
[100%] Built target dispenso

@graphicsMan
Copy link
Contributor

Thanks @barracuda156 for reporting the issues, for the commit, and for testing my patch.

I think there was one more issue you reported, related to compiler warning-as-error in moodycamel lib. I didn't repro that with my arm32 cross-compile. It may be that we want to treat moodycamel as a "system" library, so that we don't get warnings from that code. I'm not sure how to do that in CMake. I found this, but haven't had a chance to take a deeper look, and it might be a week or two until I can get back to this: https://stackoverflow.com/questions/52135983/cmake-target-link-libraries-include-as-system-to-suppress-compiler-warnings

If you wanted to try something and verify it for your platform, I'd happily accept another commit, otherwise, I can try to get back to this in a bit.

@barracuda156
Copy link
Contributor Author

@graphicsMan Are those warnings in reality harmless (i.e. triggered by w/e, but do not imply issues with the code) or possibly not? Disabling -Werror gets rid of them, but I do not know if that is the right thing to do.

@barracuda156
Copy link
Contributor Author

Those warnings show up on i386 too:

[ 60%] Building CXX object dispenso/CMakeFiles/dispenso.dir/task_set.cpp.o
cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_dispenso/dispenso/work/build/dispenso && /opt/local/bin/g++-mp-13 -DDISPENSO_LIB_EXPORT -DDISPENSO_SHARED_LIB -Ddispenso_EXPORTS -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_dispenso/dispenso/work/dispenso-1.2.0/dispenso/.. -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_dispenso/dispenso/work/dispenso-1.2.0/dispenso/third-party/moodycamel -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_dispenso/dispenso/work/build -pipe -Os -DNDEBUG -I/opt/local/include -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14 -arch i386 -mmacosx-version-min=10.6 -fPIC -fvisibility=hidden -Wall -Wextra -pedantic -Wconversion -Wno-sign-conversion -MD -MT dispenso/CMakeFiles/dispenso.dir/task_set.cpp.o -MF CMakeFiles/dispenso.dir/task_set.cpp.o.d -o CMakeFiles/dispenso.dir/task_set.cpp.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_dispenso/dispenso/work/dispenso-1.2.0/dispenso/task_set.cpp
In file included from /opt/local/include/gcc13/c++/atomic:41,
                 from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_dispenso/dispenso/work/dispenso-1.2.0/dispenso/../dispenso/platform.h:14,
                 from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_dispenso/dispenso/work/dispenso-1.2.0/dispenso/../dispenso/detail/small_buffer_allocator_impl.h:13,
                 from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_dispenso/dispenso/work/dispenso-1.2.0/dispenso/small_buffer_allocator.cpp:8:
In member function 'std::__atomic_base<_IntTp>::__int_type std::__atomic_base<_IntTp>::load(std::memory_order) const [with _ITp = long unsigned int]',
    inlined from 'bool moodycamel::ConcurrentQueue<T, Traits>::ExplicitProducer::enqueue_bulk(It, moodycamel::ConcurrentQueue<T, Traits>::size_t) [with moodycamel::ConcurrentQueue<T, Traits>::AllocationMode allocMode = moodycamel::ConcurrentQueue<char*, moodycamel::ConcurrentQueueDefaultTraits>::CanAlloc; It = char**; T = char*; Traits = moodycamel::ConcurrentQueueDefaultTraits]' at /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_dispenso/dispenso/work/dispenso-1.2.0/dispenso/third-party/moodycamel/concurrentqueue.h:2060:49,
    inlined from 'bool moodycamel::ConcurrentQueue<T, Traits>::inner_enqueue_bulk(const producer_token_t&, It, size_t) [with AllocationMode canAlloc = moodycamel::ConcurrentQueue<char*, moodycamel::ConcurrentQueueDefaultTraits>::CanAlloc; It = char**; T = char*; Traits = moodycamel::ConcurrentQueueDefaultTraits]' at /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_dispenso/dispenso/work/dispenso-1.2.0/dispenso/third-party/moodycamel/concurrentqueue.h:1382:124,
    inlined from 'bool moodycamel::ConcurrentQueue<T, Traits>::enqueue_bulk(const producer_token_t&, It, size_t) [with It = char**; T = char*; Traits = moodycamel::ConcurrentQueueDefaultTraits]' at /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_dispenso/dispenso/work/dispenso-1.2.0/dispenso/third-party/moodycamel/concurrentqueue.h:1052:38:
/opt/local/include/gcc13/c++/bits/atomic_base.h:505:31: warning: 'unsigned int __atomic_load_4(const volatile void*, int)' writing 4 bytes into a region of size 0 overflows the destination [-Wstringop-overflow=]
  505 |         return __atomic_load_n(&_M_i, int(__m));
      |                ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
In function 'bool moodycamel::ConcurrentQueue<T, Traits>::enqueue_bulk(const producer_token_t&, It, size_t) [with It = char**; T = char*; Traits = moodycamel::ConcurrentQueueDefaultTraits]':
cc1plus: note: destination object is likely at address zero

@graphicsMan
Copy link
Contributor

@barracuda156 Yes, it is my understanding that this should be an invalid (though understandable) warning. It is my understanding that this will not be null in this scenario (we should have valid producer token at this point). This error is with GCC? I'd prefer not to turn off -Werror altogether, but it would be good to disable this instance of this warning. I'll try to see if I can find out how to do that with this (since the error itself is showing up in atomic_base.h). If you have ideas, I'd love to hear them

@graphicsMan
Copy link
Contributor

@barracuda156 Can you please verify for me whether the attached patch will solve your issue?
dispenso_suppress_moodycamel_warnings.PATCH

@barracuda156
Copy link
Contributor Author

@barracuda156 Can you please verify for me whether the attached patch will solve your issue? dispenso_suppress_moodycamel_warnings.PATCH

@graphicsMan Thank you! I am away from the testing hardware atm, gonna be back by middle of next week. Will update on this as soon as I can.

@graphicsMan
Copy link
Contributor

Hey @barracuda156 just checking in to see if you had a chance to test the patch?

@barracuda156
Copy link
Contributor Author

@graphicsMan Will do tonight, thank you for a reminder.

@barracuda156
Copy link
Contributor Author

barracuda156 commented Mar 14, 2024

Dropping my patch to remove -Werror and applying dispenso_suppress_moodycamel_warnings.PATCH instead leaves the build broken:

[ 86%] Building CXX object dispenso/CMakeFiles/dispenso.dir/timing.cpp.o
cd /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/build/dispenso && /opt/local/bin/g++-mp-13 -DDISPENSO_LIB_EXPORT -DDISPENSO_SHARED_LIB -Ddispenso_EXPORTS -isystem /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-1.2.0/dispenso/.. -isystem /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-1.2.0/dispenso/third-party/moodycamel -isystem /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/build -pipe -Os -DNDEBUG -I/opt/local/include -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14 -arch ppc -mmacosx-version-min=10.6 -fPIC -fvisibility=hidden -Wall -Wextra -pedantic -Wconversion -Wno-sign-conversion -Werror -MD -MT dispenso/CMakeFiles/dispenso.dir/timing.cpp.o -MF CMakeFiles/dispenso.dir/timing.cpp.o.d -o CMakeFiles/dispenso.dir/timing.cpp.o -c /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-1.2.0/dispenso/timing.cpp
In file included from /opt/local/include/gcc13/c++/atomic:41,
                 from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-1.2.0/dispenso/platform.h:14,
                 from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-1.2.0/dispenso/detail/small_buffer_allocator_impl.h:13,
                 from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-1.2.0/dispenso/small_buffer_allocator.cpp:8:
In member function 'std::__atomic_base<_IntTp>::__int_type std::__atomic_base<_IntTp>::load(std::memory_order) const [with _ITp = long unsigned int]',
    inlined from 'bool moodycamel::ConcurrentQueue<T, Traits>::ExplicitProducer::enqueue_bulk(It, moodycamel::ConcurrentQueue<T, Traits>::size_t) [with moodycamel::ConcurrentQueue<T, Traits>::AllocationMode allocMode = moodycamel::ConcurrentQueue<char*, moodycamel::ConcurrentQueueDefaultTraits>::CanAlloc; It = char**; T = char*; Traits = moodycamel::ConcurrentQueueDefaultTraits]' at /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-1.2.0/dispenso/third-party/moodycamel/concurrentqueue.h:2060:49,
    inlined from 'bool moodycamel::ConcurrentQueue<T, Traits>::inner_enqueue_bulk(const producer_token_t&, It, size_t) [with AllocationMode canAlloc = moodycamel::ConcurrentQueue<char*, moodycamel::ConcurrentQueueDefaultTraits>::CanAlloc; It = char**; T = char*; Traits = moodycamel::ConcurrentQueueDefaultTraits]' at /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-1.2.0/dispenso/third-party/moodycamel/concurrentqueue.h:1382:124,
    inlined from 'bool moodycamel::ConcurrentQueue<T, Traits>::enqueue_bulk(const producer_token_t&, It, size_t) [with It = char**; T = char*; Traits = moodycamel::ConcurrentQueueDefaultTraits]' at /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-1.2.0/dispenso/third-party/moodycamel/concurrentqueue.h:1052:38:
/opt/local/include/gcc13/c++/bits/atomic_base.h:505:31: error: 'unsigned int __atomic_load_4(const volatile void*, int)' writing 4 bytes into a region of size 0 overflows the destination [-Werror=stringop-overflow=]
  505 |         return __atomic_load_n(&_M_i, int(__m));
      |                ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
In function 'bool moodycamel::ConcurrentQueue<T, Traits>::enqueue_bulk(const producer_token_t&, It, size_t) [with It = char**; T = char*; Traits = moodycamel::ConcurrentQueueDefaultTraits]':
cc1plus: note: destination object is likely at address zero
cc1plus: all warnings being treated as errors
make[2]: *** [dispenso/CMakeFiles/dispenso.dir/small_buffer_allocator.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
[ 93%] Building CXX object dispenso/CMakeFiles/dispenso.dir/tsan_annotations.cpp.o
cd /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/build/dispenso && /opt/local/bin/g++-mp-13 -DDISPENSO_LIB_EXPORT -DDISPENSO_SHARED_LIB -Ddispenso_EXPORTS -isystem /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-1.2.0/dispenso/.. -isystem /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-1.2.0/dispenso/third-party/moodycamel -isystem /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/build -pipe -Os -DNDEBUG -I/opt/local/include -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14 -arch ppc -mmacosx-version-min=10.6 -fPIC -fvisibility=hidden -Wall -Wextra -pedantic -Wconversion -Wno-sign-conversion -Werror -MD -MT dispenso/CMakeFiles/dispenso.dir/tsan_annotations.cpp.o -MF CMakeFiles/dispenso.dir/tsan_annotations.cpp.o.d -o CMakeFiles/dispenso.dir/tsan_annotations.cpp.o -c /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-1.2.0/dispenso/tsan_annotations.cpp
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-1.2.0/dispenso/timed_task.cpp: In member function 'void dispenso::TimedTaskScheduler::timeQueueRunLoop()':
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-1.2.0/dispenso/timed_task.cpp:86:28: error: redundant move in initialization [-Werror=redundant-move]
   86 |       auto next = std::move(tasks_.top());
      |                   ~~~~~~~~~^~~~~~~~~~~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-1.2.0/dispenso/timed_task.cpp:86:28: note: remove 'std::move' call
cc1plus: all warnings being treated as errors
make[2]: *** [dispenso/CMakeFiles/dispenso.dir/timed_task.cpp.o] Error 1
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/build'
make[1]: *** [dispenso/CMakeFiles/dispenso.dir/all] Error 2
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/build'
make: *** [all] Error 2

@graphicsMan
Copy link
Contributor

Bummer. Okay, I will have to look deeper, and/or possibly just try to disable this warning. Thanks for checking.

@graphicsMan
Copy link
Contributor

graphicsMan commented Mar 15, 2024

@barracuda156 can you please try to add -Wstringop-overflow=2 to the list of warning flags in dispenso/dispenso/CMakeLists.txt? If it still fails, can you try =1? You don't need my prior patch for this; however I'd recommend trying against the latest dispenso code and not a release, as the other warnings should have been fixed.

If one of these values works, please let me know which, and I will put something together that applies this when GCC is the compiler. I'd like to try 2 first, as it seems right to keep the warnings as strict as possible without being broken by them.

Thanks!

@barracuda156
Copy link
Contributor Author

Building from 4ebef42 – that still fails:

[ 53%] Building CXX object dispenso/CMakeFiles/dispenso.dir/small_buffer_allocator.cpp.o
cd /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/build/dispenso && /opt/local/bin/g++-mp-13 -DDISPENSO_LIB_EXPORT -DDISPENSO_SHARED_LIB -Ddispenso_EXPORTS -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-4ebef42e38c85f3d2ef213cb6edc7146eee521e6/dispenso/.. -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-4ebef42e38c85f3d2ef213cb6edc7146eee521e6/dispenso/third-party/moodycamel -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/build -pipe -Os -Wstringop-overflow=2 -DNDEBUG -I/opt/local/include -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14 -arch ppc -mmacosx-version-min=10.6 -fPIC -fvisibility=hidden -Wall -Wextra -pedantic -Wconversion -Wno-sign-conversion -Werror -MD -MT dispenso/CMakeFiles/dispenso.dir/small_buffer_allocator.cpp.o -MF CMakeFiles/dispenso.dir/small_buffer_allocator.cpp.o.d -o CMakeFiles/dispenso.dir/small_buffer_allocator.cpp.o -c /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-4ebef42e38c85f3d2ef213cb6edc7146eee521e6/dispenso/small_buffer_allocator.cpp
[ 60%] Building CXX object dispenso/CMakeFiles/dispenso.dir/task_set.cpp.o
cd /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/build/dispenso && /opt/local/bin/g++-mp-13 -DDISPENSO_LIB_EXPORT -DDISPENSO_SHARED_LIB -Ddispenso_EXPORTS -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-4ebef42e38c85f3d2ef213cb6edc7146eee521e6/dispenso/.. -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-4ebef42e38c85f3d2ef213cb6edc7146eee521e6/dispenso/third-party/moodycamel -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/build -pipe -Os -Wstringop-overflow=2 -DNDEBUG -I/opt/local/include -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14 -arch ppc -mmacosx-version-min=10.6 -fPIC -fvisibility=hidden -Wall -Wextra -pedantic -Wconversion -Wno-sign-conversion -Werror -MD -MT dispenso/CMakeFiles/dispenso.dir/task_set.cpp.o -MF CMakeFiles/dispenso.dir/task_set.cpp.o.d -o CMakeFiles/dispenso.dir/task_set.cpp.o -c /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-4ebef42e38c85f3d2ef213cb6edc7146eee521e6/dispenso/task_set.cpp
[ 66%] Building CXX object dispenso/CMakeFiles/dispenso.dir/thread_id.cpp.o
cd /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/build/dispenso && /opt/local/bin/g++-mp-13 -DDISPENSO_LIB_EXPORT -DDISPENSO_SHARED_LIB -Ddispenso_EXPORTS -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-4ebef42e38c85f3d2ef213cb6edc7146eee521e6/dispenso/.. -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-4ebef42e38c85f3d2ef213cb6edc7146eee521e6/dispenso/third-party/moodycamel -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/build -pipe -Os -Wstringop-overflow=2 -DNDEBUG -I/opt/local/include -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14 -arch ppc -mmacosx-version-min=10.6 -fPIC -fvisibility=hidden -Wall -Wextra -pedantic -Wconversion -Wno-sign-conversion -Werror -MD -MT dispenso/CMakeFiles/dispenso.dir/thread_id.cpp.o -MF CMakeFiles/dispenso.dir/thread_id.cpp.o.d -o CMakeFiles/dispenso.dir/thread_id.cpp.o -c /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-4ebef42e38c85f3d2ef213cb6edc7146eee521e6/dispenso/thread_id.cpp
[ 73%] Building CXX object dispenso/CMakeFiles/dispenso.dir/thread_pool.cpp.o
cd /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/build/dispenso && /opt/local/bin/g++-mp-13 -DDISPENSO_LIB_EXPORT -DDISPENSO_SHARED_LIB -Ddispenso_EXPORTS -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-4ebef42e38c85f3d2ef213cb6edc7146eee521e6/dispenso/.. -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-4ebef42e38c85f3d2ef213cb6edc7146eee521e6/dispenso/third-party/moodycamel -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/build -pipe -Os -Wstringop-overflow=2 -DNDEBUG -I/opt/local/include -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14 -arch ppc -mmacosx-version-min=10.6 -fPIC -fvisibility=hidden -Wall -Wextra -pedantic -Wconversion -Wno-sign-conversion -Werror -MD -MT dispenso/CMakeFiles/dispenso.dir/thread_pool.cpp.o -MF CMakeFiles/dispenso.dir/thread_pool.cpp.o.d -o CMakeFiles/dispenso.dir/thread_pool.cpp.o -c /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-4ebef42e38c85f3d2ef213cb6edc7146eee521e6/dispenso/thread_pool.cpp
[ 80%] Building CXX object dispenso/CMakeFiles/dispenso.dir/timed_task.cpp.o
cd /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/build/dispenso && /opt/local/bin/g++-mp-13 -DDISPENSO_LIB_EXPORT -DDISPENSO_SHARED_LIB -Ddispenso_EXPORTS -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-4ebef42e38c85f3d2ef213cb6edc7146eee521e6/dispenso/.. -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-4ebef42e38c85f3d2ef213cb6edc7146eee521e6/dispenso/third-party/moodycamel -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/build -pipe -Os -Wstringop-overflow=2 -DNDEBUG -I/opt/local/include -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14 -arch ppc -mmacosx-version-min=10.6 -fPIC -fvisibility=hidden -Wall -Wextra -pedantic -Wconversion -Wno-sign-conversion -Werror -MD -MT dispenso/CMakeFiles/dispenso.dir/timed_task.cpp.o -MF CMakeFiles/dispenso.dir/timed_task.cpp.o.d -o CMakeFiles/dispenso.dir/timed_task.cpp.o -c /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-4ebef42e38c85f3d2ef213cb6edc7146eee521e6/dispenso/timed_task.cpp
[ 86%] Building CXX object dispenso/CMakeFiles/dispenso.dir/timing.cpp.o
cd /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/build/dispenso && /opt/local/bin/g++-mp-13 -DDISPENSO_LIB_EXPORT -DDISPENSO_SHARED_LIB -Ddispenso_EXPORTS -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-4ebef42e38c85f3d2ef213cb6edc7146eee521e6/dispenso/.. -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-4ebef42e38c85f3d2ef213cb6edc7146eee521e6/dispenso/third-party/moodycamel -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/build -pipe -Os -Wstringop-overflow=2 -DNDEBUG -I/opt/local/include -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14 -arch ppc -mmacosx-version-min=10.6 -fPIC -fvisibility=hidden -Wall -Wextra -pedantic -Wconversion -Wno-sign-conversion -Werror -MD -MT dispenso/CMakeFiles/dispenso.dir/timing.cpp.o -MF CMakeFiles/dispenso.dir/timing.cpp.o.d -o CMakeFiles/dispenso.dir/timing.cpp.o -c /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-4ebef42e38c85f3d2ef213cb6edc7146eee521e6/dispenso/timing.cpp
In file included from /opt/local/include/gcc13/c++/atomic:41,
                 from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-4ebef42e38c85f3d2ef213cb6edc7146eee521e6/dispenso/../dispenso/platform.h:14,
                 from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-4ebef42e38c85f3d2ef213cb6edc7146eee521e6/dispenso/../dispenso/detail/small_buffer_allocator_impl.h:13,
                 from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-4ebef42e38c85f3d2ef213cb6edc7146eee521e6/dispenso/small_buffer_allocator.cpp:8:
In member function 'std::__atomic_base<_IntTp>::__int_type std::__atomic_base<_IntTp>::load(std::memory_order) const [with _ITp = long unsigned int]',
    inlined from 'bool moodycamel::ConcurrentQueue<T, Traits>::ExplicitProducer::enqueue_bulk(It, moodycamel::ConcurrentQueue<T, Traits>::size_t) [with moodycamel::ConcurrentQueue<T, Traits>::AllocationMode allocMode = moodycamel::ConcurrentQueue<char*, moodycamel::ConcurrentQueueDefaultTraits>::CanAlloc; It = char**; T = char*; Traits = moodycamel::ConcurrentQueueDefaultTraits]' at /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-4ebef42e38c85f3d2ef213cb6edc7146eee521e6/dispenso/third-party/moodycamel/concurrentqueue.h:2060:49,
    inlined from 'bool moodycamel::ConcurrentQueue<T, Traits>::inner_enqueue_bulk(const producer_token_t&, It, size_t) [with AllocationMode canAlloc = moodycamel::ConcurrentQueue<char*, moodycamel::ConcurrentQueueDefaultTraits>::CanAlloc; It = char**; T = char*; Traits = moodycamel::ConcurrentQueueDefaultTraits]' at /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-4ebef42e38c85f3d2ef213cb6edc7146eee521e6/dispenso/third-party/moodycamel/concurrentqueue.h:1382:124,
    inlined from 'bool moodycamel::ConcurrentQueue<T, Traits>::enqueue_bulk(const producer_token_t&, It, size_t) [with It = char**; T = char*; Traits = moodycamel::ConcurrentQueueDefaultTraits]' at /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-4ebef42e38c85f3d2ef213cb6edc7146eee521e6/dispenso/third-party/moodycamel/concurrentqueue.h:1052:38:
/opt/local/include/gcc13/c++/bits/atomic_base.h:505:31: error: 'unsigned int __atomic_load_4(const volatile void*, int)' writing 4 bytes into a region of size 0 overflows the destination [-Werror=stringop-overflow=]
  505 |         return __atomic_load_n(&_M_i, int(__m));
      |                ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
In function 'bool moodycamel::ConcurrentQueue<T, Traits>::enqueue_bulk(const producer_token_t&, It, size_t) [with It = char**; T = char*; Traits = moodycamel::ConcurrentQueueDefaultTraits]':
cc1plus: note: destination object is likely at address zero
cc1plus: all warnings being treated as errors

Same with -Wstringop-overflow=2. It does build with -Wno-stringop-overflow, however (and no patches).

@graphicsMan
Copy link
Contributor

Great info, thanks @barracuda156. I'll try turning that off for GCC. I hate doing it, as I usually want all diagnostics, but it really doesn't make sense in this case. I'll try to get something landed this week, and after that, I'll cut a new release that incorporates all of these small recent fixes.

@graphicsMan
Copy link
Contributor

Can you please double check that this patch works for you? I've verified that I can build with g++ and clang locally on x86_64 with this patch.
dispenso_suppress_stringop_overflow.PATCH

Thanks!

@graphicsMan
Copy link
Contributor

@barracuda156 Just checking in. I fully expect this to work, but where I don't have an easy setup to test, I'm hoping you can help me verify.

Thanks!

@graphicsMan
Copy link
Contributor

@barracuda156 I went ahead and landed this change. Please try from main when you get a chance? I plan to cut a new release soon, but I'd love to have your confirmation that this fixes your issue

@barracuda156
Copy link
Contributor Author

Sorry for a delay, will do it tonight.

@barracuda156
Copy link
Contributor Author

Yes, from ac845f0 it builds fine with no patches or manual flag passing:

36-100% sudo port -v -n build dispenso
Warning: configured user/group macports does not exist, will build as root
Portfile for dispenso changed since last build; discarding previous state.
--->  Computing dependencies for dispenso.
--->  Fetching distfiles for dispenso
--->  Verifying checksums for dispenso
--->  Checksumming dispenso-ac845f062ea62d9d2462ead0124bc7777c758e6d.tar.gz
--->  Extracting dispenso
--->  Extracting dispenso-ac845f062ea62d9d2462ead0124bc7777c758e6d.tar.gz
Executing:  cd "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work" && /usr/bin/gzip -dc '/opt/local/var/macports/distfiles/dispenso/dispenso-ac845f062ea62d9d2462ead0124bc7777c758e6d.tar.gz' | /usr/bin/gnutar --no-same-owner -xf - 
--->  Configuring dispenso
Executing:  cd "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/build" && /opt/local/bin/cmake -G "CodeBlocks - Unix Makefiles" -DCMAKE_BUILD_TYPE=MacPorts -DCMAKE_INSTALL_PREFIX="/opt/local" -DCMAKE_INSTALL_NAME_DIR="/opt/local/lib" -DCMAKE_SYSTEM_PREFIX_PATH="/opt/local;/usr" -DCMAKE_C_COMPILER="$CC" -DCMAKE_CXX_COMPILER="$CXX" -DCMAKE_OBJC_COMPILER="$CC" -DCMAKE_OBJCXX_COMPILER="$CXX" -DCMAKE_POLICY_DEFAULT_CMP0025=NEW -DCMAKE_POLICY_DEFAULT_CMP0060=NEW -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_COLOR_MAKEFILE=ON -DCMAKE_FIND_FRAMEWORK=LAST -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_MAKE_PROGRAM=/usr/bin/make -DCMAKE_MODULE_PATH="/opt/local/share/cmake/Modules" -DCMAKE_PREFIX_PATH="/opt/local/share/cmake/Modules" -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON -DCMAKE_INSTALL_RPATH="/opt/local/lib" -Wno-dev -DDISPENSO_BUILD_BENCHMARKS=OFF -DDISPENSO_BUILD_TESTS=OFF -DCMAKE_OSX_ARCHITECTURES="ppc" -DCMAKE_OSX_DEPLOYMENT_TARGET="10.6" -DCMAKE_OSX_SYSROOT="/" /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-ac845f062ea62d9d2462ead0124bc7777c758e6d 
-- The CXX compiler identification is GNU 13.2.0
-- Checking whether CXX compiler has -isysroot
-- Checking whether CXX compiler has -isysroot - yes
-- Checking whether CXX compiler supports OSX deployment target flag
-- Checking whether CXX compiler supports OSX deployment target flag - yes
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /opt/local/bin/g++-mp-13 - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
SOURCES:  /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-ac845f062ea62d9d2462ead0124bc7777c758e6d/dispenso/detail/per_thread_info.cpp;/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-ac845f062ea62d9d2462ead0124bc7777c758e6d/dispenso/detail/quanta.cpp;/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-ac845f062ea62d9d2462ead0124bc7777c758e6d/dispenso/graph.cpp;/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-ac845f062ea62d9d2462ead0124bc7777c758e6d/dispenso/graph_executor.cpp;/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-ac845f062ea62d9d2462ead0124bc7777c758e6d/dispenso/pool_allocator.cpp;/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-ac845f062ea62d9d2462ead0124bc7777c758e6d/dispenso/priority.cpp;/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-ac845f062ea62d9d2462ead0124bc7777c758e6d/dispenso/schedulable.cpp;/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-ac845f062ea62d9d2462ead0124bc7777c758e6d/dispenso/small_buffer_allocator.cpp;/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-ac845f062ea62d9d2462ead0124bc7777c758e6d/dispenso/task_set.cpp;/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-ac845f062ea62d9d2462ead0124bc7777c758e6d/dispenso/thread_id.cpp;/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-ac845f062ea62d9d2462ead0124bc7777c758e6d/dispenso/thread_pool.cpp;/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-ac845f062ea62d9d2462ead0124bc7777c758e6d/dispenso/timed_task.cpp;/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-ac845f062ea62d9d2462ead0124bc7777c758e6d/dispenso/timing.cpp;/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-ac845f062ea62d9d2462ead0124bc7777c758e6d/dispenso/tsan_annotations.cpp
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Performing Test DISPENSO_HAS_ATOMIC_WITHOUT_LIB
-- Performing Test DISPENSO_HAS_ATOMIC_WITHOUT_LIB - Failed
-- Configuring done (4.0s)
-- Generating done (0.1s)
CMake Warning:
  Manually-specified variables were not used by the project:

    CMAKE_C_COMPILER
    CMAKE_OBJCXX_COMPILER
    CMAKE_OBJC_COMPILER
    CMAKE_POLICY_DEFAULT_CMP0025
    CMAKE_POLICY_DEFAULT_CMP0060


-- Build files have been written to: /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/build
--->  Building dispenso
Executing:  cd "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/build" && /usr/bin/make -j6 -w all VERBOSE=ON 
make: Entering directory `/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/build'
/opt/local/bin/cmake -P /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/build/CMakeFiles/VerifyGlobs.cmake
/opt/local/bin/cmake -S/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-ac845f062ea62d9d2462ead0124bc7777c758e6d -B/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/build --check-build-system CMakeFiles/Makefile.cmake 0
/opt/local/bin/cmake -E cmake_progress_start /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/build/CMakeFiles /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/build//CMakeFiles/progress.marks
/usr/bin/make  -f CMakeFiles/Makefile2 all
make[1]: Entering directory `/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/build'
/usr/bin/make  -f dispenso/CMakeFiles/dispenso.dir/build.make dispenso/CMakeFiles/dispenso.dir/depend
make[2]: Entering directory `/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/build'
cd /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/build && /opt/local/bin/cmake -E cmake_depends "Unix Makefiles" /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-ac845f062ea62d9d2462ead0124bc7777c758e6d /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-ac845f062ea62d9d2462ead0124bc7777c758e6d/dispenso /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/build /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/build/dispenso /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/build/dispenso/CMakeFiles/dispenso.dir/DependInfo.cmake "--color="
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/build'
/usr/bin/make  -f dispenso/CMakeFiles/dispenso.dir/build.make dispenso/CMakeFiles/dispenso.dir/build
make[2]: Entering directory `/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/build'
[  6%] Building CXX object dispenso/CMakeFiles/dispenso.dir/detail/per_thread_info.cpp.o
cd /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/build/dispenso && /opt/local/bin/g++-mp-13 -DDISPENSO_LIB_EXPORT -DDISPENSO_SHARED_LIB -Ddispenso_EXPORTS -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-ac845f062ea62d9d2462ead0124bc7777c758e6d/dispenso/.. -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-ac845f062ea62d9d2462ead0124bc7777c758e6d/dispenso/third-party/moodycamel -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/build -pipe -Os -DNDEBUG -I/opt/local/include -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14 -arch ppc -mmacosx-version-min=10.6 -fPIC -fvisibility=hidden -Wno-stringop-overflow -Wall -Wextra -pedantic -Wconversion -Wno-sign-conversion -Werror -MD -MT dispenso/CMakeFiles/dispenso.dir/detail/per_thread_info.cpp.o -MF CMakeFiles/dispenso.dir/detail/per_thread_info.cpp.o.d -o CMakeFiles/dispenso.dir/detail/per_thread_info.cpp.o -c /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-ac845f062ea62d9d2462ead0124bc7777c758e6d/dispenso/detail/per_thread_info.cpp
[ 13%] Building CXX object dispenso/CMakeFiles/dispenso.dir/graph.cpp.o
cd /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/build/dispenso && /opt/local/bin/g++-mp-13 -DDISPENSO_LIB_EXPORT -DDISPENSO_SHARED_LIB -Ddispenso_EXPORTS -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-ac845f062ea62d9d2462ead0124bc7777c758e6d/dispenso/.. -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-ac845f062ea62d9d2462ead0124bc7777c758e6d/dispenso/third-party/moodycamel -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/build -pipe -Os -DNDEBUG -I/opt/local/include -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14 -arch ppc -mmacosx-version-min=10.6 -fPIC -fvisibility=hidden -Wno-stringop-overflow -Wall -Wextra -pedantic -Wconversion -Wno-sign-conversion -Werror -MD -MT dispenso/CMakeFiles/dispenso.dir/graph.cpp.o -MF CMakeFiles/dispenso.dir/graph.cpp.o.d -o CMakeFiles/dispenso.dir/graph.cpp.o -c /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-ac845f062ea62d9d2462ead0124bc7777c758e6d/dispenso/graph.cpp
[ 20%] Building CXX object dispenso/CMakeFiles/dispenso.dir/priority.cpp.o
cd /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/build/dispenso && /opt/local/bin/g++-mp-13 -DDISPENSO_LIB_EXPORT -DDISPENSO_SHARED_LIB -Ddispenso_EXPORTS -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-ac845f062ea62d9d2462ead0124bc7777c758e6d/dispenso/.. -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-ac845f062ea62d9d2462ead0124bc7777c758e6d/dispenso/third-party/moodycamel -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/build -pipe -Os -DNDEBUG -I/opt/local/include -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14 -arch ppc -mmacosx-version-min=10.6 -fPIC -fvisibility=hidden -Wno-stringop-overflow -Wall -Wextra -pedantic -Wconversion -Wno-sign-conversion -Werror -MD -MT dispenso/CMakeFiles/dispenso.dir/priority.cpp.o -MF CMakeFiles/dispenso.dir/priority.cpp.o.d -o CMakeFiles/dispenso.dir/priority.cpp.o -c /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-ac845f062ea62d9d2462ead0124bc7777c758e6d/dispenso/priority.cpp
[ 26%] Building CXX object dispenso/CMakeFiles/dispenso.dir/pool_allocator.cpp.o
cd /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/build/dispenso && /opt/local/bin/g++-mp-13 -DDISPENSO_LIB_EXPORT -DDISPENSO_SHARED_LIB -Ddispenso_EXPORTS -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-ac845f062ea62d9d2462ead0124bc7777c758e6d/dispenso/.. -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-ac845f062ea62d9d2462ead0124bc7777c758e6d/dispenso/third-party/moodycamel -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/build -pipe -Os -DNDEBUG -I/opt/local/include -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14 -arch ppc -mmacosx-version-min=10.6 -fPIC -fvisibility=hidden -Wno-stringop-overflow -Wall -Wextra -pedantic -Wconversion -Wno-sign-conversion -Werror -MD -MT dispenso/CMakeFiles/dispenso.dir/pool_allocator.cpp.o -MF CMakeFiles/dispenso.dir/pool_allocator.cpp.o.d -o CMakeFiles/dispenso.dir/pool_allocator.cpp.o -c /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-ac845f062ea62d9d2462ead0124bc7777c758e6d/dispenso/pool_allocator.cpp
[ 33%] Building CXX object dispenso/CMakeFiles/dispenso.dir/graph_executor.cpp.o
[ 40%] Building CXX object dispenso/CMakeFiles/dispenso.dir/detail/quanta.cpp.o
cd /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/build/dispenso && /opt/local/bin/g++-mp-13 -DDISPENSO_LIB_EXPORT -DDISPENSO_SHARED_LIB -Ddispenso_EXPORTS -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-ac845f062ea62d9d2462ead0124bc7777c758e6d/dispenso/.. -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-ac845f062ea62d9d2462ead0124bc7777c758e6d/dispenso/third-party/moodycamel -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/build -pipe -Os -DNDEBUG -I/opt/local/include -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14 -arch ppc -mmacosx-version-min=10.6 -fPIC -fvisibility=hidden -Wno-stringop-overflow -Wall -Wextra -pedantic -Wconversion -Wno-sign-conversion -Werror -MD -MT dispenso/CMakeFiles/dispenso.dir/graph_executor.cpp.o -MF CMakeFiles/dispenso.dir/graph_executor.cpp.o.d -o CMakeFiles/dispenso.dir/graph_executor.cpp.o -c /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-ac845f062ea62d9d2462ead0124bc7777c758e6d/dispenso/graph_executor.cpp
cd /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/build/dispenso && /opt/local/bin/g++-mp-13 -DDISPENSO_LIB_EXPORT -DDISPENSO_SHARED_LIB -Ddispenso_EXPORTS -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-ac845f062ea62d9d2462ead0124bc7777c758e6d/dispenso/.. -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-ac845f062ea62d9d2462ead0124bc7777c758e6d/dispenso/third-party/moodycamel -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/build -pipe -Os -DNDEBUG -I/opt/local/include -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14 -arch ppc -mmacosx-version-min=10.6 -fPIC -fvisibility=hidden -Wno-stringop-overflow -Wall -Wextra -pedantic -Wconversion -Wno-sign-conversion -Werror -MD -MT dispenso/CMakeFiles/dispenso.dir/detail/quanta.cpp.o -MF CMakeFiles/dispenso.dir/detail/quanta.cpp.o.d -o CMakeFiles/dispenso.dir/detail/quanta.cpp.o -c /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-ac845f062ea62d9d2462ead0124bc7777c758e6d/dispenso/detail/quanta.cpp
[ 46%] Building CXX object dispenso/CMakeFiles/dispenso.dir/schedulable.cpp.o
cd /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/build/dispenso && /opt/local/bin/g++-mp-13 -DDISPENSO_LIB_EXPORT -DDISPENSO_SHARED_LIB -Ddispenso_EXPORTS -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-ac845f062ea62d9d2462ead0124bc7777c758e6d/dispenso/.. -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-ac845f062ea62d9d2462ead0124bc7777c758e6d/dispenso/third-party/moodycamel -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/build -pipe -Os -DNDEBUG -I/opt/local/include -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14 -arch ppc -mmacosx-version-min=10.6 -fPIC -fvisibility=hidden -Wno-stringop-overflow -Wall -Wextra -pedantic -Wconversion -Wno-sign-conversion -Werror -MD -MT dispenso/CMakeFiles/dispenso.dir/schedulable.cpp.o -MF CMakeFiles/dispenso.dir/schedulable.cpp.o.d -o CMakeFiles/dispenso.dir/schedulable.cpp.o -c /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-ac845f062ea62d9d2462ead0124bc7777c758e6d/dispenso/schedulable.cpp
[ 53%] Building CXX object dispenso/CMakeFiles/dispenso.dir/small_buffer_allocator.cpp.o
cd /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/build/dispenso && /opt/local/bin/g++-mp-13 -DDISPENSO_LIB_EXPORT -DDISPENSO_SHARED_LIB -Ddispenso_EXPORTS -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-ac845f062ea62d9d2462ead0124bc7777c758e6d/dispenso/.. -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-ac845f062ea62d9d2462ead0124bc7777c758e6d/dispenso/third-party/moodycamel -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/build -pipe -Os -DNDEBUG -I/opt/local/include -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14 -arch ppc -mmacosx-version-min=10.6 -fPIC -fvisibility=hidden -Wno-stringop-overflow -Wall -Wextra -pedantic -Wconversion -Wno-sign-conversion -Werror -MD -MT dispenso/CMakeFiles/dispenso.dir/small_buffer_allocator.cpp.o -MF CMakeFiles/dispenso.dir/small_buffer_allocator.cpp.o.d -o CMakeFiles/dispenso.dir/small_buffer_allocator.cpp.o -c /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-ac845f062ea62d9d2462ead0124bc7777c758e6d/dispenso/small_buffer_allocator.cpp
[ 60%] Building CXX object dispenso/CMakeFiles/dispenso.dir/task_set.cpp.o
cd /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/build/dispenso && /opt/local/bin/g++-mp-13 -DDISPENSO_LIB_EXPORT -DDISPENSO_SHARED_LIB -Ddispenso_EXPORTS -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-ac845f062ea62d9d2462ead0124bc7777c758e6d/dispenso/.. -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-ac845f062ea62d9d2462ead0124bc7777c758e6d/dispenso/third-party/moodycamel -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/build -pipe -Os -DNDEBUG -I/opt/local/include -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14 -arch ppc -mmacosx-version-min=10.6 -fPIC -fvisibility=hidden -Wno-stringop-overflow -Wall -Wextra -pedantic -Wconversion -Wno-sign-conversion -Werror -MD -MT dispenso/CMakeFiles/dispenso.dir/task_set.cpp.o -MF CMakeFiles/dispenso.dir/task_set.cpp.o.d -o CMakeFiles/dispenso.dir/task_set.cpp.o -c /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-ac845f062ea62d9d2462ead0124bc7777c758e6d/dispenso/task_set.cpp
[ 66%] Building CXX object dispenso/CMakeFiles/dispenso.dir/thread_id.cpp.o
cd /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/build/dispenso && /opt/local/bin/g++-mp-13 -DDISPENSO_LIB_EXPORT -DDISPENSO_SHARED_LIB -Ddispenso_EXPORTS -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-ac845f062ea62d9d2462ead0124bc7777c758e6d/dispenso/.. -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-ac845f062ea62d9d2462ead0124bc7777c758e6d/dispenso/third-party/moodycamel -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/build -pipe -Os -DNDEBUG -I/opt/local/include -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14 -arch ppc -mmacosx-version-min=10.6 -fPIC -fvisibility=hidden -Wno-stringop-overflow -Wall -Wextra -pedantic -Wconversion -Wno-sign-conversion -Werror -MD -MT dispenso/CMakeFiles/dispenso.dir/thread_id.cpp.o -MF CMakeFiles/dispenso.dir/thread_id.cpp.o.d -o CMakeFiles/dispenso.dir/thread_id.cpp.o -c /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-ac845f062ea62d9d2462ead0124bc7777c758e6d/dispenso/thread_id.cpp
[ 73%] Building CXX object dispenso/CMakeFiles/dispenso.dir/thread_pool.cpp.o
cd /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/build/dispenso && /opt/local/bin/g++-mp-13 -DDISPENSO_LIB_EXPORT -DDISPENSO_SHARED_LIB -Ddispenso_EXPORTS -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-ac845f062ea62d9d2462ead0124bc7777c758e6d/dispenso/.. -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-ac845f062ea62d9d2462ead0124bc7777c758e6d/dispenso/third-party/moodycamel -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/build -pipe -Os -DNDEBUG -I/opt/local/include -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14 -arch ppc -mmacosx-version-min=10.6 -fPIC -fvisibility=hidden -Wno-stringop-overflow -Wall -Wextra -pedantic -Wconversion -Wno-sign-conversion -Werror -MD -MT dispenso/CMakeFiles/dispenso.dir/thread_pool.cpp.o -MF CMakeFiles/dispenso.dir/thread_pool.cpp.o.d -o CMakeFiles/dispenso.dir/thread_pool.cpp.o -c /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-ac845f062ea62d9d2462ead0124bc7777c758e6d/dispenso/thread_pool.cpp
[ 80%] Building CXX object dispenso/CMakeFiles/dispenso.dir/timed_task.cpp.o
cd /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/build/dispenso && /opt/local/bin/g++-mp-13 -DDISPENSO_LIB_EXPORT -DDISPENSO_SHARED_LIB -Ddispenso_EXPORTS -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-ac845f062ea62d9d2462ead0124bc7777c758e6d/dispenso/.. -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-ac845f062ea62d9d2462ead0124bc7777c758e6d/dispenso/third-party/moodycamel -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/build -pipe -Os -DNDEBUG -I/opt/local/include -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14 -arch ppc -mmacosx-version-min=10.6 -fPIC -fvisibility=hidden -Wno-stringop-overflow -Wall -Wextra -pedantic -Wconversion -Wno-sign-conversion -Werror -MD -MT dispenso/CMakeFiles/dispenso.dir/timed_task.cpp.o -MF CMakeFiles/dispenso.dir/timed_task.cpp.o.d -o CMakeFiles/dispenso.dir/timed_task.cpp.o -c /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-ac845f062ea62d9d2462ead0124bc7777c758e6d/dispenso/timed_task.cpp
[ 86%] Building CXX object dispenso/CMakeFiles/dispenso.dir/timing.cpp.o
cd /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/build/dispenso && /opt/local/bin/g++-mp-13 -DDISPENSO_LIB_EXPORT -DDISPENSO_SHARED_LIB -Ddispenso_EXPORTS -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-ac845f062ea62d9d2462ead0124bc7777c758e6d/dispenso/.. -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-ac845f062ea62d9d2462ead0124bc7777c758e6d/dispenso/third-party/moodycamel -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/build -pipe -Os -DNDEBUG -I/opt/local/include -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14 -arch ppc -mmacosx-version-min=10.6 -fPIC -fvisibility=hidden -Wno-stringop-overflow -Wall -Wextra -pedantic -Wconversion -Wno-sign-conversion -Werror -MD -MT dispenso/CMakeFiles/dispenso.dir/timing.cpp.o -MF CMakeFiles/dispenso.dir/timing.cpp.o.d -o CMakeFiles/dispenso.dir/timing.cpp.o -c /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-ac845f062ea62d9d2462ead0124bc7777c758e6d/dispenso/timing.cpp
[ 93%] Building CXX object dispenso/CMakeFiles/dispenso.dir/tsan_annotations.cpp.o
cd /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/build/dispenso && /opt/local/bin/g++-mp-13 -DDISPENSO_LIB_EXPORT -DDISPENSO_SHARED_LIB -Ddispenso_EXPORTS -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-ac845f062ea62d9d2462ead0124bc7777c758e6d/dispenso/.. -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-ac845f062ea62d9d2462ead0124bc7777c758e6d/dispenso/third-party/moodycamel -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/build -pipe -Os -DNDEBUG -I/opt/local/include -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14 -arch ppc -mmacosx-version-min=10.6 -fPIC -fvisibility=hidden -Wno-stringop-overflow -Wall -Wextra -pedantic -Wconversion -Wno-sign-conversion -Werror -MD -MT dispenso/CMakeFiles/dispenso.dir/tsan_annotations.cpp.o -MF CMakeFiles/dispenso.dir/tsan_annotations.cpp.o.d -o CMakeFiles/dispenso.dir/tsan_annotations.cpp.o -c /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/dispenso-ac845f062ea62d9d2462ead0124bc7777c758e6d/dispenso/tsan_annotations.cpp
[100%] Linking CXX shared library libdispenso.dylib
cd /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/build/dispenso && /opt/local/bin/cmake -E cmake_link_script CMakeFiles/dispenso.dir/link.txt --verbose=ON
/opt/local/bin/g++-mp-13 -pipe -Os -DNDEBUG -I/opt/local/include -D_GLIBCXX_USE_CXX11_ABI=0 -arch ppc -mmacosx-version-min=10.6 -dynamiclib -Wl,-headerpad_max_install_names -L/opt/local/lib -Wl,-headerpad_max_install_names -compatibility_version 1.0.0 -current_version 1.2.0 -o libdispenso.1.2.0.dylib -install_name @rpath/libdispenso.1.dylib CMakeFiles/dispenso.dir/detail/per_thread_info.cpp.o CMakeFiles/dispenso.dir/detail/quanta.cpp.o CMakeFiles/dispenso.dir/graph.cpp.o CMakeFiles/dispenso.dir/graph_executor.cpp.o CMakeFiles/dispenso.dir/pool_allocator.cpp.o CMakeFiles/dispenso.dir/priority.cpp.o CMakeFiles/dispenso.dir/schedulable.cpp.o CMakeFiles/dispenso.dir/small_buffer_allocator.cpp.o CMakeFiles/dispenso.dir/task_set.cpp.o CMakeFiles/dispenso.dir/thread_id.cpp.o CMakeFiles/dispenso.dir/thread_pool.cpp.o CMakeFiles/dispenso.dir/timed_task.cpp.o CMakeFiles/dispenso.dir/timing.cpp.o CMakeFiles/dispenso.dir/tsan_annotations.cpp.o  -Wl,-rpath,/opt/local/lib -latomic
cd /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/build/dispenso && /opt/local/bin/cmake -E cmake_symlink_library libdispenso.1.2.0.dylib libdispenso.1.dylib libdispenso.dylib
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/build'
[100%] Built target dispenso
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/build'
/opt/local/bin/cmake -E cmake_progress_start /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/build/CMakeFiles 0
make: Leaving directory `/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_dispenso/dispenso/work/build'

@barracuda156
Copy link
Contributor Author

@graphicsMan It also builds fine with tests enabled, though there are a number of errors when running tests: #29

@graphicsMan
Copy link
Contributor

I'm going to close this issue since we have now a narrower one against PPC32-bit test failures specifically in #29

@barracuda156
Copy link
Contributor Author

@graphicsMan Sure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants