-
Notifications
You must be signed in to change notification settings - Fork 8
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
Compilation issue #3
Comments
gcc 6.3.0, clang 3.8.1-24, Debian GNU/Linux stretch: |
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. |
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:
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: #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 <[email protected]> a écrit :
… Right now i've fixed or workarounded some of compilation issues on my
system (PULL: #4 <#4>). But that
isn't all.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#3 (comment)>, 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 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: #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!). |
|
Fixes: #8 But linking doesn't starts:
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: |
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
in root
fails. If you fix it you don't need to change all includes (which should be kept with |
Are you actually launching cmake on root of the project and not
|
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:
I've deleted libs/yaml so the build uses system headers and lib (from yaml-cpp-dev). And get this: Can i try your version of the library?
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:
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 |
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. |
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 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:
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 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.
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 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 |
|
Yes, caused by removing an include from |
|
This should be fixed, I should really setup my Linux VM environment again 👍 |
I tried compiling the current state of the project on ubuntu 22.04 with clang 14. There are a few compile errors that I fixed, but yaml-cpp seems too far out of date to compile properly. Perhaps you can update yaml-cpp with the latest version. This is my patch so far
The yaml-cpp error is
|
Hi,
I've tried to compile
openmom
on my Ubuntu: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 ?The text was updated successfully, but these errors were encountered: