Gdevelop: Unable to launch compilation GDevelop.js

Created on 26 Mar 2020  路  17Comments  路  Source: 4ian/GDevelop

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.

  • I'am on current master
  • I've deleted C:\GDevelop\Binaries
  • Update emscripten to 1.39.6,
    C:\emsdk
    git pull because emsdk update is outdated (message from console)
    emsdk install 1.39.6
    emsdk activate 1.39.6
    emsdk_env.bat

  • Start build
    cd C:\GDevelop\GDevelop.js
    npm install
    npm run build

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

For finish here the full log file from console.

Most helpful comment

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

All 17 comments

I can see:

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

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.

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

C:/emsdk/upstream/binllvm-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?

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:GDevelopBinariesembuild CMakeCache.txt.

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

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

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?

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?

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.

GDevelopBinariesembuildCMakeFiles GDCore.rsp

Cmake 3.5.0

Also this file exist.

CoreCMakeFilesGDCore.dirGDCoreEventsBuiltinCommentEvent.cpp.o

complete path is

C:GDevelopBinariesembuildCoreCMakeFilesGDCore.dirGDCoreEventsBuiltinCommentEvent.cpp.o

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

@4ian Is there a fix for this issue?

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.

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

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)

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 :)

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

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Wend1go picture Wend1go  路  3Comments

Phenomena3 picture Phenomena3  路  5Comments

blurymind picture blurymind  路  5Comments

4ian picture 4ian  路  3Comments

Jeje2201 picture Jeje2201  路  5Comments