[Yhc] More questions when debugging /w arm-elf-gcc

Alexis Morris akmorris at gmail.com
Tue Jul 3 19:33:39 EDT 2007


Hi all,

I have a few "undefined" errors when trying to link iofuncs.o, primitive.o,
and external.o...anyone know where those missing defines (see below) are
from?

-  In the file integer.h there is this define:

   #define mpz_ui_pow_ui(r, x, y)  { r[0].value = (Int64)pow(x, y); }  But
pow(x,y) is undefined...does anyone know where it came from?...was it a part
of LIBGMP or LIBFFI?

-  In primitive.c the functions below seem to be undefined too....

   primitive.c:void init_YHC_Primitive(WrapRegisterFun reg, void* arg);
   primitive.c:  init_YHC_Primitive(prim_register, NULL);


- In external.c the arm-gcc toolchain doesn't seem to support the <dlfcn.h>
(or <windows.h>) that are used for the dll functions. I could be wrong
though...will look into that some more. I had them commented out.


Thanks again :)


============================

$ make
arm-elf-gcc -Wall -c basepath.c
arm-elf-gcc -Wall -c foreign.c
arm-elf-gcc -Wall -c heap.c
arm-elf-gcc -Wall -c info.c
arm-elf-gcc -Wall -c iofuncs.c
arm-elf-gcc -Wall -c main.c
arm-elf-gcc -Wall -c mark.c
mark.c: In function 'mark_rec':
mark.c:238: warning: unused variable 'indent'
arm-elf-gcc -Wall -c mutator.c
arm-elf-gcc -Wall -c primitive.c
arm-elf-gcc -Wall -c profile.c
arm-elf-gcc -Wall -c stable.c
arm-elf-gcc -Wall -c external.c
arm-elf-gcc -Wall -c hashtable.c
arm-elf-gcc -Wall -c hsffi.c
hsffi.c:46: warning: 'hsffi_allocContext' defined but not used
hsffi.c:182: warning: 'hsffi_evalContext' defined but not used
arm-elf-gcc -Wall -c integer.c
arm-elf-gcc -Wall -c jonkers.c
arm-elf-gcc -Wall -c make.c
arm-elf-gcc -Wall -c module.c
arm-elf-gcc -Wall -c pretty.c
pretty.c: In function 'pr_nodeWith':
pretty.c:277: warning: unused variable 'tmp'
arm-elf-gcc -Wall -c process.c
arm-elf-gcc -Wall -c sanity.c
sanity.c: In function 'sanity_init':
sanity.c:59: warning: format '%d' expects type 'int', but argument 3 has
type 'long unsigned int'
sanity.c:59: warning: format '%d' expects type 'int', but argument 4 has
type 'long unsigned int'
arm-elf-gcc -Wall -c stopcopy.c


arm-elf-gcc  basepath.o foreign.o heap.o info.o iofuncs.o main.o mark.o
mutator.o primitive.o profile.o stable.o external.o hashtable.
o hsffi.o integer.o jonkers.o make.o module.o pretty.o process.o sanity.o
stopcopy.o -o yhi


iofuncs.o: In function `fGetMPZ':
iofuncs.c:(.text+0x468): undefined reference to `pow'

primitive.o: In function `prim_load':
primitive.c:(.text+0x750): undefined reference to `init_YHC_Primitive'

external.o: In function `ext_load':
external.c:(.text+0x170): undefined reference to `dll_open'
external.c:(.text+0x1c8): undefined reference to `dll_error'
external.c:(.text+0x1f8): undefined reference to `dll_sym'
external.c:(.text+0x204): undefined reference to `dll_error'

collect2: ld returned 1 exit status
make: *** [yhi] Error 1

-- 
</Alexis>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/yhc/attachments/20070704/51c8a96c/attachment.htm


More information about the Yhc mailing list