[Solved] Compilation error: fatal error: php.h: No such file or directory

Hello,

I tried to compile homegear 0.6 from git on Arch Linux. libhomegear.base worked without a problem. However, homegear fails with the following error:

In file included from ScriptEngine/php_sapi.cpp:32:0:
ScriptEngine/php_sapi.h:44:17: fatal error: php.h: No such file or directory
compilation terminated.
Makefile:670: recipe for target 'ScriptEngine/libscriptengine_a-php_sapi.o' failed

PHP 7 is already installed. A look into the makefile makes me wonder who should provide /usr/include/php7-homegear:
github.com/Homegear/Homegear/bl … ile.am#L26
I only have /usr/include/php with the same subfolders.

Sven

I found this documentation:
homegear.eu/doc/en-US/html/sect … anual.html

I started to write packages for Arch Linux. No I got stuck as there is no qdbm.
It seems that homegear 0.6 adds a lot of dependencies :frowning:

That’s the right one :wink:. Homegear needs PHP7 with thread support. That’s why it needs to be compiled manually. Most distributions only provide PHP7 without thread support.

Not directly. PHP does. You don’t need to compile all PHP modules. Homegear doesn’t depend on any of them except pthreads. So tell configure to not compile qdbm: “–without-qdbm”.

Cheers,

Sathya

Ah, thanks for the information. do I need nothing but --enable-pthreads?
No --enable-xml, no --enable-zip, etc? That would make thinks a lot easier.

While compiling homegear, it expects several libraries (-lqdbm, -lenchant). Are these dependencies gone when compiling php without these modules?
In addition, compiling failed because -lphp7-homegear was missing. Does homegear expect a shared library (.so)? I thought php7-homegear is only an executable.

Thanks for the help
Sven

Hm the homegear makefile need qdbm and enchant:

src/Makefile.am:LIBS += -Wl,-Bstatic -lphp7-homegear -Wl,-Bdynamic -lz -lexslt -lresolv -ltermcap -ledit -lrt -lmcrypt -lltdl -lgmp -lenchant -lqdbm -lrt -lm -lnsl -lxml2 -lxslt -lcrypt -lcrypto -lssl

Is this just e dafault configuration? I’m still struggeling, what the minimum is.

I got everything compiled, finaly.
I will publish the results as aur packages for Arch Linux.

AUR packages are now available for testing:
[ul]
[li] aur.archlinux.org/packages/php7-homegear/[/li]
[li] aur.archlinux.org/packages/libh … -base-git/[/li]
[li] aur.archlinux.org/packages/homegear-git/[/li]
[li] aur.archlinux.org/packages/home … idcos-git/[/li][/ul]

Hey,

wow, great!!! Thank you!!!

It is probably better to include more dependencies than less. The configuration I use is based on the Debian default configuration. If only a minimal configuration is used, it might be, (future) Homegear modules (similar to the OpenWeatherMap module) are not working.

Cheers,

Sathya