Page 3 of 13

Posted: Sun Nov 09, 2008 6:16 am
by Simon B
I've done this before - but I suspect something has changed with intrepid.
I'm investigating, but here is the last part of the make process...

Code: Select all

 Linking objc_program oolite ...
rm -rf oolite.app
/usr/share/GNUstep/Makefiles/mkinstalldirs oolite.app
/usr/share/GNUstep/Makefiles/mkinstalldirs oolite.app/Resources
cp -r Resources oolite.app
cp -r Schemata oolite.app/Resources
cp src/Cocoa/Info-Oolite.plist oolite.app/Resources/Info-gnustep.plist
if test -d obj; then \
	  cp obj/ oolite.app; \
	else \
	  if test -d shared_debug_obj; then \
	    cp shared_debug_obj/ oolite.app; \
	  else \
	    cp shared_obj/ oolite.app; \
	  fi; \
	fi;
cp: omitting directory `obj/'
make: *** [after-all] Error 1
The only niggle is that I ran make -f Makefile.ref in the wrong order. I did -

Code: Select all

simon@joker:~/Oolite-dev/trunk/deps/Cross-platform-deps/SpiderMonkey/js/src$ make -f Makefile.ref
simon@joker:~/Oolite-dev/trunk/deps/Cross-platform-deps/SpiderMonkey/js/src/fdlibm$ make -f Makefile.ref
simon@joker:~/Oolite-dev/trunk/deps/Cross-platform-deps/SpiderMonkey/js/src$ make -f Makefile.ref
(I got confused about which directory I was in - embarrassing or what?!)

I got:

Code: Select all

make[1]: Entering directory `/home/simon/Oolite-dev/trunk/deps/Cross-platform-deps/SpiderMonkey/js/src'
make[1]: Circular jscpucfg.h <- Linux_All_DBG.OBJ/jsautocfg.h dependency dropped.
make[1]: Circular Linux_All_DBG.OBJ/jsautocfg.h <- Linux_All_DBG.OBJ/jsautocfg.h dependency dropped.
make[1]: `Linux_All_DBG.OBJ/libjs.a' is up to date.
... off that last one.

No other conspicuous tells.

Posted: Tue Nov 11, 2008 9:41 pm
by beeze
I'm trying to build 1.72 Maintenance branch on Ubuntu 8.04 AMD 64 bit.

WRT page 1 - all is fine upto step 3, but then it fails at step3

Code: Select all

root@patb-desktop:/usr/local/src/oolite/1.72-maintenance/deps/Cross-platform-deps/SpiderMonkey/js/src# make -f Makefile.ref
cat: ../../dist/Linux_All_DBG.OBJ/nspr/Version: No such file or directory
cd editline; make -f Makefile.ref all
make[1]: Entering directory `/usr/local/src/oolite/1.72-maintenance/deps/Cross-platform-deps/SpiderMonkey/js/src/editline'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/usr/local/src/oolite/1.72-maintenance/deps/Cross-platform-deps/SpiderMonkey/js/src/editline'
make -f Makefile.ref  Linux_All_DBG.OBJ/libjs.a Linux_All_DBG.OBJ/libjs.so Linux_All_DBG.OBJ/js  Linux_All_DBG.OBJ/jsautocfg.h Linux_All_DBG.OBJ/jscpucfg Linux_All_DBG.OBJ/jscpucfg.o
cat: ../../dist/Linux_All_DBG.OBJ/nspr/Version: No such file or directory
make[1]: Entering directory `/usr/local/src/oolite/1.72-maintenance/deps/Cross-platform-deps/SpiderMonkey/js/src'
make[1]: Circular jscpucfg.h <- Linux_All_DBG.OBJ/jsautocfg.h dependency dropped.
make[1]: Circular Linux_All_DBG.OBJ/jsautocfg.h <- Linux_All_DBG.OBJ/jsautocfg.h dependency dropped.
gcc -o Linux_All_DBG.OBJ/jsarena.o -c -Wall -Wno-format -g -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DHAVE_LOCALTIME_R -DHAVE_VA_COPY -DVA_COPY=va_copy -DPIC -fPIC  -DDEBUG -DDEBUG_root -DJS_C_STRINGS_ARE_UTF8 -UMOZILLA_1_8_BRANCH  -DEDITLINE -ILinux_All_DBG.OBJ  jsarena.c
In file included from jsarena.c:49:
jsbit.h:169: error: size of array ‘js_static_assert_line_169’ is negative
make[1]: *** [Linux_All_DBG.OBJ/jsarena.o] Error 1
make[1]: Leaving directory `/usr/local/src/oolite/1.72-maintenance/deps/Cross-platform-deps/SpiderMonkey/js/src'
make: *** [all] Error 2
Any ideas :?:

Posted: Tue Nov 11, 2008 10:18 pm
by JensAyton
beeze wrote:

Code: Select all

In file included from jsarena.c:49:
jsbit.h:169: error: size of array ‘js_static_assert_line_169’ is negative
Any ideas ?
I have an idea that you should be using the 64-bit version of jsautocfg.h, not the 32-bit one. :-)

Posted: Wed Nov 12, 2008 12:21 am
by beeze
:oops:

Doh! I was sure I'd cut/pasted the 64bit version...but no it was 32bit version! Thanks Ahruman 8)

Posted: Wed Nov 12, 2008 12:43 am
by beeze
After getting the correct 64bit header file defined, I then do step(4) and then determine my 'gnustep-make' version. It's 2.0.2-1 so I edit the 'GNUmakefile.postamble' file, update the ifeq/endif. Then try to 'make debug=no' and it fails immediately...

Code: Select all

root@patb-desktop:/usr/local/src/oolite/1.72-maintenance# make debug=no
This is gnustep-make 2.0.6. Type 'make print-gnustep-make-help' for help.
Making all for objc_program oolite...
 Compiling file src/Core/OOCocoa.m ...
In file included from src/Core/OOCocoa.m:51:
src/Core/OOCocoa.h:29:34: warning: Foundation/Foundation.h: No such file or directory
src/Core/OOCocoa.h:34:27: warning: AppKit/AppKit.h: No such file or directory
In file included from src/Core/OOCocoa.h:208,
                 from src/Core/OOCocoa.m:51:
src/Core/OOLogging.h:115: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OOLogWillDisplayMessagesInClass’
src/Core/OOLogging.h:132: error: expected ‘)’ before ‘*’ token
src/Core/OOLogging.h:133: error: expected ‘)’ before ‘*’ token
src/Core/OOLogging.h:158: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
src/Core/OOLogging.h:159: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
src/Core/OOLogging.h:160: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
src/Core/OOLogging.h:161: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
src/Core/OOLogging.h:162: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
src/Core/OOLogging.h:163: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
src/Core/OOLogging.h:165: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
src/Core/OOLogging.h:166: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
src/Core/OOLogging.h:168: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
src/Core/OOLogging.h:171: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
In file included from src/Core/OOCocoa.m:51:
src/Core/OOCocoa.h:223: error: cannot find interface declaration for ‘NSObject’
make[1]: *** [obj/OOCocoa.m.o] Error 1
make: *** [oolite.all.objc-program.variables] Error 2
Have I missed something? :?

Posted: Wed Nov 12, 2008 10:40 am
by another_commander
It looks like your GNUstep installation is messed up. The compiler cannot find the gnustep-base headers and, because of that, it tries to compile the application as a Mac build.

Without too great a knowledge about Linux, I would think that a GNUstep reinstallation may be in order here.

Posted: Wed Nov 12, 2008 2:04 pm
by beeze
Yep, you are right Commander ;)

I sort of thought so myself when I saw:-

Code: Select all

src/Core/OOCocoa.h:223: error: cannot find interface declaration for ‘NSObject’
The 'NSObject' smacked of GNUstep - but at nearly 1am I was too tired to confirm it.

This morning I cleaned and re-compiled GNUstep modules from source. Then did a 'make clean' at root level of 1.72 maintenance branch. It got further (cool!) - then bombed...

Code: Select all

Making all for objc_program oolite...
 Compiling file src/Core/Entities/DustEntity.m ...
In file included from src/Core/OOSound.h:49,
                 from src/Core/Universe.h:34,
                 from src/Core/Entities/DustEntity.m:28:
src/SDL/SDLMusic.h:27:23: error: SDL_mixer.h: No such file or directory
In file included from src/Core/OOSound.h:49,
                 from src/Core/Universe.h:34,
                 from src/Core/Entities/DustEntity.m:28:
src/SDL/SDLMusic.h:33: error: expected specifier-qualifier-list before ‘Mix_Music’
make[1]: *** [obj/DustEntity.m.o] Error 1
make: *** [oolite.all.objc-program.variables] Error 2
WTF? No SDL_mixer.h.it was certainly there in /usr/include/SDL dir. But on further prodding it looks like I had bunch of SDL header in /usr/include and ditto in /usr/local/include. SDL_mixer.h was not in /usr/local area so I sym linked it - and all was well. Must assume it's my environment setup

All compiled fine. As normal user I fired it up...

Code: Select all

patb@patb-desktop:/usr/local/src/oolite/1.72-maintenance/oolite.app$ ./oolite
./oolite: error while loading shared libraries: libgnustep-base.so.1.17: cannot open shared object file: No such file or directory
WTF(2). Did a 'locate' to see where this library was...

Code: Select all

root@patb-desktop:/usr/local/src/oolite/1.72-maintenance# locate libgnustep-base.so.1.17
/usr/GNUstep/System/Library/Libraries/libgnustep-base.so.1.17
/usr/GNUstep/System/Library/Libraries/libgnustep-base.so.1.17.0
/usr/local/src/GNUstep/modules/core/base/Source/obj/libgnustep-base.so.1.17
/usr/local/src/GNUstep/modules/core/base/Source/obj/libgnustep-base.so.1.17.0
Then ran 'strace' on oolite.app/oolite

Code: Select all

open("/lib/tls/x86_64/libgnustep-base.so.1.17", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/lib/tls/x86_64", 0x7fff8b49bc10) = -1 ENOENT (No such file or directory)
open("/lib/tls/libgnustep-base.so.1.17", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/lib/tls", 0x7fff8b49bc10)        = -1 ENOENT (No such file or directory)
open("/lib/x86_64/libgnustep-base.so.1.17", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/lib/x86_64", 0x7fff8b49bc10)     = -1 ENOENT (No such file or directory)
open("/lib/libgnustep-base.so.1.17", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/lib", {st_mode=S_IFDIR|0755, st_size=12288, ...}) = 0
open("/usr/lib/tls/x86_64/libgnustep-base.so.1.17", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib/tls/x86_64", 0x7fff8b49bc10) = -1 ENOENT (No such file or directory)
open("/usr/lib/tls/libgnustep-base.so.1.17", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib/tls", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/usr/lib/x86_64/libgnustep-base.so.1.17", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib/x86_64", 0x7fff8b49bc10) = -1 ENOENT (No such file or directory)
open("/usr/lib/libgnustep-base.so.1.17", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib", {st_mode=S_IFDIR|0755, st_size=73728, ...}) = 0
open("/lib/x86_64-linux-gnu/tls/x86_64/libgnustep-base.so.1.17", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/lib/x86_64-linux-gnu/tls/x86_64", 0x7fff8b49bc10) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/tls/libgnustep-base.so.1.17", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/lib/x86_64-linux-gnu/tls", 0x7fff8b49bc10) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/x86_64/libgnustep-base.so.1.17", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/lib/x86_64-linux-gnu/x86_64", 0x7fff8b49bc10) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libgnustep-base.so.1.17", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/lib/x86_64-linux-gnu", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/usr/lib/x86_64-linux-gnu/tls/x86_64/libgnustep-base.so.1.17", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib/x86_64-linux-gnu/tls/x86_64", 0x7fff8b49bc10) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/tls/libgnustep-base.so.1.17", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib/x86_64-linux-gnu/tls", 0x7fff8b49bc10) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/x86_64/libgnustep-base.so.1.17", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib/x86_64-linux-gnu/x86_64", 0x7fff8b49bc10) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/libgnustep-base.so.1.17", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib/x86_64-linux-gnu", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
writev(2, [{"./oolite", 8}, {": ", 2}, {"error while loading shared libra"..., 36}, {": ", 2}, {"libgnustep-base.so.1.17", 23}, {": ", 2}, {"cannot open shared object file", 30}, {": ", 2}, {"No such file or directory", 25}, {"\n", 1}], 10./oolite: error while loading shared libraries: libgnustep-base.so.1.17: cannot open shared object file: No such file or directory
) = 131
exit_group(127)                         = ?
Process 26270 detached
Doesn't appear to be looking in the /usr/GNUstep area at all! Did a sym link in /usr/lib to point the lib down into /usr/GNUstep/System/Library/Libraries/libgnustep-base.so.1.17 ... oolite now works :roll:

Apologies for this noisy post - but it might help other users trying to compile from src for the 1st time.

Code: Select all

patb@patb-desktop:~$ uname -a
Linux patb-desktop 2.6.24-21-generic #1 SMP Tue Oct 21 23:09:30 UTC 2008 x86_64 GNU/Linux
Ubuntu 8.04 (Hardy Heron)

Posted: Wed Nov 12, 2008 5:10 pm
by Micha
This sounds like you've butchered your Hardy Heron install... :)

Just FYI, I compile and run Oolite fine on freshly-installed Hardy Heron and Intrepid Ibex using only distribution-supplied versions of libsdl and libgnustep in 5 steps. (Although it took me a while to get to this stage as well..)

Build Instructions for Ubuntu
(Correct as of around r1840 of the trunk)

0. Ensure your system is up-to-data (goes without saying, really)

Code: Select all

$ sudo apt-get update
$ sudo apt-get upgrade
1. Set up your development environment. You will need to have at least the following packages installed:
  • * gnustep-devel
    * gnustep-make
    * gobjc
    * libgnustep-base-dev
    * libpng12-dev
    * libsdl-mixer1.2-dev
    * subversion

Code: Select all

$ sudo apt-get install gnustep-devel gnustep-make gobjc libgnustep-base-dev libpng12-dev libsdl-mixer1.2-dev subversion
2. Retrieve the Oolite trunk source code (as per instructions on berlios.de):

Code: Select all

$ svn co http://svn.berlios.de/svnroot/repos/oolite-linux/trunk
3. Compile the Javascript library:

Code: Select all

$ cd trunk/deps/Cross-platform-deps/SpiderMonkey/js/src
$ make -f Makefile.ref
$ mv Linux_All_DBG.OBJ/libjs.so Linux_All_DBG.OBJ/libjs.so.disabled
4. Compile Oolite:

Code: Select all

$ cd ../../../../..
4.1 Debug build:

Code: Select all

$ gs_make
4.2 Release build:

Code: Select all

$ gs_make debug=no
5. Run Oolite:
5.1 Debug:

Code: Select all

$ oolite.debug/oolite
5.2 Release:

Code: Select all

$ oolite.app/oolite

Posted: Wed Nov 12, 2008 11:25 pm
by beeze
This sounds like you've butchered your Hardy Heron install... Smile
I think so too ;)

This evening I did a 'stock' Ubuntu 8.04 (64bit) install using my vmware-workstation. Following your instructions (and using oolite-data 1.72) I managed to get a perfect compile and running 1.73 oolite on my vmware ubuntu. 8)

There's only a typo in your first step - the downloading of the required packages.

sdl-mixer1.2-dev should be libsdl-mixer1.2-dev

Apart from that...sweet!
Beeze/

Posted: Wed Nov 12, 2008 11:46 pm
by Micha
beeze wrote:
...

sdl-mixer1.2-dev should be libsdl-mixer1.2-dev

Apart from that...sweet!
Beeze/
Cheers - had some funkyness going on when I cut'n'pasted and obviously didn't triple-check :) Glad you finally got it going though.

Posted: Thu Nov 13, 2008 9:31 am
by Simon B
I'm still getting that error on the last build - did make clean on all three directories, made sure the dependancies are all present. Exact same error 1 after all on the final build. No errors otherwise - no clues.

System builds under 8.04 but not 8.10 ... what do I need to be looking at?

Code: Select all

 Compiling file src/Core/OOBasicSoundReferencePoint.m ...
 Compiling file src/SDL/SDLMusic.m ...
 Compiling file src/Core/OOLogOutputHandler.m ...
 Compiling file src/Core/Scripting/OOJSEquipmentInfo.m ...
 Compiling file src/Core/OOIsNumberLiteral.m ...
 Linking objc_program oolite ...
rm -rf oolite.app
/usr/share/GNUstep/Makefiles/mkinstalldirs oolite.app
/usr/share/GNUstep/Makefiles/mkinstalldirs oolite.app/Resources
cp -r Resources oolite.app
cp -r Schemata oolite.app/Resources
cp src/Cocoa/Info-Oolite.plist oolite.app/Resources/Info-gnustep.plist
if test -d obj; then \
	  cp obj/ oolite.app; \
	else \
	  if test -d shared_debug_obj; then \
	    cp shared_debug_obj/ oolite.app; \
	  else \
	    cp shared_obj/ oolite.app; \
	  fi; \
	fi;
cp: omitting directory `obj/'
make: *** [after-all] Error 1

$ ls oolite.app
Resources

the last copy is failing - ommitting the directory.
what is this supposed to be doing?

Posted: Thu Nov 13, 2008 11:05 am
by Micha
Simon B wrote:

Code: Select all

cp: omitting directory `obj/'
make: *** [after-all] Error 1

$ ls oolite.app
Resources
the last copy is failing - ommitting the directory.
what is this supposed to be doing?
For some reason your GNUmakefile.postamble file appears to have spurios spaces in it.

The copy commands should be:

Code: Select all

cp obj/oolite.app; \
and not:

Code: Select all

cp obj/ oolite.app; \
The 'oolite.app' bit on that line comes from a variable; the relevant line in the GNUstep.postamble file is:

Code: Select all

BINARY=$(OBJC_PROGRAM_NAME)
So make sure that these variables are being set correctly without any leading spaces, both in this file and in the GNUmakefile.

I'm guessing you've modified these files? If not where did you get them from (so that we can fix the problem)?
The simplest solution would be to just revert these files to what they are in the trunk.

Posted: Thu Nov 13, 2008 9:36 pm
by beeze
Tonight I installed 'stock' 8.10 Ubuntu on my vmware-workstation (virtual machine). This version was 32bit:-

Code: Select all

patb@patb-vm32:/usr/local/src/oolite/trunk/oolite.debug$ uname -a
Linux patb-vm32 2.6.27-7-generic #1 SMP Fri Oct 24 06:42:44 UTC 2008 i686 GNU/Linux
Using Micha's guide above, I managed to compile the Trunk without any errors :?

After installing oolite-data 1.72, the game ran without a problem.

Posted: Thu Nov 13, 2008 10:06 pm
by Simon B
The files were obtained by svn ... this is a trunk build, updated last night.
I have not modified the GNUmakefile
I have modified the postamble - but only the if-fi at the start...
The modification just adds a SHAREDOBJ variable.
Binary is being set correctly there.

Line 26 in the GNUmakefile says:

OBJC_PROGRAM_NAME = oolite

changing to

OBJC_PROGRAM_NAME=oolite

fixes the problem - thanks.

Posted: Mon Dec 01, 2008 10:45 am
by tinker
Simon B wrote:
The files were obtained by svn ... this is a trunk build, updated last night.
I have not modified the GNUmakefile
I have modified the postamble - but only the if-fi at the start...
The modification just adds a SHAREDOBJ variable.
Binary is being set correctly there.

Line 26 in the GNUmakefile says:

OBJC_PROGRAM_NAME = oolite

changing to

OBJC_PROGRAM_NAME=oolite

fixes the problem - thanks.
I have the same error though I d/l the files from http://download.berlios.de/oolite-linux ... 72.tar.bz2 as I cannot get svn to work via my proxy server. The only mod I made was the usual beginning lines of the postamble. Changing line 26 in the GNUmakefile from

OBJC_PROGRAM_NAME = oolite

to

OBJC_PROGRAM_NAME=oolite

does not solve the problem.

Looking at the postamble file

Code: Select all

if test -d obj; then \
	  $(CP) obj/$(BINARY) $(PROGDIR); \
	else \
	  if test -d shared_debug_obj; then \
	    $(CP) shared_debug_obj/$(BINARY) $(PROGDIR); \
	  else \
	    $(CP) shared_obj/$(BINARY) $(PROGDIR); \
There does not seem to be any line

Code: Select all

BINARY=$(OBJC_PROGRAM_NAME)
as Micha said there is.