Hi, while trying to build an interpreted PolyML system based on version 4.1.3 (version 4.0 works fine) I'm getting linker errors, e.g.:
/tmp/driver/improve.c:724: undefined reference to `MD_update_code_addresses'
Any hints?
Achim
Achim D. Brucker wrote:
Hi, while trying to build an interpreted PolyML system based on version 4.1.3 (version 4.0 works fine) I'm getting linker errors, e.g.:
/tmp/driver/improve.c:724: undefined reference to `MD_update_code_addresses'
Any hints?
I should have added it to interpret.c . I added it to the machine code versions as the result of wanting to be able to have constants within the code. Since these could be the addresses of other objects they need to be updated by the garbage collector. It doesn't need to do anything in the interpreted version since all the constants in the interpreted version are held in the constant area. Try adding the following to interpret.c
void MD_update_code_addresses(word **addr, word **old, int L, void (*op)(word **)) { }
David
Hi, On Fri, Mar 18, 2005 at 01:57:39PM +0000, David Matthews wrote:
Any hints?
I should have added it to interpret.c . I added it to the machine code
thanks, this was the easy one :-) After adding
int registerMaskVector[];
to interpret.c I could compile the poly-interpreter. I also need the readport program to convert the portDB. Trying to compile readport fails with
readport.c:232: error: `OBJ_FIRST_BIT' undeclared (first use in this function)
After diffing the readport sources from 4.0 and the one from 4.1.3 I decided to fool a little bit, e.g. I just changed
line 232 of readport.c from else if (ch == 'L') { isOpt = 1; objBits |= OBJ_FIRST_BIT; } to else if (ch == 'L') { isOpt = 1}
and after another error message, line 484 of readport.c from b = &->gc_const; to b = &B->gc_const;
After that, you see that copygc.o also requires `MD_update_code_addresses'. Thus I also `stubbed' it there (this is a hack, as the poly interpreter needs both interpreter.o and copygc.o it seems to be better to add the stub in copygc only, and if needed, provide an extern declaration in interpert.c). Now I could compile readport, but running poly results in a segmentation fault. I will examine this in more detail over the weekend.
Thanks a lot for your help, Achim