Re: [squid-users] Building on Mac OSX

From: Matt Cochran <matt.cochran_at_yahoo.com>
Date: Sun, 9 Oct 2011 06:59:43 -0700 (PDT)

I got it to build on Mac OS - but I would get compile errors from a straight, no options ./configure. I can get past the compile errors with some simple changes, but I also get some linking errors unless I use�--disable-eui --disable-auth. Unfortunately I need the auth option! Can someone help me out with resolving the problems with TypedMsgHeader.h and the linker errors below? Address.h - added�#include<sys/types.h> fatal.h, splay.h, util.h and SquidNew.h (although I'm not sure why it helped this last one) - added�#include"config.h" so that�SQUIDCEXTERN was available In TypedMsgHeader.h, I get an "array bound is not an integer constant" for the struct definition here. To get past it I just set the array size to an arbitrary value, as I'm not sure why it doesn't work. Obviously that is not a fix... � ��structCtrlBuffer{ � � � � charraw[CMSG_SPACE(sizeof(int))]; ///< control buffer space for one fd � � }� I also noticed that in adaptation/ecap/XactionRep.cc there is a conflict if you use --enable-ecap and --disable-auth, the class is using a property on the HttpRequest object that is not defined if auth is disabled, which is probably a rare case anyway. It would need to have something like: const libecap::Area Adaptation::Ecap::XactionRep::usernameValue() const { � � const HttpRequest *request = dynamic_cast<const HttpRequest*>(theCauseRep ? �� � � � � � � � � � � � � � � � theCauseRep->raw().header : theVirginRep.raw().header); � � Must(request); #if USE_AUTH � � if (request->auth_user_request != NULL) { � � � � if (char const *name = request->auth_user_request->username()) � � � � � � return libecap::Area::FromTempBuffer(name, strlen(name)); � � } #endif � � return libecap::Area(); } So if I leave eui and auth enabled, I get the following linker error. I can live without eui, but I really need the auth part to work, and it's just that last entry for (Auth::StateData::CBDATA_StateData): Undefined symbols for architecture x86_64: � "Eui::Eui48::lookup(Ip::Address const&)", referenced from: � � � connStateCreate(RefCount<Comm::Connection> const&, http_port_list*)� � in client_side.o � � � ACLARP::match(ACLChecklist*)� � � in libacls.a(Arp.o) � "Eui::Eui64::lookup(Ip::Address const&)", referenced from: � � � connStateCreate(RefCount<Comm::Connection> const&, http_port_list*)� � in client_side.o � � � ACLEui64::match(ACLChecklist*)� � � in libacls.a(Eui64.o) � "Eui::Eui48::encode(char*, int)", referenced from: � � � makeExternalAclKey(ACLFilledChecklist*, _external_acl_data*) � � � in external_acl.o � � � aclDumpArpListWalkee(Eui::Eui48* const&, void*)in libacls.a(Arp.o) � � � Format::Format::assemble(MemBuf&, AccessLogEntry*, int) constin libformat.a(Format.o) � "Eui::Eui64::encode(char*, int)", referenced from: � � � makeExternalAclKey(ACLFilledChecklist*, _external_acl_data*) � � � in external_acl.o � � � aclDumpEuiListWalkee(Eui::Eui64* const&, void*)in libacls.a(Eui64.o) libtool: link: rm -f ".libs/squidS.o" � � � Format::Format::assemble(MemBuf&, AccessLogEntry*, int) constin libformat.a(Format.o) � "Eui::Eui48::decode(char const*)", referenced from: � � � aclParseArpData(char const*)in libacls.a(Arp.o) � "Eui::Eui64::decode(char const*)", referenced from: � � � aclParseEuiData(char const*)in libacls.a(Eui64.o) � "Auth::StateData::CBDATA_StateData", referenced from: � � � AuthBasicUserRequest::module_start(void (*)(void*, char*), void*)in libauth.a(lt3-UserRequest.o) � � � AuthNTLMUserRequest::module_start(void (*)(void*, char*), void*)in libauth.a(lt6-UserRequest.o) � � � AuthNegotiateUserRequest::module_start(void (*)(void*, char*), void*)in libauth.a(lt9-UserRequest.o) � � � AuthDigestUserRequest::module_start(void (*)(void*, char*), void*)in libauth.a(lt12-UserRequest.o) ld: symbol(s) not found for architecture x86_64 Any suggestions? I'm not sure how the linker isn't finding a 64bit library for these things, since I'm just building with the defaults. Matt ________________________________ From: Matt Cochran <matt.cochran_at_yahoo.com> To: Squid <squid-users_at_squid-cache.org> Sent: Thursday, October 6, 2011 6:10 AM Subject: Re: [squid-users] Building on Mac OSX Unfortunately, I'm trying to work with libecap, and need the 3.2 version to build on the Mac. It seems like the configure step is not identifying the correct headers in a few cases, where is a good place to start troubleshooting this? It looks like the config pieces changed dramatically between 3.1 and 3.2. Matt ________________________________ From: jeffrey j donovan <donovan_at_beth.k12.pa.us> To: Matt Cochran <matt.cochran_at_yahoo.com> Cc: Squid <squid-users_at_squid-cache.org> Sent: Sunday, September 25, 2011 5:02 PM Subject: Re: [squid-users] Building on Mac OSX I had the same problem, Im still running 3.1.x it compiles just fine. -j On Sep 24, 2011, at 4:51 PM, Matt Cochran wrote: > I've been trying to build squid 3.2 on OSX, and I'm getting a lot of errors, does anyone know of a guide for this? >� > I'm seeing things like: libtool: compile:� g++ -DHAVE_CONFIG_H -I../.. -I../../include -I../../lib -I../../src -I../../include -I../../libltdl -Wall -Wpointer-arith -Wwrite-strings -Wcomments -Werror -pipe -D_REENTRANT -g -O2 -MT Config.lo -MD -MP -MF .deps/Config.Tpo -c Config.cc� -fno-common -DPIC -o .libs/Config.o > In file included from ../../src/protos.h:35, >� � � � � � � � � from Config.cc:3: > ../../src/Packer.h:46: error: 'va_list' has not been declared > > If I add an include for <cstdarg>, and remove the SQUIDCEXTERN macro in Packer.h, I get a bit farther, but things like Address.h start to break because it doesn't seem to set the defines for HAVE_NETINET_IN_H. If I force that to 1 I get a bit farther, but there's more problems past that. > > Anyone have an idea? > > Matt >
Received on Sun Oct 09 2011 - 13:59:51 MDT

This archive was generated by hypermail 2.2.0 : Tue Oct 11 2011 - 12:00:03 MDT