Skip to content

Update to build with gcc-15#11547

Open
mitchute wants to merge 3 commits into
developfrom
gcc-15
Open

Update to build with gcc-15#11547
mitchute wants to merge 3 commits into
developfrom
gcc-15

Conversation

@mitchute
Copy link
Copy Markdown
Collaborator

Pull request overview

Description of the purpose of this PR

Pull Request Author

  • Title of PR should be user-synopsis style (clearly understandable in a standalone changelog context)
  • Label the PR with at least one of: Defect, Refactoring, NewFeature, Performance, and/or DoNoPublish
  • Pull requests that impact EnergyPlus code must also include unit tests to cover enhancement or defect repair
  • Author should provide a "walkthrough" of relevant code changes using a GitHub code review comment process
  • If any diffs are expected, author must demonstrate they are justified using plots and descriptions
  • If changes fix a defect, the fix should be demonstrated in plots and descriptions
  • If any defect files are updated to a more recent version, upload new versions here or on DevSupport
  • If IDD requires transition, transition source, rules, ExpandObjects, and IDFs must be updated, and add IDDChange label
  • If structural output changes, add to output rules file and add OutputChange label
  • If adding/removing any LaTeX docs or figures, update that document's CMakeLists file dependencies
  • If adding/removing any output files (e.g., eplustbl.*)
    • Update ..\scripts\Epl-run.bat
    • Update ..\scripts\RunEPlus.bat
    • Update ..\src\EPLaunch\ MainModule.bas, epl-ui.frm, and epl.vbp (VersionComments)
    • Update ...github\workflows\energyplus.py

Reviewer

  • Perform a Code Review on GitHub
  • If branch is behind develop, merge develop and build locally to check for side effects of the merge
  • If defect, verify by running develop branch and reproducing defect, then running PR and reproducing fix
  • If feature, test running new feature, try creative ways to break it
  • CI status: all green or justified
  • Check that performance is not impacted (CI Linux results include performance check)
  • Run Unit Test(s) locally
  • Check any new function arguments for performance impacts
  • Verify IDF naming conventions and styles, memos and notes and defaults
  • If new idf included, locally check the err file and other outputs

@mitchute mitchute self-assigned this Apr 25, 2026
@mitchute mitchute added the Defect Includes code to repair a defect in EnergyPlus label Apr 25, 2026
@mitchute mitchute marked this pull request as draft April 29, 2026 19:55
@kiefernforst
Copy link
Copy Markdown

Great, please merge this. The CMakeLists however must be rebased.

Copy link
Copy Markdown
Contributor

@jmarrec jmarrec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious if ALL of these are required or not.

FWIW, locally I can't build without workarounds with apple-clang 21 on mac, so I have a subsequent PR coming at some point I guess

Comment thread src/EnergyPlus/CMakeLists.txt Outdated
ep_enable_pch(energypluslib)
if(LINK_WITH_PYTHON)
set_source_files_properties(PluginManager.cc PythonEngine.cc PROPERTIES SKIP_PRECOMPILE_HEADERS ON)
endif()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

Comment thread cmake/CompilerFlags.cmake
Comment on lines +123 to +126
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 15.0)
# GCC 15 emits false positives through libstdc++ when compiling bundled fmt 8.0.1 with -Werror
target_compile_options(project_warnings INTERFACE -Wno-restrict)
endif()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What error were you getting without this?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In function ‘_ForwardIterator std::uninitialized_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = char*; _ForwardIterator = char*]’,
    inlined from ‘_ForwardIterator std::__uninitialized_copy_n(_RandomAccessIterator, _Size, _ForwardIterator, random_access_iterator_tag) [with _RandomAccessIterator = char*; _Size = int; _ForwardIterator = char*]’ at /usr/include/c++/15/bits/stl_uninitialized.h:1110:37,
    inlined from ‘_ForwardIterator std::uninitialized_copy_n(_InputIterator, _Size, _ForwardIterator) [with _InputIterator = char*; _Size = int; _ForwardIterator = char*]’ at /usr/include/c++/15/bits/stl_uninitialized.h:1156:41,
    inlined from ‘Char* fmt::v8::detail::write_significand(Char*, UInt, int, int, Char) [with Char = char; UInt = unsigned int; typename std::enable_if<std::is_integral<_Size>::value, int>::type <anonymous> = 0]’ at /home/nrel/EnergyPlus/third_party/fmt-8.0.1/include/fmt/format.h:1731:30,
    inlined from ‘Char* fmt::v8::detail::write_significand(Char*, UInt, int, int, Char) [with Char = char; UInt = unsigned int; typename std::enable_if<std::is_integral<_Size>::value, int>::type <anonymous> = 0]’ at /home/nrel/EnergyPlus/third_party/fmt-8.0.1/include/fmt/format.h:1723:13,
    inlined from ‘OutputIt fmt::v8::detail::write_significand(OutputIt, UInt, int, int, Char) [with OutputIt = fmt::v8::appender; UInt = unsigned int; Char = char; typename std::enable_if<(! std::is_pointer<typename std::remove_cv<typename std::remove_reference<_Tp>::type>::type>::value), int>::type <anonymous> = 0]’ at /home/nrel/EnergyPlus/third_party/fmt-8.0.1/include/fmt/format.h:1745:31,
    inlined from ‘OutputIt fmt::v8::detail::write_significand(OutputIt, T, int, int, Char, const digit_grouping<Char>&) [with OutputIt = fmt::v8::appender; Char = char; T = unsigned int]’ at /home/nrel/EnergyPlus/third_party/fmt-8.0.1/include/fmt/format.h:1772:20,
    inlined from ‘fmt::v8::detail::write_float<fmt::v8::appender, dragonbox::decimal_fp<float>, char>(fmt::v8::appender, const dragonbox::decimal_fp<float>&, const fmt::v8::basic_format_specs<char>&, float_specs, locale_ref)::<lambda(iterator)>’ at /home/nrel/EnergyPlus/third_party/fmt-8.0.1/include/fmt/format.h:1863:29,
    inlined from ‘constexpr OutputIt fmt::v8::detail::write_padded(OutputIt, const fmt::v8::basic_format_specs<Char>&, size_t, size_t, F&&) [with fmt::v8::align::type align = fmt::v8::align::right; OutputIt = fmt::v8::appender; Char = char; F = write_float<fmt::v8::appender, dragonbox::decimal_fp<float>, char>(fmt::v8::appender, const dragonbox::decimal_fp<float>&, const fmt::v8::basic_format_specs<char>&, float_specs, locale_ref)::<lambda(iterator)>&]’ at /home/nrel/EnergyPlus/third_party/fmt-8.0.1/include/fmt/format.h:1342:9,
    inlined from ‘constexpr OutputIt fmt::v8::detail::write_padded(OutputIt, const fmt::v8::basic_format_specs<Char>&, size_t, F&&) [with fmt::v8::align::type align = fmt::v8::align::right; OutputIt = fmt::v8::appender; Char = char; F = write_float<fmt::v8::appender, dragonbox::decimal_fp<float>, char>(fmt::v8::appender, const dragonbox::decimal_fp<float>&, const fmt::v8::basic_format_specs<char>&, float_specs, locale_ref)::<lambda(iterator)>]’ at /home/nrel/EnergyPlus/third_party/fmt-8.0.1/include/fmt/format.h:1351:29,
    inlined from ‘OutputIt fmt::v8::detail::write_float(OutputIt, const DecimalFP&, const fmt::v8::basic_format_specs<Char>&, float_specs, locale_ref) [with OutputIt = fmt::v8::appender; DecimalFP = dragonbox::decimal_fp<float>; Char = char]’ at /home/nrel/EnergyPlus/third_party/fmt-8.0.1/include/fmt/format.h:1861:38:
/usr/include/c++/15/bits/stl_uninitialized.h:273:31: error: ‘void* __builtin_memcpy(void*, const void*, long unsigned int)’ accessing between 2 and 2147483646 bytes at offsets 0 and 1 overlaps between 1 and 2147483645 bytes at offset 1 [-Werror=restrict]
  273 |               __builtin_memcpy(std::__niter_base(__result),
      |               ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  274 |                                std::__niter_base(__first),
      |                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  275 |                                __n * sizeof(_ValT));

Copy link
Copy Markdown
Collaborator Author

@mitchute mitchute left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jmarrec here are the errors I was seeing, and addressing with each specific change.

Ubuntu 26.04 LTS, gcc (Ubuntu 15.2.0-16ubuntu1) 15.2.0

Comment thread cmake/CompilerFlags.cmake
Comment on lines +123 to +126
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 15.0)
# GCC 15 emits false positives through libstdc++ when compiling bundled fmt 8.0.1 with -Werror
target_compile_options(project_warnings INTERFACE -Wno-restrict)
endif()
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In function ‘_ForwardIterator std::uninitialized_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = char*; _ForwardIterator = char*]’,
    inlined from ‘_ForwardIterator std::__uninitialized_copy_n(_RandomAccessIterator, _Size, _ForwardIterator, random_access_iterator_tag) [with _RandomAccessIterator = char*; _Size = int; _ForwardIterator = char*]’ at /usr/include/c++/15/bits/stl_uninitialized.h:1110:37,
    inlined from ‘_ForwardIterator std::uninitialized_copy_n(_InputIterator, _Size, _ForwardIterator) [with _InputIterator = char*; _Size = int; _ForwardIterator = char*]’ at /usr/include/c++/15/bits/stl_uninitialized.h:1156:41,
    inlined from ‘Char* fmt::v8::detail::write_significand(Char*, UInt, int, int, Char) [with Char = char; UInt = unsigned int; typename std::enable_if<std::is_integral<_Size>::value, int>::type <anonymous> = 0]’ at /home/nrel/EnergyPlus/third_party/fmt-8.0.1/include/fmt/format.h:1731:30,
    inlined from ‘Char* fmt::v8::detail::write_significand(Char*, UInt, int, int, Char) [with Char = char; UInt = unsigned int; typename std::enable_if<std::is_integral<_Size>::value, int>::type <anonymous> = 0]’ at /home/nrel/EnergyPlus/third_party/fmt-8.0.1/include/fmt/format.h:1723:13,
    inlined from ‘OutputIt fmt::v8::detail::write_significand(OutputIt, UInt, int, int, Char) [with OutputIt = fmt::v8::appender; UInt = unsigned int; Char = char; typename std::enable_if<(! std::is_pointer<typename std::remove_cv<typename std::remove_reference<_Tp>::type>::type>::value), int>::type <anonymous> = 0]’ at /home/nrel/EnergyPlus/third_party/fmt-8.0.1/include/fmt/format.h:1745:31,
    inlined from ‘OutputIt fmt::v8::detail::write_significand(OutputIt, T, int, int, Char, const digit_grouping<Char>&) [with OutputIt = fmt::v8::appender; Char = char; T = unsigned int]’ at /home/nrel/EnergyPlus/third_party/fmt-8.0.1/include/fmt/format.h:1772:20,
    inlined from ‘fmt::v8::detail::write_float<fmt::v8::appender, dragonbox::decimal_fp<float>, char>(fmt::v8::appender, const dragonbox::decimal_fp<float>&, const fmt::v8::basic_format_specs<char>&, float_specs, locale_ref)::<lambda(iterator)>’ at /home/nrel/EnergyPlus/third_party/fmt-8.0.1/include/fmt/format.h:1863:29,
    inlined from ‘constexpr OutputIt fmt::v8::detail::write_padded(OutputIt, const fmt::v8::basic_format_specs<Char>&, size_t, size_t, F&&) [with fmt::v8::align::type align = fmt::v8::align::right; OutputIt = fmt::v8::appender; Char = char; F = write_float<fmt::v8::appender, dragonbox::decimal_fp<float>, char>(fmt::v8::appender, const dragonbox::decimal_fp<float>&, const fmt::v8::basic_format_specs<char>&, float_specs, locale_ref)::<lambda(iterator)>&]’ at /home/nrel/EnergyPlus/third_party/fmt-8.0.1/include/fmt/format.h:1342:9,
    inlined from ‘constexpr OutputIt fmt::v8::detail::write_padded(OutputIt, const fmt::v8::basic_format_specs<Char>&, size_t, F&&) [with fmt::v8::align::type align = fmt::v8::align::right; OutputIt = fmt::v8::appender; Char = char; F = write_float<fmt::v8::appender, dragonbox::decimal_fp<float>, char>(fmt::v8::appender, const dragonbox::decimal_fp<float>&, const fmt::v8::basic_format_specs<char>&, float_specs, locale_ref)::<lambda(iterator)>]’ at /home/nrel/EnergyPlus/third_party/fmt-8.0.1/include/fmt/format.h:1351:29,
    inlined from ‘OutputIt fmt::v8::detail::write_float(OutputIt, const DecimalFP&, const fmt::v8::basic_format_specs<Char>&, float_specs, locale_ref) [with OutputIt = fmt::v8::appender; DecimalFP = dragonbox::decimal_fp<float>; Char = char]’ at /home/nrel/EnergyPlus/third_party/fmt-8.0.1/include/fmt/format.h:1861:38:
/usr/include/c++/15/bits/stl_uninitialized.h:273:31: error: ‘void* __builtin_memcpy(void*, const void*, long unsigned int)’ accessing between 2 and 2147483646 bytes at offsets 0 and 1 overlaps between 1 and 2147483645 bytes at offset 1 [-Werror=restrict]
  273 |               __builtin_memcpy(std::__niter_base(__result),
      |               ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  274 |                                std::__niter_base(__first),
      |                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  275 |                                __n * sizeof(_ValT));

Comment on lines 48 to +68
@@ -63,7 +58,14 @@
# else
# include <Python.h>
# endif
#endif

// C++ Headers
#include <algorithm>
#include <format>

// Third Party Headers
#if LINK_WITH_PYTHON
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

                 from /home/nrel/EnergyPlus/src/EnergyPlus/PluginManager.cc:64:
/home/nrel/.pyenv/versions/3.12.2/include/python3.12/pyconfig.h:1875:9: error: ‘_POSIX_C_SOURCE’ redefined [-Werror]
 1875 | #define _POSIX_C_SOURCE 200809L
      |         ^~~~~~~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/15/bits/os_defines.h:39,
                 from /usr/include/x86_64-linux-gnu/c++/15/bits/c++config.h:727,
                 from /usr/include/c++/15/bits/stl_algobase.h:59,
                 from /usr/include/c++/15/algorithm:62,
                 from /home/nrel/EnergyPlus/src/EnergyPlus/PluginManager.cc:49:
/usr/include/features.h:319:10: note: this is the location of the previous definition
  319 | # define _POSIX_C_SOURCE        202405L
      |          ^~~~~~~~~~~~~~~
/home/nrel/.pyenv/versions/3.12.2/include/python3.12/pyconfig.h:1896:9: error: ‘_XOPEN_SOURCE’ redefined [-Werror]
 1896 | #define _XOPEN_SOURCE 700
      |         ^~~~~~~~~~~~~
/usr/include/features.h:234:10: note: this is the location of the previous definition
  234 | # define _XOPEN_SOURCE  800
      |          ^~~~~~~~~~~~~

Comment on lines +43 to +46
// Raw allocation size including optional alignment padding
static
void *
allocate( size_type const n )
size_type
allocation_size( size_type const n )
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In file included from /home/nrel/EnergyPlus/third_party/ObjexxFCL/src/ObjexxFCL/Array.hh:19,
                 from /home/nrel/EnergyPlus/third_party/ObjexxFCL/src/ObjexxFCL/Array1.hh:18,
                 from /home/nrel/EnergyPlus/third_party/ObjexxFCL/src/ObjexxFCL/Array1D.hh:18,
                 from /home/nrel/EnergyPlus/third_party/ObjexxFCL/src/ObjexxFCL/Array.functions.hh:17,
                 from /home/nrel/EnergyPlus/src/EnergyPlus/WindowComplexManager.cc:54:
In static member function ‘static void* ObjexxFCL::AlignedAllocator<T>::allocate(size_type) [with T = EnergyPlus::DataBSDFWindow::BasisElemDescr]’,
    inlined from ‘ObjexxFCL::CArrayA< <template-parameter-1-1> >::CArrayA(size_type) [with T = EnergyPlus::DataBSDFWindow::BasisElemDescr]’ at /home/nrel/EnergyPlus/third_party/ObjexxFCL/src/ObjexxFCL/CArrayA.hh:175:26,
    inlined from ‘void ObjexxFCL::Array< <template-parameter-1-1> >::operator=(const ObjexxFCL::Array< <template-parameter-1-1> >&) [with T = EnergyPlus::DataBSDFWindow::BasisElemDescr]’ at /home/nrel/EnergyPlus/third_party/ObjexxFCL/src/ObjexxFCL/Array.hh:406:17,
    inlined from ‘ObjexxFCL::Array1D< <template-parameter-1-1> >& ObjexxFCL::Array1D< <template-parameter-1-1> >::operator=(const ObjexxFCL::Array1D< <template-parameter-1-1> >&) [with T = EnergyPlus::DataBSDFWindow::BasisElemDescr]’ at /home/nrel/EnergyPlus/third_party/ObjexxFCL/src/ObjexxFCL/Array1D.hh:477:21,
    inlined from ‘EnergyPlus::DataBSDFWindow::BasisStruct& EnergyPlus::DataBSDFWindow::BasisStruct::operator=(const EnergyPlus::DataBSDFWindow::BasisStruct&)’ at /home/nrel/EnergyPlus/src/EnergyPlus/DataBSDFWindow.hh:148:12:
/home/nrel/EnergyPlus/third_party/ObjexxFCL/src/ObjexxFCL/AlignedAllocator.hh:47:52: error: argument 1 value ‘18446744073709551591’ exceeds maximum object size 9223372036854775807 [-Werror=alloc-size-larger-than=]
   47 |                 void * mem( n > 0u ? ::operator new( ( n * sizeof( T ) ) + ( OBJEXXFCL_ALIGN - 1 ) ) : nullptr );
      |                                      ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/15/bits/stl_iterator.h:75,
                 from /usr/include/c++/15/bits/stl_algobase.h:67,
                 from /usr/include/c++/15/bits/specfun.h:43,
                 from /usr/include/c++/15/cmath:3913,
                 from /home/nrel/EnergyPlus/src/EnergyPlus/WindowComplexManager.cc:50:
/usr/include/c++/15/new: In function ‘EnergyPlus::DataBSDFWindow::BasisStruct& EnergyPlus::DataBSDFWindow::BasisStruct::operator=(const EnergyPlus::DataBSDFWindow::BasisStruct&)’:
/usr/include/c++/15/new:137:26: note: in a call to allocation function ‘void* operator new(std::size_t)’ declared here
  137 | _GLIBCXX_NODISCARD void* operator new(std::size_t)
      |                          ^~~~~~~~
In static member function ‘static void* ObjexxFCL::AlignedAllocator<T>::allocate(size_type) [with T = EnergyPlus::DataBSDFWindow::BasisElemDescr]’,
    inlined from ‘ObjexxFCL::CArrayA< <template-parameter-1-1> >::CArrayA(size_type) [with T = EnergyPlus::DataBSDFWindow::BasisElemDescr]’ at /home/nrel/EnergyPlus/third_party/ObjexxFCL/src/ObjexxFCL/CArrayA.hh:175:26,
    inlined from ‘void ObjexxFCL::Array< <template-parameter-1-1> >::operator=(const ObjexxFCL::Array< <template-parameter-1-1> >&) [with T = EnergyPlus::DataBSDFWindow::BasisElemDescr]’ at /home/nrel/EnergyPlus/third_party/ObjexxFCL/src/ObjexxFCL/Array.hh:406:17,
    inlined from ‘ObjexxFCL::Array1D< <template-parameter-1-1> >& ObjexxFCL::Array1D< <template-parameter-1-1> >::operator=(const ObjexxFCL::Array1D< <template-parameter-1-1> >&) [with T = EnergyPlus::DataBSDFWindow::BasisElemDescr]’ at /home/nrel/EnergyPlus/third_party/ObjexxFCL/src/ObjexxFCL/Array1D.hh:477:21,
    inlined from ‘EnergyPlus::DataBSDFWindow::BasisStruct& EnergyPlus::DataBSDFWindow::BasisStruct::operator=(const EnergyPlus::DataBSDFWindow::BasisStruct&)’ at /home/nrel/EnergyPlus/src/EnergyPlus/DataBSDFWindow.hh:148:12,
    inlined from ‘void EnergyPlus::WindowComplexManager::InitBSDFWindows(EnergyPlus::EnergyPlusData&)’ at /home/nrel/EnergyPlus/src/EnergyPlus/WindowComplexManager.cc:327:100:
/home/nrel/EnergyPlus/third_party/ObjexxFCL/src/ObjexxFCL/AlignedAllocator.hh:47:52: error: argument 1 value ‘18446744073709551591’ exceeds maximum object size 9223372036854775807 [-Werror=alloc-size-larger-than=]
   47 |                 void * mem( n > 0u ? ::operator new( ( n * sizeof( T ) ) + ( OBJEXXFCL_ALIGN - 1 ) ) : nullptr );
      |                                      ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/15/new: In function ‘void EnergyPlus::WindowComplexManager::InitBSDFWindows(EnergyPlus::EnergyPlusData&)’:
/usr/include/c++/15/new:137:26: note: in a call to allocation function ‘void* operator new(std::size_t)’ declared here
  137 | _GLIBCXX_NODISCARD void* operator new(std::size_t)
      |                          ^~~~~~~~
In static member function ‘static void* ObjexxFCL::AlignedAllocator<T>::allocate(size_type) [with T = EnergyPlus::DataBSDFWindow::BasisElemDescr]’,
    inlined from ‘ObjexxFCL::CArrayA< <template-parameter-1-1> >::CArrayA(size_type) [with T = EnergyPlus::DataBSDFWindow::BasisElemDescr]’ at /home/nrel/EnergyPlus/third_party/ObjexxFCL/src/ObjexxFCL/CArrayA.hh:175:26,
    inlined from ‘void ObjexxFCL::Array< <template-parameter-1-1> >::operator=(const ObjexxFCL::Array< <template-parameter-1-1> >&) [with T = EnergyPlus::DataBSDFWindow::BasisElemDescr]’ at /home/nrel/EnergyPlus/third_party/ObjexxFCL/src/ObjexxFCL/Array.hh:406:17,
    inlined from ‘ObjexxFCL::Array1D< <template-parameter-1-1> >& ObjexxFCL::Array1D< <template-parameter-1-1> >::operator=(const ObjexxFCL::Array1D< <template-parameter-1-1> >&) [with T = EnergyPlus::DataBSDFWindow::BasisElemDescr]’ at /home/nrel/EnergyPlus/third_party/ObjexxFCL/src/ObjexxFCL/Array1D.hh:477:21,
    inlined from ‘EnergyPlus::DataBSDFWindow::BasisStruct& EnergyPlus::DataBSDFWindow::BasisStruct::operator=(const EnergyPlus::DataBSDFWindow::BasisStruct&)’ at /home/nrel/EnergyPlus/src/EnergyPlus/DataBSDFWindow.hh:148:12,
    inlined from ‘void EnergyPlus::WindowComplexManager::InitBSDFWindows(EnergyPlus::EnergyPlusData&)’ at /home/nrel/EnergyPlus/src/EnergyPlus/WindowComplexManager.cc:329:142:
/home/nrel/EnergyPlus/third_party/ObjexxFCL/src/ObjexxFCL/AlignedAllocator.hh:47:52: error: argument 1 value ‘18446744073709551591’ exceeds maximum object size 9223372036854775807 [-Werror=alloc-size-larger-than=]
   47 |                 void * mem( n > 0u ? ::operator new( ( n * sizeof( T ) ) + ( OBJEXXFCL_ALIGN - 1 ) ) : nullptr );
      |                                      ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/15/new: In function ‘void EnergyPlus::WindowComplexManager::InitBSDFWindows(EnergyPlus::EnergyPlusData&)’:
/usr/include/c++/15/new:137:26: note: in a call to allocation function ‘void* operator new(std::size_t)’ declared here
  137 | _GLIBCXX_NODISCARD void* operator new(std::size_t)
      |                          ^~~~~~~~


#include <math.h>
#include <algorithm>
#include <cstdint>
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[ 44%] Built target ConvertInputFormat
/home/nrel/EnergyPlus/third_party/ssc/shared/lib_battery_dispatch.cpp: In constructor ‘dispatch_automatic_t::dispatch_automatic_t(battery_t*, double, double, double, int, double, double, double, double, double, double, double, int, int, std::size_t, std::size_t, double, bool, bool, bool, bool, std::vector<double>, int, std::vector<double>)’:
/home/nrel/EnergyPlus/third_party/ssc/shared/lib_battery_dispatch.cpp:487:26: error: ‘SIZE_MAX’ was not declared in this scope
  487 |     _hour_last_updated = SIZE_MAX;
      |                          ^~~~~~~~
/home/nrel/EnergyPlus/third_party/ssc/shared/lib_battery_dispatch.cpp:28:1: note: ‘SIZE_MAX’ is defined in header ‘<cstdint>’; this is probably fixable by adding ‘#include <cstdint>’
   27 | #include <math.h>
  +++ |+#include <cstdint>
   28 | #include <algorithm>

Comment on lines +89 to +91
if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 15.0)
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-Wno-dangling-reference> $<$<COMPILE_LANGUAGE:CXX>:-Wno-restrict>)
endif()
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/home/nrel/EnergyPlus/third_party/fmt-8.0.1/include/fmt/core.h:1803:38:   required from ‘constexpr fmt::v8::format_arg_store<Context, typename std::remove_cv<typename std::remove_reference<Args>::type>::type ...> fmt::v8::make_format_args(Args&& ...) [with Context = basic_format_context<appender, char>; Args = {std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&}]’
 1803 |   return {std::forward<Args>(args)...};
      |                                      ^
/home/nrel/EnergyPlus/third_party/fmt-8.0.1/include/fmt/core.h:2979:44:   required from ‘std::string fmt::v8::format(format_string<T ...>, T&& ...) [with T = {std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&}; std::string = std::__cxx11::basic_string<char>; format_string<T ...> = basic_format_string<char, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&>]’
 2979 |   return vformat(fmt, fmt::make_format_args(args...));
      |                       ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
/home/nrel/EnergyPlus/third_party/btwxt/include/btwxt/logging.h:25:34:   required from here
   25 |                     ? fmt::format(" ({})", *(reinterpret_cast<std::string *>(message_context)))
      |                       ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/nrel/EnergyPlus/third_party/fmt-8.0.1/include/fmt/core.h:1637:15: error: possibly dangling reference to a temporary [-Werror=dangling-reference]
 1637 |   const auto& arg = arg_mapper<Context>().map(std::forward<T>(val));
      |               ^~~
/home/nrel/EnergyPlus/third_party/fmt-8.0.1/include/fmt/core.h:1637:21: note: ‘fmt::v8::detail::arg_mapper<fmt::v8::basic_format_context<fmt::v8::appender, char> >’ temporary created here
 1637 |   const auto& arg = arg_mapper<Context>().map(std::forward<T>(val));
      |                     ^~~~~~~~~~~~~~~~~~~~~

@mitchute mitchute marked this pull request as ready for review June 1, 2026 19:15
@mitchute
Copy link
Copy Markdown
Collaborator Author

mitchute commented Jun 1, 2026

Since a lot of these are related to our use of an older version of fmt, and I was debating on whether to hold off on this until that is all ripped out. That may still be at least a month or so out, so there's probably no to wait.

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

Labels

Defect Includes code to repair a defect in EnergyPlus

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Building with gcc 14.2 fails

4 participants