compilation error

NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
Forum rules
NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
Locked
Cong

compilation error

Post 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
Dominus
Site Admin
Posts: 5656
Joined: Thu May 14, 2020 1:34 pm

Re: compilation error

Post by Dominus »

I think this is normally due to old bison or flex. Probably shouldn't be too old on Ubuntu 10.10...
--
Read the documentation and the FAQ! There is no excuse for not reading them! RTFM
Read the Rules!
We do not support Piracy/Abandonware/Warez!
Cong

Re: compilation error

Post 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...
Dominus
Site Admin
Posts: 5656
Joined: Thu May 14, 2020 1:34 pm

Re: compilation error

Post by Dominus »

At least for getting Exult to compile you can try the --disable-tools configure switch
--
Read the documentation and the FAQ! There is no excuse for not reading them! RTFM
Read the Rules!
We do not support Piracy/Abandonware/Warez!
Cong

Re: compilation error

Post by Cong »

It works

Thank You for your fast replies.
Philipp

Re: compilation error

Post 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.
Wizardry Dragon
Posts: 1241
Joined: Thu May 14, 2020 1:34 pm

Re: compilation error

Post 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
Cheers, Wizardry Dragon
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
Malignant Manor
Site Admin
Posts: 985
Joined: Thu May 14, 2020 1:34 pm

Re: compilation error

Post 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.
Dominus
Site Admin
Posts: 5656
Joined: Thu May 14, 2020 1:34 pm

Re: compilation error

Post 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).
--
Read the documentation and the FAQ! There is no excuse for not reading them! RTFM
Read the Rules!
We do not support Piracy/Abandonware/Warez!
Locked