Davidobot / love.js

LÖVE ported to the web using Emscripten, updated to the latest Emscripten and LÖVE (v11.5)
MIT License
624 stars 28 forks source link

Unable to build megasource #23

Closed EarthenSky closed 3 years ago

EarthenSky commented 3 years ago

I've been trying to build the love.js source on windows 10 but build_lovejs.bat fails to compile the megasource.

My current error is that make will complain that it cannot find certain files that are included in the megasource as *.h.in but never get converted to *.in. It looks like I either don't have some necessary dependency or cmake is failing somehow.

In file included from C:/Programming/megasource/libs/libogg-1.3.2/src/bitwise.c:24:
In file included from C:/Programming/megasource/libs/libogg-1.3.2/include\ogg/ogg.h:25:
C:/Programming/megasource/libs/libogg-1.3.2/include\ogg/os_types.h:143:12: fatal error: 'ogg/config_types.h' file not
      found
#  include <ogg/config_types.h>
           ^~~~~~~~~~~~~~~~~~~~
1 error generated.
emcc: error: 'C:/Programming/emsdk/upstream/bin\clang.exe -DEMSCRIPTEN -fignore-exceptions -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr -Xclang -isystemC:\Programming\emsdk\upstream\emscripten\system\include\SDL -target wasm32-unknown-emscripten -D__EMSCRIPTEN_major__=2 -D__EMSCRIPTEN_minor__=0 -D__EMSCRIPTEN_tiny__=11 -D_LIBCPP_ABI_VERSION=2 -Dunix -D__unix -D__unix__ -Werror=implicit-function-declaration --sysroot=C:\Programming\emsdk\upstream\emscripten\system -Xclang -isystemC:\Programming\emsdk\upstream\emscripten\cache\wasm\include -Xclang -iwithsysroot/include\compat -Xclang -iwithsysroot/include\libc -Xclang -iwithsysroot/lib\libc\musl\arch\emscripten -Xclang -iwithsysroot/local\include -Xclang -iwithsysroot/include\SSE -Xclang -iwithsysroot/include\neon -Xclang -iwithsysroot/lib\compiler-rt\include -Xclang -iwithsysroot/lib\libunwind\include -IC:/Programming/megasource/libs/libogg-1.3.2/include -DNDEBUG -O2 -w -o CMakeFiles/ogg-static.dir/src/bitwise.c.o -c C:/Programming/megasource/libs/libogg-1.3.2/src/bitwise.c -c -o CMakeFiles/ogg-static.dir/src/bitwise.c.o' failed (1)
make[2]: *** [libogg/CMakeFiles/ogg-static.dir/build.make:83: libogg/CMakeFiles/ogg-static.dir/src/bitwise.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:483: libogg/CMakeFiles/ogg-static.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

The following is the results of running the build command: command-out.txt

Thanks in advance for any help you can provide.

note: the following is the commands I ran to get to this point (perhaps I am doing something blatantly wrong?)

Davidobot commented 3 years ago

Do you make the megasource? You need to first compile the megasource and then love.js?

https://github.com/Davidobot/love.js/blob/master/build_lovejs.bat#L11 should actually do that. Does that command get run correctly?

emsdk path to ..\emsdk\emsdk_env C:\Users\Grigor\git\megasource to ......\megasource twice

Try making them absolute paths?

https://github.com/Davidobot/love.js/blob/master/build_lovejs.bat#L6 this line is quite important for activating emsdk within the bat file.

EarthenSky commented 3 years ago

I changed the paths to be absolute, but the megasource still fails to be make'd. It does however seem to activate emsdk within the shell since it adds a bunch of directories to the path, then finds the emcmake command to call.

I am building once more now with cloning love & megasource & clearing cmake cache, just in case -- here is the result of running the new build_lovejs.bat command-output-2.txt

Davidobot commented 3 years ago

Sorry, no clue. I don't have access to a PC rn or time to work on this project specifically. The prebuilt binaries should work just fine.

EarthenSky commented 3 years ago

darn, well thanks for your help anyways!