turbulenz / turbulenz_engine

Turbulenz is a modular 3D and 2D game framework for making HTML5 powered games for browsers, desktops and mobile devices.
http://turbulenz.com
MIT License
4.55k stars 511 forks source link

Problem while building #10

Open v3ss0n opened 11 years ago

v3ss0n commented 11 years ago

hello i am using master branch of 4 days ago. I am stucking at ./manage.py jslib step. it is asking for external/tzbuild/config.mk so i tried cloning tzbuild there but still fails.

here is the problem:

$ python manage.py jslib BUILD CMD IS: make -j 9 MODULAR=1 jslib [TSC ] touch.ts tarloader.ts soundtarloader.ts touchevent.ts inputdevice.ts networkdevice.ts ddsloader.ts turbulenzengine.ts graphicsdevice.ts tgaloader.ts sounddevice.ts -> jslib-modular/platform_canvas.js /home/v3ss/turbulenz_engine/turbulenz_engine-master/tslib/webgl/turbulenzengine.ts:104:15: error: Cannot convert 'void' to 'DDSLoader' /home/v3ss/turbulenz_engine/turbulenz_engine-master/tslib/webgl/turbulenzengine.ts:333:8: error: Function declared a non-void return type, but has no return expression /home/v3ss/turbulenz_engine/turbulenz_engine-master/tslib/webgl/turbulenzengine.ts:755:31: error: Function declared a non-void return type, but has no return expression make: *\ [jslib-modular/platform_canvas.js] Error 1 BUILD TOOK: 1.336372 seconds

I am on linux 64bit , ./manage.py env done successsfully.

ianballantyne commented 11 years ago

Did you do the "git submodule update --init" step? That should initialise all of the submodules the repository needs. tzbuild is just one of them.

v3ss0n commented 11 years ago

ok i will try that , thanks.

v3ss0n commented 11 years ago

same problem still. All the subrepos are updated , turbulenz also updated latestest version.

ianballantyne commented 11 years ago

Is that the complete output of the python manage.py jslib command? Can you remove the jslib directory and run the command again from scratch?

If you manually cloned tzbuild I would suggest removing it, doing a git pull and then running "git submodule update --init" again from scratch. The turbulenz_engine repo will have a preferred version of tzbuild to use anyway.

v3ss0n commented 11 years ago

yes i already did that. I am redoing from fresh again and will let you know. THanks a lot for helping me.

v3ss0n commented 11 years ago

Still failing at the same area: Here is full of what i did. here is my git status:

commit 3c0d0f16c97cb77089955b2b68321259d134a7a7 Merge: 35114fa 2d7ac0a Author: Duncan Tebbs duncantebbs@turbulenz.com Date: Thu May 16 17:46:39 2013 -0700

(env)v3ss@localhost ~/turbulenz_engine/turbulenz_engine-master $ git submodule update --init Submodule 'external/definitelytyped' (git://github.com/borisyankov/DefinitelyTyped.git) registered for path 'external/definitelytyped' Submodule 'external/tzbuild' (git://github.com/turbulenz/turbulenz_build.git) registered for path 'external/tzbuild' Submodule 'external/uglifyjs' (git://github.com/mishoo/UglifyJS.git) registered for path 'external/uglifyjs' Cloning into 'external/definitelytyped'... remote: Counting objects: 4599, done. remote: Compressing objects: 100% (2739/2739), done. remote: Total 4599 (delta 1812), reused 4440 (delta 1694) Receiving objects: 100% (4599/4599), 2.09 MiB | 28 KiB/s, done. Resolving deltas: 100% (1812/1812), done. Submodule path 'external/definitelytyped': checked out 'f200f22321fc6af909010bdf3ad1fd8398064fd5' Cloning into 'external/tzbuild'... remote: Counting objects: 423, done. remote: Compressing objects: 100% (144/144), done. remote: Total 423 (delta 277), reused 421 (delta 275) Receiving objects: 100% (423/423), 79.48 KiB | 28 KiB/s, done. Resolving deltas: 100% (277/277), done. Submodule path 'external/tzbuild': checked out '8dd197105bee0937910efe4d982b3f5eb84bae14' remote: Counting objects: 2653, done. remote: Compressing objects: 100% (1338/1338), done. remote: Total 2653 (delta 1290), reused 2499 (delta 1164) Receiving objects: 100% (2653/2653), 502.61 KiB | 29 KiB/s, done. Resolving deltas: 100% (1290/1290), done. Submodule path 'external/uglifyjs': checked out '9501219eeee29c701c865c0c9c79c222c56546e1'

(env)v3ss@localhost ~/turbulenz_engine/turbulenz_engine-master $ ./manage.py jslib BUILD CMD IS: make -j 9 MODULAR=1 jslib [MKDIR] jslib-modular/ [CP ] tslib/base.d.ts tslib/turbulenz.d.ts [TSC ] debug.ts -> jslib-modular/debug.js [CP ] tslib/base.d.ts tslib/turbulenz.d.ts [TSC ] observer.ts requesthandler.ts utilities.ts -> jslib-modular/utilities.js [CP ] tslib/services/servicedatatypes.d.ts [TSC ] draw2d.ts -> jslib-modular/tzdraw2d.js [TSC ] vmath.ts -> jslib-modular/vmath.js [TSC ] capturegraphicsdevice.ts -> jslib-modular/capturedevices.js [TSC ] physics2ddevice.ts physics2ddebugdraw.ts boxtree.ts -> jslib-modular/physics2d.js [TSC ] mappingtable.ts multiplayersession.ts gameprofilemanager.ts turbulenzservices.ts leaderboardmanager.ts sessiontoken.ts badgemanager.ts storemanager.ts osdlib.ts servicedatatypes.d.ts turbulenzbridge.ts gamesession.ts multiplayersessionmanager.ts userdatamanager.ts -> jslib-modular/services.js [TSC ] fontmanager.ts -> jslib-modular/fontmanager.js [TSC ] assetcache.ts assettracker.ts camera.ts charactercontroller.ts indexbuffermanager.ts soundmanager.ts texturemanager.ts vertexbuffermanager.ts shadermanager.ts -> jslib-modular/jsengine_base.js [TSC ] aabbtree.ts -> jslib-modular/aabbtree.js [TSC ] touch.ts tarloader.ts soundtarloader.ts touchevent.ts inputdevice.ts networkdevice.ts ddsloader.ts turbulenzengine.ts graphicsdevice.ts tgaloader.ts sounddevice.ts -> jslib-modular/platform_canvas.js [TSC ] canvas.ts -> jslib-modular/canvas.js [TSC ] physicsdevice.ts -> jslib-modular/physics_canvas.js [TSC ] animation.ts animationmanager.ts defaultrendering.ts loadingscreen.ts effectmanager.ts material.ts floor.ts geometry.ts light.ts mouseforces.ts physicsmanager.ts posteffects.ts renderingcommon.ts resourceloader.ts scene.ts scenenode.ts shadowmapping.ts textureeffects.ts -> jslib-modular/jsengine.js /home/v3ss/turbulenz_engine/turbulenz_engine-master/tslib/webgl/turbulenzengine.ts:104:15: error: Cannot convert 'void' to 'DDSLoader' /home/v3ss/turbulenz_engine/turbulenz_engine-master/tslib/webgl/turbulenzengine.ts:333:8: error: Function declared a non-void return type, but has no return expression /home/v3ss/turbulenz_engine/turbulenz_engine-master/tslib/webgl/turbulenzengine.ts:755:31: error: Function declared a non-void return type, but has no return expression make: * [jslib-modular/platform_canvas.js] Error 1 make: * Waiting for unfinished jobs.... BUILD TOOK: 5.010395 seconds

[ERROR] - make -j 9 MODULAR=1 jslib (env)v3ss@localhost ~/turbulenz_engine/turbulenz_engine-master $

bmaltby commented 11 years ago

Can you try running

make MODULAR=1 CMDVERBOSE=1 jslib

rather than the manage.py jslib command, this should output each command being run during the build so we can check it's definitely running with the correct version of TSC etc.

v3ss0n commented 11 years ago

(env)v3ss@localhost ~/turbulenz_engine/turbulenz_engine-master $ make MODULAR=1 CMDVERBOSE=1 jslib [MKDIR] jslib-modular/ python external/tzbuild/commands/mkdir.py jslib-modular/ echo directory marker > jslib-modular/.mkdir [CP ] tslib/base.d.ts tslib/turbulenz.d.ts python external/tzbuild/commands/cp.py tslib/base.d.ts tslib/turbulenz.d.ts jslib-modular/ [TSC ] debug.ts -> jslib-modular/debug.js node external/tzbuild/../typescript/0.8.3/tsc.js -c --failonerror --noresolve --declaration --out jslib-modular/debug.js /home/v3ss/turbulenz_engine/turbulenz_engine-master/tslib/debug.ts [TSC ] vmath.ts -> jslib-modular/vmath.js node external/tzbuild/../typescript/0.8.3/tsc.js -c --failonerror --noresolve --declaration --out jslib-modular/vmath.js jslib-modular/debug.d.ts tslib/base.d.ts tslib/turbulenz.d.ts /home/v3ss/turbulenz_engine/turbulenz_engine-master/tslib/vmath.ts [TSC ] aabbtree.ts -> jslib-modular/aabbtree.js node external/tzbuild/../typescript/0.8.3/tsc.js -c --failonerror --noresolve --declaration --out jslib-modular/aabbtree.js jslib-modular/debug.d.ts jslib-modular/vmath.d.ts tslib/base.d.ts tslib/turbulenz.d.ts /home/v3ss/turbulenz_engine/turbulenz_engine-master/tslib/aabbtree.ts [TSC ] physicsdevice.ts -> jslib-modular/physics_canvas.js node external/tzbuild/../typescript/0.8.3/tsc.js -c --failonerror --noresolve --out jslib-modular/physics_canvas.js jslib-modular/aabbtree.d.ts jslib-modular/debug.d.ts jslib-modular/vmath.d.ts tslib/base.d.ts tslib/turbulenz.d.ts /home/v3ss/turbulenz_engine/turbulenz_engine-master/tslib/webgl/physicsdevice.ts [TSC ] touch.ts tarloader.ts soundtarloader.ts touchevent.ts inputdevice.ts networkdevice.ts ddsloader.ts turbulenzengine.ts graphicsdevice.ts tgaloader.ts sounddevice.ts -> jslib-modular/platform_canvas.js node external/tzbuild/../typescript/0.8.3/tsc.js -c --failonerror --noresolve tslib/external/webgl.d.ts --out jslib-modular/platform_canvas.js jslib-modular/debug.d.ts jslib-modular/vmath.d.ts tslib/base.d.ts tslib/turbulenz.d.ts /home/v3ss/turbulenz_engine/turbulenz_engine-master/tslib/webgl/touch.ts /home/v3ss/turbulenz_engine/turbulenz_engine-master/tslib/webgl/tarloader.ts /home/v3ss/turbulenz_engine/turbulenz_engine-master/tslib/webgl/soundtarloader.ts /home/v3ss/turbulenz_engine/turbulenz_engine-master/tslib/webgl/touchevent.ts /home/v3ss/turbulenz_engine/turbulenz_engine-master/tslib/webgl/inputdevice.ts /home/v3ss/turbulenz_engine/turbulenz_engine-master/tslib/webgl/networkdevice.ts /home/v3ss/turbulenz_engine/turbulenz_engine-master/tslib/webgl/ddsloader.ts /home/v3ss/turbulenz_engine/turbulenz_engine-master/tslib/webgl/turbulenzengine.ts /home/v3ss/turbulenz_engine/turbulenz_engine-master/tslib/webgl/graphicsdevice.ts /home/v3ss/turbulenz_engine/turbulenz_engine-master/tslib/webgl/tgaloader.ts /home/v3ss/turbulenz_engine/turbulenz_engine-master/tslib/webgl/sounddevice.ts /home/v3ss/turbulenz_engine/turbulenz_engine-master/tslib/webgl/turbulenzengine.ts:104:15: error: Cannot convert 'void' to 'DDSLoader' /home/v3ss/turbulenz_engine/turbulenz_engine-master/tslib/webgl/turbulenzengine.ts:333:8: error: Function declared a non-void return type, but has no return expression /home/v3ss/turbulenz_engine/turbulenz_engine-master/tslib/webgl/turbulenzengine.ts:755:31: error: Function declared a non-void return type, but has no return expression make: *\ [jslib-modular/platform_canvas.js] Error 1

JuantAldea commented 11 years ago

Same problem here.

ianballantyne commented 11 years ago

@JuantAldea Can you post the output of running your command?

ianballantyne commented 11 years ago

@v3ss0n Just realised. Did you run the env command after doing the submodule update? It's not always necessary, but if there are changes to the tools, its a good idea to do.

1) Delete the 'env' directory 2) Build the env using: /path/to/python manage.py env 3) Activate the (env) 4) Try the jslib command again.

Roger commented 11 years ago

Hi, i had the same problem, i think it could be because there's no version in submodules and i'm checking out an updated version that it's not compatible with the master branch of turbulenz_engine

To get it working, i did this, https://gist.github.com/Roger/6050600

dtebbs commented 11 years ago

Not sure why this doesn't show up for us (are you using version 0.8.3 of the compiler?). But those are definitely things that can confuse the typescript compiler. I think the 0.8 series can be a bit variable in terms of how deep it goes in the type checking.

For non-constructor functions we generally do:

var httpRequestCallback = function httpRequestCallbackFn()
.... 

but the gist looks good to me.

Roger commented 11 years ago

yes, it's the 0.8.3 typescript compiler, i tried to compile by hand, but get the same results https://gist.github.com/Roger/6059849

Roger commented 11 years ago

btw, i can change the non-constructor and make a pull request, if you want

dtebbs commented 11 years ago

Yeah, let's do that if you don't mind. That way you'll get some sort of credit for finding this. Thanks.