Req #55669 [Opn->Bgs]: compile is ok, but can not run it
| From: | laruence@php.net | Date: | Mon, 12 Sep 2011 03:14:07 +0000 |
| Subject: | Req #55669 [Opn->Bgs]: compile is ok, but can not run it | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-163443@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=55669&edit=1
ID: 55669
Updated by: laruence@php.net
Reported by: inqing at gmail dot com
Summary: compile is ok, but can not run it
-Status: Open
+Status: Bogus
Type: Feature/Change Request
Package: Dynamic loading
Operating System: ubuntu server 64bit
PHP Version: trunk-SVN-2011-09-11 (SVN)
Block user comment: N
Private report: N
New Comment:
plz *DO NOT* send your own question to bug-web, pecl-dev mail list is which you
should trun to.
and for you question, as a comment, use -Wall, you will see a implicit declaration
of function,
and btw you should use php_ext_skel to generate/compile extension
Previous Comments:
------------------------------------------------------------------------
[2011-09-11 18:00:13] inqing at gmail dot com
Description:
------------
Hi phper, There's a trouble with my extension, I just make a sample extension. compile is ok,
but when i use ld() function to load my extension, it tells me that 'php: symbol lookup error:
/usr/local/lib/php/extensions/no-debug-non-zts-20060613/tintin.so: undefined symbol:
init_array'. I don't know why, can you help me? My php version is 5.2.17 and system is
Ubuntu Server 64
Test script:
---------------
PHP_FUNCTION(tintin_split){
zval *new_chars;
init_array(new_chars);
}
I use this command to compile as follow:
cc -fpic -DCOMPILE_DL_TINTIN=1 -I/usr/local/include -I. -I../.. -I../../Zend -I../../main
-I../../TSRM -c -o tintin.o tintin.c
cc -shared -L/usr/local/lib -L/usr/local/lib/php -L/usr/lib -L. -rdynamic -o tintin.so tintin.o
cp tintin.so /usr/local/lib/php/extensions/no-debug-non-zts-20060613/
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=55669&edit=1