Comments (42)
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.
from monster-mash.
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.
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.
Wonderful project you've got going here. It would be even more wonderful if it could use a simple line-drawing template as it's input rather than sloppy hand-drawn lines.
Edit: I forgot to mention that this is on Ubuntu 20.04 under Windows 10.
from monster-mash.
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...
Missing define for M_PI which I then added...
'clock_t' is not a member of 'global namespace'.
syntax errors.. lots of them...
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.
from monster-mash.
Would also be nice with maybe just a Dockerfile, which might be easier than compile instructions.
from monster-mash.
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.)
-
Install emscrispten as indicated by the docker notes.
cd /opt && git clone https://github.com/emscripten-core/emsdk.git && cd emsdk && ./emsdk install latest && ./emsdk activate latest -
Clone monster-mash.
git clone https://github.com/google/monster-mash.git
-Create build directory in monster-mash folder, say buildems.
mkdir \buildems && cd \buildems
-Run cmake to setup configuration as indicated by the docker notes
cmake ../src -D CMAKE_C_COMPILER=emcc -D CMAKE_CXX_COMPILER=em++ -D CMAKE_BUILD_TYPE=Release.
-Run make to build.
make
--I run into the 'SDL_PixelFormatEnum not declared" error while compiling mypainter.cpp, so I declared it in 'mypainter.h'.
private:
...
enum SDL_PixelFormatEnum {SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_BGR888};
--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:
#define FE_UNDERFLOW 8
-Move the build files to your web server root folder. I am running the Apache2 web server. So I did the following:
cp -r buildems /var/www/html
mkdir /var/www/html/buildems/includes
cp /src/ui/main.* /var/www/html/buildems/includes
cp /third-party/emscripten-ui/module.js /var/www/html/buildems/incudes
cp /third-party/FileSaver/FileSaver.js /var/www/html/buildems/includes
Once that done, you should be able to access the web application by pointing your browser to /buildems/monstermash.html.
from monster-mash.
Thanks @micwoj92. I solved with the docker container for now.
building with docker build . -t monstermash
from here and I also access it with chrome.
http://localhost:8000/monstermash.html
Since now we can export a gltf format, do you know if with these settings we could build a WebXR viewer?
from monster-mash.
second that. I'm on Mac OS and have no idea to make this work. Please provide instructions.
from monster-mash.
I tried giving this a go but get stuck on building the executable (on Windows). These are my steps so far;
- Clone/Download repository from https://github.com/google/monster-mash.git
- Download zip from http://www.netlib.org/voronoi/triangle.zip and place in “third_party/triangle”.
- Install build tools from https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2019
- Install Cmake from https://cmake.org/runningcmake/
- Run Cmake-gui pointing to “src” folder.
- Cmake-gui asks for SDL2_DIR
- Download Simple DirectMedia Layer from https://www.libsdl.org/download-2.0.php and point Cmake-gui “SDL2_DIR” variable to the extracted folder.
- Cmake-gui > Configure > Generate. This generates “monstermash.sln” file in the build folder.
- In the “Developer Command Prompt for VS 2019” > change directory to build folder > “msbuild monstermash.sln”.
Which produces this error:
C:\Users\tokejepsen\monster-mash\build>msbuild monstermash.sln
Microsoft (R) Build Engine version 16.8.3+39993bd9d for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
Building the projects in this solution one at a time. To enable parallel build, please add the "-m" switch.
Build started 03/02/2021 22:27:11.
Project "C:\Users\tokejepsen\monster-mash\build\monstermash.sln" on node 1 (default targets).
ValidateSolutionConfiguration:
Building solution configuration "Debug|x64".
ValidateProjects:
The project "ALL_BUILD" is not selected for building in solution configuration "Debug|x64".
Project "C:\Users\tokejepsen\monster-mash\build\monstermash.sln" (1) is building "C:\Users\tokejepsen\m
onster-mash\build\ZERO_CHECK.vcxproj" (2) on node 1 (default targets).
InitializeBuildStatus:
Creating "x64\Debug\ZERO_CHECK\ZERO_CHECK.tlog\unsuccessfulbuild" because "AlwaysCreate" was specifie
d.
CustomBuild:
Checking Build System
FinalizeBuildStatus:
Deleting file "x64\Debug\ZERO_CHECK\ZERO_CHECK.tlog\unsuccessfulbuild".
Touching "x64\Debug\ZERO_CHECK\ZERO_CHECK.tlog\ZERO_CHECK.lastbuildstate".
Done Building Project "C:\Users\tokejepsen\monster-mash\build\ZERO_CHECK.vcxproj" (default targets).
Project "C:\Users\tokejepsen\monster-mash\build\monstermash.sln" (1) is building "C:\Users\tokejepsen\m
onster-mash\build\monstermash.vcxproj.metaproj" (3) on node 1 (default targets).
Project "C:\Users\tokejepsen\monster-mash\build\monstermash.vcxproj.metaproj" (3) is building "C:\Users
\tokejepsen\monster-mash\build\monstermash.vcxproj" (4) on node 1 (default targets).
InitializeBuildStatus:
Touching "monstermash.dir\Debug\monstermash.tlog\unsuccessfulbuild".
CustomBuild:
Building Custom Rule C:/Users/tokejepsen/monster-mash/src/CMakeLists.txt
ClCompile:
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\bin\HostX64\
x64\CL.exe /c /I"C:\Users\tokejepsen\monster-mash\src\..\third_party" /I"C:\Users\tokejepsen\monster-
mash\src\..\third_party\eigen3-mod" /I"C:\Users\tokejepsen\monster-mash\src\..\third_party\eigen3" /I
"C:\Users\tokejepsen\monster-mash\src\..\third_party\libigl\include" /I"C:\Users\tokejepsen\monster-m
ash\src\..\third_party\stb" /I"C:\Users\tokejepsen\monster-mash\src\..\third_party\triangle" /I"C:\Us
ers\tokejepsen\monster-mash\src\..\third_party\zip-mod" /I"C:\Users\tokejepsen\monster-mash\src\..\th
ird_party\SDL2_gfx" /I"C:\Users\tokejepsen\monster-mash\src\..\third_party\SDL2_gfx-mod" /I"C:\Users\
tokejepsen\Desktop\SDL2-2.0.14-win32-x64\include" /Zi /W3 /WX- /diagnostics:column /Od /Ob0 /D WIN32
/D _WINDOWS /D ENABLE_DEBUG_CMD_MM /D IMAGE_READ_WRITE /D IMAGE_MINIZ_EXTERNAL /D IMAGE_SCALE /D TRIL
IBRARY /D NO_TIMER /D IGL_PARALLEL_FOR_FORCE_SERIAL /D EIGEN_MPL2_ONLY /D EIGEN_SPARSESOLVERBASE_H /D
_SDL2_gfxPrimitives_h /D APP_VERSION= /D USE_SDL_GLES2 /D USE_OPENGL_FOR_DRAWING_INSTEAD_OF_SDL /D "
CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:i
nline /GR /std:c++17 /Fo"monstermash.dir\Debug\\" /Fd"monstermash.dir\Debug\vc142.pdb" /Gd /TP /error
Report:queue -Wno-sign-compare -Werror=return-type -Wno-narrowing "C:\Users\tokejepsen\monster-mash\
src\main.cpp" "C:\Users\tokejepsen\monster-mash\src\defengarapl.cpp" "C:\Users\tokejepsen\monster-mas
h\src\cpanim.cpp" "C:\Users\tokejepsen\monster-mash\src\loadsave.cpp" "C:\Users\tokejepsen\monster-ma
sh\src\reconstruction.cpp" "C:\Users\tokejepsen\monster-mash\src\mainwindow.cpp" "C:\Users\tokejepsen
\monster-mash\src\mypainter.cpp" "C:\Users\tokejepsen\monster-mash\src\mywindow.cpp" "C:\Users\tokeje
psen\monster-mash\src\def3dsdl.cpp" "C:\Users\tokejepsen\monster-mash\third_party\ir3d-utils\regionTo
Mesh.cpp" "C:\Users\tokejepsen\monster-mash\third_party\ir3d-utils\MeshBuilder.cpp" "C:\Users\tokejep
sen\monster-mash\third_party\image\imageReadWrite.cpp" "C:\Users\tokejepsen\monster-mash\third_party\
image\imageScale.cpp" "C:\Users\tokejepsen\monster-mash\third_party\image\imageUtils.cpp" "C:\Users\t
okejepsen\monster-mash\third_party\miscutils\def3d.cpp" "C:\Users\tokejepsen\monster-mash\third_party
\miscutils\mesh3d.cpp" "C:\Users\tokejepsen\monster-mash\third_party\miscutils\fsutils.cpp" "C:\Users
\tokejepsen\monster-mash\third_party\miscutils\opengltools.cpp" "C:\Users\tokejepsen\monster-mash\thi
rd_party\miscutils\camera.cpp"
Microsoft (R) C/C++ Optimizing Compiler Version 19.28.29336 for x64
Copyright (C) Microsoft Corporation. All rights reserved.
cl /c /I"C:\Users\tokejepsen\monster-mash\src\..\third_party" /I"C:\Users\tokejepsen\monster-mash\src
\..\third_party\eigen3-mod" /I"C:\Users\tokejepsen\monster-mash\src\..\third_party\eigen3" /I"C:\User
s\tokejepsen\monster-mash\src\..\third_party\libigl\include" /I"C:\Users\tokejepsen\monster-mash\src\
..\third_party\stb" /I"C:\Users\tokejepsen\monster-mash\src\..\third_party\triangle" /I"C:\Users\toke
jepsen\monster-mash\src\..\third_party\zip-mod" /I"C:\Users\tokejepsen\monster-mash\src\..\third_part
y\SDL2_gfx" /I"C:\Users\tokejepsen\monster-mash\src\..\third_party\SDL2_gfx-mod" /I"C:\Users\tokejeps
en\Desktop\SDL2-2.0.14-win32-x64\include" /Zi /W3 /WX- /diagnostics:column /Od /Ob0 /D WIN32 /D _WIND
OWS /D ENABLE_DEBUG_CMD_MM /D IMAGE_READ_WRITE /D IMAGE_MINIZ_EXTERNAL /D IMAGE_SCALE /D TRILIBRARY /
D NO_TIMER /D IGL_PARALLEL_FOR_FORCE_SERIAL /D EIGEN_MPL2_ONLY /D EIGEN_SPARSESOLVERBASE_H /D _SDL2_g
fxPrimitives_h /D APP_VERSION= /D USE_SDL_GLES2 /D USE_OPENGL_FOR_DRAWING_INSTEAD_OF_SDL /D "CMAKE_IN
TDIR=\"Debug\"" /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /G
R /std:c++17 /Fo"monstermash.dir\Debug\\" /Fd"monstermash.dir\Debug\vc142.pdb" /Gd /TP /errorReport:q
ueue -Wno-sign-compare -Werror=return-type -Wno-narrowing "C:\Users\tokejepsen\monster-mash\src\main
.cpp" "C:\Users\tokejepsen\monster-mash\src\defengarapl.cpp" "C:\Users\tokejepsen\monster-mash\src\cp
anim.cpp" "C:\Users\tokejepsen\monster-mash\src\loadsave.cpp" "C:\Users\tokejepsen\monster-mash\src\r
econstruction.cpp" "C:\Users\tokejepsen\monster-mash\src\mainwindow.cpp" "C:\Users\tokejepsen\monster
-mash\src\mypainter.cpp" "C:\Users\tokejepsen\monster-mash\src\mywindow.cpp" "C:\Users\tokejepsen\mon
ster-mash\src\def3dsdl.cpp" "C:\Users\tokejepsen\monster-mash\third_party\ir3d-utils\regionToMesh.cpp
" "C:\Users\tokejepsen\monster-mash\third_party\ir3d-utils\MeshBuilder.cpp" "C:\Users\tokejepsen\mons
ter-mash\third_party\image\imageReadWrite.cpp" "C:\Users\tokejepsen\monster-mash\third_party\image\im
ageScale.cpp" "C:\Users\tokejepsen\monster-mash\third_party\image\imageUtils.cpp" "C:\Users\tokejepse
n\monster-mash\third_party\miscutils\def3d.cpp" "C:\Users\tokejepsen\monster-mash\third_party\miscuti
ls\mesh3d.cpp" "C:\Users\tokejepsen\monster-mash\third_party\miscutils\fsutils.cpp" "C:\Users\tokejep
sen\monster-mash\third_party\miscutils\opengltools.cpp" "C:\Users\tokejepsen\monster-mash\third_party
\miscutils\camera.cpp"
cl : command line error D8021: invalid numeric argument '/Wno-sign-compare' [C:\Users\tokejepsen\monste
r-mash\build\monstermash.vcxproj]
Done Building Project "C:\Users\tokejepsen\monster-mash\build\monstermash.vcxproj" (default targets) --
FAILED.
Done Building Project "C:\Users\tokejepsen\monster-mash\build\monstermash.vcxproj.metaproj" (default ta
rgets) -- FAILED.
Done Building Project "C:\Users\tokejepsen\monster-mash\build\monstermash.sln" (default targets) -- FAI
LED.
Build FAILED.
"C:\Users\tokejepsen\monster-mash\build\monstermash.sln" (default target) (1) ->
"C:\Users\tokejepsen\monster-mash\build\monstermash.vcxproj.metaproj" (default target) (3) ->
"C:\Users\tokejepsen\monster-mash\build\monstermash.vcxproj" (default target) (4) ->
(ClCompile target) ->
cl : command line error D8021: invalid numeric argument '/Wno-sign-compare' [C:\Users\tokejepsen\mons
ter-mash\build\monstermash.vcxproj]
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:01.19
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
from monster-mash.
Amazing @dvoromar !
If we could get a docker image going, then it'll be easier to continue contributing development efforts, while waiting/figuring out Mac/Windows.
from monster-mash.
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.
could you please add your windows build process aswell would highly appriciate it ^^
from monster-mash.
Wonderful project you've got going here. It would be even more wonderful if it could use a simple line-drawing template as it's input rather than sloppy hand-drawn lines.
Do you mean tracing existing lines?
from monster-mash.
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...
Missing define for M_PI which I then added...
'clock_t' is not a member of 'global namespace'.
syntax errors.. lots of them...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
from monster-mash.
I’ve managed to compile it on Linux. Unfortunately, it doesn’t work as showcased in the video.
You need to cmake src/
and cmake --build .
. No need to install
. This will produce a monstermash
executable. I can post all issues I had and how I solved them if people are interested. When trying to compile on Windows, it fails because of the incompatibility with the filesystem library.
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 data
folder, supposedly located 2 folders up.
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!
from monster-mash.
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?
The UI has been build for WASM, so you could give the WIP docker container a try.
Think for a local application, it'll need a different UI frontend.
from monster-mash.
I don't mind running it as a web application, but how do I link the monstermash
executable with the things inside the src/ui
folder?
from monster-mash.
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
from monster-mash.
Thanks @tokejepsen!
What about the CPU/GPU utilisation problem?
from monster-mash.
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!
from monster-mash.
No problem! Will update you as soon as I do.
from monster-mash.
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!
My container only builds the web version. I have not tried the native linux binary.
from monster-mash.
@MihaiAnca13 the wip docker container is at a working state, so you can check out the PR branch to test with.
from monster-mash.
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.
from monster-mash.
Wonderful project you've got going here. It would be even more wonderful if it could use a simple line-drawing template as it's input rather than sloppy hand-drawn lines.
Do you mean tracing existing lines?
Yes. Something like a basic bitmap to raster routine.
from monster-mash.
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.
from monster-mash.
mypainter.cpp:202:5: error: ‘SDL_PixelFormatEnum’ was not declared in th$s scope
@dvoromar @tokejepsen Hi, have you encountered this error and how did you solve it?
from monster-mash.
@DouYishun could you elaborate? What platform are you compiling to?
from monster-mash.
Linux, and libsdl2 was installed using apt-get.
from monster-mash.
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.
from monster-mash.
mypainter.cpp:202:5: error: ‘SDL_PixelFormatEnum’ was not declared in th$s scope
@dvoromar @tokejepsen Hi, have you encountered this error and how did you solve it?
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.
from monster-mash.
@dvoromar how do you enable debugging messages from DEBUG_CMD_MM
?
Seems like the -g
(https://emscripten.org/docs/tools_reference/emcc.html#emcc-g) flag is already added to the build, but I dont see any of these messages; https://github.com/google/monster-mash/blob/main/src/CMakeLists.txt#L80
from monster-mash.
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
from monster-mash.
@dvoromar how do you enable debugging messages from
DEBUG_CMD_MM
?
Seems like the-g
(https://emscripten.org/docs/tools_reference/emcc.html#emcc-g) flag is already added to the build, but I dont see any of these messages; https://github.com/google/monster-mash/blob/main/src/CMakeLists.txt#L80
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
from monster-mash.
@dvoromar how do you enable debugging messages from
DEBUG_CMD_MM
?
Seems like the-g
(https://emscripten.org/docs/tools_reference/emcc.html#emcc-g) flag is already added to the build, but I dont see any of these messages; https://github.com/google/monster-mash/blob/main/src/CMakeLists.txt#L80That 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 ENABLE_DEBUG_CMD_MM
but it does not come through the emscripten build. Got any ideas? Have you got debug messages enabled on the website demo?
from monster-mash.
How can you run monstermash on your local desktop ( Linux, Ubuntu 20.4) after you have built it successfully with cmake?
After I run:
cmake -DCMAKE_BUILD_TYPE=Release ../../src && make
I got this
Compiling for Linux
CMake Warning (dev) at /usr/share/cmake-3.16/Modules/FindOpenGL.cmake:275 (message):
Policy CMP0072 is not set: FindOpenGL prefers GLVND by default when
available. Run "cmake --help-policy CMP0072" for policy details. Use the
cmake_policy command to set the policy and suppress this warning.
FindOpenGL found both a legacy GL library:
OPENGL_gl_LIBRARY: /usr/lib/x86_64-linux-gnu/libGL.so
and GLVND libraries for OpenGL and GLX:
OPENGL_opengl_LIBRARY: /usr/lib/x86_64-linux-gnu/libOpenGL.so
OPENGL_glx_LIBRARY: /usr/lib/x86_64-linux-gnu/libGLX.so
OpenGL_GL_PREFERENCE has not been set to "GLVND" or "LEGACY", so for
compatibility with CMake 3.10 and below the legacy GL library will be used.
Call Stack (most recent call first):
CMakeLists.txt:104 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.
MM version: 210705
-- Configuring done
-- Generating done
-- Build files have been written to: /home/alberto/monster-mash/build/Release
/usr/bin/cmake -S/home/alberto/monster-mash/src -B/home/alberto/monster-mash/build/Release --check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start /home/alberto/monster-mash/build/Release/CMakeFiles /home/alberto/monster-mash/build/Release/CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make[1]: Entering directory '/home/alberto/monster-mash/build/Release'
make -f CMakeFiles/monstermash.dir/build.make CMakeFiles/monstermash.dir/depend
make[2]: Entering directory '/home/alberto/monster-mash/build/Release'
cd /home/alberto/monster-mash/build/Release && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/alberto/monster-mash/src /home/alberto/monster-mash/src /home/alberto/monster-mash/build/Release /home/alberto/monster-mash/build/Release /home/alberto/monster-mash/build/Release/CMakeFiles/monstermash.dir/DependInfo.cmake --color=
make[2]: Leaving directory '/home/alberto/monster-mash/build/Release'
make -f CMakeFiles/monstermash.dir/build.make CMakeFiles/monstermash.dir/build
make[2]: Entering directory '/home/alberto/monster-mash/build/Release'
make[2]: Nothing to be done for 'CMakeFiles/monstermash.dir/build'.
make[2]: Leaving directory '/home/alberto/monster-mash/build/Release'
[100%] Built target monstermash
make[1]: Leaving directory '/home/alberto/monster-mash/build/Release'
/usr/bin/cmake -E cmake_progress_start /home/alberto/monster-mash/build/Release/CMakeFiles 0
It seems it everything working well.
If I go to build/Release and use make
I have this:
/usr/bin/cmake -S/home/alberto/monster-mash/src -B/home/alberto/monster-mash/build/Release --check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start /home/alberto/monster-mash/build/Release/CMakeFiles /home/alberto/monster-mash/build/Release/CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make[1]: Entering directory '/home/alberto/monster-mash/build/Release'
make -f CMakeFiles/monstermash.dir/build.make CMakeFiles/monstermash.dir/depend
make[2]: Entering directory '/home/alberto/monster-mash/build/Release'
cd /home/alberto/monster-mash/build/Release && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/alberto/monster-mash/src /home/alberto/monster-mash/src /home/alberto/monster-mash/build/Release /home/alberto/monster-mash/build/Release /home/alberto/monster-mash/build/Release/CMakeFiles/monstermash.dir/DependInfo.cmake --color=
make[2]: Leaving directory '/home/alberto/monster-mash/build/Release'
make -f CMakeFiles/monstermash.dir/build.make CMakeFiles/monstermash.dir/build
make[2]: Entering directory '/home/alberto/monster-mash/build/Release'
make[2]: Nothing to be done for 'CMakeFiles/monstermash.dir/build'.
make[2]: Leaving directory '/home/alberto/monster-mash/build/Release'
[100%] Built target monstermash
make[1]: Leaving directory '/home/alberto/monster-mash/build/Release'
/usr/bin/cmake -E cmake_progress_start /home/alberto/monster-mash/build/Release/CMakeFiles 0
Not sure how I can start sketching on it.
from monster-mash.
@albertotono You need the web version.
from monster-mash.
Thanks @micwoj92 for the quick reply. With the web version, even after installing emsdk and set up the proper PATH.
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=/home/alberto/emsdk/upstream/emscripten/emcc -DCMAKE_CXX_COMPILER=/home/alberto/emsdk/upstream/emscripten/em++ ../../src && make
I get this message:
-- The CXX compiler identification is unknown
-- The C compiler identification is unknown
-- Check for working CXX compiler: /home/alberto/emsdk/upstream/emscripten/em++
-- Check for working CXX compiler: /home/alberto/emsdk/upstream/emscripten/em++ -- broken
CMake Error at /usr/share/cmake-3.16/Modules/CMakeTestCXXCompiler.cmake:53 (message):
The C++ compiler
"/home/alberto/emsdk/upstream/emscripten/em++"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: /home/alberto/monster-mash/build/Release/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/make cmTC_93620/fast && /usr/bin/make -f CMakeFiles/cmTC_93620.dir/build.make CMakeFiles/cmTC_93620.dir/build
make[1]: Entering directory '/home/alberto/monster-mash/build/Release/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_93620.dir/testCXXCompiler.cxx.o
/home/alberto/emsdk/upstream/emscripten/em++ -o CMakeFiles/cmTC_93620.dir/testCXXCompiler.cxx.o -c /home/alberto/monster-mash/build/Release/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
em++: error: BINARYEN_ROOT is set to empty value in /home/alberto/emsdk/upstream/emscripten/.emscripten
make[1]: *** [CMakeFiles/cmTC_93620.dir/build.make:66: CMakeFiles/cmTC_93620.dir/testCXXCompiler.cxx.o] Error 1
make[1]: Leaving directory '/home/alberto/monster-mash/build/Release/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_93620/fast] Error 2
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:17 (project)
-- Configuring incomplete, errors occurred!
See also "/home/alberto/monster-mash/build/Release/CMakeFiles/CMakeOutput.log".
See also "/home/alberto/monster-mash/build/Release/CMakeFiles/CMakeError.log".
(base) alberto@tensorbook:~/monster-mash/build/Release$
from monster-mash.
@albertotono from emscripten official documentation
https://emscripten.org/docs/building_from_source/configuring_emscripten_settings.html
"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 em++: error: BINARYEN_ROOT is set to empty value in /home/alberto/emsdk/upstream/emscripten/.emscripten
from monster-mash.
I don't know much about (3d) graphics stuff.
from monster-mash.
HI,
Run time Linux operating system fully slow and this error messages are show,
"
monstermash.js:4592 emscripten_set_main_loop_timing: Cannot set timing mode for main loop since a main loop does not exist! Call emscripten_set_main_loop first to set one up.
module.js:29 Calling stub instead of sigaction()
"
from monster-mash.
anyone have a working solution for a windows compiler for this?
from monster-mash.
Thanks @micwoj92. I solved with the docker container for now.
building with
docker build . -t monstermash
from here and I also access it with chrome.
http://localhost:8000/monstermash.html
Since now we can export a gltf format, do you know if with these settings we could build a WebXR viewer?
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?
from monster-mash.
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.)
* Install emscrispten as indicated by the docker notes. cd /opt && git clone https://github.com/emscripten-core/emsdk.git && cd emsdk && ./emsdk install latest && ./emsdk activate latest * Clone monster-mash. git clone https://github.com/google/monster-mash.git
-Create build directory in monster-mash folder, say buildems. mkdir \buildems && cd \buildems
-Run cmake to setup configuration as indicated by the docker notes cmake ../src -D CMAKE_C_COMPILER=emcc -D CMAKE_CXX_COMPILER=em++ -D CMAKE_BUILD_TYPE=Release.
-Run make to build. make
--I run into the 'SDL_PixelFormatEnum not declared" error while compiling mypainter.cpp, so I declared it in 'mypainter.h'. private: ... enum SDL_PixelFormatEnum {SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_BGR888};
--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: #define FE_UNDERFLOW 8
-Move the build files to your web server root folder. I am running the Apache2 web server. So I did the following: cp -r buildems /var/www/html mkdir /var/www/html/buildems/includes cp /src/ui/main.* /var/www/html/buildems/includes cp /third-party/emscripten-ui/module.js /var/www/html/buildems/incudes cp /third-party/FileSaver/FileSaver.js /var/www/html/buildems/includes
Once that done, you should be able to access the web application by pointing your browser to /buildems/monstermash.html.
Thank you. It works now for me.
And from bash in the /build/Release/ folder where I copy the files you said, I run python3 -m http.server 8886 and xdg-open http://0.0.0.0:8886/monstermash.html
from monster-mash.
Related Issues (20)
- install locally HOT 1
- How to compile on windows? HOT 6
- Any way to change canvas from 1.25 (1000x800) ratio to square or portrait? HOT 4
- How to set the current playback position with JS
- Record Stroke Pressure HOT 3
- Feature request - Add option to upload mask instead of drawing boundary.
- Rated site-Rate the site
- IConfiguring incomplete, errors occurred!
- Cmake error when installing. HOT 8
- Finally got it compiled, but all it opens is a grey screen
- Can't run properly HOT 3
- Is it possible to integrate to the draw tool, scissors smart selection alike capabilities?
- How to draw lines or curves? HOT 1
- Is it possible to save the page as an Desktop Html page App.
- Path error
- Running monster mash from command line
- caught RuntimeError: memory access out of bounds HOT 7
- Fails to compile eigein3 on gcc13 HOT 1
- Possible to run with sketch image? HOT 1
- Create Layer From Mask
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from monster-mash.