Hi,
At 15.28 25/10/2005, Markus Schlup wrote:
Hi,
I've got the following compile error when trying to compile
squid-2.5.STABLE12 on solaris 9:
make[3]: Entering directory `/data/packagesystem/build/squid-2.5.STABLE12/src'
gcc -g -O2 -Wall -D_REENTRANT -pthreads -o squid access_log.o
acl.o asn.o authenticate.o cache_cf.o CacheDigest.o cache_manager.o
carp.o cbdata.o client_db.o client_side.o comm.o comm_select.o
debug.o delay_pools.o disk.o dns_internal.o errorpage.o ETag.o
event.o external_acl.o fd.o filemap.o forward.o fqdncache.o ftp.o
gopher.o helper.o http.o HttpStatusLine.o HttpHdrCc.o
HttpHdrRange.o HttpHdrContRange.o HttpHeader.o HttpHeaderTools.o
HttpBody.o HttpMsg.o HttpReply.o HttpRequest.o icmp.o icp_v2.o
icp_v3.o ident.o internal.o ipc.o ipcache.o logfile.o main.o mem.o
MemPool.o MemBuf.o mime.o multicast.o neighbors.o net_db.o Packer.o
pconn.o peer_digest.o peer_select.o redirect.o referer.o refresh.o
send-announce.o snmp_core.o snmp_agent.o ssl.o stat.o StatHist.o
String.o stmem.o store.o store_io.o store_client.o store_digest.o
store_dir.o store_key_md5.o store_log.o store_rebuild.o
store_swapin.o store_swapmeta.o store_swapout.o tools.o unlinkd.o
url.o urn.o useragent.o wais.o wccp.o whois.o repl_modules.o
auth_modules.o store_modules.o globals.o string_arrays.o -L../lib
repl/liblru.a fs/libdiskd.a fs/libaufs.a fs/libufs.a auth/libbasic.a
-lcrypt -lregex -L../snmplib -lsnmp -lmiscutil -lrt -lpthread -lm
-lresolv -lsocket -lnsl
Undefined first referenced
symbol in file
setenv cache_cf.o
ld: fatal: Symbol referencing errors. No output written to squid
collect2: ld returned 1 exit status
make[3]: *** [squid] Error 1
make[3]: Leaving directory `/data/packagesystem/build/squid-2.5.STABLE12/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/data/packagesystem/build/squid-2.5.STABLE12/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/data/packagesystem/build/squid-2.5.STABLE12/src'
make: *** [all-recursive] Error 1
The call to setenv seems to be introduced in -STABLE12, I didn't
find it in -STABLE11 ... unfortunately this function does not seem
to exist on solaris. But there is putenv which seems to do the same
thing ... and which is also available on solaris. So I patched the
file "src/cache_cf.c" with the following (not sure if this is
absolutely correct):
--- squid-2.5.STABLE12-orig/src/cache_cf.c 2005-09-28
23:42:33.000000000 +0200
+++ squid-2.5.STABLE12/src/cache_cf.c 2005-10-25 13:40:38.000000000 +0200
@@ -312,6 +312,7 @@
static void
configDoConfigure(void)
{
+ char homebuf[BUFSIZ];
LOCAL_ARRAY(char, buf, BUFSIZ);
memset(&Config2, '\0', sizeof(SquidConfig2));
/* init memory as early as possible */
@@ -441,7 +442,9 @@
Config2.effectiveUserID = pwd->pw_uid;
Config2.effectiveGroupID = pwd->pw_gid;
if (pwd->pw_dir && *pwd->pw_dir)
- setenv("HOME", pwd->pw_dir, 1);
+ snprintf(homebuf, BUFSIZ, "%s=%s", "HOME", pwd->pw_dir);
+ /* setenv("HOME", pwd->pw_dir, 1); */
+ putenv(homebuf);
}
} else {
Config2.effectiveUserID = geteuid();
Can anyone confirm or comment on this?
Your analysis is correct:
http://www.squid-cache.org/bugs/show_bug.cgi?id=1435
Regards
Guido
-
========================================================
Guido Serassio
Acme Consulting S.r.l. - Microsoft Certified Partner
Via Lucia Savarino, 1 10098 - Rivoli (TO) - ITALY
Tel. : +39.011.9530135 Fax. : +39.011.9781115
Email: guido.serassio@xxxxxxxxxxxxxxxxx
WWW: http://www.acmeconsulting.it/