Hi everybody,

I just intall the OpenBSD 3.7, and i want to use it with apache2/mysql/php5.
About apache2 (compiled from sources) & MySQL5 (taken for their website
sources) all is fine and work perfectly.

I wanted next to install PHP5, the 5.0.5 as it is the latest version.
I need a special configuration for PHP, so I'd like to compile it with my
options. 

* I took the sources from php.net
* ./configure (without option to make it easier)
* make
and in the 3rd file of compilation, I have this mistake : 

gcc  -Iext/dom/ -I/root/softwares/php-5.0.5/ext/dom/ -DPHP_ATOM_INC
-I/root/softwares/php-5.0.5/include -I/root/softwares/php-5.0.5/main
-I/root/softwares/php-5.0.5 -I/usr/local/include/libxml2
-I/usr/local/include -I/root/softwares/php-5.0.5/TSRM
-I/root/softwares/php-5.0.5/Zend    -g -O2  -c
/root/softwares/php-5.0.5/ext/dom/php_dom.c -o ext/dom/php_dom.o  && echo >
ext/dom/php_dom.lo
In file included from
/root/softwares/php-5.0.5/ext/standard/basic_functions.h:28,
                 from /root/softwares/php-5.0.5/ext/standard/php_rand.h:29,
                 from /root/softwares/php-5.0.5/ext/dom/php_dom.c:29:
/usr/include/wchar.h:110: error: syntax error before "mbstate_t"
/usr/include/wchar.h:112: error: syntax error before "mbstate_t"
/usr/include/wchar.h:113: error: syntax error before '*' token
/usr/include/wchar.h:115: error: syntax error before "mbstate_t"
/usr/include/wchar.h:116: error: syntax error before "mbstate_t"
/usr/include/wchar.h:132: error: syntax error before "mbstate_t"
*** Error code 1

Stop in /root/softwares/php-5.0.5 (line 337 of Makefile).


The problem is about an OpenBSD misconfiguration. I wanted to test with
compiling the bash shell in the port source tree, and I have the same error
:

cc  -DPROGRAM='"bash"' -DCONF_HOSTTYPE='"i386"' -DCONF_OSTYPE='"openbsd3.7"'
-DCONF_MACHTYPE='"i386-unknown-openbsd3.7"' -DCONF_VENDOR='"unknown"'
-DLOCALEDIR='"/usr/local/share/locale"' -DPACKAGE='"bash"' -DSHELL
-DHAVE_CONFIG_H  -I.  -I. -I./include -I./lib   -g -o mksyntax ./mksyntax.c
In file included from config-bot.h:134,
                 from config.h:975,
                 from mksyntax.c:23:
/usr/include/wchar.h:110: error: syntax error before "mbstate_t"
/usr/include/wchar.h:112: error: syntax error before "mbstate_t"
/usr/include/wchar.h:113: error: syntax error before '*' token
/usr/include/wchar.h:115: error: syntax error before "mbstate_t"
/usr/include/wchar.h:116: error: syntax error before "mbstate_t"
/usr/include/wchar.h:132: error: syntax error before "mbstate_t"
In file included from config-bot.h:135,
                 from config.h:975,
                 from mksyntax.c:23:
/usr/include/wctype.h:72: error: syntax error before "wctype_t"
/usr/include/wctype.h:73: error: syntax error before "wctype"
*** Error code 1

Stop in /usr/ports/shells/bash/w-bash-3.0.16p1/bash-3.0 (line 614 of
Makefile).
*** Error code 1

Stop in /usr/ports/shells/bash (line 1855 of
/usr/ports/infrastructure/mk/bsd.port.mk).


So I said, ok, let's grab the compiled port packages.... But the thing is
that it is compiled with Apache1 and not Apache2... So the module cannot
work with my system.

I wanted to compil then the php5.0.5 from the port source tree, but you can
imagine I had an error :

# cd /usr/ports/www/php5
# make
[...]
===>  Configuring for php5-core-5.0.5
configure: loading site script /usr/ports/infrastructure/db/config.site
checking build system type... i386-unknown-openbsd3.7 checking host system
type... i386-unknown-openbsd3.7
shtool:echo:Warning: unable to determine terminal sequence for bold mode
shtool:echo:Warning: unable to determine terminal sequence for bold mode
checking for gcc... cc checking for C compiler default output... configure:
error: C compiler cannot create executables
*** Error code 77

Stop in /usr/ports/www/php5/core (line 1826 of
/usr/ports/infrastructure/mk/bsd.port.mk).
*** Error code 1

Stop in /usr/ports/www/php5 (line 109 of
/usr/ports/infrastructure/mk/bsd.port.subdir.mk).


I'm now embarresed because I don't know how to make PHP5 work :O( So do you
know a patch about the /usr/include/wchar.h problem ? 
And is it possible to fix the port package problem ?

Thank you so much for helping me.

Maxime Alexandre

--------- My configuration -----------
I didn't change anything in the system configuration.

Arch : PC (i386)

# uname -a
OpenBSD larbin.maxhouse.lan 3.7 GENERIC#50 i386

No file /etc/mk.conf

Reply via email to