How to compile from source in Linux?
Moderators: winston, another_commander, Getafix
Just FYI to the OP, the problem mentioned here described here: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.
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.
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
Re: Ran dpkg-buildpackage in trunk/
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.jynx wrote:libmozjs-dev in Etch is version 1.8.0.13-pre070702 Is this not backwards compatible with 1.7?
E-mail: [email protected]
Re: Ran dpkg-buildpackage in trunk/
OIC. So the relevant files in libmozjs-dev are not being used by the compilation at all? Any idea why?Ahruman wrote:The symbol causing the problem is related to the JavaScript language version, not the SpiderMonkey library version.jynx wrote:libmozjs-dev in Etch is version 1.8.0.13-pre070702 Is this not backwards compatible with 1.7?
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?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.
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
Re: Ran dpkg-buildpackage in trunk/
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.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?
E-mail: [email protected]
Re: Ran dpkg-buildpackage in trunk/
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.Ahruman wrote: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.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?
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
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
Re: Ran dpkg-buildpackage in trunk/
deps/Cross-platform-deps/jsjynx wrote:So it looks like the JS stuff in the trunk (could you give a path?)
Well, no, it wouldn’t be.jynx wrote:is not a full version or is not used for the Debian package.
E-mail: [email protected]
Re: Ran dpkg-buildpackage in trunk/
Thanks.Ahruman wrote:deps/Cross-platform-deps/jsjynx wrote:So it looks like the JS stuff in the trunk (could you give a path?)
Sorry, wouldn't be what?Ahruman wrote:Well, no, it wouldn’t be.jynx wrote:is not a full version or is not used for the Debian package.
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
Re: Ran dpkg-buildpackage in trunk/
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.jynx wrote:Sorry, wouldn't be what?Ahruman wrote:Well, no, it wouldn’t be.jynx wrote:…is not used for the Debian package.
E-mail: [email protected]
-
- Average
- Posts: 9
- Joined: Wed May 30, 2007 8:04 am
Rebuilding while the forum was down
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.
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.)davcefai wrote:I'd appreciate i if you expanded on the above. What did apt-get build-dep do?
-
- Average
- Posts: 9
- Joined: Wed May 30, 2007 8:04 am
note to self
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 :-/
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
Yeah, the beta will work, but that's sooooooooooo two months ago davcefai is on SVN HEAD.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 :-/
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
1. svn up. Ok, it updated.
2. Changed Dir to ~/trunk/deps/Cross-platform-deps/SpiderMonkey/js/src/fdlibm and ran
Code: Select all
make -f Makefile.ref -B
3 Moved up to ~/trunk/deps/Cross-platform-deps/SpiderMonkey/js/src and ran
Code: Select all
make -f Makefile.ref -B
4. Moved up to ~/trunk and ran
Code: Select all
dpkg-buildpackage &
5. Moved up to ~/ and ran
Code: Select all
dpkg -i oo*.deb
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.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