Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:45252 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 87161 invoked from network); 9 Aug 2009 20:52:34 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Aug 2009 20:52:34 -0000 Authentication-Results: pb1.pair.com smtp.mail=farleyknight@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=farleyknight@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.219.224 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: farleyknight@gmail.com X-Host-Fingerprint: 209.85.219.224 mail-ew0-f224.google.com Received: from [209.85.219.224] ([209.85.219.224:41461] helo=mail-ew0-f224.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0D/F5-55947-1173F7A4 for ; Sun, 09 Aug 2009 16:52:34 -0400 Received: by ewy24 with SMTP id 24so2854649ewy.23 for ; Sun, 09 Aug 2009 13:52:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=5pD5dpEu5ZnUNaL6vo+z7vXGS43U3ye40iymrJsq5a0=; b=F1TU/ZsKtk40BlNF34P9UmE/v5WB8BXfFXiZdeow6oDxtH7U/UsnDLkGETcmU+xUAm iKq8KJCP+rZMiZnVjEIC5x8OmP/6wHcYvV+9/5xJbWT+ZvLqe3mFUhfZA+6jVqN4kUZ2 24WPeJekzH+gVq4yHFe+M6uEqqbl8a5wgoNPM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=Ds5O22oGzZZv2OQdqouN7oRbVifXijh+RQHsxln3Iu/QAMKuLW7Qju4BQu53TOAKMO e9+CLFn2PvwCLPH8jZmADAcnutc8ANBwqYMtnNK34kW479V1yhOFhQJ+C9pe2d+o9tHM vR1HSbSDQNbcgAuHpTudWa4mKMeMoFBO5kogk= MIME-Version: 1.0 Received: by 10.210.57.15 with SMTP id f15mr2204903eba.54.1249851150145; Sun, 09 Aug 2009 13:52:30 -0700 (PDT) In-Reply-To: References: <200907132215.10768.thomas@koch.ro> Date: Sun, 9 Aug 2009 16:52:10 -0400 Message-ID: To: Paul Biggar Cc: thomas@koch.ro, internals@lists.php.net Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Can't use embeded sapi From: farleyknight@gmail.com (Farley Knight) On Mon, Jul 13, 2009 at 7:17 PM, Paul Biggar wrote: > Hi Thomas, > > On Mon, Jul 13, 2009 at 9:15 PM, Thomas Koch wrote: >> gcc =A0-c -I/usr/local/include/php/ -I/usr/local/include/php/main - >> I/usr/local/include/php/Zend -I/usr/local/include/php/TSRM -Wall -g -o >> worker.o worker.c >> gcc =A0-L/usr/local/lib -lphp5 -o worker worker.o >> worker.o: In function `main': >> /var/checkouts/gearman-php-worker/worker.c:5: undefined reference to >> `php_embed_init' >> /var/checkouts/gearman-php-worker/worker.c:6: undefined reference to >> `php_embed_shutdown' >> collect2: ld returned 1 exit status >> make: *** [all] Error 1 > > This worked for me, with your commands and program. Since its a linker > error, it seems likely that you haven't installed libphp5.so properly. > You didn't indicate that you ran make install, did you? If so, you may > want to verify that there is a libphp5.so in /usr/local/lib, and that > it is a shared library. > > I don't think Thomas is completely off here.. For most of the morning I've been trying to compile 5.3.0: make clean; ./configure --enable-embed=3Dshared; make && sudo make install But when I went to build #include int main(int argc, char *argv[]) { PHP_EMBED_START_BLOCK(argc, argv); PHP_EMBED_END_BLOCK(); return 0; } using gcc -o embed_test embed_test.c -I/usr/local/include/php/ -I/usr/local/include/php/main -I/usr/local/include/php/Zend -I/usr/local/include/php/TSRM -L/usr/local/lib -lphp5 I kept getting /tmp/cc9OgNuw.o: In function `main': embed_test.c:(.text+0x21): undefined reference to `php_embed_init' embed_test.c:(.text+0x65): undefined reference to `php_embed_shutdown' However, when I run config and make for 5.2.10, the test file compiles just fine. Something must have changed between the two versions... Not sure what, though.. Probably will dig deeper into this.. Thanks, - Farley