Open meska-lt opened 3 years ago
Try installing make
from brew and running gmake
instead of make
. I don't think the sm64-port makefiles work with OSX as is and I can't really help fixing them since I don't know anything about programming on OSX, but that might help.
You might also want to try the Docker solution.
Using gmake
(installed via brew
) did resolve previous issue. Assets did get extracted properly, but when it came to compiling (or linking 🤔), I got following output:
armips.cpp:1939:43: error: a space is required between consecutive right angle brackets (use '> >')
std::vector<std::shared_ptr<AssemblerFile>> files;
^~
> >
armips.cpp:2240:55: warning: use of enumeration in a nested name specifier is a C++11 extension [-Wc++11-extensions]
return fileHeader.e_ident[EI_DATA] == ELFDATA2MSB ? Endianness::Big : Endianness::Little;
^
armips.cpp:2240:73: warning: use of enumeration in a nested name specifier is a C++11 extension [-Wc++11-extensions]
return fileHeader.e_ident[EI_DATA] == ELFDATA2MSB ? Endianness::Big : Endianness::Little;
^
armips.cpp:2367:102: error: no viable constructor returning object of type 'std::unique_ptr<CAssemblerCommand>'
virtual std::unique_ptr<CAssemblerCommand> generateCtorStub(std::vector<ElfRelocatorCtor>& ctors) { return nullptr; }
^ ~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:2535:3: note: candidate
constructor not viable: expects an l-value for 1st argument
unique_ptr(unique_ptr&);
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:2536:35: note: candidate
constructor [with _Up = CAssemblerCommand, _Ep = std::__1::default_delete<CAssemblerCommand>] not viable: expects an l-value for 1st
argument
template <class _Up, class _Ep> unique_ptr(unique_ptr<_Up, _Ep>&);
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:2551:3: note: candidate
constructor not viable: no known conversion from 'std::unique_ptr<CAssemblerCommand>' to 'std::__1::nullptr_t' for 1st argument
unique_ptr(nullptr_t) : __ptr_(pointer())
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:2557:12: note: candidate
constructor not viable: no known conversion from 'std::unique_ptr<CAssemblerCommand>' to 'std::__1::unique_ptr<CAssemblerCommand,
std::__1::default_delete<CAssemblerCommand> >::pointer' (aka 'CAssemblerCommand *') for 1st argument
explicit unique_ptr(pointer __p)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:2569:3: note: candidate
constructor not viable: no known conversion from 'std::unique_ptr<CAssemblerCommand>' to '__rv<std::__1::unique_ptr<CAssemblerCommand,
std::__1::default_delete<CAssemblerCommand> > >' for 1st argument
unique_ptr(__rv<unique_ptr> __u)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:2543:3: note: candidate
constructor not viable: requires 0 arguments, but 1 was provided
unique_ptr() : __ptr_(pointer())
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:2588:3: note: candidate
constructor not viable: requires 2 arguments, but 1 was provided
unique_ptr(pointer __p, deleter_type __d)
^
armips.cpp:2438:39: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
const ExpressionFunctionMap emptyMap = {};
^
armips.cpp:2438:41: error: non-aggregate type 'const ExpressionFunctionMap' (aka 'const map<basic_string<wchar_t, char_traits<wchar_t>,
allocator<wchar_t> >, const ExpressionFunctionEntry>') cannot be initialized with an initializer list
const ExpressionFunctionMap emptyMap = {};
^~
armips.cpp:2429:78: error: no viable constructor returning object of type 'std::unique_ptr<CAssemblerCommand>'
virtual std::unique_ptr<CAssemblerCommand> parseDirective(Parser& parser) { return nullptr; }
^ ~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:2535:3: note: candidate
constructor not viable: expects an l-value for 1st argument
unique_ptr(unique_ptr&);
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:2536:35: note: candidate
constructor [with _Up = CAssemblerCommand, _Ep = std::__1::default_delete<CAssemblerCommand>] not viable: expects an l-value for 1st
argument
template <class _Up, class _Ep> unique_ptr(unique_ptr<_Up, _Ep>&);
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:2551:3: note: candidate
constructor not viable: no known conversion from 'std::unique_ptr<CAssemblerCommand>' to 'std::__1::nullptr_t' for 1st argument
unique_ptr(nullptr_t) : __ptr_(pointer())
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:2557:12: note: candidate
constructor not viable: no known conversion from 'std::unique_ptr<CAssemblerCommand>' to 'std::__1::unique_ptr<CAssemblerCommand,
std::__1::default_delete<CAssemblerCommand> >::pointer' (aka 'CAssemblerCommand *') for 1st argument
explicit unique_ptr(pointer __p)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:2569:3: note: candidate
constructor not viable: no known conversion from 'std::unique_ptr<CAssemblerCommand>' to '__rv<std::__1::unique_ptr<CAssemblerCommand,
std::__1::default_delete<CAssemblerCommand> > >' for 1st argument
unique_ptr(__rv<unique_ptr> __u)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:2543:3: note: candidate
constructor not viable: requires 0 arguments, but 1 was provided
unique_ptr() : __ptr_(pointer())
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:2588:3: note: candidate
constructor not viable: requires 2 arguments, but 1 was provided
unique_ptr(pointer __p, deleter_type __d)
^
armips.cpp:2430:75: error: no viable constructor returning object of type 'std::unique_ptr<CAssemblerCommand>'
virtual std::unique_ptr<CAssemblerCommand> parseOpcode(Parser& parser) { return nullptr; }
^ ~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:2535:3: note: candidate
constructor not viable: expects an l-value for 1st argument
unique_ptr(unique_ptr&);
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:2536:35: note: candidate
constructor [with _Up = CAssemblerCommand, _Ep = std::__1::default_delete<CAssemblerCommand>] not viable: expects an l-value for 1st
argument
template <class _Up, class _Ep> unique_ptr(unique_ptr<_Up, _Ep>&);
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:2551:3: note: candidate
constructor not viable: no known conversion from 'std::unique_ptr<CAssemblerCommand>' to 'std::__1::nullptr_t' for 1st argument
unique_ptr(nullptr_t) : __ptr_(pointer())
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:2557:12: note: candidate
constructor not viable: no known conversion from 'std::unique_ptr<CAssemblerCommand>' to 'std::__1::unique_ptr<CAssemblerCommand,
std::__1::default_delete<CAssemblerCommand> >::pointer' (aka 'CAssemblerCommand *') for 1st argument
explicit unique_ptr(pointer __p)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:2569:3: note: candidate
constructor not viable: no known conversion from 'std::unique_ptr<CAssemblerCommand>' to '__rv<std::__1::unique_ptr<CAssemblerCommand,
std::__1::default_delete<CAssemblerCommand> > >' for 1st argument
unique_ptr(__rv<unique_ptr> __u)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:2543:3: note: candidate
constructor not viable: requires 0 arguments, but 1 was provided
unique_ptr() : __ptr_(pointer())
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:2588:3: note: candidate
constructor not viable: requires 2 arguments, but 1 was provided
unique_ptr(pointer __p, deleter_type __d)
^
armips.cpp:2463:46: warning: use of enumeration in a nested name specifier is a C++11 extension [-Wc++11-extensions]
virtual Endianness getEndianness() { return Endianness::Little; }
^
armips.cpp:2485:57: warning: use of enumeration in a nested name specifier is a C++11 extension [-Wc++11-extensions]
return Version == MARCH_N64 || Version == MARCH_RSP ? Endianness::Big : Endianness::Little;
^
armips.cpp:2485:75: warning: use of enumeration in a nested name specifier is a C++11 extension [-Wc++11-extensions]
return Version == MARCH_N64 || Version == MARCH_RSP ? Endianness::Big : Endianness::Little;
^
armips.cpp:2658:6: warning: scoped enumerations are a C++11 extension [-Wc++11-extensions]
enum class MipsRegisterType
^
armips.cpp:2677:6: warning: scoped enumerations are a C++11 extension [-Wc++11-extensions]
enum class MipsImmediateType
^
armips.cpp:2757:18: warning: use of enumeration in a nested name specifier is a C++11 extension [-Wc++11-extensions]
primary.type = MipsImmediateType::None;
^
armips.cpp:2761:20: warning: use of enumeration in a nested name specifier is a C++11 extension [-Wc++11-extensions]
secondary.type = MipsImmediateType::None;
^
armips.cpp:2876:20: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template <typename... Args>
^
armips.cpp:2885:20: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template <typename... Args>
^
armips.cpp:2897:20: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template <typename... Args>
^
armips.cpp:2904:20: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template <typename... Args>
^
armips.cpp:2959:6: warning: scoped enumerations are a C++11 extension [-Wc++11-extensions]
enum class ArmipsMode { FILE, MEMORY };
^
armips.cpp:2997:10: warning: use of enumeration in a nested name specifier is a C++11 extension [-Wc++11-extensions]
mode = ArmipsMode::FILE;
^
armips.cpp:3047:24: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
bool physicalValueSet = false;
^
armips.cpp:3089:35: error: a space is required between consecutive right angle brackets (use '> >')
std::vector<std::shared_ptr<Label>> labels;
^~
> >
armips.cpp:3141:23: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using DirectiveFunc = std::unique_ptr<CAssemblerCommand> (*)(Parser&,int);
^
armips.cpp:3148:22: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using DirectiveMap = std::unordered_multimap<std::wstring, const DirectiveEntry>;
^
armips.cpp:3207:6: warning: scoped enumerations are a C++11 extension [-Wc++11-extensions]
enum class TokenType
^
armips.cpp:3261:14: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
Token(Token &&src)
^
armips.cpp:3460:38: error: a space is required between consecutive right angle brackets (use '> >')
static std::vector<std::vector<Token>> equValues;
^~
> >
armips.cpp:3499:24: warning: range-based for loop is a C++11 extension [-Wc++11-extensions]
for (const Token &tok: tokens)
^
armips.cpp:3545:23: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using MipsMacroFunc = std::unique_ptr<CAssemblerCommand> (*)(Parser&,MipsRegisterData&,MipsImmediateData&,int);
^
armips.cpp:3660:7: warning: use of enumeration in a nested name specifier is a C++11 extension [-Wc++11-extensions]
case MipsImmediateType::Immediate5:
^
armips.cpp:3660:7: error: expression is not an integral constant expression
case MipsImmediateType::Immediate5:
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
armips.cpp:3662:7: warning: use of enumeration in a nested name specifier is a C++11 extension [-Wc++11-extensions]
case MipsImmediateType::Immediate7:
^
armips.cpp:3662:7: error: expression is not an integral constant expression
case MipsImmediateType::Immediate7:
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
armips.cpp:3664:7: warning: use of enumeration in a nested name specifier is a C++11 extension [-Wc++11-extensions]
case MipsImmediateType::Immediate10:
^
armips.cpp:3664:7: error: expression is not an integral constant expression
case MipsImmediateType::Immediate10:
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
armips.cpp:3666:7: warning: use of enumeration in a nested name specifier is a C++11 extension [-Wc++11-extensions]
case MipsImmediateType::Immediate16:
^
armips.cpp:3666:7: error: expression is not an integral constant expression
case MipsImmediateType::Immediate16:
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
armips.cpp:3667:7: warning: use of enumeration in a nested name specifier is a C++11 extension [-Wc++11-extensions]
case MipsImmediateType::ImmediateHalfFloat:
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
65 warnings and 20 errors generated.
gmake: *** [Makefile:19: armips] Error 1
Makefile:185: *** Failed to build tools. Stop.
Any ideas what could be the main issue (different toolkit than desired)?
The issue is you're compiling armips with Clang/Xcode and for some reason it seems to be using the wrong flags. Try installing GCC from brew or something. The OSX build environment has some differences to the normal GNU setup, so you're gonna run into a lot of issues like this.
I've tried building PS2 version on Mac, but I couldn't.
git clone https://github.com/fgsfdsfgs/sm64-port.git -b ps2 --recursive
);baserom.us.z64
(checked hashes – they did match) into root directory of repository;make
(triedmake -j2
too).Got following output: