Return-Path: Delivered-To: apmail-apr-dev-archive@www.apache.org Received: (qmail 14219 invoked from network); 13 Jun 2005 20:15:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 13 Jun 2005 20:15:43 -0000 Received: (qmail 28200 invoked by uid 500); 13 Jun 2005 20:15:40 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 28175 invoked by uid 500); 13 Jun 2005 20:15:40 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Id: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 28162 invoked by uid 99); 13 Jun 2005 20:15:39 -0000 X-ASF-Spam-Status: No, hits=0.1 required=10.0 tests=FORGED_RCVD_HELO X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from warspite.concentric.net (HELO warspite.cnchost.com) (207.155.248.9) by apache.org (qpsmtpd/0.28) with ESMTP; Mon, 13 Jun 2005 13:15:39 -0700 Received: from rcsv650.rowe-clan.net (c-24-13-128-132.hsd1.il.comcast.net [24.13.128.132]) by warspite.cnchost.com id QAA24113; Mon, 13 Jun 2005 16:15:22 -0400 (EDT) [ConcentricHost SMTP Relay 1.17] Errors-To: Message-Id: <6.2.1.2.2.20050613150337.053c4eb0@pop3.rowe-clan.net> X-Mailer: QUALCOMM Windows Eudora Version 6.2.1.2 Date: Mon, 13 Jun 2005 15:12:57 -0500 To: Nicholas Merryman From: "William A. Rowe, Jr." Subject: Re: Problem creating statically linked executable with APR Cc: dev@apr.apache.org In-Reply-To: References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Nicholas; don't use libapr - that refers to 0.9.x and you will undoubtedly create headaches. Retain libapr-1 if that's the version you mean to build against. Use apr-config-1 to query apr for the paths to the library, compile time variables, etc. And it appears you might be missing -lc, which you would get by querying apr-util for the link flags. Bill At 10:08 AM 6/13/2005, Nicholas Merryman wrote: >Before I integrated APR functionality into this program, I could create the static executable with no problems. Below are my compile options / output. I simply renamed libapr-1.a to libapr.a and moved it to /linus/luz/lib, where all the other static libraries for my project reside. Using the dynamic libapr, everything works fine, but I have a specific need for this static executable. > > >g++ -c -o/linus/luz/obj/client/collectall/collectall.o -O1 -fPIC -W -Wall -Wno-unused -DFDR_OS_LINUX -DFDR_OS_FLAVOR_REDHAT -DFDR_OS_VERSION=73 -DFDR_HARDWARE_IX86 -DFDR_PLATFORM_LINUX_GENERIC_GNU -DFDR_PLATFORM_LUZ -DPLATFORM_COMPONENT_NAME=\"collectall\" -I /linus/src/fdr/include/public -I /linus/src/fdr/include/private -I /linus/src/fdr/include -I /linus/src/fdr/include/private/linux -I /linus/src/fdr/include/private/gcc collectall.cpp > >g++ -static -O1 -fPIC -W -Wall -Wno-unused -DFDR_OS_LINUX -DFDR_OS_FLAVOR_REDHAT -DFDR_OS_VERSION=73 -DFDR_HARDWARE_IX86 -o /linus/luz/bin/collectall /linus/luz/obj/client/collectall/collectall.o /linus/luz/lib/libfdrcore.a /linus/luz/lib/libxml.pi.a /linus/luz/lib/libreport.pi.a /linus/luz/lib/libzlib.a /linus/luz/lib/libapr.a -lz -lpthread -ldl -Xlinker -rpath-link -Xlinker /linus/luz/lib -L/linus/luz/lib >/linus/luz/lib/libapr.a(dso.o)(.text+0x91): In function `apr_dso_load': >dso/unix/dso.c:138: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking >/linus/luz/lib/libapr.a(groupinfo.o)(.text+0x24): In function `apr_gid_name_get': >user/unix/groupinfo.c:39: Using 'getgrgid_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking >/linus/luz/lib/libapr.a(groupinfo.o)(.text+0x78): In function `apr_gid_get': >user/unix/groupinfo.c:58: Using 'getgrnam_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking >/linus/luz/lib/libapr.a(userinfo.o)(.text+0x19): In function `getpwnam_safe': >user/unix/userinfo.c:41: Using 'getpwnam_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking >/linus/luz/lib/libapr.a(userinfo.o)(.text+0x100): In function `apr_uid_name_get': >user/unix/userinfo.c:117: Using 'getpwuid_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking >/linus/luz/lib/libapr.a(sockaddr.o)(.text+0x476): In function `call_resolver': >network_io/unix/sockaddr.c:336: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking >/linus/luz/lib/libapr.a(sockaddr.o)(.text+0x7d7): In function `apr_getservbyname': >network_io/unix/sockaddr.c:701: Using 'getservbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking > > >Any ideas how can I resolve this? > >Thanks, >Nick