PDA

View Full Version : World make errors


dispair
06-29-2007, 04:49 AM
I am trying to compile the emu server on a redhat 9 system that is fresh installed, i got all other things in ok like mysql and perl however when i goto build this i keep getting

[root@RedHat EQEmu.6.28.07]# make
make -C EMuShareMem
make[1]: Entering directory `/eqemu/source/EQEmu.6.28.07/EMuShareMem'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/eqemu/source/EQEmu.6.28.07/EMuShareMem'
make -C world
?@?@make[1]: Entering directory `/eqemu/source/EQEmu.6.28.07/world'
gcc -c -Wall -Wuninitialized -Wwrite-strings -Wcast-qual -Wcomment -Wcast-align
-Wno-deprecated -g -march=i686 -O -pthread -pipe -I../common/SocketLib -DFX -D_GNU_SOURCE -DINVERSEXY -DWORLD -DDEBUG=5 -DEQDEBUG=5 -DSHAREMEM -DCATCH_CRASH -DNO_PIDLOG -DFIELD_ITEMS -DIRC -Di386 -DAPP_OPCODE_SIZE=2 -DEMBPERL -DEMBPERL_PLUGIN -DHAS_UNION_SEMUN -I/usr/local/include/mysql -fno-strict-aliasing -pipe -I/usr/local/include -I/usr/include/gdbm -I/usr/local/lib/perl5/5.8.8/i586-linux/CORE EQW.cpp -o EQW.o
EQW.cpp:56: parse error before `__attribute__'
EQW.cpp: In function `void XS_EQWIO_PRINT(...)':
EQW.cpp:57: parse error before `__attribute__'
EQW.cpp: In function `void XS_EQWIO_PRINT(...)':
EQW.cpp:57: redefinition of `void XS_EQWIO_PRINT(...)'
EQW.cpp:56: `void XS_EQWIO_PRINT(...)' previously defined here
EQW.cpp:57: redefinition of `void XS_EQWIO_PRINT(...)'
EQW.cpp:56: `void XS_EQWIO_PRINT(...)' previously defined here
EQW.cpp:59: `sp' undeclared (first use this function)
EQW.cpp:59: (Each undeclared identifier is reported only once for each function
it appears in.)
EQW.cpp:60: parse error before `if'
EQW.cpp:64: parse error before `for'
EQW.cpp:64: parse error before `;' token
EQW.cpp:64: syntax error before `++' token
EQW.cpp:66: ISO C++ forbids declaration of `Singleton' with no type
EQW.cpp:66: prototype for `int EQW::Singleton()' does not match any in class `
EQW'
EQW.h:33: candidate is: static EQW* EQW::Singleton()
EQW.cpp:66: `int EQW::Singleton()' and `static EQW* EQW::Singleton()' cannot be
overloaded
EQW.cpp: In member function `int EQW::Singleton()':
EQW.cpp:66: parse error before `->' token
EQW.cpp:69: ISO C++ forbids declaration of `PL_stack_sp' with no type
EQW.cpp:69: type mismatch with previous external decl
/usr/local/lib/perl5/5.8.8/i586-linux/CORE/thrdvar.h:34: previous external decl
of `SV**PL_stack_sp'
EQW.cpp:69: `tmpXSoff' undeclared (first use this function)
EQW.cpp:69: parse error before `return'
make[1]: *** [EQW.o] Error 1
make[1]: Leaving directory `/eqemu/source/EQEmu.6.28.07/world'
make: *** [all] Error 2
[root@RedHat EQEmu.6.28.07]#


as you can see everything upto world compiled i just need to resolve these errors so that i can continue and i have no idea. any ideas?

sfisque
06-30-2007, 03:27 AM
did you do a make clean and a make depend?

== sfisque

gernblan
09-01-2007, 07:11 AM
Try changing your arch to i386.

joligario
12-28-2009, 09:58 PM
Trying to set up on a remote server, so starting from scratch. Using gcc (not sure what version is installed). Got a very similar error:

EQW.cpp:57: syntax error before `__attribute__'
EQW.cpp: In function `void XS_EQWIO_PRINT(...)':
EQW.cpp:58: syntax error before `__attribute__'
EQW.cpp: In function `void XS_EQWIO_PRINT(...)':
EQW.cpp:58: redefinition of `void XS_EQWIO_PRINT(...)'
EQW.cpp:57: `void XS_EQWIO_PRINT(...)' previously defined here
EQW.cpp:58: redefinition of `void XS_EQWIO_PRINT(...)'
EQW.cpp:57: `void XS_EQWIO_PRINT(...)' previously defined here
EQW.cpp:60: `sp' undeclared (first use this function)
EQW.cpp:60: (Each undeclared identifier is reported only once for each function
it appears in.)
EQW.cpp:61: syntax error before `if'
EQW.cpp:65: syntax error before `for'
EQW.cpp:65: syntax error before `;' token
EQW.cpp:65: syntax error before `++' token
EQW.cpp:67: ISO C++ forbids declaration of `Singleton' with no type
EQW.cpp:67: prototype for `int EQW::Singleton()' does not match any in class `
EQW'
EQW.h:33: candidate is: static EQW* EQW::Singleton()
EQW.cpp:67: `int EQW::Singleton()' and `static EQW* EQW::Singleton()' cannot be
overloaded
EQW.cpp: In member function `int EQW::Singleton()':
EQW.cpp:67: syntax error before `->' token
EQW.cpp:70: ISO C++ forbids declaration of `PL_stack_sp' with no type
EQW.cpp:70: type mismatch with previous external decl
/usr/lib/perl5/5.8.8/i686-linux/CORE/thrdvar.h:34: previous external decl of `
SV**PL_stack_sp'
EQW.cpp:70: `tmpXSoff' undeclared (first use this function)
EQW.cpp:70: syntax error before `return'
make: *** [EQW.o] Error 1

Any ideas?

EDIT: Oh yeah, and EMuShareMem compiled fine.
EDIT2: Ah, found my version. GCC 3.2.3 and machine is i386-redhat-linux so I will just need help locating where to change to 386 arch...

joligario
12-29-2009, 06:17 PM
Anyone around able to decipher this problem?

Derision
12-29-2009, 06:45 PM
Does your machine have Perl 5.8.8+ installed ?

EQW.cpp line 57 is:

XS(XS_EQWIO_PRINT); /* prototype to pass -Wmissing-prototypes */

On my box, the XS macro is in:

/usr/lib/perl5/5.8.8/i686-linux/CORE/XSUB.h

In the world/zone makefile there is a line which includes this:


perl -MExtUtils::Embed -e ccopts


If you execute this at a command prompt, it should tell you where your Perl include files are, e.g.


xxxxxx@xxxxxx ~/currentsvn/projecteqemu/EQEmuServer/world $ perl -MExtUtils::Embed -e ccopts
-fno-strict-aliasing -pipe -Wdeclaration-after-statement -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -I/usr/lib/perl5/5.8.8/i686-linux/CORE


If you have an XSUB.h in the directory indicated after the -I, then I would think you should be good to go.

GCC 3.2.3 is old. My Gentoo box is running 4.1.1, and that is a few years old, so it may be that your Linux distro is just too out-of-date (just guessing).

joligario
12-29-2009, 07:00 PM
Here is the output:

-fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -I/usr/lib/perl5/5.8.8/i686-linux/CORE

I was thinking that 3.2.3 is old, but that is because he is running CentOS 3.9. I tried running a yum update, as well as a dependency update, and everything says that it is up-to-date.

My XSUB.h is present in that directory as well...

Any help given is definitely appreciated!

EDIT: FYI - Here is my complete GCC list:

yum list | grep gcc
compat-gcc i386 7.3-2.96.128 base
compat-gcc-c++ i386 7.3-2.96.128 base
compat-gcc-g77 i386 7.3-2.96.128 addons
compat-gcc-java i386 7.3-2.96.128 addons
compat-gcc-objc i386 7.3-2.96.128 addons

prickle
12-30-2009, 10:32 AM
EDIT: Oh yeah, and EMuShareMem compiled fine.
EDIT2: Ah, found my version. GCC 3.2.3 and machine is i386-redhat-linux so I will just need help locating where to change to 386 arch...

the quick edit to hit all the files:

-go to the top level build directory
-run the following command:
grep -Ril i686 * | xargs perl -pi -e 's/i686/i386/g'
-run 'make clean'
-run 'make'

joligario
12-30-2009, 02:50 PM
Just in case, I went ahead and did a fresh svn download 5 minutes ago. Ran the grep replace, then compiled. Still fails in the same place.

gcc -c -Wall -Wuninitialized -Wwrite-strings -Wcast-qual -Wcomment -Wcast-align
-Wno-deprecated -g -march=i386 -O -pthread -pipe -I../common/SocketLib -DFX -D_GNU_SOURCE
-DINVERSEXY -DWORLD -DDEBUG=5 -DEQDEBUG=5 -DSHAREMEM -DCATCH_CRASH -DNO_PIDLOG
-DFIELD_ITEMS -DIRC -Di386 -DAPP_OPCODE_SIZE=2 -DEMBPERL -DEMBPERL_PLUGIN
-DHAS_UNION_SEMUN -I/usr/include/mysql -g -pipe -fno-strict-aliasing -pipe -Wdeclaration-after-statement
-I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -I/usr/lib/perl5/5.8.8/i686-linux/CORE EQW.cpp -o EQW.o
EQW.cpp:57: syntax error before `__attribute__'
EQW.cpp: In function `void XS_EQWIO_PRINT(...)':
EQW.cpp:58: syntax error before `__attribute__'
EQW.cpp: In function `void XS_EQWIO_PRINT(...)':
EQW.cpp:58: redefinition of `void XS_EQWIO_PRINT(...)'
EQW.cpp:57: `void XS_EQWIO_PRINT(...)' previously defined here
EQW.cpp:58: redefinition of `void XS_EQWIO_PRINT(...)'
EQW.cpp:57: `void XS_EQWIO_PRINT(...)' previously defined here
EQW.cpp:60: `sp' undeclared (first use this function)
EQW.cpp:60: (Each undeclared identifier is reported only once for each function
it appears in.)
EQW.cpp:61: syntax error before `if'
EQW.cpp:65: syntax error before `for'
EQW.cpp:65: syntax error before `;' token
EQW.cpp:65: syntax error before `++' token
EQW.cpp:67: ISO C++ forbids declaration of `Singleton' with no type
EQW.cpp:67: prototype for `int EQW::Singleton()' does not match any in class `
EQW'
EQW.h:33: candidate is: static EQW* EQW::Singleton()
EQW.cpp:67: `int EQW::Singleton()' and `static EQW* EQW::Singleton()' cannot be
overloaded
EQW.cpp: In member function `int EQW::Singleton()':
EQW.cpp:67: syntax error before `->' token
EQW.cpp:70: ISO C++ forbids declaration of `PL_stack_sp' with no type
EQW.cpp:70: type mismatch with previous external decl
/usr/lib/perl5/5.8.8/i686-linux/CORE/thrdvar.h:34: previous external decl of `
SV**PL_stack_sp'
EQW.cpp:70: `tmpXSoff' undeclared (first use this function)
EQW.cpp:70: syntax error before `return'
make[1]: *** [EQW.o] Error 1
make[1]: Leaving directory `/home/eqemu/eqemuserver/source/world'
make: *** [all] Error 2

I noticed iggi got it to work fine on CentOS 5.4 ...

EDIT: After some fishing around on the wiki, I tried to make sure everything was installed and ran into this:

[/home/eqemu/eqemuserver/source]# yum install gcc gcc-c++ perl-IO-stringy mysql-devel mysqlclient10-devel vim-enhanced mysql-server
Gathering header information file(s) from server(s)
Server: CentOS-3 - Addons
Server: CentOS-3 - Base
Server: CentOS-3 - Extras
Server: CentOS-3 - Updates
Finding updated packages
Downloading needed headers
gcc is installed and is the latest version.
gcc-c++ is installed and is the latest version.
Cannot find a package matching perl-IO-stringy
Cannot find a package matching mysql-devel
Cannot find a package matching mysqlclient10-devel
Cannot find a package matching mysql-server

Is that an important issue?

joligario
12-30-2009, 05:18 PM
And this..

Package perl-DBD-MySQL needs libmysqlclient.so.10, this is not available.

Derision
12-30-2009, 05:33 PM
I did some Googling around for "syntax error before `__attribute__'" and/or perl and GCC, and I judging by the threads I found, I think the issue is the version of GCC your are using.
If you can, I would try upgrading it to 4.0/4.1. If you can't do that, I'm out of ideas. Not to say that fixing the (possible) gcc issue would then leave you with other problems
due to the age of the distro and the packages installed on it.

joligario
12-30-2009, 05:42 PM
Yeah, I was thinking the same thing. I can't seem to get it to upgrade, but maybe he doesn't have the latest rpm installed. I am looking at upping the OS first...