Page 1 of 1

Linux CVS Compile Issues

Posted: Tue Sep 12, 2006 8:26 pm
by Tylius-
I'm trying to compile the CVS snapshot under linux, I've managed to get up to this point, but I can't seem to resolve this issue.

Searched and searched for info, but no luck, and I can't find a CVS binary package :(

ucparse.o: In function `yyparse()':
/usr/share/bison/bison.simple:574: undefined reference to `yylex()'
ucparse.o: In function `yyparse()':
/home/bryantona/Desktop/exult-cvs/exult/usecode/compiler/ucparse.yy:549: undefined reference to `start_script()'
/home/bryantona/Desktop/exult-cvs/exult/usecode/compiler/ucparse.yy:561: undefined reference to `end_script()'
ucmain.o: In function `main':
/home/bryantona/Desktop/exult-cvs/exult/usecode/compiler/ucmain.cc:107: undefined reference to `yyin'
/home/bryantona/Desktop/exult-cvs/exult/usecode/compiler/ucmain.cc:93: undefined reference to `yyin'
collect2: ld returned 1 exit status

Any info on how to get this fixed would be greatly appreciated, or even just a lead on where I could look for some more info, thanks in advance :)

Re: Linux CVS Compile Issues

Posted: Tue Sep 12, 2006 8:27 pm
by Tylius-
Bah, no edit feature...

Xubuntu Linux, running off the Edgy repositories, so gcc and whatnot are all 4.1 I believe.

Re: Linux CVS Compile Issues

Posted: Wed Sep 13, 2006 7:45 am
by wjp
Try removing uclex.cc, ucparse.cc, ucparse.h from the usecode/compiler directory and then re-running make.

Re: Linux CVS Compile Issues

Posted: Sat Sep 16, 2006 10:27 am
by Tylius-
Fixed it, thanks!

Re: Linux CVS Compile Issues

Posted: Fri Sep 22, 2006 1:33 pm
by Tylius-
Sorry...another compile issue, I saw the updates about avatar's speed in the changelog so decided to update =P

ucsym.h:268: error: 'Uc_scope' has not been declared
ucparse.yy: In function 'int yyparse()':
ucparse.yy:229: error: no matching function for call to 'Uc_function_symbol::create(char*&, int, std::vector >&, bool, Uc_scope*)'
ucsym.h:268: note: candidates are: static Uc_function_symbol* Uc_function_symbol::create(char*, int, std::vector >&, bool, int*)
make[3]: *** [ucparse.o] Error 1

I tried removing the three files listed above, like last time, except there's no uclex.cc with this cvs package to remove, and when I remove ucparse.h / .cc, it just gets created again when I run make.

Any idea? Sorry to bother again ;x

Re: Linux CVS Compile Issues

Posted: Fri Sep 22, 2006 1:35 pm
by Tylius-
And I tried removing ucparse.yy, but then it says it's needed by ucparse.cc

Re: Linux CVS Compile Issues

Posted: Fri Sep 22, 2006 1:43 pm
by Tylius-
*shrugs* I just deleted the .yy file, then removed a section from the makefil that wanted it

Hope that doesn't break anything O.o

Re: Linux CVS Compile Issues

Posted: Fri Sep 22, 2006 1:49 pm
by Tylius-
Alright, guess it did :(

It compiled more, but now I'm getting, so....I'm stumped and I'll wait, or see if I can find the cvs package I had before :)


xdrag.o: In function `Get_window_coords':
/home/bryantona/Desktop/exult/exult/xdrag.cc:51: undefined reference to `XQueryTree'
/home/bryantona/Desktop/exult/exult/xdrag.cc:53: undefined reference to `XFree'
/home/bryantona/Desktop/exult/exult/xdrag.cc:59: undefined reference to `XGetWindowAttributes'
xdrag.o: In function `Xdnd':
/home/bryantona/Desktop/exult/exult/xdrag.cc:88: undefined reference to `XInternAtom'
/home/bryantona/Desktop/exult/exult/xdrag.cc:89: undefined reference to `XInternAtom'
/home/bryantona/Desktop/exult/exult/xdrag.cc:90: undefined reference to `XInternAtom'
/home/bryantona/Desktop/exult/exult/xdrag.cc:91: undefined reference to `XInternAtom'
/home/bryantona/Desktop/exult/exult/xdrag.cc:93: undefined reference to `XInternAtom'
xdrag.o:/home/bryantona/Desktop/exult/exult/xdrag.cc:94: more undefined references to `XInternAtom' follow
xdrag.o: In function `Xdnd::select_msg(XSelectionEvent&)':
/home/bryantona/Desktop/exult/exult/xdrag.cc:258: undefined reference to `XGetAtomName'
/home/bryantona/Desktop/exult/exult/xdrag.cc:275: undefined reference to `XGetWindowProperty'
/home/bryantona/Desktop/exult/exult/xdrag.cc:307: undefined reference to `XFree'
xdrag.o: In function `Xdnd::client_msg(XClientMessageEvent&)':
/home/bryantona/Desktop/exult/exult/xdrag.cc:132: undefined reference to `XGetAtomName'
/home/bryantona/Desktop/exult/exult/xdrag.cc:190: undefined reference to `XSendEvent'
/home/bryantona/Desktop/exult/exult/xdrag.cc:154: undefined reference to `XGetWindowProperty'
/home/bryantona/Desktop/exult/exult/xdrag.cc:200: undefined reference to `XConvertSelection'
xdrag.o: In function `Xdnd':
/home/bryantona/Desktop/exult/exult/xdrag.cc:108: undefined reference to `XChangeProperty'
/home/bryantona/Desktop/exult/exult/xdrag.cc:108: undefined reference to `XChangeProperty'
collect2: ld returned 1 exit status

Re: Linux CVS Compile Issues

Posted: Fri Sep 22, 2006 1:55 pm
by wjp
Try adding the line

Code: Select all

class Uc_scope;
right below the line

Code: Select all

class Uc_class;
in usecode/compiler/ucsym.h.

Re: Linux CVS Compile Issues

Posted: Fri Sep 22, 2006 1:57 pm
by wjp
The X link errors you're seeing are unrelated to these ucsym.h issues, by the way.

Re: Linux CVS Compile Issues

Posted: Fri Sep 22, 2006 3:41 pm
by MeddlingMonk
I've started getting errors myself when making in Fedora 5 in the last three snapshots. Make keeps ending with

ucsym.h:268: error: ‘Uc_scope’ has not been declared
ucparse.yy: In function ‘int yyparse()’:
ucparse.yy:229: error: no matching function for call to ‘Uc_function_symbol::create(char*&, int, std::vector >&, bool, Uc_scope*)’
ucsym.h:268: note: candidates are: static Uc_function_symbol* Uc_function_symbol::create(char*, int, std::vector >&, bool, int*)
make[3]: *** [ucparse.o] Error 1
make[3]: Leaving directory `/home/meddlingmonk/Desktop/exult/usecode/compiler'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/meddlingmonk/Desktop/exult/usecode'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/meddlingmonk/Desktop/exult'
make: *** [all] Error 2

It kind of looks like what you suggest is relevant with this as well. I'm going to try. But it's interesting I didn't get this before. I tried building the snapshot I got on the 16th, the last one before I started getting these errors, and it still builds ok.

Re: Linux CVS Compile Issues

Posted: Fri Sep 22, 2006 3:46 pm
by MeddlingMonk
Nope. Get the same errors.

Re: Linux CVS Compile Issues

Posted: Fri Sep 22, 2006 6:58 pm
by marzo
Tylius: deleting the ucparse.yy file and related section will break the usecode compiler (UCC). If you are not going to be compiling usecode yourself, you will not have any problems with it.

MeddlingMonk: after adding the line wjp suggested, try deleting the ucsym.o file. And can you confirm that in ucsym.h, near line 268, there are the following lines of code?

Code: Select all

	static Uc_function_symbol *create(char *nm, int num, 
				std::vector& p, bool is_extern=false,
				Uc_scope *scope = 0, int shp = -1);

Re: Linux CVS Compile Issues

Posted: Sat Sep 23, 2006 3:06 am
by Tylius-
Right, I figured that compile section was for a utility rather than some core piece of Exult, since they had me remove some files relating to it last time, but after doing it this time I got those X errors.

Trying out the fix for the header file he posted right now

Re: Linux CVS Compile Issues

Posted: Sat Sep 23, 2006 3:13 am
by Tylius
Alright, the fix for the usecode compiler worked perfectly and got past all that, however it's still getting stuck on the errors around:

xdrag.o: In function `Get_window_coords':
/home/bryantona/Desktop/exult/exult/xdrag.cc:51: undefined reference to `XQueryTree'
/home/bryantona/Desktop/exult/exult/xdrag.cc:53: undefined reference to `XFree'

And I've no clue what to do to fix that >.D)

Re: Linux CVS Compile Issues

Posted: Sat Sep 23, 2006 3:15 am
by Tylius
(I really wish there was an edit feature)

If there's any information, compiler info, or anything that would be handy for tracking this down, just let me know and I'll do my best to get the information for you :)

Re: Linux CVS Compile Issues

Posted: Fri Sep 30, 2011 6:34 pm
by Axel S
I fixed the "undefined reference to 'X...'" rather simply: there's a "-lX11" missing in the generated Makefile. I've added that in the line "x_libraries =" so that it reads "x_libraries = -lX11".
Maybe that's not its intention but it works just fine.

Re: Linux CVS Compile Issues

Posted: Fri Sep 30, 2011 9:00 pm
by Dominus
Necroposter!!!!

Seriously isn't that fixed in SVN? I'm sure we added something for x11 after the rc1 release.

Edit: yes, added this 19th December 2010