4ian / GDevelop

🎮 Open-source, cross-platform 2D/3D/multiplayer game engine designed for everyone.
https://gdevelop.io
Other
10.81k stars 848 forks source link

Unable to launch compilation GDevelop.js #1591

Closed Bouh closed 4 years ago

Bouh commented 4 years ago

Describe the bug

Unable to build GDevelop.js, since ninja integration and update of emscripten. I've read again and again the readme for install emscripten and start the build process. And update my script for my workflow, but it's broken.

My script batch script, resume the console call above in one file.

For finish here the full log file from console.

4ian commented 4 years ago

I can see:

DCMAKE_TOOLCHAIN_FILE=C:\emsdk\emscripten\1.37.37\cmake\Modules\Platform\Emscripten.cmake'] at C:\GDevelop\Binaries\embuild

in the logs. This means that you have some sort of mismatch between the new version and the old one. I would recommend to: clear the Binaries/embuild folder, run npm run clean in GDevelop.js Make sure to clear any environment variable that was set up by emscripten 1.37. In particular, I think there was a EMSCRIPTEN environment variable, be sure that it's not defined.

Bouh commented 4 years ago

It's a bit better, emscriptem seem use the correct version now :) Now issue is spesific about ninja. New log file.

4ian commented 4 years ago

C:/emsdk/upstream/bin\llvm-ar.exe: error: CoreCMakeFilesGDCore.dirGDCoreEventsBuiltinCommentEvent.cpp.o: no such file or directory

Weird. Can you try cleaning everything and starting again the compilation? Remove Binaries/embuild another time and run again npm run build?

Bouh commented 4 years ago

Same result.

I see when Building to go Linking

[144/294] Building CXX object GDJS\CMakeFiles\GDJS.dir\GDJS\Extensions\Builtin\BaseObjectExtension.cpp.o

And after:

[145/294] Linking CXX static library ..\Output\Release_Emscripten\libGDCore.bc

And error come, I've take a look in CMakeCache.txt and i see linker program isn't defined.

//Path to a program.
CMAKE_LINKER:FILEPATH=CMAKE_LINKER-NOTFOUND

My full C:\GDevelop\Binaries\embuild\ CMakeCache.txt.

4ian commented 4 years ago

Can you show again the full log, with the error? Linker missing should not be a problem, Emscripten is the linker.

Bouh commented 4 years ago

Here same error, with less Building step, stop always at Linking strangely. https://pastebin.com/raw/dyu1W3gS

4ian commented 4 years ago

I'm a bit out of ideas 😕 Especially because AppVeyor on Windows is able to link libGDCore.bc without issues.. Could it be again a conflict with the old Emscripten version?

4ian commented 4 years ago

Now that I look again...

CoreCMakeFilesGDCore.dirGDCoreEventsBuiltinCommentEvent.cpp.o: no such file or directory

This path is totally wrong! Are you running with the usual command prompt on Windows? Or Powershell/bash? Can you pastebin the content of CMakeFiles/GDCore.rsp which should be somewhere in Binaries/embuild?

What is your CMake version? Looks like something removed the separators in the path! Might be a CMake/Ninja bug?

Bouh commented 4 years ago

Previous directory C:\emsdk have been deleted for make a clean install.

I use classic cmd as admin from win10. I've tried powershell as admin too.

GDevelop\Binaries\embuild\CMakeFiles\ GDCore.rsp

Cmake 3.5.0

Bouh commented 4 years ago

Also this file exist.

CoreCMakeFilesGDCore.dirGDCoreEventsBuiltinCommentEvent.cpp.o

complete path is

C:\GDevelop\Binaries\embuild\Core\CMakeFiles\GDCore.dir\GDCore\Events\Builtin\CommentEvent.cpp.o

Ummh, i've deleted my GDevelop folder, emsdk folder, clean tmp, and the error is still here.

PawBud commented 4 years ago

@4ian Is there a fix for this issue?

Bouh commented 4 years ago

Please do not ping just for ask if a fix exist for it, the answer is no if you don't see solution here or in PR for now. If you have same error, in this case tell us, with your technical spec.

PawBud commented 4 years ago

I am sorry @Bouh, I shall not repeat it.

Bouh commented 4 years ago

I go back on mingw32-make it's less faster, but atleat it's works for me.

Log file with ninja

Log file with mingw32-make

Diff between Ninja and mingw32: [2/145] Linking CXX static library ..\Output\Release_Emscripten\libGDCore.bc

[ 44%] Linking CXX static library ..\..\Output\Release_Emscripten\libGDCore.bc
[ 44%] Built target GDCore

Path are no same ! One parent of diff.

I've checked rule of ninja but the file is always reset after npm build so i don't know where change the path.

If it's not the problem, I'll wait a next build of ninja or update in GD repo for compile process and retry later.

During this while can i open a PR for change Gruntfile.js and package.json for add a command for use MinGW ? (Ninja is always by default)

4ian commented 4 years ago

During this while can i open a PR for change Gruntfile.js and package.json for add a command for use MinGW ? (Ninja is always by default)

Yes sounds like a good idea! You can add an optional parameter --use-mingw32-make :)

Bouh commented 4 years ago

A user from Ninja repo told me to go on CMake 3.17 (lastest), and it's works! I can compile Core, build GD and open it and export games like before :)

New PR for update the readme of Gdevelop.js

4ian commented 4 years ago

That's great! Thanks for the follow up :)