Source-Problems (svn)

For discussion of ports to POSIX based systems, especially using GNUStep.

Moderators: winston, another_commander, Getafix

Post Reply
Cobra-x
Poor
Poor
Posts: 6
Joined: Sat Jun 17, 2006 4:02 pm
Location: Germany
Contact:

Source-Problems (svn)

Post by Cobra-x »

Hello - I will build the Binary , but make will not to do :/
1.) the SVN/trunk are incomplete ?
  • > ls
    Asset Source deps FreeDesktop GNUmakefile.postamble Oolite-importer OSX-SDL Resources tools
    autopackage Doc GNUmakefile installers Oolite.xcodeproj README.txt src
    >
a make say 2 Files not found (
GNUmakefile:1: /common.make & GNUmakefile:26: /objc.make ) and stopped on /objc.make ( no rule )

and in the source from oolite-src-1.62-5.tar.gz almost same ->

GNUmakefile:1: /common.make & GNUmakefile:13: /application.make file not found
application.make has no rule - Stopped

have any an idea, what i make wrong ?
User avatar
winston
Pirate
Pirate
Posts: 731
Joined: Mon Sep 27, 2004 10:21 pm
Location: Port St. Mary, Isle of Man
Contact:

Post by winston »

You need to install at least GNUstep Make and GNUstep Base (development).

If your distro packages GNUstep, you can do it that way. Alternately, go to http://www.gnustep.org and download GNUstep Make and GNUstep Base. You'll need to install Make first, then Base.

If you've already done this, then your environment is not set correctly. You need to put this in your .bashrc (or equivalent if using a different shell)

Code: Select all

. /usr/GNUstep/System/Library/Makefiles/GNUstep.sh
and the next shell you open will be set up correctly.
Cobra-x
Poor
Poor
Posts: 6
Joined: Sat Jun 17, 2006 4:02 pm
Location: Germany
Contact:

Post by Cobra-x »

ok that "bug its fixed .. but

Code: Select all

src/Core/vector.h:64: error: syntax error before 'GLfloat'
src/Core/vector.h:64: warning: no semicolon at end of struct or union
src/Core/vector.h:65: warning: data definition has no type or storage class
src/Core/vector.h:66: error: syntax error before 'z'

[......]

src/Core/vector.c: At top level:
src/Core/vector.c:768: error: syntax error before 'GLfloat'
src/Core/vector.c: In function 'lineCubeIntersection':
src/Core/vector.c:774: error: 'v0' undeclared (first use in this function)
src/Core/vector.c:774: error: 'rd' undeclared (first use in this function)
src/Core/vector.c:776: error: 'v1' undeclared (first use in this function)
make[1]: *** [shared_obj/vector.o] Fehler 1
make: *** [oolite.all.objc-program.variables] Fehler 2
in the actual svn
User avatar
winston
Pirate
Pirate
Posts: 731
Joined: Mon Sep 27, 2004 10:21 pm
Location: Port St. Mary, Isle of Man
Contact:

Post by winston »

When you see syntax errors for OpenGL stuff it's because you don't have the header files for OpenGL development. Your distro will have these - search your distro's repository then use yum or apt to install the appropriate packages. Don't forget the SDL development stuff too.
Cobra-x
Poor
Poor
Posts: 6
Joined: Sat Jun 17, 2006 4:02 pm
Location: Germany
Contact:

Post by Cobra-x »

OK - OpenGL has failed - but yet ?

but SDL its installd - and the source will not them .... >

Code: Select all

jmarco@cpu1:~/Projekte/CVS/oolite> make
Making all for objc_program oolite...
 Compiling file src/SDL/Comparison.m ...
In file included from src/SDL/Comparison.m:45:
src/SDL/Comparison.h:48:33: error: Foundation/NSObject.h: File not found
In file included from src/SDL/Comparison.m:45:
src/SDL/Comparison.h:70: error: cannot find interface declaration for 'NSObject'
make[1]: *** [shared_obj/Comparison.o] Fehler 1
make: *** [oolite.all.objc-program.variables] Fehler 2
jmarco@cpu1:~/Projekte/CVS/oolite> rpm -q SDL-devel
SDL-devel-1.2.8-8
jmarco@cpu1:~/Projekte/CVS/oolite> rpm -q SDL
SDL-1.2.8-8
jmarco@cpu1:~/Projekte/CVS/oolite> dir src/SDL/Comp*
-rw-r--r--  1 jmarco users 3964 2006-06-17 17:30 src/SDL/Comparison.h
-rw-r--r--  1 jmarco users 2212 2006-06-17 17:30 src/SDL/Comparison.m
jmarco@cpu1:~/Projekte/CVS/oolite> locate Foundation/NSObj
/home/jmarco/Projekte/CVS/gnustep-base/Headers/Foundation/NSObjCRuntime.h
/home/jmarco/Projekte/CVS/gnustep-base/Headers/Foundation/NSObject.h
marco@cpu1:~/Projekte/CVS/oolite> rpm -q gnustep-make
gnustep-make-1.10.0-1mdk
jmarco@cpu1:~/Projekte/CVS/oolite> rpm -q gnustep-base
gnustep-base-1.10.2-1mdk
SDL and SDL-devel are installed ( see rpm -query ) - and the only error what i can see its a file not found ....

and gnustep its installed,the cvs data are not relevant ...
User avatar
winston
Pirate
Pirate
Posts: 731
Joined: Mon Sep 27, 2004 10:21 pm
Location: Port St. Mary, Isle of Man
Contact:

Post by winston »

Code: Select all

src/SDL/Comparison.h:48:33: error: Foundation/NSObject.h: File not found 
That's the root of your current problem: no GNUstep Base development kit - or at least, it can't be found.

Generally, look for the first error and start there. Often, the first error will cascade into thousands of other build errors - so start at the beginning and work your way through. Don't be distracted by errors further down the build log 'till you've solved the first error that prints out.
Cobra-x
Poor
Poor
Posts: 6
Joined: Sat Jun 17, 2006 4:02 pm
Location: Germany
Contact:

Post by Cobra-x »

winston wrote:
Generally, look for the first error and start there. Often, the first error will cascade into thousands of other build errors - so start at the beginning and work your way through. Don't be distracted by errors further down the build log 'till you've solved the first error that prints out.
ok - i have yet gnustep and SDL komplete reinstalled - but this error stops me too. (before and after reinstall SDL)

Code: Select all

jmarco@cpu1:~/Projekte/CVS/oolite> make
Making all for objc_program oolite...
 Compiling file src/Core/AI.m ...
In file included from src/Core/PlayerEntity.h:44,
                 from src/Core/entities.h:43,
                 from src/Core/AI.h:42,
                 from src/Core/AI.m:40:
src/SDL/SDLImage.h:12:23: error: SDL_image.h: File not found
make[1]: *** [shared_obj/AI.o] Error 1
make: *** [oolite.all.objc-program.variables] Error 2

jmarco@cpu1:~/Projekte/CVS/oolite> dir src/SDL/SDL*
-rw-r--r--  1 jmarco users  438 2006-06-17 12:10 src/SDL/SDLImage.h
-rw-r--r--  1 jmarco users  449 2006-06-17 12:10 src/SDL/SDLImage.m
-rw-r--r--  1 jmarco users 1020 2006-06-17 12:10 src/SDL/SDLMusic.h
-rw-r--r--  1 jmarco users 4433 2006-06-17 12:10 src/SDL/SDLMusic.m
-rw-r--r--  1 jmarco users  882 2006-06-17 12:10 src/SDL/SDLSound.h
-rw-r--r--  1 jmarco users 2844 2006-06-17 12:10 src/SDL/SDLSound.m
jmarco@cpu1:~/Projekte/CVS/oolite> dir shared_obj/AI*
-rw-r--r--  1 jmarco users 0 2006-06-21 07:52 shared_obj/AI.d
jmarco@cpu1:~/Projekte/CVS/oolite> dir src/Core/AI*
-rw-r--r--  1 jmarco users  2357 2006-06-17 17:30 src/Core/AI.h
-rw-r--r--  1 jmarco users 11214 2006-06-17 17:30 src/Core/AI.m
jmarco@cpu1:~/Projekte/CVS/oolite> locate AI.o
jmarco@cpu1:~/Projekte/CVS/oolite>
AI.o is not really a file from SDL or gnustep - and not in any package from oolite (i have downloaded the complete tree, not only trunk :oops:)

and thats all Information, who i become when i run make - sorry :(
magamo
Competent
Competent
Posts: 45
Joined: Sat Feb 25, 2006 7:07 pm

Post by magamo »

Cobra-x wrote:
ok - i have yet gnustep and SDL komplete reinstalled - but this error stops me too. (before and after reinstall SDL)

Code: Select all

jmarco@cpu1:~/Projekte/CVS/oolite> make
Making all for objc_program oolite...
 Compiling file src/Core/AI.m ...
In file included from src/Core/PlayerEntity.h:44,
                 from src/Core/entities.h:43,
                 from src/Core/AI.h:42,
                 from src/Core/AI.m:40:
src/SDL/SDLImage.h:12:23: error: SDL_image.h: File not found
make[1]: *** [shared_obj/AI.o] Error 1
make: *** [oolite.all.objc-program.variables] Error 2
AI.o is not really a file from SDL or gnustep - and not in any package from oolite (i have downloaded the complete tree, not only trunk :oops:)

and thats all Information, who i become when i run make - sorry :(
I snipped your code segment for brevity. SDL_image.h is a header file provided by the SDL_image library package. AI.o is the file you're attempting to build, that is failing. Since it couldn't compile without the aforementioned header, it doesn't exist when you try and find it later.

Also, one thing to keep in mind is that the 'locate' command depends on a user-updated database of files in your filesystem. If you want to find something newer than the latest database update, you can either run 'updatedb' to update it, or use the 'find' command (check out 'man find', lots of different options to this one.

However, to be specific on what you're looking for here, you want to use 'find . -name AI.o', executed from the toplevel of the Oolite source tree)

Now, back to the crux of the issue (It's nearing 3am my time, and I'm being a little random) many distributions will include SDL_image within their main SDL package, some don't. Some may not even have a package for SDL_image at all.

I'd verify that it gets installed with the SDL package (A good place to start looking for the header file is /usr/include/SDL, or /usr/X11R6/include/SDL, or in rare [somewhat broken] occasions, or if you installed SDL and SDL_image manually from source, /usr/local/include/SDL)

If SDL_image.h doesn't exist in any of those places, but SDL is installed, I'd suggest either looking for an SDL_image package for your distribution. (don't forget any appropriate -devel packages!) Or alternatively, build SDL_image yourself. I'd suggest, if you go this route, to install it with the same --prefix as SDL (Most program's configure scripts can handle SDL and SDL_image being in separate prefixes, however, some can't.) it's a simple './configure && make && make install' process.
User avatar
winston
Pirate
Pirate
Posts: 731
Joined: Mon Sep 27, 2004 10:21 pm
Location: Port St. Mary, Isle of Man
Contact:

Post by winston »

Check you have all of these:

SDL
SDL_image <--- you are missing this
SDL_mixer <--- if you don't have SDL_image I bet you don't have SDL_mixer either
GNUstep Make <--- You're definitely OK here
GNUstep Base <---- From the last output it looks like you're OK here
OpenGL (libopengl32 and libglu32)
Cobra-x
Poor
Poor
Posts: 6
Joined: Sat Jun 17, 2006 4:02 pm
Location: Germany
Contact:

Post by Cobra-x »

Hm installed of the SDL - Packages are correct and complete

Code: Select all

jmarco@cpu1:~/Projekte/CVS/oolite> rpm -q SDL
SDL-1.2.10-1
jmarco@cpu1:~/Projekte/CVS/oolite> rpm -q SDL_mixer
SDL_mixer-1.2.6-3
jmarco@cpu1:~/Projekte/CVS/oolite> rpm -q SDL_image
SDL_image-1.2.4-2
jmarco@cpu1:~/Projekte/CVS/oolite> locate /SDL_image
but .. what i found (eventually have my distri thats renamed ... )??

Code: Select all

jmarco@cpu1:~/Projekte/CVS/oolite> locate /SDL_image
/usr/include/SDL/SDL_imageFilter.h
SDL and SDL Devel have i installed from the http://www.libsdl.org
- And the Packages for Image / Mixer from my Distri
magamo
Competent
Competent
Posts: 45
Joined: Sat Feb 25, 2006 7:07 pm

Post by magamo »

Cobra-x wrote:
Hm installed of the SDL - Packages are correct and complete

Code: Select all

jmarco@cpu1:~/Projekte/CVS/oolite> rpm -q SDL
SDL-1.2.10-1
jmarco@cpu1:~/Projekte/CVS/oolite> rpm -q SDL_mixer
SDL_mixer-1.2.6-3
jmarco@cpu1:~/Projekte/CVS/oolite> rpm -q SDL_image
SDL_image-1.2.4-2
jmarco@cpu1:~/Projekte/CVS/oolite> locate /SDL_image
but .. what i found (eventually have my distri thats renamed ... )??

Code: Select all

jmarco@cpu1:~/Projekte/CVS/oolite> locate /SDL_image
/usr/include/SDL/SDL_imageFilter.h
SDL and SDL Devel have i installed from the http://www.libsdl.org
- And the Packages for Image / Mixer from my Distri
You may still need to install the -devel packages for SDL_image. I'd check that you have those in.

Times like this, I'm thankful that I run Slackware. There's none of this -devel package mess. :)
User avatar
winston
Pirate
Pirate
Posts: 731
Joined: Mon Sep 27, 2004 10:21 pm
Location: Port St. Mary, Isle of Man
Contact:

Post by winston »

What happens if you type "locate SDL_image.h" ? That's the one it's whining about. (IGNORE results that are in the OS X Backport directory).

If you installed from source, it could be that the development kit simply isn't in the include path. You can either rebuild with ./configure --prefix=/usr to stick everything in /usr/include, /usr/lib etc. or alter the GNUmakefile to add the include path. So for example, if SDL_image.h turns out to be in /foo/bar/baz/include/SDL/SDL_image.h

Then change this line in GNUmakefile:

Code: Select all

        ADDITIONAL_INCLUDE_DIRS = -Isrc/SDL -Isrc/Core -Isrc/BSDCompat
to this:

Code: Select all

        ADDITIONAL_INCLUDE_DIRS = -Isrc/SDL -Isrc/Core -Isrc/BSDCompat -I/foo/bar/baz/include
You may need to do something similar for libraries. NOTE there are two sets of include dirs - one for the Windows build and one for the Unix/Linux build. Make sure you get the right one (i.e. the one in the 'else' clause of the 'ifeq').
Cobra-x
Poor
Poor
Posts: 6
Joined: Sat Jun 17, 2006 4:02 pm
Location: Germany
Contact:

Post by Cobra-x »

hmm
ADDITIONAL_INCLUDE_DIRS = -Isrc/SDL -Isrc/Core -Isrc/BSDCompat -I/usr/lib
not others

Code: Select all

[.....]
/usr/lib/gcc/i586-suse-linux/4.0.2/../../../libSDL_image.a(IMG_png.o): In function `IMG_LoadPNG_RW':
: undefined reference to `png_read_image'
/usr/lib/gcc/i586-suse-linux/4.0.2/../../../libSDL_image.a(IMG_png.o): In function `IMG_LoadPNG_RW':
: undefined reference to `png_get_tRNS'
/usr/lib/gcc/i586-suse-linux/4.0.2/../../../libSDL_image.a(IMG_png.o): In function `IMG_LoadPNG_RW':
: undefined reference to `png_set_expand'
/usr/lib/gcc/i586-suse-linux/4.0.2/../../../libSDL_image.a(IMG_png.o): In function `IMG_LoadPNG_RW':
: undefined reference to `png_set_gray_to_rgb'
/usr/lib/gcc/i586-suse-linux/4.0.2/../../../libSDL_image.a(IMG_png.o): In function `IMG_LoadPNG_RW':
: undefined reference to `png_set_expand'
collect2: ld returned 1 exit status
make[1]: *** [shared_obj/oolite] Fehler 1
make: *** [oolite.all.objc-program.variables] Fehler 2
jmarco@cpu1:~/Projekte/CVS/oolite> 
then have i change them :
oolite_LIB_DIRS += -L/usr/X11R6/lib/
to
oolite_LIB_DIRS += -L/usr/X11R6/lib/ -L/usr/lib

good - the messages for errors changes a little ....

Code: Select all

jmarco@cpu1:~/Projekte/CVS/oolite> make
Making all for objc_program oolite...
 Linking objc_program oolite ...
/usr/lib/libSDL_mixer.a(music.o): In function `music_internal_position':
: undefined reference to `Player_SetPosition'
/usr/lib/libSDL_mixer.a(music.o): In function `music_internal_volume':
: undefined reference to `Player_SetVolume'
/usr/lib/libSDL_mixer.a(music.o): In function `open_music':
: undefined reference to `md_mode'
[....]
: undefined reference to `png_set_expand'
/usr/lib/libSDL_image.a(IMG_png.o): In function `IMG_LoadPNG_RW':
: undefined reference to `png_set_gray_to_rgb'
/usr/lib/libSDL_image.a(IMG_png.o): In function `IMG_LoadPNG_RW':
: undefined reference to `png_set_expand'
collect2: ld returned 1 exit status
make[1]: *** [shared_obj/oolite] Fehler 1
make: *** [oolite.all.objc-program.variables] Fehler 2
jmarco@cpu1:~/Projekte/CVS/oolite>
User avatar
winston
Pirate
Pirate
Posts: 731
Joined: Mon Sep 27, 2004 10:21 pm
Location: Port St. Mary, Isle of Man
Contact:

Post by winston »

There are still some libraries that are missing. You'll have to Google where they come from I'm afraid if there's no "File not found" errors (Google the error message, it will probably tell you the library its from).
Post Reply