Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:59565 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 9230 invoked from network); 9 Apr 2012 21:52:48 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Apr 2012 21:52:48 -0000 Authentication-Results: pb1.pair.com header.from=luke@cywh.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=luke@cywh.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain cywh.com from 209.85.210.45 cause and error) X-PHP-List-Original-Sender: luke@cywh.com X-Host-Fingerprint: 209.85.210.45 mail-pz0-f45.google.com Received: from [209.85.210.45] ([209.85.210.45:62190] helo=mail-pz0-f45.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D3/60-34074-F2A538F4 for ; Mon, 09 Apr 2012 17:52:47 -0400 Received: by dacx6 with SMTP id x6so5941816dac.18 for ; Mon, 09 Apr 2012 14:52:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=user-agent:date:subject:from:to:message-id:thread-topic :mime-version:content-type:x-gm-message-state; bh=iW4owlDkig23ZpnzjS7e35D/ybotKYTwsYdjewa4a88=; b=XPzb9PbRbvMegxtZpD1IiJsP2BTY38sSOc/QEynKg7KgmOyg5iC93ac4pkphQehe2R a77SlREtntli/xX39wZqMdIEJIMd+YiLMnQOIf4wyrlD9KCba1oLlI291UrTT9/wl4dN AFFcVotY8E44CAhnjZzK6yaxA4P4Cphja76PTqEc8MVdMJ7ESP302wmnjaB7u2UVzoAS TSf0s5GmxlVcjj/tF+uzW5z4D+PWszqz8kJqgWUd+Hqlfl9NDCfXw6mHNDZImqTuWSv5 mYsJSxGmPKOCbiPJgQz98n1P+KA5LCT6g59NqKsRHDhsIWcecX66Zzvhme40koTvjDzH au9g== Received: by 10.68.134.4 with SMTP id pg4mr23013934pbb.37.1334008364692; Mon, 09 Apr 2012 14:52:44 -0700 (PDT) Received: from [10.1.10.222] ([66.60.139.106]) by mx.google.com with ESMTPS id e7sm15969206pbs.21.2012.04.09.14.52.43 (version=SSLv3 cipher=OTHER); Mon, 09 Apr 2012 14:52:44 -0700 (PDT) User-Agent: Microsoft-MacOutlook/14.13.0.110805 Date: Mon, 09 Apr 2012 14:54:23 -0700 To: PHP Internals Message-ID: Thread-Topic: Writing an extension - dyld: ...Symbol not found Mime-version: 1.0 Content-type: multipart/alternative; boundary="B_3416828066_88865" X-Gm-Message-State: ALoCoQlrPHsd0fq9yf9g+dvTmzaw403CNVHypc4HXW7deVs4u37K2G4kOPnG5DdGxsj5uqn6fm1Z Subject: Writing an extension - dyld: ...Symbol not found From: luke@cywh.com (Luke Scott) --B_3416828066_88865 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit I'm writing an extension called "V8PHP". It's similar to the V8JS extension, but the implementation is quite different. I'm having trouble linking the v8 library to my extension. When I run a PHP script via CLI I get: dyld: lazy symbol binding failed: Symbol not found: __ZN2v86String3NewEPKci Referenced from: /phpdev/lib/php/extensions/debug-zts-20090626/v8php.so Expected in: flat namespace dyld: Symbol not found: __ZN2v86String3NewEPKci Referenced from: /phpdev/lib/php/extensions/debug-zts-20090626/v8php.so Expected in: flat namespace Trace/BPT trap I have PHP installed in /phpdev/ (--prefix=/phpdev). v8 was compiled with gyp using the following commands: cd /v8/ make dependencies make native And this outputted these files to /v8/out/native/: libpreparser_lib.a libv8_base.a libv8_nosnapshot.a libv8_snapshot.a obj/ obj.target/ And the obj.target directory has a bunch of .a files in obj.target/v8_base/src/. I created a soft link from /v8/include/v8.h to /phpdev/include/v8.h, /v8/include/v8stdint.h to /phpdev/include/v8stdint.h, and /v8/out/native/libv8_base.a to /phpdev/lib/libv8.a. My config.m4 file looks like this: PHP_ARG_ENABLE(v8php, [V8PHP], [--enable-v8php Include V8 JavaScript Engine]) if test $PHP_V8PHP != "no"; then SEARCH_PATH="$prefix /usr/local /usr" SEARCH_FOR="/include/v8.h" if test -r $PHP_V8PHP/$SEARCH_FOR; then V8_DIR=$PHP_V8PHP else AC_MSG_CHECKING([for V8 files in default path]) for i in $SEARCH_PATH ; do if test -r $i/$SEARCH_FOR; then V8_DIR=$i AC_MSG_RESULT(found in $i) fi done fi if test -z "$V8_DIR"; then AC_MSG_RESULT([not found]) AC_MSG_ERROR([Unable to locate V8]) fi PHP_ADD_INCLUDE($V8_DIR/include) PHP_ADD_LIBRARY_WITH_PATH(v8, $V8_DIR/$PHP_LIBDIR, V8PHP_SHARED_LIBADD) PHP_SUBST(V8PHP_SHARED_LIBADD) PHP_REQUIRE_CXX() PHP_NEW_EXTENSION(v8php, v8php.cc v8_class.cc, $ext_shared) fi It _seems_ like libv8.a is trying to link to something else... but I'm not sure. My extension compiled fine. I'm on Mac OS X 10.6.x. Anyone know what the problem could be? Luke --B_3416828066_88865--