DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2008-09-01 13:55:53

n3rd
Member
From: Netherlands
Registered: 2008-06-14
Posts: 16
Website

Compile php with libxml2

When i try to compile PHP --with-libxml2 i get a lot of errors like the following:

/home/ubuntu/Desktop/cross/php/php-5.2.6/ext/libxml/libxml.c:938: error: `object' undeclared (first use in this function)
/home/ubuntu/Desktop/cross/php/php-5.2.6/ext/libxml/libxml.c:941: error: `docp' undeclared (first use in this function)
/home/ubuntu/Desktop/cross/php/php-5.2.6/ext/libxml/libxml.c: At top level:
/home/ubuntu/Desktop/cross/php/php-5.2.6/ext/libxml/libxml.c:952: error: parse error before '*' token
/home/ubuntu/Desktop/cross/php/php-5.2.6/ext/libxml/libxml.c: In function `php_libxml_decrement_doc_ref':
/home/ubuntu/Desktop/cross/php/php-5.2.6/ext/libxml/libxml.c:956: error: `object' undeclared (first use in this function)
/home/ubuntu/Desktop/cross/php/php-5.2.6/ext/libxml/libxml.c:960: error: `xmlDoc' undeclared (first use in this function)
/home/ubuntu/Desktop/cross/php/php-5.2.6/ext/libxml/libxml.c:960: error: parse error before ')' token
/home/ubuntu/Desktop/cross/php/php-5.2.6/ext/libxml/libxml.c: At top level:
/home/ubuntu/Desktop/cross/php/php-5.2.6/ext/libxml/libxml.c:977: error: parse error before "node"
/home/ubuntu/Desktop/cross/php/php-5.2.6/ext/libxml/libxml.c: In function `php_libxml_node_free_resource':
/home/ubuntu/Desktop/cross/php/php-5.2.6/ext/libxml/libxml.c:979: error: `node' undeclared (first use in this function)
/home/ubuntu/Desktop/cross/php/php-5.2.6/ext/libxml/libxml.c:984: error: `XML_DOCUMENT_NODE' undeclared (first use in this function)

Ending with:

make: *** [ext/libxml/libxml.lo] Error 1

I have no clue how i can solve this. I'm almost sure i compiled libxml2 successfull because i did use it to compile some other binaries that where succesfull.
I also did compile php successfull without libxml2.

Does anyone have a suggestion what I can do or what the problem is? Thanx for you help.

Offline

 

#2 2008-09-02 11:38:02

n3rd
Member
From: Netherlands
Registered: 2008-06-14
Posts: 16
Website

Re: Compile php with libxml2

By accident i figured what it was, I was passing the lib directory to --with-libxml-dir while it should be the prefix only.

Maybe someone can tell me why php can't find libmysqlclient.so.15 while mysql can after making a symlink to the /lib directory?

Edit:
Ok, i succeeded in compiling php 5.2.6 with most of the standard features. Openssl and curl are missing i think i did not compile them correctly and gd is missing but i think it might consume too much memory anyway.

You can download it here:
http://www.n3rd.nl/ch3wnas/php-5.2.6/

I did compile most as shared, so you can enable only the extension you really need (I'll advise you to enable as less as possible). You can enable and disable extensions in php.ini witch is located at /mnt/HD_a2/www/php/php.ini
Don't forget to download libmysqlclient.so.15.0.0 if you plan to use mysql/mysqli/pdo_mysql and make the correct symlink to /lib/mysql/libmysqlclient.so.15 otherwise you wil get a segmentation fault error.

Last edited by n3rd (2008-09-04 14:59:36)

Offline

 

#3 2009-05-04 14:26:12

bfg100k
Member
Registered: 2007-09-15
Posts: 55

Re: Compile php with libxml2

Hi n3rd,

Will it be possible for you to list down the steps to compile PHP on the DNS-323? I'm in need of imap support in PHP for the box but so far, all the precompiled binaries do not have it. Hence I'm looking at some DIY time over the next couple of weekends. The trouble is... I'm new to compilation on the linux environment, let alone the DNS-323. Any help will be greatly appreciated.

Thanks!

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB