Page 1 of 1

compilation error

Posted: Sat Dec 11, 2010 1:40 am
by Cong
Hello

I'm compiling 1.4.9rc1 on Ubuntu 10.10 (kernel 2.6.35-23) 32 bits. I got these errors when issued make command. Can anyone help?

make[3]: Entering directory `/home/cong/Downloads/exult-1.4.9rc1/usecode/compiler'
/bin/bash ../../libtool --tag=CXX --mode=link g++ -g -O2 -o ucc ucparse.o uclex.o ucmain.o ucclass.o ucexpr.o ucfun.o ucloc.o ucstmt.o ucsym.o ../libusecode.la -lasound
libtool: link: g++ -g -O2 -o ucc ucparse.o uclex.o ucmain.o ucclass.o ucexpr.o ucfun.o ucloc.o ucstmt.o ucsym.o ../.libs/libusecode.a /usr/lib/libasound.so -lm -ldl -lpthread -lrt
ucparse.o: In function `yyparse()':
/home/cong/Downloads/exult-1.4.9rc1/usecode/compiler/ucparse.cc:2771: undefined reference to `yylex()'
ucparse.o: In function `yyparse()':
/home/cong/Downloads/exult-1.4.9rc1/usecode/compiler/ucparse.yy:362: undefined reference to `end_fun_id()'
/home/cong/Downloads/exult-1.4.9rc1/usecode/compiler/ucparse.yy:360: undefined reference to `start_fun_id()'
/home/cong/Downloads/exult-1.4.9rc1/usecode/compiler/ucparse.yy:1770: undefined reference to `start_script()'
/home/cong/Downloads/exult-1.4.9rc1/usecode/compiler/ucparse.yy:1773: undefined reference to `end_script()'
/home/cong/Downloads/exult-1.4.9rc1/usecode/compiler/ucparse.yy:1069: undefined reference to `start_loop()'
/home/cong/Downloads/exult-1.4.9rc1/usecode/compiler/ucparse.yy:1071: undefined reference to `end_loop()'
/home/cong/Downloads/exult-1.4.9rc1/usecode/compiler/ucparse.yy:1075: undefined reference to `end_loop()'
/home/cong/Downloads/exult-1.4.9rc1/usecode/compiler/ucparse.yy:1081: undefined reference to `start_loop()'
/home/cong/Downloads/exult-1.4.9rc1/usecode/compiler/ucparse.yy:1083: undefined reference to `end_loop()'
/home/cong/Downloads/exult-1.4.9rc1/usecode/compiler/ucparse.yy:1086: undefined reference to `end_loop()'
/home/cong/Downloads/exult-1.4.9rc1/usecode/compiler/ucparse.yy:1109: undefined reference to `start_loop()'
/home/cong/Downloads/exult-1.4.9rc1/usecode/compiler/ucparse.yy:964: undefined reference to `start_script()'
/home/cong/Downloads/exult-1.4.9rc1/usecode/compiler/ucparse.yy:967: undefined reference to `end_script()'
/home/cong/Downloads/exult-1.4.9rc1/usecode/compiler/ucparse.yy:1017: undefined reference to `start_loop()'
/home/cong/Downloads/exult-1.4.9rc1/usecode/compiler/ucparse.yy:1036: undefined reference to `end_loop()'
/home/cong/Downloads/exult-1.4.9rc1/usecode/compiler/ucparse.yy:1038: undefined reference to `start_loop()'
/home/cong/Downloads/exult-1.4.9rc1/usecode/compiler/ucparse.yy:1054: undefined reference to `end_loop()'
/home/cong/Downloads/exult-1.4.9rc1/usecode/compiler/ucparse.yy:1059: undefined reference to `start_loop()'
/home/cong/Downloads/exult-1.4.9rc1/usecode/compiler/ucparse.yy:1061: undefined reference to `end_loop()'
/home/cong/Downloads/exult-1.4.9rc1/usecode/compiler/ucparse.yy:1065: undefined reference to `end_loop()'
/home/cong/Downloads/exult-1.4.9rc1/usecode/compiler/ucparse.yy:1232: undefined reference to `end_loop()'
/home/cong/Downloads/exult-1.4.9rc1/usecode/compiler/ucparse.yy:1239: undefined reference to `end_loop()'
/home/cong/Downloads/exult-1.4.9rc1/usecode/compiler/ucparse.yy:1251: undefined reference to `start_loop()'
/home/cong/Downloads/exult-1.4.9rc1/usecode/compiler/ucparse.yy:1344: undefined reference to `end_breakable()'
/home/cong/Downloads/exult-1.4.9rc1/usecode/compiler/ucparse.yy:1373: undefined reference to `start_script()'
/home/cong/Downloads/exult-1.4.9rc1/usecode/compiler/ucparse.yy:1385: undefined reference to `end_script()'
/home/cong/Downloads/exult-1.4.9rc1/usecode/compiler/ucparse.yy:1338: undefined reference to `start_breakable()'
ucmain.o: In function `main':
/home/cong/Downloads/exult-1.4.9rc1/usecode/compiler/ucmain.cc:109: undefined reference to `yyin'
/home/cong/Downloads/exult-1.4.9rc1/usecode/compiler/ucmain.cc:123: undefined reference to `yyin'
/home/cong/Downloads/exult-1.4.9rc1/usecode/compiler/ucmain.cc:95: undefined reference to `yyin'
collect2: ld returned 1 exit status
make[3]: *** [ucc] Error 1
make[3]: Leaving directory `/home/cong/Downloads/exult-1.4.9rc1/usecode/compiler'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/cong/Downloads/exult-1.4.9rc1/usecode'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/cong/Downloads/exult-1.4.9rc1'
make: *** [all] Error 2

Re: compilation error

Posted: Sat Dec 11, 2010 8:36 am
by Dominus
I think this is normally due to old bison or flex. Probably shouldn't be too old on Ubuntu 10.10...

Re: compilation error

Posted: Sat Dec 11, 2010 6:08 pm
by Cong
I got the latest version for bison and flex

bison 2.4.1.dfsg-3 A parser generator that is compatible with YACC
flex 2.5.35-9.1 A fast lexical analyzer generator. Dominus (not logged in) wrote:
>
> I think this is normally due to old bison or flex. Probably
> shouldn't be too old on Ubuntu 10.10...

Re: compilation error

Posted: Sat Dec 11, 2010 11:04 pm
by Dominus
At least for getting Exult to compile you can try the --disable-tools configure switch

Re: compilation error

Posted: Sun Dec 12, 2010 12:41 am
by Cong
It works

Thank You for your fast replies.

Re: compilation error

Posted: Sun Dec 26, 2010 12:23 pm
by Philipp
I fixed this error after replacing Ubuntu's bison with a current bison 2.4.3, compiled from source. However, Im not sure if this was necessary at all.

My config is:
Kubuntu 10.10 with std flex 2.5.35(-9.1)
self-compiled bison 2.4.3


But there seems to be a really nasty pifall with bison/flexx you should be aware of: make (dist)clean doesn't seem to remove all intermediate files. I had this error for quite a long time, and once I deleted my exult folder and unpacked the archive again, the error was gone.

So, my advice: set up your flex/bison install, use a fresh unpacked source release from exult, try again.

Re: compilation error

Posted: Sun Dec 26, 2010 8:13 pm
by Wizardry Dragon
Most linux installs will have to disable tools and/or studio to work without tweaking or compiling from source, as I found out as well with Fedora.
----------
Peter M Dodge
aka Wizardry Dragon
www.thefeudallands.ca

Re: compilation error

Posted: Sun Dec 26, 2010 8:42 pm
by Malignant Manor
All Exult components compile fine with the standard Ubuntu bison and flex packages. I've never had to custom compile any other packages for Exult either.
Most linux installs will have to disable tools and/or studio to work without tweaking or compiling from source, as I found out as well with Fedora.
This is untrue.

Re: compilation error

Posted: Sun Dec 26, 2010 9:52 pm
by Dominus
Yes, compile from source has been fixed in SVN.

All other problems are probably/perhaps related to improper development environment set up (e.g. Not installing devel packages for libs and other needed things).

Fatal: Not able to open ./cache/production/data_global.php