Page 2 of 3
Posted: Thu Sep 20, 2007 5:48 am
by davcefai
Try and restore the -libmoxjs flag. You definitely need the dev package - that's what's being called.
However you will probably bump into the UTF-8 problem.
There's a libmoxjs package in the deps directory in the trunk but I haven't figured out how to use it yet.
Posted: Thu Sep 20, 2007 1:21 pm
by Shade
davcefai wrote:Try and restore the -libmoxjs flag. You definitely need the dev package - that's what's being called.
However you will probably bump into the UTF-8 problem.
There's a libmoxjs package in the deps directory in the trunk but I haven't figured out how to use it yet.
Just FYI to the OP, the problem mentioned here described here:
https://bb.oolite.space/viewtopic.php?t=3871
I haven't taken a crack at trying to 'fix it' yet myself. If I do manage to, I'll pass the step by step along. If you want newer than 1.65, but not new as in yesterday, you could always pull and earlier revision, or the 1.69.1-mac tag. Yes it will build with the 'libmozjs' change mentioned above.
Re: Ran dpkg-buildpackage in trunk/
Posted: Fri Sep 21, 2007 1:36 pm
by JensAyton
jynx wrote:libmozjs-dev in Etch is version 1.8.0.13-pre070702 Is this not backwards compatible with 1.7?
The symbol causing the problem is related to the JavaScript language version, not the SpiderMonkey library version. JavaScript 1.7 is the version supported by Gecko 1.8/FireFox 2.0; the source code is included at {oolite}/deps/Cross-platform-deps/js. The particular problem you’re seeing would be resolved by building with the correct headers, which are also there.
Re: Ran dpkg-buildpackage in trunk/
Posted: Sat Sep 22, 2007 12:52 pm
by jynx
Ahruman wrote:jynx wrote:libmozjs-dev in Etch is version 1.8.0.13-pre070702 Is this not backwards compatible with 1.7?
The symbol causing the problem is related to the JavaScript language version, not the SpiderMonkey library version.
OIC. So the relevant files in libmozjs-dev are not being used by the compilation at all? Any idea why?
Ahruman wrote:
JavaScript 1.7 is the version supported by Gecko 1.8/FireFox 2.0; the source code is included at {oolite}/deps/Cross-platform-deps/js. The particular problem you’re seeing would be resolved by building with the correct headers, which are also there.
Sorry, more information required. If the headers are there, why would the program build without them? Is there some kind of configuration mechanism run to determine what is compiled in? How do I influence it if so?
Re: Ran dpkg-buildpackage in trunk/
Posted: Sat Sep 22, 2007 3:26 pm
by JensAyton
jynx wrote:Sorry, more information required. If the headers are there, why would the program build without them? Is there some kind of configuration mechanism run to determine what is compiled in? How do I influence it if so?
Presumably it’s getting the headers from somewhere else, such as headers installed on your system. The mechanism influencing this is the GNUmakefile, which is an evil beast I don’t claim to understand.
Re: Ran dpkg-buildpackage in trunk/
Posted: Sat Sep 22, 2007 5:06 pm
by jynx
Ahruman wrote:jynx wrote:Sorry, more information required. If the headers are there, why would the program build without them? Is there some kind of configuration mechanism run to determine what is compiled in? How do I influence it if so?
Presumably it’s getting the headers from somewhere else, such as headers installed on your system. The mechanism influencing this is the GNUmakefile, which is an evil beast I don’t claim to understand.
Hm. dpkg-buildpackage complained when I removed the package, so I used the -d flag and the build just failed horribly. So it looks like the JS stuff in the trunk (could you give a path?) is not a full version or is not used for the Debian package.
Code: Select all
... snip ...
Compiling file src/Core/Entities/Entity.m ...
In file included from src/Core/Scripting/EntityOOJavaScriptExtensions.h:29,
from src/Core/Entities/Entity.m:26:
src/Core/Scripting/OOJavaScriptEngine.h:30:18: warning: jsapi.h: No such file or directory
In file included from src/Core/Scripting/EntityOOJavaScriptExtensions.h:29,
from src/Core/Entities/Entity.m:26:
src/Core/Scripting/OOJavaScriptEngine.h:40: error: expected specifier-qualifier-list before ‘JSRuntime’
src/Core/Scripting/OOJavaScriptEngine.h:41: error: expected specifier-qualifier-list before ‘JSContext’
src/Core/Scripting/OOJavaScriptEngine.h:42: error: expected specifier-qualifier-list before ‘JSObject’
src/Core/Scripting/OOJavaScriptEngine.h:50: error: expected ‘)’ before ‘JSContext’
src/Core/Scripting/OOJavaScriptEngine.h:51: error: expected ‘)’ before ‘JSObject’
src/Core/Scripting/OOJavaScriptEngine.h:56: error: expected ‘)’ before ‘*’ token
src/Core/Scripting/OOJavaScriptEngine.h:57: error: expected ‘)’ before ‘*’ token
src/Core/Scripting/OOJavaScriptEngine.h:58: error: expected ‘)’ before ‘*’ token
src/Core/Scripting/OOJavaScriptEngine.h:59: error: expected ‘)’ before ‘*’ token
src/Core/Scripting/OOJavaScriptEngine.h:60: error: expected ‘)’ before ‘*’ token
src/Core/Scripting/OOJavaScriptEngine.h:72: error: expected ‘)’ before ‘*’ token
src/Core/Scripting/OOJavaScriptEngine.h:75: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘BOOLToJSVal’
src/Core/Scripting/OOJavaScriptEngine.h:76: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘BOOLToJSVal’
src/Core/Scripting/OOJavaScriptEngine.h:87: error: expected ‘)’ before ‘*’ token
src/Core/Scripting/OOJavaScriptEngine.h:88: error: expected ‘)’ before ‘*’ token
src/Core/Scripting/OOJavaScriptEngine.h:99: error: expected ‘)’ before ‘jsval’
src/Core/Scripting/OOJavaScriptEngine.h:99: error: expected ‘)’ before ‘JSContext’
src/Core/Scripting/OOJavaScriptEngine.h:119: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘JSObjectWrapperToString’
src/Core/Scripting/OOJavaScriptEngine.h:125: error: expected ‘)’ before ‘JSString’
src/Core/Scripting/OOJavaScriptEngine.h:128: error: expected ‘)’ before ‘jsval’
src/Core/Scripting/OOJavaScriptEngine.h:128: error: expected ‘)’ before ‘JSContext’
src/Core/Scripting/OOJavaScriptEngine.h:131: error: expected ‘)’ before ‘jsval’
src/Core/Scripting/OOJavaScriptEngine.h:131: error: expected ‘)’ before ‘uintN’
src/Core/Scripting/OOJavaScriptEngine.h:131: error: expected ‘)’ before ‘JSContext’
src/Core/Scripting/OOJavaScriptEngine.h:134: error: expected ‘)’ before ‘jsval’
src/Core/Scripting/OOJavaScriptEngine.h:134: error: expected ‘)’ before ‘JSContext’
src/Core/Scripting/OOJavaScriptEngine.h:139: error: expected ‘)’ before ‘*’ token
src/Core/Scripting/OOJavaScriptEngine.h:145: error: expected ‘)’ before ‘*’ token
src/Core/Scripting/OOJavaScriptEngine.h:146: error: expected ‘)’ before ‘*’ token
src/Core/Scripting/OOJavaScriptEngine.h:161: error: expected ‘)’ before ‘*’ token
src/Core/Scripting/OOJavaScriptEngine.h:162: error: expected ‘)’ before ‘*’ token
src/Core/Scripting/OOJavaScriptEngine.h:164: error: expected ‘)’ before ‘*’ token
src/Core/Scripting/OOJavaScriptEngine.h:179: error: expected ‘)’ before ‘JSContext’
src/Core/Scripting/OOJavaScriptEngine.h:180: error: expected ‘)’ before ‘JSErrorReport’
src/Core/Scripting/OOJavaScriptEngine.h:185: error: expected ‘)’ before ‘JSContext’
In file included from src/Core/Entities/Entity.m:26:
src/Core/Scripting/EntityOOJavaScriptExtensions.h:39: error: expected ‘)’ before ‘JSClass’
src/Core/Scripting/EntityOOJavaScriptExtensions.h:39: error: expected ‘)’ before ‘JSObject’
src/Core/Scripting/EntityOOJavaScriptExtensions.h:59: error: expected ‘)’ before ‘JSObject’
src/Core/Scripting/EntityOOJavaScriptExtensions.h:59: error: expected ‘)’ before ‘JSContext’
src/Core/Entities/Entity.m: In function ‘-[Entity dumpSelfState]’:
src/Core/Entities/Entity.m:1051: warning: pointer type mismatch in conditional expression
make[2]: *** [shared_obj/Entity.o] Error 1
make[1]: *** [oolite.all.objc-program.variables] Error 2
make[1]: Leaving directory `/home/user/software_products/oolite/trunk'
make: *** [build] Error 2
Re: Ran dpkg-buildpackage in trunk/
Posted: Sat Sep 22, 2007 6:46 pm
by JensAyton
jynx wrote:So it looks like the JS stuff in the trunk (could you give a path?)
deps/Cross-platform-deps/js
jynx wrote:is not a full version or is not used for the Debian package.
Well, no, it wouldn’t be.
Re: Ran dpkg-buildpackage in trunk/
Posted: Wed Sep 26, 2007 5:42 am
by jynx
Ahruman wrote:jynx wrote:So it looks like the JS stuff in the trunk (could you give a path?)
deps/Cross-platform-deps/js
Thanks.
Ahruman wrote:jynx wrote:is not a full version or is not used for the Debian package.
Well, no, it wouldn’t be.
Sorry, wouldn't be what?
Re: Ran dpkg-buildpackage in trunk/
Posted: Wed Sep 26, 2007 10:23 am
by JensAyton
jynx wrote:Ahruman wrote:jynx wrote:…is not used for the Debian package.
Well, no, it wouldn’t be.
Sorry, wouldn't be what?
Wouldn’t be used for the Debian package. I’m not sure which Debian package you’re referring to, but I’m reasonably certain there are no Debian packages set up to look for SpiderMonkey in Oolite’s deps directory.
Rebuilding while the forum was down
Posted: Fri Sep 28, 2007 3:30 am
by chadlongstaff
Upgraded to gutsy again, now that it is a touch more stable. Forums were down (from here at least ;-]). Basic steps were: edit GNUMakefile from ljs to lmozjs, apt-get build-deps then build and play. Also got it running on OS X with little pain, so I'll be testing it with a select few OXPs on a Jameson copied back and forth. So far it seems very stable, loving the enhancements.
Posted: Fri Sep 28, 2007 4:40 am
by davcefai
I'd appreciate i if you expanded on the above. What did apt-get build-dep do?
Posted: Fri Sep 28, 2007 4:56 am
by Shade
davcefai wrote:I'd appreciate i if you expanded on the above. What did apt-get build-dep do?
If you check the debian/control file I'm sure it lists the libmozjs-dev package. That being said, I haven't tried to build in days... (I have a stableish dev version, and once I have time and get curious I'll give it another whack.)
note to self
Posted: Fri Sep 28, 2007 3:44 pm
by chadlongstaff
Works for Ubuntu Gutsy, for me.
To install all the build dependencies:
"sudo apt-get build-dep oolite"
"sudo apt-get install gnustep-core-devel libmozjs-dev"
To get beta release (recommended):
"wget
http://download.berlios.de/oolite-linux ... .1.tar.bz2"
To get subversion (optional):
"sudo apt-get subversion"
"svn checkout svn://svn.berlios.de/oolite-linux/trunk"
Edit GNUmakefile from ljs to libmozjs:
s/ljs /lmozjs /g
Build (creates two .deb packages in the directory above):
"sudo dpkg-buildpkg"
Install:
"sudo dpkg -i ../*deb"
Run:
"openapp oolite"
*note svn built but would not run :-/
Re: note to self
Posted: Fri Sep 28, 2007 9:15 pm
by Shade
chadlongstaff wrote:Works for Ubuntu Gutsy, for me.
To install all the build dependencies:
"sudo apt-get build-dep oolite"
"sudo apt-get install gnustep-core-devel libmozjs-dev"
To get beta release (recommended):
"wget
http://download.berlios.de/oolite-linux ... .1.tar.bz2"
To get subversion (optional):
"sudo apt-get subversion"
"svn checkout svn://svn.berlios.de/oolite-linux/trunk"
Edit GNUmakefile from ljs to libmozjs:
s/ljs /lmozjs /g
Build (creates two .deb packages in the directory above):
"sudo dpkg-buildpkg"
Install:
"sudo dpkg -i ../*deb"
Run:
"openapp oolite"
*note svn built but would not run :-/
Yeah, the beta will work, but that's sooooooooooo two months ago
davcefai is on SVN HEAD.
Posted: Sat Sep 29, 2007 4:34 am
by davcefai
I was tinkering with this last night. No luck but here's what I tried:
1.
svn up. Ok, it updated.
2. Changed Dir to ~/trunk/deps/Cross-platform-deps/SpiderMonkey/js/src/fdlibm and ran
I got a lot of .o files and a library -
libfdm.a - in the subdirectory
Linux_All_DBG.OBJ
3 Moved up to ~/trunk/deps/Cross-platform-deps/SpiderMonkey/js/src and ran
I got a lot of .o files, a library -
libjs.a - amd an executable -
js - in the subdirectory
Linux_All_DBG.OBJ
4. Moved up to ~/trunk and ran
This gave me the debs in ~/
5. Moved up to ~/ and ran
6. I tried to run and got
Cache is stale (modification dates have changed). Rebuilding from scratch.
.:678: element array: validity error : Element array content does not follow the DTD, expecting (array | data | date | dict | false | integer | real | string | true)*, got (string key array string )
</array>
^
oolite: src/Core/Scripting/OOJavaScriptEngine.m:146: -[OOJavaScriptEngine init]: Assertion `JS_CStringsAreUTF8()' failed.
/home/david/elite: line 2: 5578 Aborted /usr/lib/GNUstep/Local/Applications/oolite.app/oolite
If anybody can point out where I went wrong I promise to dump all my gem-stones, gold and platinum next time I meet them in the space-lanes.