Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:15774 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 80557 invoked by uid 1010); 3 Apr 2005 22:13:39 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 80542 invoked from network); 3 Apr 2005 22:13:39 -0000 Received: from unknown (HELO pb1.pair.com) (127.0.0.1) by localhost with SMTP; 3 Apr 2005 22:13:39 -0000 X-Host-Fingerprint: 208.187.189.114 unknown Linux 2.4/2.6 Received: from ([208.187.189.114:48170] helo=linus.supernerd.com) by pb1.pair.com (ecelerity HEAD r(5268)) with SMTP id 2E/D2-19272-29A60524 for ; Sun, 03 Apr 2005 18:13:38 -0400 Received: from localhost (localhost [127.0.0.1]) by linus.supernerd.com (Postfix) with ESMTP id 825C7BB580; Sun, 3 Apr 2005 15:18:49 -0700 (MST) Received: from linus.supernerd.com ([127.0.0.1]) by localhost (linus [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 08866-09; Sun, 3 Apr 2005 15:18:48 -0700 (MST) Received: from [10.0.0.6] (unknown [67.172.240.114]) by linus.supernerd.com (Postfix) with ESMTP id BA7BBBB728; Sun, 3 Apr 2005 15:18:47 -0700 (MST) Message-ID: <42506B61.4000001@supernerd.com> Date: Sun, 03 Apr 2005 16:17:05 -0600 User-Agent: Mozilla Thunderbird 1.0RC1 (Windows/20041201) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Michael Johnston Cc: internals@lists.php.net References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at linus.supernerd.com Subject: Re: [PHP-DEV] os x linking issue with extension From: john@supernerd.com (John LeSueur) Michael Johnston wrote: > (I'm not sure if extension development belongs on this list, but I > couldn't find a better one. If there is a more appropriate list, could > someone please point me to it?) > > I am working on an extension that is os x specific & relies on Carbon > & ApplicationServices (it is a port of appscript, to allow writing > applescript applications in php). > > I used ext_skel to create an extension, and ran phpize. In the > config.m4, I put: > > PHP_ADD_FRAMEWORK(Carbon) > PHP_ADD_INCLUDE("/Developer/Headers/FlatCarbon") > > but when I attempt to use carbon api I get an undefined symbol error > from the dynamic linker. > > looking at the configure script generated by phpize, it seemed to me > that the PHP_ADD_FRAMEWORK macro is not actually being used to affect > the build. I attempted to change this by manually editing the > configure script to add $PHP_FRAMEWORKS to the arguments passed to > linktool mode=link, and added PHP_VAR_SUBST="$PHP_FRAMEWORKS". Using > make --debug, I verified that linktool mode=link was now being called > with the -framework param, but I still get the same undefined symbol > error. > > I don't know much about how the dynamic linker works. What do I need > to do to have extension .so link to carbon? > > I am using the 5.0.3 release source package of php, os x 10.3.8, gcc 3.3 > > > Michael Johnston > You might find more help on pecl-dev. Specifically gabe has written some config.m4 stuff for osx that uses php_ADD_FRAMEWORK(). It's in the php_zeroconf extension. John LeSueur