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

mythdate.cpp requires include <array> on macOS SDK 12.3 and later (C++17) #535

Closed
jhoyt4 opened this issue Apr 3, 2022 · 1 comment · Fixed by #537
Closed

mythdate.cpp requires include <array> on macOS SDK 12.3 and later (C++17) #535

jhoyt4 opened this issue Apr 3, 2022 · 1 comment · Fixed by #537
Assignees
Labels
ports:osx OSX port version:master Master Development Branch version:v32-fixes fixes/32

Comments

@jhoyt4
Copy link
Contributor

jhoyt4 commented Apr 3, 2022

  • Platform: macOS

  • MythTV version: fixes/32 and master

  • Package version: N/A

  • Component: mythdate.cpp

What steps will reproduce the bug?

How often does it reproduce? Is there a required condition?

everytime

What is the expected behaviour?

successful compile

What do you see instead?

Here's the compiler error from fixes/32

mythdate.cpp:266:44: error: constexpr variable cannot have non-literal type 'const std::array<int, 4>'
        static constexpr std::array<int,4> divisor = {1000, 100, 10, 1};
                                           ^
mythdate.cpp:266:44: error: implicit instantiation of undefined template 'std::array<int, 4>'
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/__tuple:219:64: note: template is declared here
template <class _Tp, size_t _Size> struct _LIBCPP_TEMPLATE_VIS array;
                                                               ^
2 errors generated.
make[2]: *** [obj/mythdate.o] Error 1
make[1]: *** [sub-libmythbase-make_first] Error 2
make: *** [libs] Error 2
    Compiling Mythtv failed

Additional information

adding include <array> to the beginning of mythdate.cpp the file seems to have resolved the issue

I'm working up a PR for both once I get the chance to finish compiling and test

@jhoyt4
Copy link
Contributor Author

jhoyt4 commented Apr 3, 2022

Fixed by PR536 and PR537

@stuarta stuarta self-assigned this Apr 3, 2022
@stuarta stuarta added version:master Master Development Branch ports:osx OSX port version:v32-fixes fixes/32 labels Apr 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ports:osx OSX port version:master Master Development Branch version:v32-fixes fixes/32
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants