Can't compile under opensuse 11.2 64-bit

Help regarding development/scripting, troubleshooting or just general gameplay -- anything that hasn't already been answered in the Wiki or pinned FAQs.

Moderator: Developers

ns89
Acid Blob (New member)
Acid Blob (New member)
Posts: 18
Joined: Sun Aug 15, 2010 2:05 am

Can't compile under opensuse 11.2 64-bit

Post by ns89 »

When I try to compile from the svn trunk in the game directory with make -f Makefile.unix I get

Code: Select all

[CC] camera.c -> camera.o
In file included from camera.c:29:
Client.h:28:23: error: enet/enet.h: No such file or directory
In file included from Client.h:29,
                 from camera.c:29:
Network.h:42: error: expected declaration specifiers or ‘...’ before ‘ENetEvent’
Network.h:185: error: expected specifier-qualifier-list before ‘ENetAddress’
Network.h:194: error: expected declaration specifiers or ‘...’ before ‘ENetEvent’
Network.h:221: error: expected specifier-qualifier-list before ‘ENetPeer’
Network.h:240: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
Network.h:241: error: expected declaration specifiers or ‘...’ before ‘ENetPeer’
Network.h:250: error: expected specifier-qualifier-list before ‘ENetAddress’
Network.h:287: error: expected declaration specifiers or ‘...’ before ‘ENetPeer’
Network.h:305: error: expected specifier-qualifier-list before ‘ENetHost’
Network.h:375: error: expected specifier-qualifier-list before ‘ENetPacket’
Network.h:408: error: expected declaration specifiers or ‘...’ before ‘ENetEvent’
Network.h:409: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
Network.h:410: error: expected declaration specifiers or ‘...’ before ‘ENetPeer’
In file included from Client.h:29,
                 from camera.c:29:
Network.h:412: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
Network.h:413: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
Network.h:414: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
Network.h:418: error: expected ‘)’ before ‘*’ token
Network.h:419: error: expected ‘)’ before ‘*’ token
Network.h:421: error: expected declaration specifiers or ‘...’ before ‘ENetPeer’
Network.h:429: error: expected declaration specifiers or ‘...’ before ‘ENetPeer’
Network.h:434: error: expected ‘)’ before ‘*’ token
Network.h:435: error: expected ‘)’ before ‘*’ token
Network.h:447: error: expected ‘)’ before ‘*’ token
Network.h:450: error: expected ‘)’ before ‘*’ token
In file included from camera.c:29:
Client.h:76: error: expected specifier-qualifier-list before ‘ENetPeer’
Client.h:140: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
Client.h:161: error: expected declaration specifiers or ‘...’ before ‘ENetEvent’
camera.c: In function ‘cam_move’:
camera.c:281: error: ‘struct sClient’ has no member named ‘loc_pla_count’
camera.c:284: error: ‘struct sClient’ has no member named ‘loc_pla_count’
camera.c:289: error: ‘struct sClient’ has no member named ‘loc_pla_count’
camera.c:292: error: ‘struct sClient’ has no member named ‘loc_pla_count’
camera.c:297: error: ‘struct sClient’ has no member named ‘loc_pla_count’
camera.c:300: error: ‘struct sClient’ has no member named ‘loc_pla_count’
camera.c:303: error: ‘struct sClient’ has no member named ‘loc_pla_count’
camera.c:309: error: ‘struct sClient’ has no member named ‘loc_pla_count’
camera.c:310: error: ‘struct sClient’ has no member named ‘loc_pla_count’
camera.c:322: error: ‘struct sClient’ has no member named ‘loc_pla_count’
camera.c:323: error: ‘struct sClient’ has no member named ‘loc_pla_count’
camera.c:335: error: ‘struct sClient’ has no member named ‘loc_pla_count’
camera.c:336: error: ‘struct sClient’ has no member named ‘loc_pla_count’
camera.c:348: error: ‘struct sClient’ has no member named ‘loc_pla_count’
camera.c:354: error: ‘struct sClient’ has no member named ‘loc_pla_count’
camera.c:360: error: ‘struct sClient’ has no member named ‘loc_pla_count’
camera.c:365: error: ‘struct sClient’ has no member named ‘loc_pla_count’
make: *** [camera.o] Error 1
And when I try to run it like make -f ./game/Makefile.unix I get:

Code: Select all

make: *** No rule to make target `test/test_sdl.c', needed by `test_sdl.o'.  Stop.
User avatar
Zefz
Squirrel Knight (Administrator)
Squirrel Knight (Administrator)
Posts: 3820
Joined: Wed Jul 23, 2008 1:27 am
Location: Norway
Contact:

Post by Zefz »

You need to makefile in the Egoboo directory and not just in the Game directory so that Egoboo compiles Enet as well? (Enet is a network library that Egoboo uses and requires to compile)
ns89
Acid Blob (New member)
Acid Blob (New member)
Posts: 18
Joined: Sun Aug 15, 2010 2:05 am

Post by ns89 »

Zefz wrote:You need to makefile in the Egoboo directory and not just in the Game directory so that Egoboo compiles Enet as well? (Enet is a network library that Egoboo uses and requires to compile)
Well, when I try that I get:

Code: Select all

make -f Makefile.unix 
make -C enet
make[1]: Entering directory `~/src/egoboo/trunk/enet'
make[1]: *** No targets specified and no makefile found.  Stop.
make[1]: Leaving directory `~/src/egoboo/trunk/enet'
make: *** [all] Error 2
I've also tried to do a configure first but it seems to be broken ATM

Code: Select all

checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking for library containing strerror... none required
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for EGOBOO... yes
checking for IMG_Load            in -lSDL_image... yes
checking for Mix_Linked_Version  in -lSDL_mixer... yes
checking for TTF_Linked_Version  in -lSDL_ttf  ... yes
configure: creating ./config.status
.in'ig.status: error: cannot find input file: `
User avatar
Zefz
Squirrel Knight (Administrator)
Squirrel Knight (Administrator)
Posts: 3820
Joined: Wed Jul 23, 2008 1:27 am
Location: Norway
Contact:

Post by Zefz »

There is a makefile in my enet folder. Are you using the following SVN?
https://egoboo.svn.sourceforge.net/svnr ... ches/2.6.x

It seemed like you were trying to compile something in the Trunk, where the old discontinued branch of Egoboo is.
ns89
Acid Blob (New member)
Acid Blob (New member)
Posts: 18
Joined: Sun Aug 15, 2010 2:05 am

Post by ns89 »

Zefz wrote:There is a makefile in my enet folder. Are you using the following SVN?
https://egoboo.svn.sourceforge.net/svnr ... ches/2.6.x

It seemed like you were trying to compile something in the Trunk, where the old discontinued branch of Egoboo is.
:oops: I thought trunk was where the latest was stored, at least it normally is on most SVNs.
ns89
Acid Blob (New member)
Acid Blob (New member)
Posts: 18
Joined: Sun Aug 15, 2010 2:05 am

a new problem

Post by ns89 »

Of course now I get:

Code: Select all

/usr/lib64/gcc/x86_64-suse-linux/4.4/../../../../x86_64-suse-linux/bin/ld: cannot find -lenet
collect2: ld returned 1 exit status
make[1]: *** [egoboo-2.x] Error 1
make[1]: Leaving directory `~/src/egoboo/branches/2.6.x/game'
make: *** [egoboo] Error 2
When I try make all from /egoboo/branches/2.6.x/ :(
User avatar
penguinflyer5234
Sheep (Developer)
Sheep (Developer)
Posts: 3025
Joined: Wed Jul 23, 2008 1:39 am
Location: Best Southwest

Post by penguinflyer5234 »

for some odd reason you have to cd to enet and then make there for it to work, dunno why
...
ns89
Acid Blob (New member)
Acid Blob (New member)
Posts: 18
Joined: Sun Aug 15, 2010 2:05 am

Post by ns89 »

penguinflyer5234 wrote:for some odd reason you have to cd to enet and then make there for it to work, dunno why
And then we get this:

Code: Select all

gcc -Os -Iinclude   -c -o host.o host.c
gcc -Os -Iinclude   -c -o list.o list.c
gcc -Os -Iinclude   -c -o memory.o memory.c
gcc -Os -Iinclude   -c -o packet.o packet.c
gcc -Os -Iinclude   -c -o peer.o peer.c
gcc -Os -Iinclude   -c -o protocol.o protocol.c
gcc -Os -Iinclude   -c -o unix.o unix.c
ar -rcs ./lib/libenet.a host.o list.o memory.o packet.o peer.o protocol.o unix.o
ar: ./lib/libenet.a: No such file or directory
make: *** [all] Error 1
ns89
Acid Blob (New member)
Acid Blob (New member)
Posts: 18
Joined: Sun Aug 15, 2010 2:05 am

making some progress

Post by ns89 »

Ok I've made a little progress.
When I do mkdir lib under enet it satisfies it and lets me make libenet.a.
So then I went back to 2.6.x and try make I get:

Code: Select all

egoboo_vfs.o: In function `vfs_add_mount_point':
egoboo_vfs.c:(.text+0x2335): undefined reference to `PHYSFS_mount'
collect2: ld returned 1 exit status
make[1]: *** [egoboo-2.x] Error 1
make[1]: Leaving directory `~/src/egoboo/branches/2.6.x/game'
make: *** [egoboo] Error 2
User avatar
penguinflyer5234
Sheep (Developer)
Sheep (Developer)
Posts: 3025
Joined: Wed Jul 23, 2008 1:39 am
Location: Best Southwest

Post by penguinflyer5234 »

my guess is that you have PhysFS v1.0, you need 2.0 to compile and run Egoboo
...
ns89
Acid Blob (New member)
Acid Blob (New member)
Posts: 18
Joined: Sun Aug 15, 2010 2:05 am

Post by ns89 »

Does it need the library or the header or both? And where does it look for them?
User avatar
penguinflyer5234
Sheep (Developer)
Sheep (Developer)
Posts: 3025
Joined: Wed Jul 23, 2008 1:39 am
Location: Best Southwest

Post by penguinflyer5234 »

both, usually.
But apparently you have the right header since egoboo_vfs.c compiled correctly, but not the library...

I'm pretty sure it only looks in /usr/lib but you should be able to add more places to look by adding -L(location) to LD_FLAGS before it says -lphysfs
...
ns89
Acid Blob (New member)
Acid Blob (New member)
Posts: 18
Joined: Sun Aug 15, 2010 2:05 am

Post by ns89 »

penguinflyer5234 wrote:both, usually.
But apparently you have the right header since egoboo_vfs.c compiled correctly, but not the library...

I'm pretty sure it only looks in /usr/lib but you should be able to add more places to look by adding -L(location) to LD_FLAGS before it says -lphysfs
I had to compile and install Physfs 2.0.1 because there are no builds for it currently on my distro.
And I added -L/usr/lib64 in front of -lphysfs and it seems to have compiled gonna try a make install and cross my fingers. :D
ns89
Acid Blob (New member)
Acid Blob (New member)
Posts: 18
Joined: Sun Aug 15, 2010 2:05 am

Post by ns89 »

Ok, when I try to run it I get:

Code: Select all

Initializing filesystem services...
Game directories are:
        Binaries: /usr/games/
        Data: /usr/share/games/egoboo-2.x/
        User Data: ~/.egoboo-2.x/
        Config Files: /usr/etc/egoboo-2.x/
SDL WARN: Unable to set SDL video mode: Couldn't find matching GLX visual
SDL WARN: Unable to set SDL video mode: Couldn't find matching GLX visual
But no game. :(
User avatar
Zefz
Squirrel Knight (Administrator)
Squirrel Knight (Administrator)
Posts: 3820
Joined: Wed Jul 23, 2008 1:27 am
Location: Norway
Contact:

Post by Zefz »

Ah welcome to the club! It seems most (all?) Linux users are having that problem at the moment. SDL is somehow not setting a video mode Linux likes. We still haven't figured out what this is!
Post Reply