MCMrARM / mcpelauncher-linux

Please note this is a legacy repository, please go to: https://github.com/minecraft-linux/mcpelauncher-manifest/wiki
GNU General Public License v3.0
312 stars 46 forks source link

Cant make on MacOS #369

Open djekl opened 6 years ago

djekl commented 6 years ago

iMac (non retina) OS 10.13.3 High Sierra

Below is my output to make -j$(sysctl -n hw.ncpu)


[ 21%] Built target glfw
[ 21%] Built target libzip
[ 24%] Linking CXX executable server
[ 24%] Building CXX object CMakeFiles/mcpelauncher.dir/src/ui/file_picker/file_picker_zenity.cpp.o
Undefined symbols for architecture i386:
  "std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::operator<<<char, std::__1::char_traits<char>, std::__1::allocator<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
      operator<<(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, mcpe::string const&) in string_darwin.cpp.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [server] Error 1
make[1]: *** [CMakeFiles/server.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
In file included from /Users/djekl/mcpelauncher-linux/src/ui/file_picker/file_picker_zenity.cpp:1:
/Users/djekl/mcpelauncher-linux/src/ui/file_picker/file_picker_zenity.h:24:10: warning: 'setMode' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
    void setMode(Mode mode) {
         ^
/Users/djekl/mcpelauncher-linux/src/ui/file_picker/file_picker.h:17:18: note: overridden virtual function is here
    virtual void setMode(Mode mode) = 0;
                 ^
/Users/djekl/mcpelauncher-linux/src/ui/file_picker/file_picker_zenity.cpp:76:81: error: use of undeclared identifier 'errno'
        Log::error("ZenityFilePicker", "Show: execv() error %i %s", r, strerror(errno));
                                                                                ^
1 warning and 1 error generated.
make[2]: *** [CMakeFiles/mcpelauncher.dir/src/ui/file_picker/file_picker_zenity.cpp.o] Error 1
make[1]: *** [CMakeFiles/mcpelauncher.dir/all] Error 2
make: *** [all] Error 2```
stayandwait commented 6 years ago

I am having the same problem :(

stayandwait commented 6 years ago

OS: Macos High Sierra 10.13.4 (also happens in Macos Sierra)

I am getting this :(

[ 98%] Linking CXX executable server Undefined symbols for architecture i386: "std::1::basic_ostream<char, std::__1::char_traits >& std::1::operator<<<char, std::1::char_traits, std::1::allocator >(std::1::basic_ostream<char, std::1::char_traits >&, std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&)", referenced from: operator<<(std::__1::basic_ostream<char, std::__1::char_traits >&, mcpe::string const&) in string_darwin.cpp.o ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: [server] Error 1 make[1]: [CMakeFiles/server.dir/all] Error 2 make[1]: Waiting for unfinished jobs.... [100%] Linking CXX executable mcpelauncher [100%] Built target mcpelauncher make: [all] Error 2

cravussin commented 6 years ago

Same here on Sierra 10.12.6:

[ 48%] Building CXX object CMakeFiles/server.dir/src/common/extract.cpp.o [ 49%] Building CXX object CMakeFiles/server.dir/src/common/path_helper.cpp.o [ 50%] Building CXX object CMakeFiles/server.dir/src/common/log.cpp.o [ 51%] Building CXX object CMakeFiles/server.dir/src/minecraft/symbols.cpp.o [ 52%] Building CXX object CMakeFiles/server.dir/src/common/modloader.cpp.o [ 53%] Building CXX object CMakeFiles/server.dir/src/minecraft/std/string_darwin.cpp.o [ 54%] Building CXX object CMakeFiles/server.dir/src/server/server.cpp.o [ 56%] Building CXX object CMakeFiles/server.dir/src/server/server_properties.cpp.o [ 57%] Linking CXX executable server Undefined symbols for architecture i386: "std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::operator<<<char, std::__1::char_traits<char>, std::__1::allocator<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from: operator<<(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, mcpe::string const&) in string_darwin.cpp.o ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [server] Error 1 make[1]: *** [CMakeFiles/server.dir/all] Error 2 make: *** [all] Error 2

cravussin commented 6 years ago

Could compile and run from the "fix Darwin" branch, with the patch to string_darwin.cpp

https://github.com/MCMrARM/mcpelauncher-linux/pull/367#discussion-diff-178462844R56