Re: [squid-users] Solaris/OpenSSL/MD5 Issues

From: Amos Jeffries <squid3@dont-contact.us>
Date: Sun, 11 Nov 2007 13:39:49 +1300

Randall DuCharme wrote:
> Just an update Amos,
>
> I took the patch plus the change to fix the copy/paste error, hand
> applied relevant bits to 2.6.STABLE16 and it complained about not
> being able to find MD5Init, MD5Update and MD5Final. Seems it's in
> libmd5.so.1. I guess that would be logical LOL. I hacked configure.in
> like so...
>
> --- AC_CHECK_LIB(crypt, crypt, [CRYPTLIB="-lcrypt"])
> +++ AC_CHECK_LIB(crypt, crypt, [CRYPTLIB="-lcrypt -lmd5"])
>
> and I now have a running version of 2.6.STABLE16! That might not
> be the best way to do this though huh? Oh... and it builds nicely
> with SunStudio12 as well. ( I have diffs if needed but but you
> already know what's changed )

Great finding the lib was the next hard bit.

Maybe this would be the better one if it works:

   AC_CHECK_LIB(crypt, crypt, [CRYPTLIB=" -lcrypt "])
   AC_CHECK_LIB(md5, MD5Init, [CRYPTLIB+=" -lmd5 "])

that leaves crypt for the older OS. but adds md5 for any with it
present. I"m testing it on an OS without libmd5 now to see if there is a
bigger problem.

Thank you very much for both finding this and helping to test the solution.

If there were any other changes beyond the patch I sent and the above
could you send me a patch back and I'll queue it for any future 26 releases.

>
> I am not quite as lucky with 3.0.RC1 yet. I'm going to get some
> dinner and revisit this afterwards but I'm currently left with this:
>
> g++ -Werror -Wall -Wpointer-arith -Wwrite-strings -Wcomments -D_REENTRANT -pthreads -DSOLARIS2=11 -O3 -m64 -march=opteron -mcpu=opteron -mtune=opteron -msse3 -m3dnow -mfpmath=sse -pthreads -m64 -o ufsdump debug.o int.o mem.o store_key_md5.o StoreMeta.o StoreMetaMD5.o StoreMetaSTD.o StoreMetaSTDLFS.o StoreMetaUnpacker.o StoreMetaURL.o StoreMetaVary.o String.o time.o ufsdump.o url.o AsyncCall.o BodyPipe.o ConfigParser.o store.o StoreFileSystem.o StoreSwapLogData.o access_log.o acl.o acl_noncore.o ACLChecklist.o ACLProxyAuth.o ACLUserData.o ACLRegexData.o ACLStringData.o authenticate.o cache_cf.o cache_manager.o CacheDigest.o carp.o cbdata.o client_db.o client_side.o client_side_reply.o client_side_request.o clientStream.o comm_select.o comm_select_win32.o comm_poll.o comm_epoll.o comm_kqueue.o ConfigOption.o disk.o dns_internal.o errorpage.o ETag.o event.o external_acl.o ExternalACLEntry.o fd.o fde.o filemap.o forward.o fqdncache.o ftp.o gopher.o helper.o htcp.o http.o
> HttpStatusLine.o HttpHdrCc.o HttpHdrRange.o HttpHdrSc.o HttpHdrScTarget.o HttpHdrContRange.o HttpHeader.o HttpHeaderTools.o HttpBody.o HttpMsg.o HttpReply.o HttpRequest.o HttpRequestMethod.o icmp.o icp_v2.o icp_v3.o ACLIdent.o ident.o internal.o ipc.o ipcache.o list.o logfile.o mem_node.o MemBuf.o MemObject.o mime.o multicast.o neighbors.o net_db.o Packer.o Parsing.o pconn.o peer_digest.o peer_select.o redirect.o referer.o refresh.o RemovalPolicy.o send-announce.o snmp_core.o snmp_agent.o tunnel.o Server.o SquidNew.o stat.o StatHist.o stmem.o store_io.o StoreIOState.o store_client.o store_digest.o store_dir.o store_log.o store_rebuild.o store_swapin.o store_swapmeta.o store_swapout.o SwapDir.o tools.o unlinkd.o URLScheme.o urn.o useragent.o wccp.o wccp2.o whois.o wordlist.o repl_modules.o globals.o string_arrays.o -L/usr/local/lib/amd64 ./.libs/libsquid.a -L/usr/sfw/lib/amd64 ./.libs/libauth.a /usr/sfw/lib/amd64/libstdc++.so -lgcc_s
> -L/export/home/randy/Download/squid-3.0.RC1/lib repl/liblru.a fs/libufs.a auth/libntlm.a auth/libbasic.a auth/libdigest.a auth/libnegotiate.a -lcrypt -lmd5 ../snmplib/libsnmp.a -lmiscutil -lpthread -lm -lresolv -lmalloc -lsocket -lnsl -Wl,-R -Wl,/usr/sfw/lib/amd64 -Wl,-R -Wl,/usr/sfw/lib/amd64 -Wl,-R -Wl,/usr/local/lib/amd64
> ld: warning: file /usr/sfw/lib/amd64/libstdc++.so: attempted multiple inclusion of file
> Undefined first referenced
> symbol in file
> esiEnableProcessing(HttpReply*) client_side_reply.o
> esiProcessStream(clientStreamNode*, ClientHttpRequest*, HttpReply*, StoreIOBuffer) client_side_reply.o
> esiStreamRead(clientStreamNode*, ClientHttpRequest*) client_side_reply.o
> esiStreamDetach(clientStreamNode*, ClientHttpRequest*) client_side_reply.o
> esiStreamStatus(clientStreamNode*, ClientHttpRequest*) client_side_reply.o
> ESIParser::Type cache_cf.o
> ld: fatal: Symbol referencing errors. No output written to ufsdump
> collect2: ld returned 1 exit status
> gmake[3]: *** [ufsdump] Error 1
<snip>

Okay. That looks like another seperate problem than MD5.

For some reason you have "-Wl,-R -Wl,/usr/sfw/lib/amd64"
twice times at the end of the g++ parameters, that looks to be the problem.
Are you manually setting those flags or leaving to the autotools?

Amos
Received on Sat Nov 10 2007 - 17:39:49 MST

This archive was generated by hypermail pre-2.1.9 : Sat Dec 01 2007 - 12:00:05 MST