Return-Path: X-Original-To: apmail-httpd-modules-dev-archive@minotaur.apache.org Delivered-To: apmail-httpd-modules-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0301996F3 for ; Fri, 22 Jun 2012 00:27:41 +0000 (UTC) Received: (qmail 60255 invoked by uid 500); 22 Jun 2012 00:27:40 -0000 Delivered-To: apmail-httpd-modules-dev-archive@httpd.apache.org Received: (qmail 60226 invoked by uid 500); 22 Jun 2012 00:27:40 -0000 Mailing-List: contact modules-dev-help@httpd.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: modules-dev@httpd.apache.org Delivered-To: mailing list modules-dev@httpd.apache.org Received: (qmail 60213 invoked by uid 99); 22 Jun 2012 00:27:40 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Jun 2012 00:27:40 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jlewis@silverhawk.net designates 209.85.210.45 as permitted sender) Received: from [209.85.210.45] (HELO mail-pz0-f45.google.com) (209.85.210.45) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Jun 2012 00:27:33 +0000 Received: by dadn2 with SMTP id n2so1898849dad.18 for ; Thu, 21 Jun 2012 17:27:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding :x-gm-message-state; bh=LGWRnoqEwwyPEqQOW5aebEnRRbGudSBC4pG6E8q4zDg=; b=nDtIleoQrsMZtwC5qsGM3U9UV3PoEkukS2A09YZlMT7qqAPaU2ioArRql4OY0HEXM4 T5E2DNyN1rtv890HgCTa9OcgZoe61BbqcnQn9fcPHaBkuE+wDX5BP93SL33/nDZ62hP3 vHEwfNhFiGVCVrHwPBInmQE5vLvIbGCV2F8sY7ALKW4NdWzmZ+w/t1z8E3eMA7XvITMu Ck1I2SPYKaYfqi1OWf/OtGs93NuW61cli1W7rCjCxEEIWONcEaWucFxgU9/BlqNqpisH Z7p83LLRSwPbDalL4PCf7UgD7ESVeyN6UWK+YasBPME/cSgFMLwglPc9S13irQtW5MOS Hlew== Received: by 10.68.129.100 with SMTP id nv4mr3345904pbb.153.1340324831670; Thu, 21 Jun 2012 17:27:11 -0700 (PDT) Received: from [192.168.1.148] (cottonwoodheights.silverhawk.net. [63.226.93.31]) by mx.google.com with ESMTPS id mt9sm37152119pbb.14.2012.06.21.17.27.10 (version=SSLv3 cipher=OTHER); Thu, 21 Jun 2012 17:27:11 -0700 (PDT) Sender: Joe Lewis Message-ID: <4FE3BBDD.2070208@joe-lewis.com> Date: Thu, 21 Jun 2012 18:27:09 -0600 From: Joe Lewis User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 To: modules-dev@httpd.apache.org Subject: Re: SOLVED was Re: How to compiling/link/use Apache module that uses shared library? References: <20120621194952.FRB10.186918.imail@eastrmwml214> In-Reply-To: <20120621194952.FRB10.186918.imail@eastrmwml214> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQlx9HJdz6fCR+5ANRe6it9EGcoPfbwmcfinBuBLIBx16aStJvQi5qg0jxxEHeKChdg5dXZG On 6/21/12 5:49 PM, ohaya@cox.net wrote: > ---- ohaya@cox.net wrote: >> ---- Sorin Manolache wrote: >>> And I forgot to say: run gdb in some sort of environment where you see >>> your current source code line and a couple of surrounding lines. You >>> could achieve this with the "list" command, but I prefer running gdb in >>> emacs and let emacs do the nice listing of source code in a different panel. >>> >>> S >> >> Here's the function from my source. It's the original from mod_headers.c, plus my printf: >> >> >> static int header_post_config(apr_pool_t *pconf, apr_pool_t *plog, >> apr_pool_t *ptemp, server_rec *s) >> { >> printf("In header_post_config\n"); >> header_ssl_lookup = APR_RETRIEVE_OPTIONAL_FN(ssl_var_lookup); >> return OK; >> } >> >> Jim > > Hi, > > I was able to get the segfault to go away. Here's what I had to do: > > - Created /etc/ld.so.conf.d/my.conf, and added the directory where my libobaccess.so was > - Run 'ldconfig' to activate. > - In the apxs command, DON'T include the -L and -l arguments > > After that, Apache appears to start ok, without segfault :)!! > > Thanks for all of the great help, esp. the suggestion about checking "ldconfig -p". I still don't understand why, but I'm just glad that I can get past this piece so now I can debug my module :)... > > Later, > Jim I'm just glad this list is as good as it is! FYI, the ldconfig is the dynamic linker control, and those /etc/ld.so.conf.d files provide additional search directories for the linker to check in when loading a library. Joe -- http://www.silverhawk.net/