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
Compiling instructions #1
Comments
second that. I'm on Mac OS and have no idea to make this work. Please provide instructions. |
I tried giving this a go but get stuck on building the executable (on Windows). These are my steps so far;
Which produces this error:
Think this project has not been tested on Windows, just looking at the Cmake compiler messages; monster-mash/src/CMakeLists.txt Line 83 in f3ba0c1
|
Would also be nice with maybe just a Dockerfile, which might be easier than compile instructions. |
Hi, I'm going to add compiling instructions for building on Linux as that is what I use for development. At this state, the project might be non-trivial to compile on other platforms, however, I had success using mingw-w64 for building on Windows in the past. |
Amazing @dvoromar ! |
could you please add your windows build process aswell would highly appriciate it ^^ |
30 years ago I was inserting machine code into Borland Pascal library files, now I can't tell if I've compiled a program successfully, or how to install the thing if it has compiled. Found and installed relevant SDL2 dev files. Ran Cmake ./src with no errors. Ran make with no errors. make install gives me "make: *** No rule to make target 'install'. Stop." So as I've got 100+ tabs open and it's late I shall take it's advice and Stop for the night. Edit: I forgot to mention that this is on Ubuntu 20.04 under Windows 10. |
Do you mean tracing existing lines? |
On windows with VS 2019 I've done all that @tokejepsen has done so far minus the last step. Instead I got the error "Invalid numeric argument '/Wno-sign-compare'." In the configuration properties for Command Line under "AdditionalOptions" I then removed all additional options and was able to progress into the complication process. However I was then greeted with more errors... It seems these issues stem from the fact that this source was probably compiled for Linux and not for Windows inside Visual Studio. I'll keep trying to lower the error count but yeah doing this on windows when it was originally for Linux is going to be more difficult. |
can you give me the link to your fork as soon as you're done i will prob automate it after you're done making it run on VS |
I’ve managed to compile it on Linux. Unfortunately, it doesn’t work as showcased in the video. You need to When I run the ‘monstermash’ executable it comes up with: “Failed to load texture” no matter where the executable and the ‘data’ folders are. In the code, you can see it's looking for the texture in the Regardless, the window created has no GUI, and after finding the shortcuts in the code, I’ve managed to get it started. The script only runs on one CPU, being incredibly slow. Having no texture either, made it impossible to use at all. How can we run it on all available CPUs and hopefully making use of some GPU power as well? Also, how do we enable the GUI showcased in the presentation video? Thanks in advance! |
The UI has been build for WASM, so you could give the WIP docker container a try. |
I don't mind running it as a web application, but how do I link the |
I tested @rahulpowar docker file yesterday and it worked, so you can look at what the docker file is doing; https://github.com/rahulpowar/monster-mash/blob/main/Dockerfile BTW this is the wip docker container; #3 |
Thanks @tokejepsen! What about the CPU/GPU utilisation problem? |
Havent actually looked at the CPU/GPU usage, sorry. Would be good if you could report on your findings with the docker container! |
No problem! Will update you as soon as I do. |
My container only builds the web version. I have not tried the native linux binary. |
@MihaiAnca13 the wip docker container is at a working state, so you can check out the PR branch to test with. |
I only tried to compile this version on Linux. There was an early development version that used Qt for UI. That version appeared in some demo video clips, however, it is now deprecated and no longer being developed. |
Yes. Something like a basic bitmap to raster routine. |
This is probably good for a separate issue, so the idea does not get lost in the compiling discussion. |
|
@DouYishun could you elaborate? What platform are you compiling to? |
Linux, and libsdl2 was installed using apt-get. |
Havent had this, but havent tried compiling to Linux as much as Emscripten. If you could post a reproducible then we can test it out. |
Yes, I had that as well! The SDL2 library has the struct, but it's not named for some reason. You need to go where the SDL2 library is installed, find the file that has that structure, and just insert the name in the front. |
@dvoromar how do you enable debugging messages from |
I have downloaded sdl2-devel-2.0.14-vc.zip and used cmake to point to this folder, but still cannot find it with cmake @tokejepsen |
That macro can be enabled by defining ENABLE_DEBUG_CMD_MM. By default, it's enabled in desktop build but disabled in emscripten one. Have a look at the following: monster-mash/src/CMakeLists.txt Line 94 in f3ba0c1
|
Tried enabling |
Thank you for the docker notes. With slight modifications, they can help compile on Ubuntu 18.04 to run as a Linux web application using the following work arounds. (Would expect a similar compilation experience with 20.04.)
-Create build directory in monster-mash folder, say buildems. -Run cmake to setup configuration as indicated by the docker notes -Run make to build. --I run into the 'SDL_PixelFormatEnum not declared" error while compiling mypainter.cpp, so I declared it in 'mypainter.h'. --I also ran into an 'FE_UNDERFLOW" not defined" error while compiling polar_dec.cpp, so I added the following line on top of that file: -Move the build files to your web server root folder. I am running the Apache2 web server. So I did the following: Once that done, you should be able to access the web application by pointing your browser to /buildems/monstermash.html. |
How can you run monstermash on your local desktop ( Linux, Ubuntu 20.4) after you have built it successfully with cmake? After I run:
I got this
It seems it everything working well. If I go to build/Release and use
Not sure how I can start sketching on it. |
@albertotono You need the web version. |
Thanks @micwoj92 for the quick reply. With the web version, even after installing emsdk and set up the proper PATH.
I get this message:
|
@albertotono from emscripten official documentation "In most cases it is necessary to edit the generated file and modify at least the LLVM_ROOT and BINARYEN_ROOT settings to point to the correct location of your local LLVM and Binaryen installations respectively." At least that should be the solution based on the error you had |
I don't know much about (3d) graphics stuff. |
HI, " module.js:29 Calling stub instead of sigaction() |
anyone have a working solution for a windows compiler for this? |
I built and run the dockerfile in Ubuntu and nothing happened, supposedly I should see something if I type localhost:8000 in any web browser? |
Thank you. It works now for me. |
Would be great to have stepped instructions on how to compile this project.
I'll be trying to compile this myself (although I've never compiled a c++ project before), so will document my process as I go along.
Further down the line it would be great to have CI generated releases for supported platforms.
The text was updated successfully, but these errors were encountered: