Build errors on Intel Mac with SDK 2.4.1

Hello,

I’m experiencing multiple issues on my intel mac when trying to build a simple plugin:

In file included from src/Blank.cpp:1:
In file included from src/Blank.hpp:3:
In file included from src/plugin.hpp:1:
In file included from ./dep/Rack-SDK/include/rack.hpp:24:
./dep/Rack-SDK/include/string.hpp:1:5: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal]
", "c"}
    ^
     
./dep/Rack-SDK/include/string.hpp:1:1: error: expected unqualified-id
", "c"}
^
./dep/Rack-SDK/include/string.hpp:1:6: warning: missing terminating '"' character [-Winvalid-pp-token]
", "c"}
     ^
./dep/Rack-SDK/include/string.hpp:46:27: error: implicit instantiation of undefined template 'std::vector<std::string>'
        std::vector<std::string> parts;
                                 ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/iosfwd:259:28: note: template is declared here
class _LIBCPP_TEMPLATE_VIS vector;
                           ^
In file included from src/Blank.cpp:1:
In file included from src/Blank.hpp:3:
In file included from src/plugin.hpp:1:
In file included from ./dep/Rack-SDK/include/rack.hpp:24:
./dep/Rack-SDK/include/string.hpp:67:1: error: extraneous closing brace ('}')
} // namespace string
^
./dep/Rack-SDK/include/string.hpp:68:1: error: extraneous closing brace ('}')
} // namespace rack
^
./dep/Rack-SDK/include/string.hpp:132:1: error: unterminated /* comment
/** Splits a string into a vector of tokens.
^
In file included from src/Blank.cpp:1:
In file included from src/Blank.hpp:3:
In file included from src/plugin.hpp:1:
In file included from ./dep/Rack-SDK/include/rack.hpp:27:
In file included from ./dep/Rack-SDK/include/random.hpp:3:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/random:1690:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/numeric:292:18: error: no template named 'iterator_traits'; did you mean '::std::iterator_traits'?
        typename iterator_traits<_InputIterator>::value_type __t(*__first);
                 ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__iterator/iterator_traits.h:400:29: note: '::std::iterator_traits' declared here
struct _LIBCPP_TEMPLATE_VIS iterator_traits
                            ^
In file included from src/Blank.cpp:1:
In file included from src/Blank.hpp:3:
In file included from src/plugin.hpp:1:
In file included from ./dep/Rack-SDK/include/rack.hpp:27:
In file included from ./dep/Rack-SDK/include/random.hpp:3:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/random:1690:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/numeric:315:18: error: no template named 'iterator_traits'; did you mean '::std::iterator_traits'?
        typename iterator_traits<_InputIterator>::value_type __t(*__first);
                 ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__iterator/iterator_traits.h:400:29: note: '::std::iterator_traits' declared here
struct _LIBCPP_TEMPLATE_VIS iterator_traits
                            ^
In file included from src/Blank.cpp:1:
In file included from src/Blank.hpp:3:
In file included from src/plugin.hpp:1:
In file included from ./dep/Rack-SDK/include/rack.hpp:27:
In file included from ./dep/Rack-SDK/include/random.hpp:3:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/random:1690:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/numeric:458:18: error: no template named 'iterator_traits'; did you mean '::std::iterator_traits'?
        typename iterator_traits<_InputIterator>::value_type __acc(*__first);
                 ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__iterator/iterator_traits.h:400:29: note: '::std::iterator_traits' declared here
struct _LIBCPP_TEMPLATE_VIS iterator_traits
                            ^
In file included from src/Blank.cpp:1:
In file included from src/Blank.hpp:3:
In file included from src/plugin.hpp:1:
In file included from ./dep/Rack-SDK/include/rack.hpp:27:
In file included from ./dep/Rack-SDK/include/random.hpp:3:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/random:1690:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/numeric:462:22: error: no template named 'iterator_traits'; did you mean '::std::iterator_traits'?
            typename iterator_traits<_InputIterator>::value_type __val(*__first);
                     ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__iterator/iterator_traits.h:400:29: note: '::std::iterator_traits' declared here
struct _LIBCPP_TEMPLATE_VIS iterator_traits
                            ^
In file included from src/Blank.cpp:1:
In file included from src/Blank.hpp:3:
In file included from src/plugin.hpp:1:
In file included from ./dep/Rack-SDK/include/rack.hpp:27:
In file included from ./dep/Rack-SDK/include/random.hpp:3:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/random:1690:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/numeric:468:21: error: no member named 'move' in namespace 'rack::string::std::__1'; did you mean '::std::move'?
            __acc = _VSTD::move(__val);
                    ^~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:858:15: note: expanded from macro '_VSTD'
#define _VSTD std::_LIBCPP_ABI_NAMESPACE
              ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__utility/move.h:27:1: note: '::std::move' declared here
move(_Tp&& __t) _NOEXCEPT {
^
In file included from src/Blank.cpp:1:
In file included from src/Blank.hpp:3:
In file included from src/plugin.hpp:1:
In file included from ./dep/Rack-SDK/include/rack.hpp:27:
In file included from ./dep/Rack-SDK/include/random.hpp:3:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/random:1690:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/numeric:482:18: error: no template named 'iterator_traits'; did you mean '::std::iterator_traits'?
        typename iterator_traits<_InputIterator>::value_type __acc(*__first);
                 ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__iterator/iterator_traits.h:400:29: note: '::std::iterator_traits' declared here
struct _LIBCPP_TEMPLATE_VIS iterator_traits
                            ^
In file included from src/Blank.cpp:1:
In file included from src/Blank.hpp:3:
In file included from src/plugin.hpp:1:
In file included from ./dep/Rack-SDK/include/rack.hpp:27:
In file included from ./dep/Rack-SDK/include/random.hpp:3:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/random:1690:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/numeric:486:22: error: no template named 'iterator_traits'; did you mean '::std::iterator_traits'?
            typename iterator_traits<_InputIterator>::value_type __val(*__first);
                     ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__iterator/iterator_traits.h:400:29: note: '::std::iterator_traits' declared here
struct _LIBCPP_TEMPLATE_VIS iterator_traits
                            ^
In file included from src/Blank.cpp:1:
In file included from src/Blank.hpp:3:
In file included from src/plugin.hpp:1:
In file included from ./dep/Rack-SDK/include/rack.hpp:27:
In file included from ./dep/Rack-SDK/include/random.hpp:3:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/random:1690:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/numeric:492:21: error: no member named 'move' in namespace 'rack::string::std::__1'; did you mean '::std::move'?
            __acc = _VSTD::move(__val);
                    ^~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:858:15: note: expanded from macro '_VSTD'
#define _VSTD std::_LIBCPP_ABI_NAMESPACE
              ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__utility/move.h:27:1: note: '::std::move' declared here
move(_Tp&& __t) _NOEXCEPT {
^
In file included from src/Blank.cpp:1:
In file included from src/Blank.hpp:3:
In file included from src/plugin.hpp:1:
In file included from ./dep/Rack-SDK/include/rack.hpp:27:
In file included from ./dep/Rack-SDK/include/random.hpp:3:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/random:1725:16: error: no template named 'is_convertible'; did you mean '::std::is_convertible'?
              !is_convertible<_Sseq, typename _Engine::result_type>::value &&
               ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/type_traits:1728:61: note: '::std::is_convertible' declared here
template <class _T1, class _T2> struct _LIBCPP_TEMPLATE_VIS is_convertible
                                                            ^
In file included from src/Blank.cpp:1:
In file included from src/Blank.hpp:3:
In file included from src/plugin.hpp:1:
In file included from ./dep/Rack-SDK/include/rack.hpp:27:
In file included from ./dep/Rack-SDK/include/random.hpp:3:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/random:1726:33: error: no template named 'remove_cv'; did you mean '::std::remove_cv'?
              !is_same<typename remove_cv<_Sseq>::type, _Engine>::value;
                                ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/type_traits:715:50: note: '::std::remove_cv' declared here
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_cv
                                                 ^
In file included from src/Blank.cpp:1:
In file included from src/Blank.hpp:3:
In file included from src/plugin.hpp:1:
In file included from ./dep/Rack-SDK/include/rack.hpp:27:
In file included from ./dep/Rack-SDK/include/random.hpp:3:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/random:1726:16: error: no template named 'is_same'; did you mean '::std::is_same'?
              !is_same<typename remove_cv<_Sseq>::type, _Engine>::value;
               ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/type_traits:558:29: note: '::std::is_same' declared here
struct _LIBCPP_TEMPLATE_VIS is_same : _BoolConstant<__is_same(_Tp, _Up)> { };
                            ^
In file included from src/Blank.cpp:1:
In file included from src/Blank.hpp:3:
In file included from src/plugin.hpp:1:
In file included from ./dep/Rack-SDK/include/rack.hpp:27:
In file included from ./dep/Rack-SDK/include/random.hpp:3:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/random:1899:1: error: no template named 'basic_ostream'; did you mean '::std::basic_ostream'?
basic_ostream<_CharT, _Traits>&
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/ostream:151:28: note: '::std::basic_ostream' declared here
class _LIBCPP_TEMPLATE_VIS basic_ostream
                           ^
In file included from src/Blank.cpp:1:
In file included from src/Blank.hpp:3:
In file included from src/plugin.hpp:1:
In file included from ./dep/Rack-SDK/include/rack.hpp:27:
In file included from ./dep/Rack-SDK/include/random.hpp:3:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/random:1900:12: error: no template named 'basic_ostream'; did you mean '::std::basic_ostream'?
operator<<(basic_ostream<_CharT, _Traits>& __os,
           ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/ostream:151:28: note: '::std::basic_ostream' declared here
class _LIBCPP_TEMPLATE_VIS basic_ostream
                           ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
1 warning and 20 errors generated.
make: *** [build/src/Blank.cpp.o] Error 1

Anyone else dealing with this issue?

Code can be found here: https://github.com/shortwavaudio/vcv-rack-plugins

Your Github link is 404 not found.

1 Like

It’s hard to say without seeing your code (is your repo private?) but at a guess I’d say you’ve accidentally deleted a chunk of code in one of the header files in the Rack SDK.

string.hpp has a comment block around line 64 which contains the code from your error message: ", "c"}:

The error implies that all of the code in string.hpp before that code on line 68 has been wiped out somehow. That would be very weird, but it would explain what you’re seeing.

2 Likes

Just a guess are you using namespace std in a header?

I like richies guess more than mine :slight_smile:

2 Likes

Have set up your build environment correctly?

1 Like

@pgatt @Richie sorry, i made the repo public now

yeah; it used to work fine before… i am wondering if maybe it’s not an issue with an Xcode update

1 Like

no, it’s only a super simple blank plugin… used to build fine about 6 months agho. Then I updated Xcode and I’m wondering if it’s not related

just to be sure, i downloaded the SDK again, but i’m still seeing the error

Could it be that that comment block is ill-formed for this particular build environment?

1 Like

If you open your dep/Rack-SDK/include/string.hpp in an editor, does it match https://github.com/VCVRack/Rack/blob/v2/include/string.hpp?

If so, what happens if you deliberately break that file, say by pasting the word hazmat at the very top of the file?

Also, how are you pointing your build environment at the SDK? Are you setting RACK_DIR ? How?

(Question for the room: is it weird to have the Rack SDK as a dependency of the plugin?)

1 Like

For what it’s worth, I just cloned the repo and built it successfully for all four architectures—on an Intel Mac—using the Rack Plugin Toolchain (Docker version).

So it doesn’t appear to me to be a problem with either the source code or the includes. :thinking:

2 Likes

After you upgraded Xcode did you do a complete clean build of your plug? They moved some headers around with latest version etc

I can give it a whirl on latest macOS and Xcode when I’m at computer next

I checked the file, and look a the beginning…

That’s definitely not correct for line 1 of string.hpp (which begins with a #pragma). As @richie showed earlier, what you have at the beginning of line 1 should actually be near the end of line 68. You’re missing almost 68 lines at the beginning of the file.

I strongly suggest that you redownload the Rack SDK (again): https://vcvrack.com/downloads/Rack-SDK-latest-mac-x64.zip.

1 Like

it worked! thank you :slight_smile: So, it looks like there is an issue with this package: https://vcvrack.com/downloads/Rack-SDK-2.4.1-mac-x64.zip, this is the one i had downloaded that contains the faulty code.

3 Likes

fwiw, I’ve never used an SDK, I build rack and build the plugins under it…

1 Like