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

Build problem on Intel Mac Os Monterey 12.7.5 #480

Closed
sbonaime opened this issue Jun 23, 2024 · 4 comments
Closed

Build problem on Intel Mac Os Monterey 12.7.5 #480

sbonaime opened this issue Jun 23, 2024 · 4 comments
Labels

Comments

@sbonaime
Copy link

sbonaime commented Jun 23, 2024

Description
powertabeditor does not build with Intel Mac Os Monterey 12.7.5 and f6662dd
I install "Command Line Tools" and not Xcode

To Reproduce
no problem with cmake

 cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=/usr/local/opt/qt@5/lib/cmake ..                                                                                 
-- The C compiler identification is AppleClang 14.0.0.14000029
-- The CXX compiler identification is AppleClang 14.0.0.14000029
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Boost: /usr/local/lib/cmake/Boost-1.85.0/BoostConfig.cmake (found suitable version "1.85.0", minimum required is "1.65") found components: date_time iostreams
-- Found minizip: /usr/local/include/minizip
-- Found nlohmann_json: /usr/local/share/cmake/nlohmann_json/nlohmann_jsonConfig.cmake (found suitable version "3.11.3", minimum required is "3.7.3")
-- Found rtmidi: /usr/local/include/rtmidi (Required is at least version "4.0")
-- Found Git: /usr/local/bin/git (found version "2.44.0")
-- Version number: 2.0.0-alpha19-80-gf6662dd3
-- Configuring done (1.7s)
-- Generating done (0.1s)
-- Build files have been written to: /Users/zarg404/git/powertabeditor/build cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=/usr/local/opt/qt@5/lib/cmake ..                                                                                 
-- The C compiler identification is AppleClang 14.0.0.14000029
-- The CXX compiler identification is AppleClang 14.0.0.14000029
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Boost: /usr/local/lib/cmake/Boost-1.85.0/BoostConfig.cmake (found suitable version "1.85.0", minimum required is "1.65") found components: date_time iostreams
-- Found minizip: /usr/local/include/minizip
-- Found nlohmann_json: /usr/local/share/cmake/nlohmann_json/nlohmann_jsonConfig.cmake (found suitable version "3.11.3", minimum required is "3.7.3")
-- Found rtmidi: /usr/local/include/rtmidi (Required is at least version "4.0")
-- Found Git: /usr/local/bin/git (found version "2.44.0")
-- Version number: 2.0.0-alpha19-80-gf6662dd3
-- Configuring done (1.7s)
-- Generating done (0.1s)
-- Build files have been written to: /Users/zarg404/git/powertabeditor/build cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=/usr/local/opt/qt@5/lib/cmake ..                                                                                 
-- The C compiler identification is AppleClang 14.0.0.14000029
-- The CXX compiler identification is AppleClang 14.0.0.14000029
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Boost: /usr/local/lib/cmake/Boost-1.85.0/BoostConfig.cmake (found suitable version "1.85.0", minimum required is "1.65") found components: date_time iostreams
-- Found minizip: /usr/local/include/minizip
-- Found nlohmann_json: /usr/local/share/cmake/nlohmann_json/nlohmann_jsonConfig.cmake (found suitable version "3.11.3", minimum required is "3.7.3")
-- Found rtmidi: /usr/local/include/rtmidi (Required is at least version "4.0")
-- Found Git: /usr/local/bin/git (found version "2.44.0")
-- Version number: 2.0.0-alpha19-80-gf6662dd3
-- Configuring done (1.7s)
-- Generating done (0.1s)
-- Build files have been written to: /Users/zarg404/git/powertabeditor/build ````

Lots of errors with ninja
```` ninja                                                                                                                                                                          
[17/532] Building CXX object source/score/CMakeFiles/ptescore.dir/staff.cpp.o
FAILED: source/score/CMakeFiles/ptescore.dir/staff.cpp.o
/Library/Developer/CommandLineTools/usr/bin/c++ -DBOOST_DATE_TIME_DYN_LINK -DBOOST_DATE_TIME_NO_LIB -DQT_DEPRECATED_WARNINGS -I/Users/zarg404/git/powertabeditor/source/score/.. -I/Users/zarg404/git/powertabeditor/source/score -I/Users/zarg404/git/powertabeditor/build/source/score -isystem /usr/local/include -g -std=c++20 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.1.sdk -mmacosx-version-min=10.15 -Wall -Wnon-virtual-dtor -Wextra -Werror=switch -Wimplicit-fallthrough -stdlib=libc++ -fcolor-diagnostics -MD -MT source/score/CMakeFiles/ptescore.dir/staff.cpp.o -MF source/score/CMakeFiles/ptescore.dir/staff.cpp.o.d -o source/score/CMakeFiles/ptescore.dir/staff.cpp.o -c /Users/zarg404/git/powertabeditor/source/score/staff.cpp
In file included from /Users/zarg404/git/powertabeditor/source/score/staff.cpp:21:
/Users/zarg404/git/powertabeditor/source/score/utils.h:54:19: error: no member named 'lower_bound' in namespace 'std::ranges'; did you mean 'std::lower_bound'?
        auto it = std::ranges::lower_bound(range, position, {}, ProjectToPosition{});
                  ^~~~~~~~~~~~~~~~~~~~~~~~
                  std::lower_bound
/Library/Developer/CommandLineTools/SDKs/MacOSX13.1.sdk/usr/include/c++/v1/__algorithm/lower_bound.h:52:1: note: 'std::lower_bound' declared here
lower_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value_, _Compare __comp)
^
In file included from /Users/zarg404/git/powertabeditor/source/score/staff.cpp:21:
/Users/zarg404/git/powertabeditor/source/score/utils.h:105:21: error: no member named 'views' in namespace 'std'
        return std::views::filter(range, Detail::InPositionRange(left, right));
               ~~~~~^
/Users/zarg404/git/powertabeditor/source/score/utils.h:112:19: error: no member named 'lower_bound' in namespace 'std::ranges'; did you mean 'std::lower_bound'?
        auto it = std::ranges::lower_bound(objects, obj.getPosition(), {}, Detail::ProjectToPosition{});
                  ^~~~~~~~~~~~~~~~~~~~~~~~
                  std::lower_bound
/Library/Developer/CommandLineTools/SDKs/MacOSX13.1.sdk/usr/include/c++/v1/__algorithm/lower_bound.h:52:1: note: 'std::lower_bound' declared here
lower_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value_, _Compare __comp)
^
In file included from /Users/zarg404/git/powertabeditor/source/score/staff.cpp:21:
/Users/zarg404/git/powertabeditor/source/score/utils.h:112:19: error: no matching function for call to 'lower_bound'
        auto it = std::ranges::lower_bound(objects, obj.getPosition(), {}, Detail::ProjectToPosition{});
                  ^~~~~~~~~~~~~~~~~~~~~~~~
/Users/zarg404/git/powertabeditor/source/score/staff.cpp:76:17: note: in instantiation of function template specialization 'ScoreUtils::insertObject<Dynamic, const Dynamic &>' requested here
    ScoreUtils::insertObject(myDynamics, dynamic);
                ^
/Library/Developer/CommandLineTools/SDKs/MacOSX13.1.sdk/usr/include/c++/v1/__algorithm/lower_bound.h:52:1: note: candidate template ignored: deduced conflicting types for parameter '_ForwardIterator' ('std::vector<Dynamic>' vs. 'int')
lower_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value_, _Compare __comp)
^
In file included from /Users/zarg404/git/powertabeditor/source/score/staff.cpp:21:
/Users/zarg404/git/powertabeditor/source/score/utils.h:54:19: error: no matching function for call to 'lower_bound'
        auto it = std::ranges::lower_bound(range, position, {}, ProjectToPosition{});
                  ^~~~~~~~~~~~~~~~~~~~~~~~
/Users/zarg404/git/powertabeditor/source/score/utils.h:129:27: note: in instantiation of function template specialization 'ScoreUtils::Detail::binarySearch<std::vector<Dynamic> &>' requested here
        auto it = Detail::binarySearch(objects, obj.getPosition());
                          ^
/Users/zarg404/git/powertabeditor/source/score/staff.cpp:81:17: note: in instantiation of function template specialization 'ScoreUtils::removeObject<Dynamic>' requested here
    ScoreUtils::removeObject(myDynamics, dynamic);
                ^
/Library/Developer/CommandLineTools/SDKs/MacOSX13.1.sdk/usr/include/c++/v1/__algorithm/lower_bound.h:52:1: note: candidate template ignored: deduced conflicting types for parameter '_ForwardIterator' ('std::vector<Dynamic>' vs. 'int')
lower_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value_, _Compare __comp)
^
5 errors generated.
[18/532] Building CXX object source/score/CMakeFiles/ptescore.dir/scorelocation.cpp.o
FAILED: source/score/CMakeFiles/ptescore.dir/scorelocation.cpp.o
/Library/Developer/CommandLineTools/usr/bin/c++ -DBOOST_DATE_TIME_DYN_LINK -DBOOST_DATE_TIME_NO_LIB -DQT_DEPRECATED_WARNINGS -I/Users/zarg404/git/powertabeditor/source/score/.. -I/Users/zarg404/git/powertabeditor/source/score -I/Users/zarg404/git/powertabeditor/build/source/score -isystem /usr/local/include -g -std=c++20 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.1.sdk -mmacosx-version-min=10.15 -Wall -Wnon-virtual-dtor -Wextra -Werror=switch -Wimplicit-fallthrough -stdlib=libc++ -fcolor-diagnostics -MD -MT source/score/CMakeFiles/ptescore.dir/scorelocation.cpp.o -MF source/score/CMakeFiles/ptescore.dir/scorelocation.cpp.o.d -o source/score/CMakeFiles/ptescore.dir/scorelocation.cpp.o -c /Users/zarg404/git/powertabeditor/source/score/scorelocation.cpp
In file included from /Users/zarg404/git/powertabeditor/source/score/scorelocation.cpp:21:
/Users/zarg404/git/powertabeditor/source/score/../score/utils.h:54:19: error: no member named 'lower_bound' in namespace 'std::ranges'; did you mean 'std::lower_bound'?
        auto it = std::ranges::lower_bound(range, position, {}, ProjectToPosition{});
                  ^~~~~~~~~~~~~~~~~~~~~~~~
                  std::lower_bound
/Library/Developer/CommandLineTools/SDKs/MacOSX13.1.sdk/usr/include/c++/v1/__algorithm/lower_bound.h:52:1: note: 'std::lower_bound' declared here
lower_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value_, _Compare __comp)
^
In file included from /Users/zarg404/git/powertabeditor/source/score/scorelocation.cpp:21:
/Users/zarg404/git/powertabeditor/source/score/../score/utils.h:105:21: error: no member named 'views' in namespace 'std'
        return std::views::filter(range, Detail::InPositionRange(left, right));
               ~~~~~^
/Users/zarg404/git/powertabeditor/source/score/../score/utils.h:112:19: error: no member named 'lower_bound' in namespace 'std::ranges'; did you mean 'std::lower_bound'?
        auto it = std::ranges::lower_bound(objects, obj.getPosition(), {}, Detail::ProjectToPosition{});
                  ^~~~~~~~~~~~~~~~~~~~~~~~
                  std::lower_bound
/Library/Developer/CommandLineTools/SDKs/MacOSX13.1.sdk/usr/include/c++/v1/__algorithm/lower_bound.h:52:1: note: 'std::lower_bound' declared here
lower_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value_, _Compare __comp)
^
/Users/zarg404/git/powertabeditor/source/score/scorelocation.cpp:108:40: error: cannot use type 'void' as a range
            for (const Position &pos : ScoreUtils::findInRange(
                                       ^
/Users/zarg404/git/powertabeditor/source/score/scorelocation.cpp:133:65: error: member reference base type 'void' is not a structure or union
                                         nextBar->getPosition()).empty())
                                         ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
In file included from /Users/zarg404/git/powertabeditor/source/score/scorelocation.cpp:21:
/Users/zarg404/git/powertabeditor/source/score/../score/utils.h:54:19: error: no matching function for call to 'lower_bound'
        auto it = std::ranges::lower_bound(range, position, {}, ProjectToPosition{});
                  ^~~~~~~~~~~~~~~~~~~~~~~~
/Users/zarg404/git/powertabeditor/source/score/../score/utils.h:85:27: note: in instantiation of function template specialization 'ScoreUtils::Detail::binarySearch<std::span<const Barline, 18446744073709551615> &>' requested here
        auto it = Detail::binarySearch(range, position);
                          ^
/Users/zarg404/git/powertabeditor/source/score/scorelocation.cpp:236:24: note: in instantiation of function template specialization 'ScoreUtils::findByPosition<std::span<const Barline, 18446744073709551615>>' requested here
    return ScoreUtils::findByPosition(getSystem().getBarlines(),
                       ^
/Library/Developer/CommandLineTools/SDKs/MacOSX13.1.sdk/usr/include/c++/v1/__algorithm/lower_bound.h:52:1: note: candidate template ignored: deduced conflicting types for parameter '_ForwardIterator' ('std::span<const Barline, 18446744073709551615>' vs. 'int')
lower_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value_, _Compare __comp)
^
In file included from /Users/zarg404/git/powertabeditor/source/score/scorelocation.cpp:21:
/Users/zarg404/git/powertabeditor/source/score/../score/utils.h:54:19: error: no matching function for call to 'lower_bound'
        auto it = std::ranges::lower_bound(range, position, {}, ProjectToPosition{});
                  ^~~~~~~~~~~~~~~~~~~~~~~~
/Users/zarg404/git/powertabeditor/source/score/../score/utils.h:85:27: note: in instantiation of function template specialization 'ScoreUtils::Detail::binarySearch<std::span<Barline, 18446744073709551615> &>' requested here
        auto it = Detail::binarySearch(range, position);
                          ^
/Users/zarg404/git/powertabeditor/source/score/scorelocation.cpp:242:24: note: in instantiation of function template specialization 'ScoreUtils::findByPosition<std::span<Barline, 18446744073709551615>>' requested here
    return ScoreUtils::findByPosition(getSystem().getBarlines(),
                       ^
/Library/Developer/CommandLineTools/SDKs/MacOSX13.1.sdk/usr/include/c++/v1/__algorithm/lower_bound.h:52:1: note: candidate template ignored: deduced conflicting types for parameter '_ForwardIterator' ('std::span<Barline, 18446744073709551615>' vs. 'int')
lower_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value_, _Compare __comp)
^
In file included from /Users/zarg404/git/powertabeditor/source/score/scorelocation.cpp:21:
/Users/zarg404/git/powertabeditor/source/score/../score/utils.h:54:19: error: no matching function for call to 'lower_bound'
        auto it = std::ranges::lower_bound(range, position, {}, ProjectToPosition{});
                  ^~~~~~~~~~~~~~~~~~~~~~~~
/Users/zarg404/git/powertabeditor/source/score/../score/utils.h:94:27: note: in instantiation of function template specialization 'ScoreUtils::Detail::binarySearch<std::span<const Position, 18446744073709551615> &>' requested here
        auto it = Detail::binarySearch(range, position);
                          ^
/Users/zarg404/git/powertabeditor/source/score/scorelocation.cpp:330:46: note: in instantiation of function template specialization 'ScoreUtils::findIndexByPosition<std::span<const Position, 18446744073709551615>>' requested here
            voice.getPositions()[ScoreUtils::findIndexByPosition(
                                             ^
/Library/Developer/CommandLineTools/SDKs/MacOSX13.1.sdk/usr/include/c++/v1/__algorithm/lower_bound.h:52:1: note: candidate template ignored: deduced conflicting types for parameter '_ForwardIterator' ('std::span<const Position, 18446744073709551615>' vs. 'int')
lower_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value_, _Compare __comp)
^
8 errors generated.
[20/532] Building CXX object source/score/CMakeFiles/ptescore.dir/score.cpp.o
FAILED: source/score/CMakeFiles/ptescore.dir/score.cpp.o
/Library/Developer/CommandLineTools/usr/bin/c++ -DBOOST_DATE_TIME_DYN_LINK -DBOOST_DATE_TIME_NO_LIB -DQT_DEPRECATED_WARNINGS -I/Users/zarg404/git/powertabeditor/source/score/.. -I/Users/zarg404/git/powertabeditor/source/score -I/Users/zarg404/git/powertabeditor/build/source/score -isystem /usr/local/include -g -std=c++20 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.1.sdk -mmacosx-version-min=10.15 -Wall -Wnon-virtual-dtor -Wextra -Werror=switch -Wimplicit-fallthrough -stdlib=libc++ -fcolor-diagnostics -MD -MT source/score/CMakeFiles/ptescore.dir/score.cpp.o -MF source/score/CMakeFiles/ptescore.dir/score.cpp.o.d -o source/score/CMakeFiles/ptescore.dir/score.cpp.o -c /Users/zarg404/git/powertabeditor/source/score/score.cpp
/Users/zarg404/git/powertabeditor/source/score/score.cpp:148:34: error: no member named 'views' in namespace 'std'
        for (const T &obj : std::views::reverse(get_symbols(system)))
                            ~~~~~^
1 error generated.
[22/532] Building CXX object source/score/CMakeFiles/ptescore.dir/system.cpp.o
FAILED: source/score/CMakeFiles/ptescore.dir/system.cpp.o
/Library/Developer/CommandLineTools/usr/bin/c++ -DBOOST_DATE_TIME_DYN_LINK -DBOOST_DATE_TIME_NO_LIB -DQT_DEPRECATED_WARNINGS -I/Users/zarg404/git/powertabeditor/source/score/.. -I/Users/zarg404/git/powertabeditor/source/score -I/Users/zarg404/git/powertabeditor/build/source/score -isystem /usr/local/include -g -std=c++20 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.1.sdk -mmacosx-version-min=10.15 -Wall -Wnon-virtual-dtor -Wextra -Werror=switch -Wimplicit-fallthrough -stdlib=libc++ -fcolor-diagnostics -MD -MT source/score/CMakeFiles/ptescore.dir/system.cpp.o -MF source/score/CMakeFiles/ptescore.dir/system.cpp.o.d -o source/score/CMakeFiles/ptescore.dir/system.cpp.o -c /Users/zarg404/git/powertabeditor/source/score/system.cpp
In file included from /Users/zarg404/git/powertabeditor/source/score/system.cpp:23:
/Users/zarg404/git/powertabeditor/source/score/utils.h:54:19: error: no member named 'lower_bound' in namespace 'std::ranges'; did you mean 'std::lower_bound'?
        auto it = std::ranges::lower_bound(range, position, {}, ProjectToPosition{});
                  ^~~~~~~~~~~~~~~~~~~~~~~~
                  std::lower_bound
/Library/Developer/CommandLineTools/SDKs/MacOSX13.1.sdk/usr/include/c++/v1/__algorithm/lower_bound.h:52:1: note: 'std::lower_bound' declared here
lower_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value_, _Compare __comp)
^
In file included from /Users/zarg404/git/powertabeditor/source/score/system.cpp:23:
/Users/zarg404/git/powertabeditor/source/score/utils.h:105:21: error: no member named 'views' in namespace 'std'
        return std::views::filter(range, Detail::InPositionRange(left, right));
               ~~~~~^
/Users/zarg404/git/powertabeditor/source/score/utils.h:112:19: error: no member named 'lower_bound' in namespace 'std::ranges'; did you mean 'std::lower_bound'?
        auto it = std::ranges::lower_bound(objects, obj.getPosition(), {}, Detail::ProjectToPosition{});
                  ^~~~~~~~~~~~~~~~~~~~~~~~
                  std::lower_bound
/Library/Developer/CommandLineTools/SDKs/MacOSX13.1.sdk/usr/include/c++/v1/__algorithm/lower_bound.h:52:1: note: 'std::lower_bound' declared here
lower_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value_, _Compare __comp)
^
/Users/zarg404/git/powertabeditor/source/score/system.cpp:80:40: error: no member named 'views' in namespace 'std'
    for (const Barline &barline : std::views::reverse(myBarlines))
                                  ~~~~~^
In file included from /Users/zarg404/git/powertabeditor/source/score/system.cpp:23:
/Users/zarg404/git/powertabeditor/source/score/utils.h:54:19: error: no matching function for call to 'lower_bound'
        auto it = std::ranges::lower_bound(range, position, {}, ProjectToPosition{});
                  ^~~~~~~~~~~~~~~~~~~~~~~~
/Users/zarg404/git/powertabeditor/source/score/utils.h:85:27: note: in instantiation of function template specialization 'ScoreUtils::Detail::binarySearch<std::span<const Barline, 18446744073709551615> &>' requested here
        auto it = Detail::binarySearch(range, position);
                          ^
/Users/zarg404/git/powertabeditor/source/score/system.cpp:222:46: note: in instantiation of function template specialization 'ScoreUtils::findByPosition<std::span<const Barline, 18446744073709551615>>' requested here
    const Barline *current_bar = ScoreUtils::findByPosition(
                                             ^
/Library/Developer/CommandLineTools/SDKs/MacOSX13.1.sdk/usr/include/c++/v1/__algorithm/lower_bound.h:52:1: note: candidate template ignored: deduced conflicting types for parameter '_ForwardIterator' ('std::span<const Barline, 18446744073709551615>' vs. 'int')
lower_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value_, _Compare __comp)
^
In file included from /Users/zarg404/git/powertabeditor/source/score/system.cpp:23:
/Users/zarg404/git/powertabeditor/source/score/utils.h:112:19: error: no matching function for call to 'lower_bound'
        auto it = std::ranges::lower_bound(objects, obj.getPosition(), {}, Detail::ProjectToPosition{});
                  ^~~~~~~~~~~~~~~~~~~~~~~~
/Users/zarg404/git/powertabeditor/source/score/system.cpp:70:17: note: in instantiation of function template specialization 'ScoreUtils::insertObject<Barline, const Barline &>' requested here
    ScoreUtils::insertObject(myBarlines, barline);
                ^
/Library/Developer/CommandLineTools/SDKs/MacOSX13.1.sdk/usr/include/c++/v1/__algorithm/lower_bound.h:52:1: note: candidate template ignored: deduced conflicting types for parameter '_ForwardIterator' ('std::vector<Barline>' vs. 'int')
lower_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value_, _Compare __comp)
^
In file included from /Users/zarg404/git/powertabeditor/source/score/system.cpp:23:
/Users/zarg404/git/powertabeditor/source/score/utils.h:54:19: error: no matching function for call to 'lower_bound'
        auto it = std::ranges::lower_bound(range, position, {}, ProjectToPosition{});
                  ^~~~~~~~~~~~~~~~~~~~~~~~
/Users/zarg404/git/powertabeditor/source/score/utils.h:129:27: note: in instantiation of function template specialization 'ScoreUtils::Detail::binarySearch<std::vector<Barline> &>' requested here
        auto it = Detail::binarySearch(objects, obj.getPosition());
                          ^
/Users/zarg404/git/powertabeditor/source/score/system.cpp:75:17: note: in instantiation of function template specialization 'ScoreUtils::removeObject<Barline>' requested here
    ScoreUtils::removeObject(myBarlines, barline);
                ^
/Library/Developer/CommandLineTools/SDKs/MacOSX13.1.sdk/usr/include/c++/v1/__algorithm/lower_bound.h:52:1: note: candidate template ignored: deduced conflicting types for parameter '_ForwardIterator' ('std::vector<Barline>' vs. 'int')
lower_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value_, _Compare __comp)
^
In file included from /Users/zarg404/git/powertabeditor/source/score/system.cpp:23:
/Users/zarg404/git/powertabeditor/source/score/utils.h:112:19: error: no matching function for call to 'lower_bound'
        auto it = std::ranges::lower_bound(objects, obj.getPosition(), {}, Detail::ProjectToPosition{});
                  ^~~~~~~~~~~~~~~~~~~~~~~~
/Users/zarg404/git/powertabeditor/source/score/system.cpp:113:17: note: in instantiation of function template specialization 'ScoreUtils::insertObject<TempoMarker, const TempoMarker &>' requested here
    ScoreUtils::insertObject(myTempoMarkers, marker);
                ^
/Library/Developer/CommandLineTools/SDKs/MacOSX13.1.sdk/usr/include/c++/v1/__algorithm/lower_bound.h:52:1: note: candidate template ignored: deduced conflicting types for parameter '_ForwardIterator' ('std::vector<TempoMarker>' vs. 'int')
lower_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value_, _Compare __comp)
^
In file included from /Users/zarg404/git/powertabeditor/source/score/system.cpp:23:
/Users/zarg404/git/powertabeditor/source/score/utils.h:54:19: error: no matching function for call to 'lower_bound'
        auto it = std::ranges::lower_bound(range, position, {}, ProjectToPosition{});
                  ^~~~~~~~~~~~~~~~~~~~~~~~
/Users/zarg404/git/powertabeditor/source/score/utils.h:129:27: note: in instantiation of function template specialization 'ScoreUtils::Detail::binarySearch<std::vector<TempoMarker> &>' requested here
        auto it = Detail::binarySearch(objects, obj.getPosition());
                          ^
/Users/zarg404/git/powertabeditor/source/score/system.cpp:118:17: note: in instantiation of function template specialization 'ScoreUtils::removeObject<TempoMarker>' requested here
    ScoreUtils::removeObject(myTempoMarkers, marker);
                ^
/Library/Developer/CommandLineTools/SDKs/MacOSX13.1.sdk/usr/include/c++/v1/__algorithm/lower_bound.h:52:1: note: candidate template ignored: deduced conflicting types for parameter '_ForwardIterator' ('std::vector<TempoMarker>' vs. 'int')
lower_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value_, _Compare __comp)
^
In file included from /Users/zarg404/git/powertabeditor/source/score/system.cpp:23:
/Users/zarg404/git/powertabeditor/source/score/utils.h:112:19: error: no matching function for call to 'lower_bound'
        auto it = std::ranges::lower_bound(objects, obj.getPosition(), {}, Detail::ProjectToPosition{});
                  ^~~~~~~~~~~~~~~~~~~~~~~~
/Users/zarg404/git/powertabeditor/source/score/system.cpp:123:17: note: in instantiation of function template specialization 'ScoreUtils::insertObject<AlternateEnding, const AlternateEnding &>' requested here
    ScoreUtils::insertObject(myAlternateEndings, ending);
                ^
/Library/Developer/CommandLineTools/SDKs/MacOSX13.1.sdk/usr/include/c++/v1/__algorithm/lower_bound.h:52:1: note: candidate template ignored: deduced conflicting types for parameter '_ForwardIterator' ('std::vector<AlternateEnding>' vs. 'int')
lower_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value_, _Compare __comp)
^
In file included from /Users/zarg404/git/powertabeditor/source/score/system.cpp:23:
/Users/zarg404/git/powertabeditor/source/score/utils.h:54:19: error: no matching function for call to 'lower_bound'
        auto it = std::ranges::lower_bound(range, position, {}, ProjectToPosition{});
                  ^~~~~~~~~~~~~~~~~~~~~~~~
/Users/zarg404/git/powertabeditor/source/score/utils.h:129:27: note: in instantiation of function template specialization 'ScoreUtils::Detail::binarySearch<std::vector<AlternateEnding> &>' requested here
        auto it = Detail::binarySearch(objects, obj.getPosition());
                          ^
/Users/zarg404/git/powertabeditor/source/score/system.cpp:128:17: note: in instantiation of function template specialization 'ScoreUtils::removeObject<AlternateEnding>' requested here
    ScoreUtils::removeObject(myAlternateEndings, ending);
                ^
/Library/Developer/CommandLineTools/SDKs/MacOSX13.1.sdk/usr/include/c++/v1/__algorithm/lower_bound.h:52:1: note: candidate template ignored: deduced conflicting types for parameter '_ForwardIterator' ('std::vector<AlternateEnding>' vs. 'int')
lower_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value_, _Compare __comp)
^
In file included from /Users/zarg404/git/powertabeditor/source/score/system.cpp:23:
/Users/zarg404/git/powertabeditor/source/score/utils.h:112:19: error: no matching function for call to 'lower_bound'
        auto it = std::ranges::lower_bound(objects, obj.getPosition(), {}, Detail::ProjectToPosition{});
                  ^~~~~~~~~~~~~~~~~~~~~~~~
/Users/zarg404/git/powertabeditor/source/score/system.cpp:133:17: note: in instantiation of function template specialization 'ScoreUtils::insertObject<Direction, const Direction &>' requested here
    ScoreUtils::insertObject(myDirections, direction);
                ^
/Library/Developer/CommandLineTools/SDKs/MacOSX13.1.sdk/usr/include/c++/v1/__algorithm/lower_bound.h:52:1: note: candidate template ignored: deduced conflicting types for parameter '_ForwardIterator' ('std::vector<Direction>' vs. 'int')
lower_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value_, _Compare __comp)
^
In file included from /Users/zarg404/git/powertabeditor/source/score/system.cpp:23:
/Users/zarg404/git/powertabeditor/source/score/utils.h:54:19: error: no matching function for call to 'lower_bound'
        auto it = std::ranges::lower_bound(range, position, {}, ProjectToPosition{});
                  ^~~~~~~~~~~~~~~~~~~~~~~~
/Users/zarg404/git/powertabeditor/source/score/utils.h:129:27: note: in instantiation of function template specialization 'ScoreUtils::Detail::binarySearch<std::vector<Direction> &>' requested here
        auto it = Detail::binarySearch(objects, obj.getPosition());
                          ^
/Users/zarg404/git/powertabeditor/source/score/system.cpp:138:17: note: in instantiation of function template specialization 'ScoreUtils::removeObject<Direction>' requested here
    ScoreUtils::removeObject(myDirections, direction);
                ^
/Library/Developer/CommandLineTools/SDKs/MacOSX13.1.sdk/usr/include/c++/v1/__algorithm/lower_bound.h:52:1: note: candidate template ignored: deduced conflicting types for parameter '_ForwardIterator' ('std::vector<Direction>' vs. 'int')
lower_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value_, _Compare __comp)
^
In file included from /Users/zarg404/git/powertabeditor/source/score/system.cpp:23:
/Users/zarg404/git/powertabeditor/source/score/utils.h:112:19: error: no matching function for call to 'lower_bound'
        auto it = std::ranges::lower_bound(objects, obj.getPosition(), {}, Detail::ProjectToPosition{});
                  ^~~~~~~~~~~~~~~~~~~~~~~~
/Users/zarg404/git/powertabeditor/source/score/system.cpp:143:17: note: in instantiation of function template specialization 'ScoreUtils::insertObject<PlayerChange, const PlayerChange &>' requested here
    ScoreUtils::insertObject(myPlayerChanges, change);
                ^
/Library/Developer/CommandLineTools/SDKs/MacOSX13.1.sdk/usr/include/c++/v1/__algorithm/lower_bound.h:52:1: note: candidate template ignored: deduced conflicting types for parameter '_ForwardIterator' ('std::vector<PlayerChange>' vs. 'int')
lower_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value_, _Compare __comp)
^
In file included from /Users/zarg404/git/powertabeditor/source/score/system.cpp:23:
/Users/zarg404/git/powertabeditor/source/score/utils.h:54:19: error: no matching function for call to 'lower_bound'
        auto it = std::ranges::lower_bound(range, position, {}, ProjectToPosition{});
                  ^~~~~~~~~~~~~~~~~~~~~~~~
/Users/zarg404/git/powertabeditor/source/score/utils.h:129:27: note: in instantiation of function template specialization 'ScoreUtils::Detail::binarySearch<std::vector<PlayerChange> &>' requested here
        auto it = Detail::binarySearch(objects, obj.getPosition());
                          ^
/Users/zarg404/git/powertabeditor/source/score/system.cpp:148:17: note: in instantiation of function template specialization 'ScoreUtils::removeObject<PlayerChange>' requested here
    ScoreUtils::removeObject(myPlayerChanges, change);
                ^
/Library/Developer/CommandLineTools/SDKs/MacOSX13.1.sdk/usr/include/c++/v1/__algorithm/lower_bound.h:52:1: note: candidate template ignored: deduced conflicting types for parameter '_ForwardIterator' ('std::vector<PlayerChange>' vs. 'int')
lower_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value_, _Compare __comp)
^
In file included from /Users/zarg404/git/powertabeditor/source/score/system.cpp:23:
/Users/zarg404/git/powertabeditor/source/score/utils.h:112:19: error: no matching function for call to 'lower_bound'
        auto it = std::ranges::lower_bound(objects, obj.getPosition(), {}, Detail::ProjectToPosition{});
                  ^~~~~~~~~~~~~~~~~~~~~~~~
/Users/zarg404/git/powertabeditor/source/score/system.cpp:153:17: note: in instantiation of function template specialization 'ScoreUtils::insertObject<ChordText, const ChordText &>' requested here
    ScoreUtils::insertObject(myChords, chord);
                ^
/Library/Developer/CommandLineTools/SDKs/MacOSX13.1.sdk/usr/include/c++/v1/__algorithm/lower_bound.h:52:1: note: candidate template ignored: deduced conflicting types for parameter '_ForwardIterator' ('std::vector<ChordText>' vs. 'int')
lower_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value_, _Compare __comp)
^
In file included from /Users/zarg404/git/powertabeditor/source/score/system.cpp:23:
/Users/zarg404/git/powertabeditor/source/score/utils.h:54:19: error: no matching function for call to 'lower_bound'
        auto it = std::ranges::lower_bound(range, position, {}, ProjectToPosition{});
                  ^~~~~~~~~~~~~~~~~~~~~~~~
/Users/zarg404/git/powertabeditor/source/score/utils.h:129:27: note: in instantiation of function template specialization 'ScoreUtils::Detail::binarySearch<std::vector<ChordText> &>' requested here
        auto it = Detail::binarySearch(objects, obj.getPosition());
                          ^
/Users/zarg404/git/powertabeditor/source/score/system.cpp:158:17: note: in instantiation of function template specialization 'ScoreUtils::removeObject<ChordText>' requested here
    ScoreUtils::removeObject(myChords, chord);
                ^
/Library/Developer/CommandLineTools/SDKs/MacOSX13.1.sdk/usr/include/c++/v1/__algorithm/lower_bound.h:52:1: note: candidate template ignored: deduced conflicting types for parameter '_ForwardIterator' ('std::vector<ChordText>' vs. 'int')
lower_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value_, _Compare __comp)
^
In file included from /Users/zarg404/git/powertabeditor/source/score/system.cpp:23:
/Users/zarg404/git/powertabeditor/source/score/utils.h:112:19: error: no matching function for call to 'lower_bound'
        auto it = std::ranges::lower_bound(objects, obj.getPosition(), {}, Detail::ProjectToPosition{});
                  ^~~~~~~~~~~~~~~~~~~~~~~~
/Users/zarg404/git/powertabeditor/source/score/system.cpp:163:17: note: in instantiation of function template specialization 'ScoreUtils::insertObject<TextItem, const TextItem &>' requested here
    ScoreUtils::insertObject(myTextItems, text);
                ^
/Library/Developer/CommandLineTools/SDKs/MacOSX13.1.sdk/usr/include/c++/v1/__algorithm/lower_bound.h:52:1: note: candidate template ignored: deduced conflicting types for parameter '_ForwardIterator' ('std::vector<TextItem>' vs. 'int')
lower_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value_, _Compare __comp)
^
In file included from /Users/zarg404/git/powertabeditor/source/score/system.cpp:23:
/Users/zarg404/git/powertabeditor/source/score/utils.h:54:19: error: no matching function for call to 'lower_bound'
        auto it = std::ranges::lower_bound(range, position, {}, ProjectToPosition{});
                  ^~~~~~~~~~~~~~~~~~~~~~~~
/Users/zarg404/git/powertabeditor/source/score/utils.h:129:27: note: in instantiation of function template specialization 'ScoreUtils::Detail::binarySearch<std::vector<TextItem> &>' requested here
        auto it = Detail::binarySearch(objects, obj.getPosition());
                          ^
/Users/zarg404/git/powertabeditor/source/score/system.cpp:168:17: note: in instantiation of function template specialization 'ScoreUtils::removeObject<TextItem>' requested here
    ScoreUtils::removeObject(myTextItems, text);
                ^
/Library/Developer/CommandLineTools/SDKs/MacOSX13.1.sdk/usr/include/c++/v1/__algorithm/lower_bound.h:52:1: note: candidate template ignored: deduced conflicting types for parameter '_ForwardIterator' ('std::vector<TextItem>' vs. 'int')
lower_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value_, _Compare __comp)
^
19 errors generated.
[26/532] Building CXX object source/score/CMakeFiles/ptescore.dir/serialization.cpp.o
ninja: build stopped: subcommand failed.

and I have the same errors with cmake instead of ninja.
Any idea ?
Thanks

@sbonaime sbonaime added the bug label Jun 23, 2024
@cameronwhite
Copy link
Member

I think a newer compiler version is required - the CI builds are using AppleClang 15.0.0.x (https://github.com/powertab/powertabeditor/actions/runs/9629396083/job/26558767470), but according to https://en.cppreference.com/w/cpp/compiler_support/20 you might be able to use 14.0.3 which is supposed to have support for the <ranges> header

@sbonaime
Copy link
Author

I think a newer compiler version is required - the CI builds are using AppleClang 15.0.0.x (https://github.com/powertab/powertabeditor/actions/runs/9629396083/job/26558767470), but according to https://en.cppreference.com/w/cpp/compiler_support/20 you might be able to use 14.0.3 which is supposed to have support for the <ranges> header

So I partially solve the problem with

brew install   llvm
export PATH="/usr/local/opt/llvm/bin:$PATH"

export CC=/usr/local/opt/llvm/bin/clang
export CXX=/usr/local/opt/llvm/bin/clang++

now this is the cmake result:


cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=/usr/local/opt/qt@5/lib/cmake ..                                                                                 -- The C compiler identification is Clang 18.1.7
-- The CXX compiler identification is Clang 18.1.7
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/local/opt/llvm/bin/clang - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/local/opt/llvm/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Boost: /usr/local/lib/cmake/Boost-1.85.0/BoostConfig.cmake (found suitable version "1.85.0", minimum required is "1.65") found components: date_time iostreams
-- Found minizip: /usr/local/include/minizip
-- Found nlohmann_json: /usr/local/share/cmake/nlohmann_json/nlohmann_jsonConfig.cmake (found suitable version "3.11.3", minimum required is "3.7.3")
-- Found rtmidi: /usr/local/include/rtmidi (Required is at least version "4.0")
-- Found Git: /usr/local/bin/git (found version "2.45.2")
-- Version number: 2.0.0-alpha19-80-gf6662dd3
-- Configuring done (2.6s)
-- Generating done (0.1s)
-- Build files have been written to: /Users/zarg404/git/powertabeditor/build

I have now other compilation issues with ninja are male like

 Waiting for unfinished jobs....
[ 37%] Building CXX object source/painters/CMakeFiles/ptepainters.dir/beamgroup.cpp.o
[ 38%] Building CXX object source/audio/CMakeFiles/pteaudio.dir/settings.cpp.o
In file included from /Users/zarg404/git/powertabeditor/source/painters/barlinepainter.cpp:22:
In file included from /usr/local/opt/qt@5/lib/QtCore.framework/Headers/QCoreApplication:1:
/usr/local/opt/qt@5/lib/QtCore.framework/Headers/qcoreapplication.h:66:7: error: definition of type 'QStringList' conflicts with type alias of the same name
   66 | class QStringList;
      |       ^
/usr/local/include/QtCore/qcontainerfwd.h:39:7: note: 'QStringList' declared here
   39 | using QStringList = QList<QString>;
      |       ^
In file included from /Users/zarg404/git/powertabeditor/source/painters/barlinepainter.cpp:23:
In file included from /usr/local/opt/qt@5/lib/QtGui.framework/Headers/QCursor:1:
/usr/local/opt/qt@5/lib/QtGui.framework/Headers/qcursor.h:127:1: error: unknown type name 'Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT6'
  127 | Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT6(QCursor)
      | ^
/usr/local/opt/qt@5/lib/QtGui.framework/Headers/qcursor.h:129:13: error: expected ';' after top level declarator
  129 | Q_GUI_EXPORT bool operator==(const QCursor &lhs, const QCursor &rhs) noexcept;
      |             ^
3 errors generated.
make[2]: *** [source/painters/CMakeFiles/ptepainters.dir/barlinepainter.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
[ 38%] Building CXX object source/dialogs/CMakeFiles/ptedialogs.dir/alternateendingdialog.cpp.o
[ 38%] Building CXX object source/dialogs/CMakeFiles/ptedialogs.dir/artificialharmonicdialog.cpp.o
[ 38%] Building CXX object source/dialogs/CMakeFiles/ptedialogs.dir/barlinedialog.cpp.o
In file included from /Users/zarg404/git/powertabeditor/source/widgets/common.cpp:20:
In file included from /usr/local/opt/qt@5/lib/QtWidgets.framework/Headers/QAction:1:
In file included from /usr/local/opt/qt@5/lib/QtWidgets.framework/Headers/qaction.h:46:
/usr/local/include/QtWidgets/qwidget.h:577:26: error: incomplete type 'QAction' named in nested name specifier
  577 |         connect(result, &QAction::triggered, std::forward<Args>(args)...);
      |                          ^~~~~~~~~
/Users/zarg404/git/powertabeditor/source/widgets/common.h:24:7: note: forward declaration of 'QAction'
   24 | class QAction;
      |       ^
In file included from /Users/zarg404/git/powertabeditor/source/widgets/common.cpp:20:
In file included from /usr/local/opt/qt@5/lib/QtWidgets.framework/Headers/QAction:1:
In file included from /usr/local/opt/qt@5/lib/QtWidgets.framework/Headers/qaction.h:46:
/usr/local/include/QtWidgets/qwidget.h:584:26: error: incomplete type 'QAction' named in nested name specifier
  584 |         connect(result, &QAction::triggered, std::forward<Args>(args)...);

@sbonaime
Copy link
Author

maybe it it something like rohit-px2/nvui#71

@sbonaime
Copy link
Author

I had qt5 AND qt6 installed ! So I solve the problem with

brew uninstall qt6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants