Hi,
Sorry to bother you folks, but I'm building ciao-1.8p2 on a solaris/sparc 5.7 platform with gcc 2.95.3, and there is a surprising error. The make fails because of the following error:
gcc wam.o format.o inout.o misc.o startgoal.o ciao.o nondet.o objareas.o streams.o timing.o wambuiltin.o wamfunction.o unix_utils.o attr.o dynlink.o tasks.o locks.o prolog_tasks.o own_malloc_linear.o alloc.o heapgc.o indexing.o initial.o registers.o stacks.o support.o term_support.o wamsupport.o qread.o qget.o builtin.o interrupt.o gauge.o bignum.o profile.o ciao_prolog.o start.o version.o sockets_c.o random.o main.o -ldl -lm -lnsl -lpthread -lrt -lsocket -o ciaoengine Undefined first referenced symbol in file setenv unix_utils.o ld: fatal: Symbol referencing errors. No output written to ciaoengine
which is definately because unix_utils.c is using setenv() -- and that's not present in solaris C libraries (at least through solaris 8, I haven't checked solaris 9). It's not present in a lot of C libraries, so I'm very surprised that it's used when it is detecting a "SolarisSparc" system -- which it does, btw, for example:
if test ! -d /usr/local/src/ciao-1.8p2/bin/SolarisSparc ; then \ mkdir /usr/local/src/ciao-1.8p2/bin/SolarisSparc ; chmod 775 /usr/local/src/ciao-1.8p2/bin/SolarisSparc ; fi make[2]: Leaving directory `/usr/local/src/ciao-1.8p2' cd /usr/local/src/ciao-1.8p2/bin/SolarisSparc && \ ln -s ../../engine/*.[ch] . && \ ln -s ../../engine/Makefile . && \ rm -f configure.h make createincludedir
is right in the beginning of the output of make.
So, any ideas? All I did was edit SETTINGS and run make. The system is fairly gnu-ified, and it is used for compiling a diverse assortment of things, so most tools are there and/or fairly up-to-date (gcc2.95.3 versus newer gcc3+ is a topic for another day).
If there's some patch I need, or something I need to edit, please let me know! I don't want to mess around any more, because it's such an obvious bug that I have to believe it's something stupid on my end...
Thanks,
-V Hoffman
Vasilios Hoffman Junior Unix Administrator Wesleyan University voice (860) 685-3142 fax (860) 685-2401 ============================================================================== Message: Address: Action: help majordomo(a)clip.dia.fi.upm.es Info. on useful commands subscribe ciao-users-request(a)clip.dia.fi.upm.es Subscribe to this list unsubscribe ciao-users-request(a)clip.dia.fi.upm.es Unsubscribe from this list <whatever> ciao-users(a)clip.dia.fi.upm.es Send message to list ----------------------------------------------------------------------------- Archived messages: http://www.clip.dia.fi.upm.es/Mail/ciao-users/ -----------------------------------------------------------------------------
Vasilios Hoffman writes:
which is definately because unix_utils.c is using setenv() -- and that's not present in solaris C libraries (at least through solaris 8, I haven't checked solaris 9). It's not present in a lot of C libraries, so I'm very surprised that it's used when it is detecting a "SolarisSparc" system -- which it does, btw, for example:
Hum, you're right, Vasilios. I've just tried compiling in a local Solaris machine. The best I can say is that it certainly used to work, and that somehow the bug sneaked into the stable version. Sorry about this; we will cook up a patch and send it to you (and incorporate it into the next development release, due soon).
MCL
________________________________________________________ Virtuosity is no big deal, if you don't mind practicing. ============================================================================== Message: Address: Action: help majordomo(a)clip.dia.fi.upm.es Info. on useful commands subscribe ciao-users-request(a)clip.dia.fi.upm.es Subscribe to this list unsubscribe ciao-users-request(a)clip.dia.fi.upm.es Unsubscribe from this list <whatever> ciao-users(a)clip.dia.fi.upm.es Send message to list ----------------------------------------------------------------------------- Archived messages: http://www.clip.dia.fi.upm.es/Mail/ciao-users/ -----------------------------------------------------------------------------
Thanks! That is wonderful -- I knew it used to work too, hence the surprise. Such is life under multiple platforms <grin>.
best,
-V Hoffman
On Tue, 24 Sep 2002, Manuel Carro wrote:
Vasilios Hoffman writes:
which is definately because unix_utils.c is using setenv() -- and that's not present in solaris C libraries (at least through solaris 8, I haven't checked solaris 9). It's not present in a lot of C libraries, so I'm very surprised that it's used when it is detecting a "SolarisSparc" system -- which it does, btw, for example:
Hum, you're right, Vasilios. I've just tried compiling in a localSolaris machine. The best I can say is that it certainly used to work, and that somehow the bug sneaked into the stable version. Sorry about this; we will cook up a patch and send it to you (and incorporate it into the next development release, due soon).
MCL
Virtuosity is no big deal, if you don't mind practicing.
============================================================================== Message: Address: Action: help majordomo(a)clip.dia.fi.upm.es Info. on useful commands subscribe ciao-users-request(a)clip.dia.fi.upm.es Subscribe to this list unsubscribe ciao-users-request(a)clip.dia.fi.upm.es Unsubscribe from this list <whatever> ciao-users(a)clip.dia.fi.upm.es Send message to list ----------------------------------------------------------------------------- Archived messages: http://www.clip.dia.fi.upm.es/Mail/ciao-users/ -----------------------------------------------------------------------------
Sorry to bother you folks, but I'm building ciao-1.8p2 on a solaris/sparc 5.7 platform with gcc 2.95.3, and there is a surprising error. The make fails because of the following error:
The piece of code below, to be added to unix_utils.c right before
BOOL prolog_setenvstr(Arg) ....
should make the trick:
/*----------------------------------------------------------*/
#if defined(Solaris) /* emulate setenv in terms of putenv (from rpm 2.0.9 source code) */ int setenv(const char *name, const char *value, int overwrite) { int len; if (!overwrite && getenv(name)) return 0; len = strlen(name) + strlen(value) + 2; if (len < 255) { char buf[256]; strcpy(buf, name); strcat(buf, "="); strcat(buf, value); return putenv(buf); } else { char *buf = malloc(len); strcpy(buf, name); strcat(buf, "="); strcat(buf, value); return putenv(buf); } } #endif
/*----------------------------------------------------------*/
Credits for finding the patch are due to Jose F. Morales (jfran(a)clip.dia.fi.upm.es), one of the lab members.
MCL
____________________________________ I like beer for breakfast sometimes. ============================================================================== Message: Address: Action: help majordomo(a)clip.dia.fi.upm.es Info. on useful commands subscribe ciao-users-request(a)clip.dia.fi.upm.es Subscribe to this list unsubscribe ciao-users-request(a)clip.dia.fi.upm.es Unsubscribe from this list <whatever> ciao-users(a)clip.dia.fi.upm.es Send message to list ----------------------------------------------------------------------------- Archived messages: http://www.clip.dia.fi.upm.es/Mail/ciao-users/ -----------------------------------------------------------------------------