Jump to content
Eternal Lands Official Forums
Sign in to follow this  
Tanyia

Ubuntu compiling help [CLOSED]

Recommended Posts

I hope you don't mind me asking this on this thread. If so, no worries, I'll make a general thread about it. I just say this because I'm using Ubuntu Dapper Drake. I was able to get EL to compile before (months ago), but not now.

 

So, I followed your directions exactly, and came up with the following issues.

 

1.) The apt-get step--here's my output.

 

afonger@afonger-desktop:~$ sudo apt-get -y install cvs libbz2-dev zlib1g-dev libgdbm-dev libxml2-dev libsdl1.2-dev libsdl-ttf2.0-dev xlibmesa-gl-dev freeglut3-dev vorbis-tools libopenal-dev libsdl-image1.2-dev libsdl-net1.2-dev libxml-dev libalut-dev libvorbis-dev libcal3d11-dev libalut-dev g++

 

Reading package lists... Done

Building dependency tree... Done

cvs is already the newest version.

zlib1g-dev is already the newest version.

libxml2-dev is already the newest version.

libsdl1.2-dev is already the newest version.

Package xlibmesa-gl-dev is not available, but is referred to by another package.

This may mean that the package is missing, has been obsoleted, or

is only available from another source

However the following packages replace it:

x11proto-gl-dev

E: Package xlibmesa-gl-dev has no installation candidate

 

Am I missing a library? If so, any way to get it without upgrading to FF? Or someway to get around this?

 

2.) Here's what happened when I tried to compile, ignoring the issue above (if it is indeed an issue):

 

afonger@afonger-desktop:~/elcvs/elc$ make -f Makefile.linux~

gcc -march=i686 -Wall -O -ggdb -pipe -DLINUX -DELC -DPNG_SCREENSHOT -DUSE_FRAMEBUFFER -DNEW_FRUSTUM -DBUG_FIX_3D_OBJECTS_MIN_MAX -DNEW_TEX -DOPTIONS_I18N -DATI_9200_FIX -DNEW_ACTOR_ANIMATION -DAUTO_UPDATE -DCOUNTERS -DFONTS_FIX -I/usr/local/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/include/libxml2 -c -o 2d_objects.o 2d_objects.c

In file included from 2d_objects.c:7:

global.h:74:21: error: SDL_net.h: No such file or directory

In file included from global.h:114,

from 2d_objects.c:7:

multiplayer.h:20: error: syntax error before ‘my_socket’

multiplayer.h:20: warning: type defaults to ‘int’ in declaration of ‘my_socket’

multiplayer.h:20: warning: data definition has no type or storage class

multiplayer.h:67: error: syntax error before ‘my_socket’

multiplayer.h:69: error: syntax error before ‘my_socket’

2d_objects.c: In function ‘display_2d_objects’:

2d_objects.c:669: warning: unused variable ‘dist’

make: *** [2d_objects.o] Error 1

 

Compiling with Makefile.linux did not work at all. The error was

 

afonger@afonger-desktop:~/elcvs/elc$ make -f Makefile.linux

Makefile.linux:7: *** missing separator. Stop.

 

 

Any help would be greatly appreciated. Thanks for making a guide for us! :P

Edited by Tanyia

Share this post


Link to post
Share on other sites

sometimes package names change over time, or between distros... try installing the package listed as a replacement instead, x11proto-gl-dev (as well as the rest of the installs, as you're missing libsdl-net1.2-dev when you try to compile)... but check how much more it would want to upgrade at the same time... depending on how it's all set up, that upgrade may require dozens of other packages to be updated (which is probably a bad thing)

Edited by ttlanhil

Share this post


Link to post
Share on other sites

Ok, got x11proto-gl-dev, thanks. I was assuming it installed in instead.

 

As for libsdl-net1.2-dev, according to Synaptic I already have it. Do I need to link something in?

Share this post


Link to post
Share on other sites

ooh, waitamin...

-I/usr/local/include/SDL
okay, I think this is the problem... did you, at one stage, compile and install SDL from source?

if it were using the one installed by ubuntu, that should have been -I/usr/include/SDL or similar (local is for things the user adds, not the distro).

and since sdl-net is probably in /usr/include/SDL , that'd explain why it's not being found

afonger@afonger-desktop:~/elcvs/elc$ make -f Makefile.linux

Makefile.linux:7: *** missing separator. Stop.

mrh? okay, what's the difference between Makefile.linux and Makefile.linux~ ?
diff -u Makefile.linux Makefile.linux~

or between Makefile.linux and what's in CVS

cvs diff -u Makefile.linux

Share this post


Link to post
Share on other sites

okay, I think this is the problem... did you, at one stage, compile and install SDL from source?

if it were using the one installed by ubuntu, that should have been -I/usr/include/SDL or similar (local is for things the user adds, not the distro).

and since sdl-net is probably in /usr/include/SDL , that'd explain why it's not being found

Ahh yes, you're right, I did a little while ago, and I totally forgot about it. How do I fix it to point to the right location?

 

cvs diff -u Makefile.linux yields:

 

Index: Makefile.linux
===================================================================
RCS file: /cvsroot/elc/elc/Makefile.linux,v
retrieving revision 1.180
diff -u -u -r1.180 Makefile.linux
--- Makefile.linux	  5 Apr 2007 07:46:24 -0000	   1.180
+++ Makefile.linux	  30 Apr 2007 15:50:38 -0000
@@ -4,6 +4,18 @@

# basic compiling and linking - rarely changed
OPTIONS = -DLINUX -DELC $(foreach FEATURE, $(FEATURES), -D$(FEATURE))
+<<<<<<< Makefile.linux
+CFLAGS=$(PLATFORM) $(CWARN) -O0 -ggdb -pipe $(OPTIONS) $(shell sdl-config --cflags) $(shell xml2-config --cflags)
+_CFLAGS=$(PLATFORM) -O2 -fomit-frame-pointer -ffast-math -pipe $(OPTIONS) $(shell sdl-config --cflags) $(shell xml2-config --cflags)
+CXXFLAGS=$(PLATFORM) $(CXXWARN) -O0 -ggdb -pipe $(OPTIONS)
+_CXXFLAGS=$(PLATFORM) -O2 -fomit-frame-pointer -ffast-math -pipe $(OPTIONS)
+
+<<<<<<< Makefile.linux
+LDFLAGS=$(shell sdl-config --libs) $(shell xml2-config --libs) -lSDL_net -lopenal $(XDIR) -lGL -lGLU -lvorbis -lvorbisfile -lcal3d -lm -lpng -lalut
+=======
+LDFLAGS=$(shell sdl-config --libs) $(shell xml2-config --libs) -lSDL_net -lopenal $(XDIR) -lGL -lGLU -lvorbis -lvorbisfile -lcal3d -lm -lpng $(EXTRA_LIBS)
+>>>>>>> 1.159
+=======
CFLAGS=$(PLATFORM) $(CWARN) -O0 -ggdb -pipe $(OPTIONS) $(shell sdl-config --cflags) $(shell xml2-config --cflags) -fno-strict-aliasing $(EXTRA_INCLUDES)
_CFLAGS=$(PLATFORM) -O2 -fomit-frame-pointer -ffast-math -pipe $(OPTIONS) $(shell sdl-config --cflags) $(shell xml2-config --cflags) -fno-strict-aliasing $(EXTRA_INCLUDES)
CXXFLAGS=$(PLATFORM) $(CXXWARN) -O0 -ggdb -pipe $(OPTIONS) $(shell sdl-config --cflags) $(shell xml2-config --cflags) -fno-strict-aliasing $(EXTRA_INCLUDES)
@@ -14,6 +26,7 @@
PNG_SCREENSHOT_LIBS = -lpng
LDFLAGS=$(shell sdl-config --libs) $(shell xml2-config --libs) -lSDL_net -lopenal $(XDIR) -lGL -lGLU -lvorbis -lvorbisfile -lcal3d -lm $(EXTRA_LIBS) -lalut \
	$(foreach FEATURE, $(FEATURES), $($(FEATURE)_LIBS))
+>>>>>>> 1.180
_LDFLAGS=$(XDIR) -lGL -lpthread -lz
STATICLIBS=libs/libSDL_net.a libs/libSDL.a libs/libSDL_image.a libs/libopenal.a libs/libvorbisfile.a libs/libvorbis.a libs/libogg.a libs/libxml2.a libs/libcal3d.a libs/libpng.a libs/libasound.a $(EXTRA_STATICLIBS)

Edited by Tanyia

Share this post


Link to post
Share on other sites

go to wherever you compiled and installed SDL from, and do 'make uninstall', then force a reinstall of SDL in synaptic or whichever.

this should restore your system to using the distro's SDL

 

as for the makefile... it looks like it's been updated, had a conflict, and updated again... ouch... well, these days there isn't any need to edit the makefiles (all the configuration should be in make.conf), so you can delete it and 'cvs up' to get a new one.

and then, if you want, 'ln -s Makefile.linux Makefile' and then you can just use 'make' instead of 'make -f Makefile.linux'

Share this post


Link to post
Share on other sites

Did all of the above, and got this when I tried to compile:

 

afonger@afonger-desktop:~/elcvs/elc$ make

make: *** No rule to make target `/usr/local/include/SDL/SDL.h', needed by `2d_objects.o'. Stop.

 

I guess that means it did not restore it? Just to clarify, I removed the -dev version and reinstalled it, then I marked both the -dev and non dev versions for reinstallation.

Share this post


Link to post
Share on other sites

nope, it's still pointing to local... uhh... what does 'sdl-config --cflags' give? (on the other hand, the lack of target thing is messed up)

does your Makefile.linux~ work after the lib upgrade?

and is there a mod who could split this thread to help-me or something? :) it's not so much on-topic for a guide

Share this post


Link to post
Share on other sites

afonger@afonger-desktop:~/elcvs/elc$ sdl-config --cflags
-I/usr/include/SDL -D_REENTRANT

 

Makefile.linux and Makefile.linux~ give the same error.

Share this post


Link to post
Share on other sites

Ok...improvement...maybe... So, Placid's suggestion didn't work either (it was still pointing to /usr/local/include/SDL), so I removed the /usr/local/include/SDL folder (which was empty anyway) and made a symbolic link to /usr/include/SDL. Now it is missing this file:

 

afonger@afonger-desktop:~/elcvs/elc$ make
make: *** No rule to make target `/usr/local/include/SDL/SDL_stdinc.h', needed by `2d_objects.o'.  Stop.

 

So at least it's looking in the right place now (because it found SDL.h).

Share this post


Link to post
Share on other sites

give the output of:

which sdl-config

I bet it says /usr/local/bin/sdl-config rather then /usr/bin/sdl-config.

 

Ooooooooooh and of course linux with gmake uses dependencies :P

rm -f .depend

Edited by RallosZek

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×