Can't compile from source

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

Moderator: Developers

Post Reply
shoun1234
Acid Blob (New member)
Acid Blob (New member)
Posts: 6
Joined: Fri Dec 09, 2011 8:43 am

Can't compile from source

Post by shoun1234 »

I download source from trunk. But the compilation throws

Code: Select all

char.c:8870:8: error: conflicting types for ‘ChrEnviro_synchronize’
char.c:3163:3: note: previous implicit declaration of ‘ChrEnviro_synchronize’ was here
make: *** [char.o] Error 1
when compiling with make -f Makefile.unix (according to README.Linux)

Do ./autogen.sh from top level throws

Code: Select all

configure: creating ./config.status
.in'ig.status: error: cannot find input file: `
I can't find solution for this on the internet for using search function in this forum.

Also, if compiling 2.6.x version, it complains

Code: Select all

make -C ./game all PREFIX=/usr PROJ_NAME=egoboo-2.x
make[1]: Entering directory `/path/userA/egoboo-2.6.x/game'
make[1]: *** No rule to make target `egoboo_display.o', needed by `egoboo-2.x'.  Stop.
make[1]: Leaving directory `/home/userA/egoboo-2.6.x/game'
make: *** [egoboo] Error 2

How can I compile egoboo from source?

Thanks
User avatar
Zefz
Squirrel Knight (Administrator)
Squirrel Knight (Administrator)
Posts: 3820
Joined: Wed Jul 23, 2008 1:27 am
Location: Norway
Contact:

Re: Can't compile from source

Post by Zefz »

Try the 2.8.x branch instead of the trunk, which is the currently active development branch:
http://egoboo.svn.sourceforge.net/viewv ... hes/2.8.x/
shoun1234
Acid Blob (New member)
Acid Blob (New member)
Posts: 6
Joined: Fri Dec 09, 2011 8:43 am

Re: Can't compile from source

Post by shoun1234 »

After checking out version 2.8.x, compiling with command `make all` it shows

Code: Select all

/usr/bin/libtool: line 1128: gcc-3: command not found
make[1]: *** [bbox.lo] Error 1
Does egoboo use gcc 3?

My gcc version is (Debian 4.6.2-5) 4.6.2
Thanks for help
User avatar
penguinflyer5234
Sheep (Developer)
Sheep (Developer)
Posts: 3025
Joined: Wed Jul 23, 2008 1:39 am
Location: Best Southwest

Re: Can't compile from source

Post by penguinflyer5234 »

egolib/Makefile -> line 22:
CC := gcc-3
change to
CC := gcc
...
shoun1234
Acid Blob (New member)
Acid Blob (New member)
Posts: 6
Joined: Fri Dec 09, 2011 8:43 am

Re: Can't compile from source

Post by shoun1234 »

Thanks. That solves the previous problem. Now there is a new one. The error shows

Code: Select all

In file included from /usr/include/stdlib.h:43:0,
                 from /usr/include/SDL/SDL_stdinc.h:40,
                 from /usr/include/SDL/SDL_endian.h:31,
                 from ./endian.h:24,
                 from /usr/include/ctype.h:41,
                 from ../egolib/../egolib/../egolib/typedef.h:26,
                 from ../egolib/../egolib/bbox.h:26,
                 from ../egolib/bbox.inl:26,
                 from bbox.c:24:
/usr/include/i386-linux-gnu/bits/waitstatus.h:80:15: error: duplicate member '__w_retcode'
/usr/include/i386-linux-gnu/bits/waitstatus.h:81:15: error: duplicate member '__w_coredump'
/usr/include/i386-linux-gnu/bits/waitstatus.h:82:15: error: duplicate member '__w_termsig'
/usr/include/i386-linux-gnu/bits/waitstatus.h:94:15: error: duplicate member '__w_stopsig'
/usr/include/i386-linux-gnu/bits/waitstatus.h:95:15: error: duplicate member '__w_stopval'

Searching on the internet, it seems the issue of stdlib.h or endian.h. But with find command, I can't be very sure which to mark out.

Code: Select all

./cartman/src/SDL_rotozoom.c:9:#include <stdlib.h>
./egolib/log.c:24:#include <stdlib.h>
./egolib/font_ttf.c:25:#include <stdlib.h>
./egolib/vfs.c:24:#include <stdlib.h>
./egolib/system.h:26:#include <stdlib.h>
./egolib/clock.c:25:#include <stdlib.h>
./egolib/mem.h:27:#include <stdlib.h>
./egolib/file_formats/id_md2.c:29:#include <stdlib.h>
./egolib/file_formats/configfile.h:26:#include <stdlib.h>
./game/Obsolete/Timer.c:25:#include <stdlib.h>
./game/Obsolete/Task.c:26:#include <stdlib.h>
Thanks for the help.
User avatar
penguinflyer5234
Sheep (Developer)
Sheep (Developer)
Posts: 3025
Joined: Wed Jul 23, 2008 1:39 am
Location: Best Southwest

Re: Can't compile from source

Post by penguinflyer5234 »

Hmm, try renaming endian.h (wherever it is) and changing the files that include endian.h (in egoboo and egolib!) to whatever you renamed it. (similar problem here)
...
bgbirdsey
{]-[0{0|307 (Developer)
{]-[0{0|307 (Developer)
Posts: 1864
Joined: Wed Jul 23, 2008 4:22 am
Location: Minnesota, USA

Re: Can't compile from source

Post by bgbirdsey »

I believe that there are problems using SDL with any version of GCC-4
shoun1234
Acid Blob (New member)
Acid Blob (New member)
Posts: 6
Joined: Fri Dec 09, 2011 8:43 am

Re: Can't compile from source

Post by shoun1234 »

Renaming endian.h to e.g. EndianMacros.h passes the error occurred previously. Now a new message says

Code: Select all

libtool: link: `file_formats/cap_file.lo' is not a valid libtool object
It seems that rebuild some libs is needed. Or object file doesn't exist, but searching with cap_file shows

Code: Select all

./egolib/cap_file.o
./egolib/.libs/cap_file.o
Any suggestion?

Thank you for help
shoun1234
Acid Blob (New member)
Acid Blob (New member)
Posts: 6
Joined: Fri Dec 09, 2011 8:43 am

Re: Can't compile from source

Post by shoun1234 »

I can not compile with svn source 2.8.x. 2.8.1 obtained from sf can be compiled without a problem.

Thanks for help.
ebyrob
Acid Blob (New member)
Acid Blob (New member)
Posts: 2
Joined: Sun May 05, 2013 1:54 am

Re: Can't compile from source

Post by ebyrob »

I'm trying to build 2.9.x branch and 2.8.x branch (both seem like two latest versions)

I had the same issues you did with renaming endian.c/.h.

After that I had a missing /enet/enet.h problem:
../egolib/../egolib/network.h:27:23: fatal error: enet/enet.h: No such file or directory

in 2.9.x/ branch I just have a lot of issues with the Makefile being confused about exact file names and .cpp vs .c extensions.

Anyone having luck building from the svn repository? If so, how are you doing it/what OS/compiler are you building on?

Thanks for any insight.
User avatar
penguinflyer5234
Sheep (Developer)
Sheep (Developer)
Posts: 3025
Joined: Wed Jul 23, 2008 1:39 am
Location: Best Southwest

Re: Can't compile from source

Post by penguinflyer5234 »

My code from this thread is now in branches/pf5234/egoboo, revision 1716. It may not work in either Windows or Linux, I've only tested OS X.
...
ebyrob
Acid Blob (New member)
Acid Blob (New member)
Posts: 2
Joined: Sun May 05, 2013 1:54 am

Re: Can't compile from source

Post by ebyrob »

wow that builds without changes!! and it was easy to fix make install_svn. Now my only problem so far is the mouse cursor, but I'm ignoring that for now. Thanks. You should definitely make a tag at some point.
czyzby
Acid Blob (New member)
Acid Blob (New member)
Posts: 1
Joined: Wed Mar 30, 2016 2:34 pm

Re: Can't compile from source

Post by czyzby »

I downloaded the Linux version from the official website and I'm having trouble with the compiling:

Code: Select all

/usr/bin/ld: graphic_mad.o: undefined reference to symbol 'fmod@@GLIBC_2.2.5'
//lib/x86_64-linux-gnu/libm.so.6: error adding symbols: DSO missing from command line
All the required libs are present, I think.
Post Reply