From ramian@sbfel3.ucsb.edu Tue Apr 30 00:33:45 1996 To: gomes@ICSI.Berkeley.EDU Subject: Re: r_log problem with cc 4.0 > When using Sun's cc compiler, the following link errors occur > _log_ PARSERxx.o > ld: fatal: Symbol referencing errors. No output written to ../cs > *** Error code 1 > make: Fatal error: Command failed for target `../cs' > > This evidently refers to line 3491 of Bin/cs.code/PARSERxx.c: > ret_val9 = r_log(log_self); > > Does anyone know how to fix it, what to replace r_log with, > or what other library is missing? Thanks. > > I'm don't really know the compiler's internals, and I'll try to get > Boris to officially respond. Till then: A grep seems to show that > r_log is from Library/System/runtime.sa. Near as I can tell, these are > inlined functions that end up translating into the "log" functions. > Maybe there is some problem in linking in the math library? Ben, Thanks for responding. I was able to find a solution. It turns out that cc 4.0 uses the form xxxf() instead of r_xxx() for single precision math calls. However, sun provides a library, libsunmath, that provides extensions including r_ calls, so adding -lsunmath to the load command fixes the problem. Of course, the purpose of using cc instead of gcc is to take advantage of the new libraries optimized for the new hardware. It would be nice if Sather had a software switch that could select either form. Perhaps some modifications to System/floatmath.h would implement that? Jerry ramian@sbfel3.ucsb.edu http://sbfel3.ucsb.edu/ ----- Add an #ifdef to floatmath.h to not prepend the "r_" (see the macros towards the end). floatmath.h exists solely to allow compatability with differently named and typed floating point routines across platforms. - Dave -- David Stoutamire http://www.icsi.berkeley.edu/~davids