[phc-general] command mysql_pconnect
Mickel
mickel at telecomjordaan.nl
Mon Feb 13 21:12:42 GMT 2012
Hi paul,
Still no luck.
THis is what i have done.
-install clean ubuntu.
-compile php with this commandline.
CFLAGS="-O3" ./configure --enable-bcmath --with-gmp --enable-embed --enable-calendar --enable-libxml --disable-ipv6 --without-gd --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-dba --enable-xmlreader --enable-dom --enable-shmop --enable-soap --with-pic --enable-mbstring --enable-dba --enable-embed --with-zlib --enable-sockets --enable-pdo=shared --with-pdo-sqlite=shared --with-sqlite=shared --with-pear --with-gettext=shared --enable-ftp --enable-embedded-mysqli --with-openssl-dir --with-pcre-regex --enable-xml --enable-session --enable-shared --with-jpeg-dir=/root/Downloads/UC8400/BERoot --enable-xmlreader --enable-xmlwriter --enable-simplexml --enable-debug -enable-tokenizer --enable-wddx --with-mysql --enable-spl --enable-ctype --enable-posix --disable-all
make && make install
-install phc with ./configure and make && make install
-compile PHP for arm with this commandline (it is the same as normal x86, only the mysql dir is directed to the armsource package i have from manufacture; otherwise mysql will not work)
export PATH=/usr/local/arm-linux-4.4.2/bin/:$PATH
export CC=/usr/local/arm-linux-4.4.2/bin/xscale-linux-gcc
export CXX=/usr/local/arm-linux-4.4.2/bin/xscale-linux-cpp
export CPP=/usr/local/arm-linux-4.4.2/bin/xscale-linux-cpp
export RANLIB=/usr/local/arm-linux-4.4.2/bin/xscale-linux-ranlib
export STRIP=/usr/local/arm-linux-4.4.2/bin/xscale-linux-strip
export LDFLAGS="-s -Xlinker -rpath /lib -Xlinker -rpath-link /usr/local/arm-linux-4.4.2/lib"
rm ./config.cache
CFLAGS="-O3" ./configure --host=xscale-linux --target=xscale --prefix=/php-arm --enable-bcmath --enable-embed --enable-calendar --enable-libxml --disable-ipv6 --without-gd --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-dba --enable-xmlreader --enable-dom --enable-shmop --enable-soap --with-pic --enable-mbstring --enable-dba --enable-embed --with-zlib --enable-sockets --enable-pdo=shared --with-pdo-sqlite=shared --with-sqlite=shared --with-pear --with-gettext=shared --enable-ftp --enable-embedded-mysqli --with-openssl-dir --with-pcre-regex --enable-xml --enable-session --enable-shared --with-jpeg-dir=/root/Downloads/UC8400/BERoot --enable-xmlreader --enable-xmlwriter --enable-simplexml --enable-debug -enable-tokenizer --enable-wddx --enable-spl --enable-ctype --enable-posix --with-mysql=/root/Downloads/UC8400/BERoot --disable-all ac_cv_c_bigendian_php="yes"
make && make install prefix=/php-arm
-make c program from php with command
phc --generate-c handler.php > handler.c
-Trying compile handler.c for arm with command(normal x86 compile Works ok)
export PATH=/usr/local/arm-linux-4.4.2/bin/:$PATH
xscale-linux-gcc -v -I/php-arm/include/php -I/php-arm/include/php/main -I/php-arm/include/php/TSRM -I/php-arm/include/php/Zend -L/php-arm/lib -Wl,-R/php-arm/lib -lphp5 -O0 -ohandler
This is the output.
Using built-in specs.
Target: arm-linux
Configured with: ../gcc-4.4.2/configure --host=i686-pc-linux --build=i686-pc-linux --target=arm-linux --prefix=/usr/local/arm-linux-4.4.2 --with-gmp=/usr/local/arm-linux-4.4.2/tools --with-mpfr=/usr/local/arm-linux-4.4.2/tools --with-headers=/home/work/stdlinux/linux-2.6.x/include --with-gnu-ld --with-gnu-as --without-newlib --enable-long-long --disable-libada --without-cvs --disable-libgomp --disable-libmudflap --disable-libssp --enable-threads --enable-__cxa_atexit --enable-shared --enable-languages=c,c++ --with-system-zlib --with-mpc=/usr/local/arm-linux-4.4.2/tools --enable-multilib : (reconfigured) ../gcc-4.4.2/configure --host=i686-pc-linux --build=i686-pc-linux --target=arm-linux --prefix=/usr/local/arm-linux-4.4.2 --with-gmp=/usr/local/arm-linux-4.4.2/tools --with-mpfr=/usr/local/arm-linux-4.4.2/tools --with-headers=/home/work/stdlinux/linux-2.6.x/include --with-gnu-ld --with-gnu-as --without-newlib --enable-long-long --disable-libada --without-cvs --disable-libgomp --disable-libmudflap --disable-libssp --enable-threads --enable-__cxa_atexit --enable-shared --enable-languages=c,c++ --with-system-zlib --with-mpc=/usr/local/arm-linux-4.4.2/tools --enable-multilib : (reconfigured) ../gcc-4.4.2/configure --host=i686-pc-linux --build=i686-pc-linux --target=arm-linux --prefix=/usr/local/arm-linux-4.4.2 --with-gmp=/usr/local/arm-linux-4.4.2/tools --with-mpfr=/usr/local/arm-linux-4.4.2/tools --with-headers=/home/work/stdlinux/linux-2.6.x/include --with-gnu-ld --with-gnu-as --without-newlib --enable-long-long --disable-libada --without-cvs --disable-libgomp --disable-libmudflap --disable-libssp --enable-threads --enable-__cxa_atexit --enable-shared --enable-languages=c,c++ --with-system-zlib --with-mpc=/usr/local/arm-linux-4.4.2/tools --enable-multilib : (reconfigured) ../gcc-4.4.2/configure --host=i686-pc-linux --build=i686-pc-linux --target=arm-linux --prefix=/usr/local/arm-linux-4.4.2 --with-gmp=/usr/local/arm-linux-4.4.2/tools --with-mpfr=/usr/local/arm-linux-4.4.2/tools --with-headers=/home/work/stdlinux/linux-2.6.x/include --with-gnu-ld --with-gnu-as --without-newlib --enable-long-long --disable-libada --without-cvs --disable-libgomp --disable-libmudflap --disable-libssp --enable-threads --enable-__cxa_atexit --enable-shared --enable-languages=c,c++ --with-system-zlib --with-mpc=/usr/local/arm-linux-4.4.2/tools --enable-multilib : (reconfigured) ../gcc-4.4.2/configure --host=i686-pc-linux --build=i686-pc-linux --target=arm-linux --prefix=/usr/local/arm-linux-4.4.2 --with-gmp=/usr/local/arm-linux-4.4.2/tools --with-mpfr=/usr/local/arm-linux-4.4.2/tools --with-headers=/home/work/stdlinux/linux-2.6.x/include --with-gnu-ld --with-gnu-as --without-newlib --enable-long-long --disable-libada --without-cvs --disable-libgomp --disable-libmudflap --disable-libssp --enable-threads --enable-__cxa_atexit --enable-shared --enable-languages=c,c++ --with-system-zlib --with-mpc=/usr/local/arm-linux-4.4.2/tools --enable-multilib
Thread model: posix
gcc version 4.4.2 (GCC)
COMPILER_PATH=/usr/local/arm-linux-4.4.2/libexec/gcc/arm-linux/4.4.2/:/usr/local/arm-linux-4.4.2/libexec/gcc/arm-linux/4.4.2/:/usr/local/arm-linux-4.4.2/libexec/gcc/arm-linux/:/usr/local/arm-linux-4.4.2/lib/gcc/arm-linux/4.4.2/:/usr/local/arm-linux-4.4.2/lib/gcc/arm-linux/:/usr/local/arm-linux-4.4.2/lib/gcc/arm-linux/4.4.2/../../../../arm-linux/bin/
LIBRARY_PATH=/usr/local/arm-linux-4.4.2/lib/gcc/arm-linux/4.4.2/be/:/usr/local/arm-linux-4.4.2/lib/gcc/arm-linux/4.4.2/../../../../arm-linux/lib/be/:/usr/local/arm-linux-4.4.2/lib/gcc/arm-linux/4.4.2/:/usr/local/arm-linux-4.4.2/lib/gcc/arm-linux/4.4.2/../../../../arm-linux/lib/
COLLECT_GCC_OPTIONS='-mbig-endian' '-v' '-I/php-arm/include/php' '-I/php-arm/include/php/main' '-I/php-arm/include/php/TSRM' '-I/php-arm/include/php/Zend' '-L/php-arm/lib' '-R/root/Downloads/UC8400/BERoot/lib/mysql' '-O0' '-ohandler'
/usr/local/arm-linux-4.4.2/libexec/gcc/arm-linux/4.4.2/collect2 --eh-frame-hdr -dynamic-linker /lib/ld-linux.so.2 -X -EB -m armelf_linux -p -ohandler /usr/local/arm-linux-4.4.2/lib/gcc/arm-linux/4.4.2/../../../../arm-linux/lib/be/crt1.o /usr/local/arm-linux-4.4.2/lib/gcc/arm-linux/4.4.2/../../../../arm-linux/lib/be/crti.o /usr/local/arm-linux-4.4.2/lib/gcc/arm-linux/4.4.2/be/crtbegin.o -L/php-arm/lib -L/usr/local/arm-linux-4.4.2/lib/gcc/arm-linux/4.4.2/be -L/usr/local/arm-linux-4.4.2/lib/gcc/arm-linux/4.4.2/../../../../arm-linux/lib/be -L/usr/local/arm-linux-4.4.2/lib/gcc/arm-linux/4.4.2 -L/usr/local/arm-linux-4.4.2/lib/gcc/arm-linux/4.4.2/../../../../arm-linux/lib -R/php-arm/lib -lphp5 -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/local/arm-linux-4.4.2/lib/gcc/arm-linux/4.4.2/be/crtend.o /usr/local/arm-linux-4.4.2/lib/gcc/arm-linux/4.4.2/../../../../arm-linux/lib/be/crtn.o
/usr/local/arm-linux-4.4.2/lib/gcc/arm-linux/4.4.2/../../../../arm-linux/bin/ld: warning: libmysqlclient.so.16, needed by /php-arm/lib/libphp5.so, not found (try using -rpath or -rpath-link)
/usr/local/arm-linux-4.4.2/lib/gcc/arm-linux/4.4.2/../../../../arm-linux/lib/be/crt1.o: In function `_start':
init.c:(.text+0x34): undefined reference to `main'
/php-arm/lib/libphp5.so: undefined reference to `mysql_server_end at libmysqlclient_16'
/php-arm/lib/libphp5.so: undefined reference to `mysql_errno at libmysqlclient_16'
/php-arm/lib/libphp5.so: undefined reference to `mysql_get_server_info at libmysqlclient_16'
/php-arm/lib/libphp5.so: undefined reference to `mysql_list_fields at libmysqlclient_16'
/php-arm/lib/libphp5.so: undefined reference to `mysql_select_db at libmysqlclient_16'
/php-arm/lib/libphp5.so: undefined reference to `mysql_real_escape_string at libmysqlclient_16'
/php-arm/lib/libphp5.so: undefined reference to `mysql_get_client_info at libmysqlclient_16'
/php-arm/lib/libphp5.so: undefined reference to `mysql_real_connect at libmysqlclient_16'
/php-arm/lib/libphp5.so: undefined reference to `mysql_error at libmysqlclient_16'
/php-arm/lib/libphp5.so: undefined reference to `mysql_ping at libmysqlclient_16'
/php-arm/lib/libphp5.so: undefined reference to `mysql_real_query at libmysqlclient_16'
/php-arm/lib/libphp5.so: undefined reference to `mysql_list_tables at libmysqlclient_16'
/php-arm/lib/libphp5.so: undefined reference to `mysql_fetch_row at libmysqlclient_16'
/php-arm/lib/libphp5.so: undefined reference to `mysql_use_result at libmysqlclient_16'
/php-arm/lib/libphp5.so: undefined reference to `mysql_init at libmysqlclient_16'
/php-arm/lib/libphp5.so: undefined reference to `mysql_affected_rows at libmysqlclient_16'
/php-arm/lib/libphp5.so: undefined reference to `mysql_thread_id at libmysqlclient_16'
/php-arm/lib/libphp5.so: undefined reference to `mysql_options at libmysqlclient_16'
/php-arm/lib/libphp5.so: undefined reference to `mysql_field_count at libmysqlclient_16'
/php-arm/lib/libphp5.so: undefined reference to `mysql_info at libmysqlclient_16'
/php-arm/lib/libphp5.so: undefined reference to `mysql_num_fields at libmysqlclient_16'
/php-arm/lib/libphp5.so: undefined reference to `mysql_close at libmysqlclient_16'
/php-arm/lib/libphp5.so: undefined reference to `mysql_eof at libmysqlclient_16'
/php-arm/lib/libphp5.so: undefined reference to `mysql_character_set_name at libmysqlclient_16'
/php-arm/lib/libphp5.so: undefined reference to `mysql_fetch_lengths at libmysqlclient_16'
/php-arm/lib/libphp5.so: undefined reference to `mysql_num_rows at libmysqlclient_16'
/php-arm/lib/libphp5.so: undefined reference to `mysql_list_processes at libmysqlclient_16'
/php-arm/lib/libphp5.so: undefined reference to `mysql_free_result at libmysqlclient_16'
/php-arm/lib/libphp5.so: undefined reference to `mysql_stat at libmysqlclient_16'
/php-arm/lib/libphp5.so: undefined reference to `mysql_get_host_info at libmysqlclient_16'
/php-arm/lib/libphp5.so: undefined reference to `mysql_insert_id at libmysqlclient_16'
/php-arm/lib/libphp5.so: undefined reference to `mysql_field_seek at libmysqlclient_16'
/php-arm/lib/libphp5.so: undefined reference to `mysql_set_character_set at libmysqlclient_16'
/php-arm/lib/libphp5.so: undefined reference to `mysql_store_result at libmysqlclient_16'
/php-arm/lib/libphp5.so: undefined reference to `mysql_list_dbs at libmysqlclient_16'
/php-arm/lib/libphp5.so: undefined reference to `mysql_data_seek at libmysqlclient_16'
/php-arm/lib/libphp5.so: undefined reference to `mysql_server_init at libmysqlclient_16'
/php-arm/lib/libphp5.so: undefined reference to `mysql_get_proto_info at libmysqlclient_16'
/php-arm/lib/libphp5.so: undefined reference to `mysql_fetch_field at libmysqlclient_16'
/php-arm/lib/libphp5.so: undefined reference to `mysql_escape_string at libmysqlclient_16'
collect2: ld returned 1 exit status
Please let me know how to solve this, there is something in the line about -rpath or -rpath-link
But i don't know how to use this
Please assist,
Thanks in advance.
Br Mickel
-----Oorspronkelijk bericht-----
Van: Paul Biggar [mailto:paul.biggar at gmail.com]
Verzonden: zaterdag 11 februari 2012 19:21
Aan: Mickel
CC: phc-general at phpcompiler.org
Onderwerp: Re: [phc-general] command mysql_pconnect
Hi Mickel,
I mean compile PHP with that option.
Paul
On Sat, Feb 11, 2012 at 03:28, Mickel <mickel at telecomjordaan.nl> wrote:
> Hi paul,
>
>
>
> Do you mean a phc recompile with option –enable-mysql
>
> Or do i also recompile php with the mysql option?
>
>
>
> PLease let me know.
>
>
>
> Mickel
>
>
>
> Van: Paul Biggar [mailto:paul.biggar at gmail.com]
> Verzonden: vrijdag 10 februari 2012 23:56
> Aan: Mickel
> CC: phc-general at phpcompiler.org
> Onderwerp: Re: [phc-general] command mysql_pconnect
>
>
>
> It sounds like phc is linking to a library that doesn't have MySQL
> installed. Did you specify --enable-mysql when building it?
>
> Sent from my phone - please excuse brevity
>
> On Feb 10, 2012 12:49 p.m., "Mickel" <mickel at telecomjordaan.nl> wrote:
>
> Hi all,
>
>
>
> First of all, keep up the good work with phc.
>
>
>
> I have compiled a PHP code to a executable for a arm
> processor(embedded)
>
> First installed php and pch on my ubuntu box.
>
> Then i compiled PHP for arm.
>
>
>
> After i created the C code from the php code i can crosscompile the
> code to run on the Arm embedded box.
>
>
>
> In the PHP code the is a mysql connection using mysql_pconnect to
> connect to DB
>
>
>
> When i run the executable on the armbox i getting a error.
>
> Fatal error: __MAIN__(): Call to undefined function mysql_pconnect()
> in <unknown> on line 0
>
>
>
> Please help me with this issue.
>
> Thanks in advance
>
>
>
> Mickel
>
>
> _______________________________________________
> phc-general mailing list
> phc-general at phpcompiler.org
> https://nova.villiros.com/cgi-bin/mailman/listinfo/phc-general
--
Paul Biggar
paulbiggar.com
@paulbiggar
Check out my startup: http://circleci.com - Continuous Integration made easy!
More information about the phc-general
mailing list