Open murlock opened 5 years ago
gcc 6.3.0, clang 3.8.1-24, Debian GNU/Linux stretch: openmom_build.log
I've fixed some errors by including some headers (https://github.com/rtentser/openmom/tree/compilationFixes) and using -fpermissive flag lets gcc to ignore some other issues (it's temporary solution, but i don't want to look into them right now). And now i stuck with another problem. I've attached the log. I'll try to fix it too but it's been a while since i wrote in C++ and i wasn't good, so i need time to refresh my skills. Any help will be appreciated. openmom_build2.log
So far I'm mainly working with XCode, I created the cmake project so that someone could help in configuring it for additional platforms but I haven't personally tested it too much on other operating systems.
My main machine has this clang/LLVM version:
Apple LLVM version 8.0.0 (clang-800.0.42.1)
XCode has some predefined headers which indeed must be added to allow compilation through a different build system, I'd be glad if you are able to provide a pull request which fixes compilation under your version of linux as it's really welcome :)
Right now i've fixed or workarounded some of compilation issues on my system (PULL: https://github.com/Jakz/openmom/pull/4). But that isn't all.
Thanks,
I'll try with new updates and will upgrade my clang version !
Regards
Le sam. 24 nov. 2018 à 08:07, rtentser notifications@github.com a écrit :
Right now i've fixed or workarounded some of compilation issues on my system (PULL: #4 https://github.com/Jakz/openmom/pull/4). But that isn't all.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Jakz/openmom/issues/3#issuecomment-441348703, or mute the thread https://github.com/notifications/unsubscribe-auth/AAPTAQVXTDv0SqwEc44477OyhpX9So_Zks5uyPAWgaJpZM4YcjkF .
-- Michael Bonfils ( http://www.murlock.org )
@rtentser: It's not clear if now it compiles with -fpermissive
on your machine or if it still requires fixes, I merged the PR meanwhile, in case it wasn't complete please specify it directly in the text of the PR so that I'll avoid merging it.
If another PR is needed then feel free to open it. I'll try to setup a bare Linux environment to test compilation too.
Ok, I prepared the environment and tested compilation on clang-3.8. Added some fixes that I already integrated into master branch, now it should reach linking phase, could @rtentser please confirm this?
It wasn't finished: there was a problem with operator- for iterator and you've fixed it. Thanks a lot (and for other fixes too)!
There was some filenames issues still, i've fixed them: https://github.com/Jakz/openmom/pull/7
Now it's 100%, "Linking CXX executable openmom" and many errors.
I've fixed -fpermissive issues earlier, so we don't need this flag anymore.
I added some more fixes which should solve linking problems on Linux, now the executable should be correctly created but it crashes at startup (another story!).
/home/rtentser/Sources/openmom/src/save/YAML.cpp:5:27: fatal error: yaml-cpp/yaml.h: No such file or directory
Fixes: https://github.com/Jakz/openmom/pull/8
But linking doesn't starts:
make[2]: *** No rule to make target '/yaml/lib/linux/libyaml-cpp.a', needed by 'openmom'. Stop.
CMakeFiles/Makefile2:86: recipe for target 'CMakeFiles/openmom.dir/all' failed
make[1]: *** [CMakeFiles/openmom.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
Also, Debian and Ubuntu have libyaml-cpp-dev package: https://packages.debian.org/stretch/libyaml-cpp-dev. Can you use it?
Here is content of a package in Debian Stretch i386: /usr/include/yaml-cpp/anchor.h /usr/include/yaml-cpp/binary.h /usr/include/yaml-cpp/contrib/anchordict.h /usr/include/yaml-cpp/contrib/graphbuilder.h /usr/include/yaml-cpp/dll.h /usr/include/yaml-cpp/emitfromevents.h /usr/include/yaml-cpp/emitter.h /usr/include/yaml-cpp/emitterdef.h /usr/include/yaml-cpp/emittermanip.h /usr/include/yaml-cpp/emitterstyle.h /usr/include/yaml-cpp/eventhandler.h /usr/include/yaml-cpp/exceptions.h /usr/include/yaml-cpp/mark.h /usr/include/yaml-cpp/node/convert.h /usr/include/yaml-cpp/node/detail/bool_type.h /usr/include/yaml-cpp/node/detail/impl.h /usr/include/yaml-cpp/node/detail/iterator.h /usr/include/yaml-cpp/node/detail/iterator_fwd.h /usr/include/yaml-cpp/node/detail/memory.h /usr/include/yaml-cpp/node/detail/node.h /usr/include/yaml-cpp/node/detail/node_data.h /usr/include/yaml-cpp/node/detail/node_iterator.h /usr/include/yaml-cpp/node/detail/node_ref.h /usr/include/yaml-cpp/node/emit.h /usr/include/yaml-cpp/node/impl.h /usr/include/yaml-cpp/node/iterator.h /usr/include/yaml-cpp/node/node.h /usr/include/yaml-cpp/node/parse.h /usr/include/yaml-cpp/node/ptr.h /usr/include/yaml-cpp/node/type.h /usr/include/yaml-cpp/noncopyable.h /usr/include/yaml-cpp/null.h /usr/include/yaml-cpp/ostream_wrapper.h /usr/include/yaml-cpp/parser.h /usr/include/yaml-cpp/stlemitter.h /usr/include/yaml-cpp/traits.h /usr/include/yaml-cpp/yaml.h /usr/lib/i386-linux-gnu/cmake/yaml-cpp/yaml-cpp-config-version.cmake /usr/lib/i386-linux-gnu/cmake/yaml-cpp/yaml-cpp-config.cmake /usr/lib/i386-linux-gnu/cmake/yaml-cpp/yaml-cpp-targets-release.cmake /usr/lib/i386-linux-gnu/cmake/yaml-cpp/yaml-cpp-targets.cmake /usr/lib/i386-linux-gnu/libyaml-cpp.a /usr/lib/i386-linux-gnu/libyaml-cpp.so /usr/lib/i386-linux-gnu/pkgconfig/yaml-cpp.pc /usr/share/doc/libyaml-cpp-dev/changelog.Debian.gz /usr/share/doc/libyaml-cpp-dev/copyright
I've tried to build openmom without my changes after i've installed the package and get some other errors:
I did some local enhancements to the library so that's why I would prefer avoiding using the package (and I'm not even sure all distributions have it), I think the problem you get is related to
set(LIBRARY_FOLDER ${CMAKE_CURRENT_SOURCE_DIR}/libs)
in root CMakeFiles.txt
which is not propagated to the CMakeFiles.txt
in the subfolders so that it's empty, and subsequent
set(YAML_INCLUDE_DIR ${LIBRARY_FOLDER}/yaml/include)
fails. If you fix it you don't need to change all includes (which should be kept with yaml-cpp
since this is required on macOS).
Are you actually launching cmake on root of the project and not src
folder? Otherwise you could try by caching the variable, eg
set(LIBRARY_FOLDER ${CMAKE_CURRENT_SOURCE_DIR}/libs CACHE INTERNAL "")
With root of the project as a source directory it successfully compiles. Thanks!
But linking still fails. You use x86-64 version of libyaml-cpp? My system is x86.
Yes, I just prebuilt x64 version, you can try replacing it to see if works, then we need to update cmake script to choose the correct one accordingly.
I've tried with libyaml-cpp.a from Debian repository and your headers and get this:
/home/rtentser/Sources/openmom/libs/yaml/lib/linux/libyaml-cpp.a(node_data.cpp.o):(.bss+0x0): multiple definition of `YAML::detail::node_data::empty_scalar[abi:cxx11]'
save/libSAVE_LIB.a(YAML.cpp.o):(.bss+0x0): first defined here
save/libSAVE_LIB.a(YAML.cpp.o): In function `YAML::BadConversion::BadConversion(YAML::Mark const&)':
YAML.cpp:(.text._ZN4YAML13BadConversionC2ERKNS_4MarkE[_ZN4YAML13BadConversionC5ERKNS_4MarkE]+0x7b): undefined reference to `vtable for YAML::BadConversion'
save/libSAVE_LIB.a(YAML.cpp.o): In function `YAML::TypedBadConversion<int>::~TypedBadConversion()':
YAML.cpp:(.text._ZN4YAML18TypedBadConversionIiED2Ev[_ZN4YAML18TypedBadConversionIiED5Ev]+0x26): undefined reference to `YAML::BadConversion::~BadConversion()'
save/libSAVE_LIB.a(YAML.cpp.o): In function `YAML::TypedBadConversion<short>::~TypedBadConversion()':
YAML.cpp:(.text._ZN4YAML18TypedBadConversionIsED2Ev[_ZN4YAML18TypedBadConversionIsED5Ev]+0x26): undefined reference to `YAML::BadConversion::~BadConversion()'
save/libSAVE_LIB.a(YAML.cpp.o): In function `YAML::TypedBadConversion<unsigned short>::~TypedBadConversion()':
YAML.cpp:(.text._ZN4YAML18TypedBadConversionItED2Ev[_ZN4YAML18TypedBadConversionItED5Ev]+0x26): undefined reference to `YAML::BadConversion::~BadConversion()'
save/libSAVE_LIB.a(YAML.cpp.o): In function `YAML::TypedBadConversion<float>::~TypedBadConversion()':
YAML.cpp:(.text._ZN4YAML18TypedBadConversionIfED2Ev[_ZN4YAML18TypedBadConversionIfED5Ev]+0x26): undefined reference to `YAML::BadConversion::~BadConversion()'
save/libSAVE_LIB.a(YAML.cpp.o): In function `YAML::TypedBadConversion<bool>::~TypedBadConversion()':
YAML.cpp:(.text._ZN4YAML18TypedBadConversionIbED2Ev[_ZN4YAML18TypedBadConversionIbED5Ev]+0x26): undefined reference to `YAML::BadConversion::~BadConversion()'
save/libSAVE_LIB.a(YAML.cpp.o): In function `.L6154':
YAML.cpp:(.text._ZN4YAML6detail9node_data3getINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERNS0_4nodeERKT_St10shared_ptrINS0_13memory_holderEE[_ZN4YAML6detail9node_data3getINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERNS0_4nodeERKT_St10shared_ptrINS0_13memory_holderEE]+0xa5): undefined reference to `YAML::detail::node_data::convert_to_map(std::shared_ptr<YAML::detail::memory_holder>)'
save/libSAVE_LIB.a(YAML.cpp.o): In function `YAML::TypedBadConversion<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >::~TypedBadConversion()':
YAML.cpp:(.text._ZN4YAML18TypedBadConversionINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev[_ZN4YAML18TypedBadConversionINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED5Ev]+0x26): undefined reference to `YAML::BadConversion::~BadConversion()'
save/libSAVE_LIB.a(YAML.cpp.o):(.data.rel.ro._ZTIN4YAML18TypedBadConversionIbEE[_ZTIN4YAML18TypedBadConversionIbEE]+0x8): undefined reference to `typeinfo for YAML::BadConversion'
save/libSAVE_LIB.a(YAML.cpp.o):(.data.rel.ro._ZTIN4YAML18TypedBadConversionIfEE[_ZTIN4YAML18TypedBadConversionIfEE]+0x8): undefined reference to `typeinfo for YAML::BadConversion'
save/libSAVE_LIB.a(YAML.cpp.o):(.data.rel.ro._ZTIN4YAML18TypedBadConversionItEE[_ZTIN4YAML18TypedBadConversionItEE]+0x8): undefined reference to `typeinfo for YAML::BadConversion'
save/libSAVE_LIB.a(YAML.cpp.o):(.data.rel.ro._ZTIN4YAML18TypedBadConversionIsEE[_ZTIN4YAML18TypedBadConversionIsEE]+0x8): undefined reference to `typeinfo for YAML::BadConversion'
save/libSAVE_LIB.a(YAML.cpp.o):(.data.rel.ro._ZTIN4YAML18TypedBadConversionIiEE[_ZTIN4YAML18TypedBadConversionIiEE]+0x8): undefined reference to `typeinfo for YAML::BadConversion'
save/libSAVE_LIB.a(YAML.cpp.o):(.data.rel.ro._ZTIN4YAML18TypedBadConversionINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE[_ZTIN4YAML18TypedBadConversionINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE]+0x8): more undefined references to `typeinfo for YAML::BadConversion' follow
collect2: error: ld returned 1 exit status
src/CMakeFiles/openmom.dir/build.make:121: ошибка выполнения рецепта для цели «src/openmom»
make[2]: *** [src/openmom] Ошибка 1
CMakeFiles/Makefile2:124: ошибка выполнения рецепта для цели «src/CMakeFiles/openmom.dir/all»
make[1]: *** [src/CMakeFiles/openmom.dir/all] Ошибка 2
Makefile:83: ошибка выполнения рецепта для цели «all»
make: *** [all] Ошибка 2
I've deleted libs/yaml so the build uses system headers and lib (from yaml-cpp-dev). And get this: openmom.log I haven't compared it with earlier try (when cmake used src as source directory) so it can be the same (or not).
Can i try your version of the library?
and I'm not even sure all distributions have it
I think you can add a check for it in configuration so it'll be a user's problem, not yours.
The errors you get by using the headers from package library from Debian are given by the fact that I modified the library and enhanced some functionalities that I needed (which is a reason why I prefer to include it into the repository).
My version of the library has been compiled directly from the github source so that's the one you should try to use.
But github version of yaml-cpp (this one? https://github.com/jbeder/yaml-cpp/) won't have your changes, will it?
My changes are currently header only, so you should be able to compile the default library and use it with my headers. Unfortunately I can't totally factorize out my modifications on the headers because yaml-cpp requires exceptions enabled but I don't want to enable them unless really necessary so I had to remove the relevant code.
Build with github version fully successful. Thanks!
I've remembered: yaml-cpp 0.5.2 is broken so you're right with providing the library.
Do i need to make a pull request with libyaml-cpp.a compiled for x86?
It could be a good idea to solve the issue for the moment, but does the game start also after copying the LBX files or just compilation is going through?
Just compilation.
Ok, so I'd like to know what's going on. I fixed some issues which were probably causing UB but went fine on Clang and failed on MSVS2017 so possibly now it could also run (assuming you are copying data correctly) but I should debug the engine on Linux to have more clues.
I also like to get rid of yaml-cpp library since it's overdone for the needs and it gave more problems than anything but this would require a bare yaml parser which is enough to parse data.
Now i get this:
[ 1%] Building CXX object src/ui/animations/CMakeFiles/UI_ANIMATIONS_LIB.dir/Animations.cpp.o
c++: error: unrecognized command line option ‘-fstandalone-debug’; did you mean ‘-fcompare-debug’?
c++: error: unrecognized command line option ‘-stdlib=libstdc++’; did you mean ‘-static-libstdc++’?
gcc 6.3.0, clang 3.8.1.
that's strange since Apple Clang has both of them, maybe on Linux it's different, feel free to modify CMakeLists.txt
with if cases for UNIX
and remove non working flags.
Workaround: #9.
The engine still doesn't compiles with gcc and i consider it's a bug (i will not fix it any time soon. If i will).
The engine isn't runnable still. I get "Floating point exception" when try to start it. No further details in terminal.
assuming you are copying data correctly
Which data i need to copy? And where? Maybe this is my problem.
The game requires all the .LBX files inside /data/lbx. Now the problem is that each platform is different with respect to the working directory. If you see here you can see that getResourcePath
returns a relative path to pwd to the data subdirectory (which contains yaml, lbx and so on).
You can modify it to match the structure you want to make it work on Linux, unfortunately I don't have any ready virtual machine to test it on (my SSD broke recently) so you are on your own for this but since it works on macOS it should work easily on Linux too.
Mind that I discovered some issues with yaml-cpp library on release on Windows so I'm not sure that the library is working nicely on Linux, I really should write a bare parser and forget about it.
With fresh commits:
/home/rtentser/Sources/openmom/src/ui/parts/CommonDraw.h:23:75: error: no type named 'string_view' in namespace 'std'
static void drawUnitPropValue(Property property, const Unit* unit, std::string_view prefix, coord_t x, coord_t y);
~~~~~^
/home/rtentser/Sources/openmom/src/ui/parts/CommonDraw.cpp:133:78: error: no type named 'string_view' in namespace 'std'
void CommonDraw::drawUnitPropValue(Property property, const Unit* unit, std::string_view prefix, coord_t x, coord_t y)
And i've fixed another include, pushed it to PR.
I think the issue with string_view can be fixed by "-std=c++17" and upgrade of my clang, because this feature is a part of C++17 standard and was implemented in clang 4.0.
And i need to upgrade my gcc too — cmake uses libstdc++ which didn't supports string_view until 7.
I started using some C++17 features because they're quite useful and ubiquitous with respect to compiler support at this point.
But I just added a check for availability with a forced override through -DOM_CONFIG_DONT_USE_STRING_VIEW=true
. Now that shouldn't be an issue anymore, it should fallback to const std::string&
when compiler doesn't support it.
I'd be glad to be able to see it running on Linux, I've been able to run it properly on Windows so it's the only basic platform missing!
And now i have linking problems.
CMakeFiles/openmom.dir/main.cpp.o: In function `unsigned int fmt::v5::internal::parse_nonnegative_int<fmt::v5::internal::null_terminating_iterator<char>, fmt::v5::internal::error_handler&>(fmt::v5::internal::null_terminating_iterator<char>&, fmt::v5::internal::error_handler&)':
/home/rtentser/Sources/openmom/src/common/fmt/printf.h:139: undefined reference to `fmt::v5::internal::error_handler::on_error(char const*)'
CMakeFiles/openmom.dir/main.cpp.o: In function `fmt::v5::basic_parse_context<char, fmt::v5::internal::error_handler>::on_error(char const*)':
/home/rtentser/Sources/openmom/src/common/fmt/core.h:919: undefined reference to `fmt::v5::internal::error_handler::on_error(char const*)'
CMakeFiles/openmom.dir/main.cpp.o: In function `fmt::v5::internal::count_digits(unsigned int)':
/home/rtentser/Sources/openmom/src/./common/fmt/format.h:901: undefined reference to `fmt::v5::internal::basic_data<void>::ZERO_OR_POWERS_OF_10_32'
CMakeFiles/openmom.dir/main.cpp.o: In function `char* fmt::v5::internal::format_decimal<unsigned int, char, fmt::v5::internal::no_thousands_sep>(char*, unsigned int, int, fmt::v5::internal::no_thousands_sep)':
/home/rtentser/Sources/openmom/src/./common/fmt/format.h:969: undefined reference to `fmt::v5::internal::basic_data<void>::DIGITS'
/home/rtentser/Sources/openmom/src/./common/fmt/format.h:971: undefined reference to `fmt::v5::internal::basic_data<void>::DIGITS'
/home/rtentser/Sources/openmom/src/./common/fmt/format.h:979: undefined reference to `fmt::v5::internal::basic_data<void>::DIGITS'
/home/rtentser/Sources/openmom/src/./common/fmt/format.h:981: undefined reference to `fmt::v5::internal::basic_data<void>::DIGITS'
CMakeFiles/openmom.dir/main.cpp.o: In function `char fmt::v5::internal::thousands_sep<char>(fmt::v5::internal::locale_ref)':
/home/rtentser/Sources/openmom/src/./common/fmt/format.h:946: undefined reference to `char fmt::v5::internal::thousands_sep_impl<char>(fmt::v5::internal::locale_ref)'
CMakeFiles/openmom.dir/main.cpp.o: In function `char* fmt::v5::internal::format_decimal<unsigned int, char, fmt::v5::internal::add_thousands_sep<char> >(char*, unsigned int, int, fmt::v5::internal::add_thousands_sep<char>)':
/home/rtentser/Sources/openmom/src/./common/fmt/format.h:969: undefined reference to `fmt::v5::internal::basic_data<void>::DIGITS'
/home/rtentser/Sources/openmom/src/./common/fmt/format.h:971: undefined reference to `fmt::v5::internal::basic_data<void>::DIGITS'
/home/rtentser/Sources/openmom/src/./common/fmt/format.h:979: undefined reference to `fmt::v5::internal::basic_data<void>::DIGITS'
/home/rtentser/Sources/openmom/src/./common/fmt/format.h:981: undefined reference to `fmt::v5::internal::basic_data<void>::DIGITS'
CMakeFiles/openmom.dir/main.cpp.o: In function `fmt::v5::internal::count_digits(unsigned long long)':
/home/rtentser/Sources/openmom/src/./common/fmt/format.h:773: undefined reference to `fmt::v5::internal::basic_data<void>::ZERO_OR_POWERS_OF_10_64'
/home/rtentser/Sources/openmom/src/./common/fmt/format.h:773: undefined reference to `fmt::v5::internal::basic_data<void>::ZERO_OR_POWERS_OF_10_64'
CMakeFiles/openmom.dir/main.cpp.o: In function `char* fmt::v5::internal::format_decimal<unsigned long long, char, fmt::v5::internal::no_thousands_sep>(char*, unsigned long long, int, fmt::v5::internal::no_thousands_sep)':
/home/rtentser/Sources/openmom/src/./common/fmt/format.h:969: undefined reference to `fmt::v5::internal::basic_data<void>::DIGITS'
/home/rtentser/Sources/openmom/src/./common/fmt/format.h:971: undefined reference to `fmt::v5::internal::basic_data<void>::DIGITS'
/home/rtentser/Sources/openmom/src/./common/fmt/format.h:979: undefined reference to `fmt::v5::internal::basic_data<void>::DIGITS'
/home/rtentser/Sources/openmom/src/./common/fmt/format.h:981: undefined reference to `fmt::v5::internal::basic_data<void>::DIGITS'
CMakeFiles/openmom.dir/main.cpp.o: In function `char* fmt::v5::internal::format_decimal<unsigned long long, char, fmt::v5::internal::add_thousands_sep<char> >(char*, unsigned long long, int, fmt::v5::internal::add_thousands_sep<char>)':
/home/rtentser/Sources/openmom/src/./common/fmt/format.h:969: undefined reference to `fmt::v5::internal::basic_data<void>::DIGITS'
CMakeFiles/openmom.dir/main.cpp.o:/home/rtentser/Sources/openmom/src/./common/fmt/format.h:971: more undefined references to `fmt::v5::internal::basic_data<void>::DIGITS' follow
CMakeFiles/openmom.dir/main.cpp.o: In function `void fmt::v5::internal::handle_char_specs<char, fmt::v5::internal::arg_formatter_base<fmt::v5::back_insert_range<fmt::v5::internal::basic_buffer<char> > >::char_spec_handler>(fmt::v5::basic_format_specs<char> const*, fmt::v5::internal::arg_formatter_base<fmt::v5::back_insert_range<fmt::v5::internal::basic_buffer<char> > >::char_spec_handler&&)':
/home/rtentser/Sources/openmom/src/./common/fmt/format.h:1189: undefined reference to `fmt::v5::internal::error_handler::on_error(char const*)'
CMakeFiles/openmom.dir/main.cpp.o: In function `void fmt::v5::basic_writer<fmt::v5::back_insert_range<fmt::v5::internal::basic_buffer<char> > >::write_double<double>(double, fmt::v5::basic_format_specs<char> const&)':
/home/rtentser/Sources/openmom/src/./common/fmt/format.h:2736: undefined reference to `void fmt::v5::internal::sprintf_format<double>(double, fmt::v5::internal::basic_buffer<char>&, fmt::v5::core_format_specs)'
CMakeFiles/openmom.dir/main.cpp.o: In function `void fmt::v5::basic_writer<fmt::v5::back_insert_range<fmt::v5::internal::basic_buffer<char> > >::write_double<long double>(long double, fmt::v5::basic_format_specs<char> const&)':
/home/rtentser/Sources/openmom/src/./common/fmt/format.h:2736: undefined reference to `void fmt::v5::internal::sprintf_format<long double>(long double, fmt::v5::internal::basic_buffer<char>&, fmt::v5::core_format_specs)'
CMakeFiles/openmom.dir/main.cpp.o: In function `void fmt::v5::internal::handle_cstring_type_spec<char, fmt::v5::internal::arg_formatter_base<fmt::v5::back_insert_range<fmt::v5::internal::basic_buffer<char> > >::cstring_spec_handler>(char, fmt::v5::internal::arg_formatter_base<fmt::v5::back_insert_range<fmt::v5::internal::basic_buffer<char> > >::cstring_spec_handler&&)':
/home/rtentser/Sources/openmom/src/./common/fmt/format.h:1200: undefined reference to `fmt::v5::internal::error_handler::on_error(char const*)'
CMakeFiles/openmom.dir/main.cpp.o: In function `void fmt::v5::internal::check_string_type_spec<char, fmt::v5::internal::error_handler>(char, fmt::v5::internal::error_handler&&)':
/home/rtentser/Sources/openmom/src/./common/fmt/format.h:1206: undefined reference to `fmt::v5::internal::error_handler::on_error(char const*)'
CMakeFiles/openmom.dir/main.cpp.o: In function `void fmt::v5::internal::check_pointer_type_spec<char, fmt::v5::internal::error_handler>(char, fmt::v5::internal::error_handler&&)':
/home/rtentser/Sources/openmom/src/./common/fmt/format.h:1212: undefined reference to `fmt::v5::internal::error_handler::on_error(char const*)'
I'd be glad to be able to see it running on Linux
I'll be glad too. I love Master of Magic and want to play it without dosbox. Thank you for your work!
That's because now text formatting library source file is inside common/fmt
subfolder, I added the source to CMakeLists.txt
and added common/fmt
to include directories. Now it should work again!
Yes Master of Magic is really a masterpiece but the engine is so complex to reproduce, I hope that one day this port will be fully playable but it still requires a lot of work!
Ok I pushed some changed that made that map local static, which should force initialization correctly when localization is loaded from english.yaml
[ 4%] Building CXX object src/common/CMakeFiles/COMMON_LIB.dir/mystrings.cpp.o
/home/rtentser/Sources/openmom/src/common/mystrings.cpp:18:8: error: no member named 'transform' in namespace 'std'
std::transform(text.begin(), text.end(), lname.begin(), ::tolower);
~~~~~^
/home/rtentser/Sources/openmom/src/common/mystrings.cpp:26:8: error: no member named 'transform' in namespace 'std'
std::transform(text.begin(), text.end(), lname.begin(), ::toupper);
~~~~~^
/home/rtentser/Sources/openmom/src/common/mystrings.cpp:37:3: error: use of undeclared identifier 'assert'
assert(str.length() > 0);
^
/home/rtentser/Sources/openmom/src/common/mystrings.cpp:52:3: error: use of undeclared identifier 'assert'
assert(e <= tokens.size() - 1 && s >= 0 && s <= e);
^
4 errors generated.
Yes, caused by removing an include from mystrings.h
, unfortunately on macOS some includes are predefined so I didn't catch them
[ 54%] Building CXX object src/platform/CMakeFiles/PLATFORM_LIB.dir/unix.cpp.o
/home/rtentser/Sources/openmom/src/platform/unix.cpp:37:13: error: use of undeclared identifier 'strings'; did you mean 'std::string'?
if (strings::compareInsensitive(name, ent->d_name))
^~~~~~~
std::string
/usr/bin/../lib/gcc/i686-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/stringfwd.h:74:33: note: 'std::string' declared here
typedef basic_string<char> string;
^
/home/rtentser/Sources/openmom/src/platform/unix.cpp:37:22: error: no member named 'compareInsensitive' in
'std::__cxx11::basic_string<char>'
if (strings::compareInsensitive(name, ent->d_name))
~~~~~~~~~^
2 errors generated.
This should be fixed, I should really setup my Linux VM environment again 👍
Hi,
I've tried to compile
openmom
on my Ubuntu:with clang 4.0, some errors are raised related to
SkillSet::iterator
with invalid operands.Can you describe which version of clang on Mac is used to compile ? Regarding your
cmake
, I suppose you are using Mac and/or Windows ?