Build Probleme Jessie x64

Ich versuche den aktuellen master tree unter Debian-Jessie x64 zu bauen und scheitere beim Kompilieren der ScriptEngine mit unten aufgeführten Fehlermeldungen. PHP hab ich meiner Meinung nach richtig recompiliert und installiert, aber möglicherweise liegt es trotzdem daran. Hier einmal die Fehlermeldungen

LSD

==== Building scriptengine (release) ====
php_sapi.cpp
Libraries/ScriptEngine/php_sapi.cpp: In function ‘zend_homegear_globals* php_homegear_get_globals()’:
Libraries/ScriptEngine/php_sapi.cpp:44:49: error: ‘tsrm_ls’ was not declared in this scope
  return ((zend_homegear_globals*) (*((void ***) tsrm_ls))[((homegear_globals_id)-1)]);
                                                 ^
Libraries/ScriptEngine/php_sapi.cpp: In function ‘int php_homegear_read_post(char*, uint)’:
Libraries/ScriptEngine/php_sapi.cpp:36:64: error: expected primary-expression before ‘*’ token
 #define SEG(v) TSRMG(homegear_globals_id, zend_homegear_globals*, v)
                                                                ^
Libraries/ScriptEngine/php_sapi.cpp:85:5: note: in expansion of macro ‘SEG’
  if(SEG(commandLine)) return 0;
     ^
Libraries/ScriptEngine/php_sapi.cpp:36:65: error: expected primary-expression before ‘,’ token
 #define SEG(v) TSRMG(homegear_globals_id, zend_homegear_globals*, v)
                                                                 ^
Libraries/ScriptEngine/php_sapi.cpp:85:5: note: in expansion of macro ‘SEG’
  if(SEG(commandLine)) return 0;
     ^
Libraries/ScriptEngine/php_sapi.cpp:85:9: error: ‘commandLine’ was not declared in this scope
  if(SEG(commandLine)) return 0;
         ^
Libraries/ScriptEngine/php_sapi.cpp:36:67: note: in definition of macro ‘SEG’
 #define SEG(v) TSRMG(homegear_globals_id, zend_homegear_globals*, v)
                                                                   ^
Libraries/ScriptEngine/php_sapi.cpp:36:68: error: ‘TSRMG’ was not declared in this scope
 #define SEG(v) TSRMG(homegear_globals_id, zend_homegear_globals*, v)
                                                                    ^
Libraries/ScriptEngine/php_sapi.cpp:85:5: note: in expansion of macro ‘SEG’
  if(SEG(commandLine)) return 0;
     ^
Libraries/ScriptEngine/php_sapi.cpp:36:64: error: expected primary-expression before ‘*’ token
 #define SEG(v) TSRMG(homegear_globals_id, zend_homegear_globals*, v)
                                                                ^
Libraries/ScriptEngine/php_sapi.cpp:86:24: note: in expansion of macro ‘SEG’
  BaseLib::HTTP* http = SEG(http);
                        ^
Libraries/ScriptEngine/php_sapi.cpp:36:65: error: expected primary-expression before ‘,’ token
 #define SEG(v) TSRMG(homegear_globals_id, zend_homegear_globals*, v)
                                                                 ^
Libraries/ScriptEngine/php_sapi.cpp:86:24: note: in expansion of macro ‘SEG’
  BaseLib::HTTP* http = SEG(http);
                        ^
Libraries/ScriptEngine/php_sapi.cpp:36:68: error: ‘TSRMG’ was not declared in this scope
 #define SEG(v) TSRMG(homegear_globals_id, zend_homegear_globals*, v)
                                                                    ^
Libraries/ScriptEngine/php_sapi.cpp:86:24: note: in expansion of macro ‘SEG’
  BaseLib::HTTP* http = SEG(http);
                        ^
Libraries/ScriptEngine/php_sapi.cpp: In function ‘char* php_homegear_read_cookies()’:
Libraries/ScriptEngine/php_sapi.cpp:36:64: error: expected primary-expression before ‘*’ token
 #define SEG(v) TSRMG(homegear_globals_id, zend_homegear_globals*, v)
                                                                ^
Libraries/ScriptEngine/php_sapi.cpp:95:5: note: in expansion of macro ‘SEG’
  if(SEG(commandLine)) return 0;
     ^
Libraries/ScriptEngine/php_sapi.cpp:36:65: error: expected primary-expression before ‘,’ token
 #define SEG(v) TSRMG(homegear_globals_id, zend_homegear_globals*, v)
                                                                 ^
Libraries/ScriptEngine/php_sapi.cpp:95:5: note: in expansion of macro ‘SEG’
  if(SEG(commandLine)) return 0;
     ^
Libraries/ScriptEngine/php_sapi.cpp:95:9: error: ‘commandLine’ was not declared in this scope
  if(SEG(commandLine)) return 0;
         ^
Libraries/ScriptEngine/php_sapi.cpp:36:67: note: in definition of macro ‘SEG’
 #define SEG(v) TSRMG(homegear_globals_id, zend_homegear_globals*, v)
                                                                   ^
Libraries/ScriptEngine/php_sapi.cpp:36:68: error: ‘TSRMG’ was not declared in this scope
 #define SEG(v) TSRMG(homegear_globals_id, zend_homegear_globals*, v)
                                                                    ^
Libraries/ScriptEngine/php_sapi.cpp:95:5: note: in expansion of macro ‘SEG’
  if(SEG(commandLine)) return 0;
     ^
Libraries/ScriptEngine/php_sapi.cpp:36:64: error: expected primary-expression before ‘*’ token
 #define SEG(v) TSRMG(homegear_globals_id, zend_homegear_globals*, v)
                                                                ^
Libraries/ScriptEngine/php_sapi.cpp:96:24: note: in expansion of macro ‘SEG’
  BaseLib::HTTP* http = SEG(http);
                        ^
Libraries/ScriptEngine/php_sapi.cpp:36:65: error: expected primary-expression before ‘,’ token
 #define SEG(v) TSRMG(homegear_globals_id, zend_homegear_globals*, v)
                                                                 ^
Libraries/ScriptEngine/php_sapi.cpp:96:24: note: in expansion of macro ‘SEG’
  BaseLib::HTTP* http = SEG(http);
                        ^
Libraries/ScriptEngine/php_sapi.cpp:36:68: error: ‘TSRMG’ was not declared in this scope
 #define SEG(v) TSRMG(homegear_globals_id, zend_homegear_globals*, v)
                                                                    ^
Libraries/ScriptEngine/php_sapi.cpp:96:24: note: in expansion of macro ‘SEG’
  BaseLib::HTTP* http = SEG(http);
                        ^
Libraries/ScriptEngine/php_sapi.cpp:36:64: error: expected primary-expression before ‘*’ token
 #define SEG(v) TSRMG(homegear_globals_id, zend_homegear_globals*, v)
                                                                ^
Libraries/ScriptEngine/php_sapi.cpp:98:6: note: in expansion of macro ‘SEG’
  if(!SEG(cookiesParsed))
      ^
Libraries/ScriptEngine/php_sapi.cpp:36:65: error: expected primary-expression before ‘,’ token
 #define SEG(v) TSRMG(homegear_globals_id, zend_homegear_globals*, v)
                                                                 ^
Libraries/ScriptEngine/php_sapi.cpp:98:6: note: in expansion of macro ‘SEG’
  if(!SEG(cookiesParsed))
      ^
Libraries/ScriptEngine/php_sapi.cpp:98:10: error: ‘cookiesParsed’ was not declared in this scope
  if(!SEG(cookiesParsed))
          ^
Libraries/ScriptEngine/php_sapi.cpp:36:67: note: in definition of macro ‘SEG’
 #define SEG(v) TSRMG(homegear_globals_id, zend_homegear_globals*, v)
                                                                   ^
Libraries/ScriptEngine/php_sapi.cpp:36:64: error: expected primary-expression before ‘*’ token
 #define SEG(v) TSRMG(homegear_globals_id, zend_homegear_globals*, v)
                                                                ^
Libraries/ScriptEngine/php_sapi.cpp:100:3: note: in expansion of macro ‘SEG’
   SEG(cookiesParsed) = true;
   ^
Libraries/ScriptEngine/php_sapi.cpp:36:65: error: expected primary-expression before ‘,’ token
 #define SEG(v) TSRMG(homegear_globals_id, zend_homegear_globals*, v)
                                                                 ^
Libraries/ScriptEngine/php_sapi.cpp:100:3: note: in expansion of macro ‘SEG’
   SEG(cookiesParsed) = true;
   ^
Libraries/ScriptEngine/php_sapi.cpp: In function ‘int php_homegear_ub_write(const char*, uint32_t)’:
Libraries/ScriptEngine/php_sapi.cpp:36:64: error: expected primary-expression before ‘*’ token
 #define SEG(v) TSRMG(homegear_globals_id, zend_homegear_globals*, v)
                                                                ^
Libraries/ScriptEngine/php_sapi.cpp:110:27: note: in expansion of macro ‘SEG’
  std::vector<char>* out = SEG(output);
                           ^
Libraries/ScriptEngine/php_sapi.cpp:36:65: error: expected primary-expression before ‘,’ token
 #define SEG(v) TSRMG(homegear_globals_id, zend_homegear_globals*, v)
                                                                 ^
Libraries/ScriptEngine/php_sapi.cpp:110:27: note: in expansion of macro ‘SEG’
  std::vector<char>* out = SEG(output);
                           ^
Libraries/ScriptEngine/php_sapi.cpp:110:31: error: ‘output’ was not declared in this scope
  std::vector<char>* out = SEG(output);
                               ^
Libraries/ScriptEngine/php_sapi.cpp:36:67: note: in definition of macro ‘SEG’
 #define SEG(v) TSRMG(homegear_globals_id, zend_homegear_globals*, v)
                                                                   ^
Libraries/ScriptEngine/php_sapi.cpp:36:68: error: ‘TSRMG’ was not declared in this scope
 #define SEG(v) TSRMG(homegear_globals_id, zend_homegear_globals*, v)
                                                                    ^
Libraries/ScriptEngine/php_sapi.cpp:110:27: note: in expansion of macro ‘SEG’
  std::vector<char>* out = SEG(output);
                           ^
Libraries/ScriptEngine/php_sapi.cpp: In function ‘int php_homegear_send_headers(sapi_headers_struct*)’:
Libraries/ScriptEngine/php_sapi.cpp:36:64: error: expected primary-expression before ‘*’ token
 #define SEG(v) TSRMG(homegear_globals_id, zend_homegear_globals*, v)
                                                                ^
Libraries/ScriptEngine/php_sapi.cpp:127:5: note: in expansion of macro ‘SEG’
  if(SEG(commandLine)) return SAPI_HEADER_SENT_SUCCESSFULLY;
     ^
Libraries/ScriptEngine/php_sapi.cpp:36:65: error: expected primary-expression before ‘,’ token
 #define SEG(v) TSRMG(homegear_globals_id, zend_homegear_globals*, v)
                                                                 ^
Libraries/ScriptEngine/php_sapi.cpp:127:5: note: in expansion of macro ‘SEG’
  if(SEG(commandLine)) return SAPI_HEADER_SENT_SUCCESSFULLY;
     ^
Libraries/ScriptEngine/php_sapi.cpp:127:9: error: ‘commandLine’ was not declared in this scope
  if(SEG(commandLine)) return SAPI_HEADER_SENT_SUCCESSFULLY;
         ^
Libraries/ScriptEngine/php_sapi.cpp:36:67: note: in definition of macro ‘SEG’
 #define SEG(v) TSRMG(homegear_globals_id, zend_homegear_globals*, v)
                                                                   ^
Libraries/ScriptEngine/php_sapi.cpp:36:68: error: ‘TSRMG’ was not declared in this scope
 #define SEG(v) TSRMG(homegear_globals_id, zend_homegear_globals*, v)
                                                                    ^
Libraries/ScriptEngine/php_sapi.cpp:127:5: note: in expansion of macro ‘SEG’
  if(SEG(commandLine)) return SAPI_HEADER_SENT_SUCCESSFULLY;
     ^
Libraries/ScriptEngine/php_sapi.cpp:36:64: error: expected primary-expression before ‘*’ token
 #define SEG(v) TSRMG(homegear_globals_id, zend_homegear_globals*, v)
                                                                ^
Libraries/ScriptEngine/php_sapi.cpp:129:27: note: in expansion of macro ‘SEG’
  std::vector<char>* out = SEG(output);
                           ^
Libraries/ScriptEngine/php_sapi.cpp:36:65: error: expected primary-expression before ‘,’ token
 #define SEG(v) TSRMG(homegear_globals_id, zend_homegear_globals*, v)
                                                                 ^
Libraries/ScriptEngine/php_sapi.cpp:129:27: note: in expansion of macro ‘SEG’
  std::vector<char>* out = SEG(output);
                           ^
Libraries/ScriptEngine/php_sapi.cpp:129:31: error: ‘output’ was not declared in this scope
  std::vector<char>* out = SEG(output);
                               ^
Libraries/ScriptEngine/php_sapi.cpp:36:67: note: in definition of macro ‘SEG’
 #define SEG(v) TSRMG(homegear_globals_id, zend_homegear_globals*, v)
                                                                   ^
Libraries/ScriptEngine/php_sapi.cpp:36:68: error: ‘TSRMG’ was not declared in this scope
 #define SEG(v) TSRMG(homegear_globals_id, zend_homegear_globals*, v)
                                                                    ^
Libraries/ScriptEngine/php_sapi.cpp:129:27: note: in expansion of macro ‘SEG’
  std::vector<char>* out = SEG(output);
                           ^
Libraries/ScriptEngine/php_sapi.cpp: In function ‘void php_homegear_register_variables(zval*)’:
Libraries/ScriptEngine/php_sapi.cpp:36:64: error: expected primary-expression before ‘*’ token
 #define SEG(v) TSRMG(homegear_globals_id, zend_homegear_globals*, v)
                                                                ^
Libraries/ScriptEngine/php_sapi.cpp:221:5: note: in expansion of macro ‘SEG’
  if(SEG(commandLine))
     ^
Libraries/ScriptEngine/php_sapi.cpp:36:65: error: expected primary-expression before ‘,’ token
 #define SEG(v) TSRMG(homegear_globals_id, zend_homegear_globals*, v)
                                                                 ^
Libraries/ScriptEngine/php_sapi.cpp:221:5: note: in expansion of macro ‘SEG’
  if(SEG(commandLine))
     ^
Libraries/ScriptEngine/php_sapi.cpp:221:9: error: ‘commandLine’ was not declared in this scope
  if(SEG(commandLine))
         ^
Libraries/ScriptEngine/php_sapi.cpp:36:67: note: in definition of macro ‘SEG’
 #define SEG(v) TSRMG(homegear_globals_id, zend_homegear_globals*, v)
                                                                   ^
Libraries/ScriptEngine/php_sapi.cpp:36:68: error: ‘TSRMG’ was not declared in this scope
 #define SEG(v) TSRMG(homegear_globals_id, zend_homegear_globals*, v)
                                                                    ^
Libraries/ScriptEngine/php_sapi.cpp:221:5: note: in expansion of macro ‘SEG’
  if(SEG(commandLine))
     ^
Libraries/ScriptEngine/php_sapi.cpp:36:64: error: expected primary-expression before ‘*’ token
 #define SEG(v) TSRMG(homegear_globals_id, zend_homegear_globals*, v)
                                                                ^
Libraries/ScriptEngine/php_sapi.cpp:234:25: note: in expansion of macro ‘SEG’
   BaseLib::HTTP* http = SEG(http);
                         ^
Libraries/ScriptEngine/php_sapi.cpp:36:65: error: expected primary-expression before ‘,’ token
 #define SEG(v) TSRMG(homegear_globals_id, zend_homegear_globals*, v)
                                                                 ^
Libraries/ScriptEngine/php_sapi.cpp:234:25: note: in expansion of macro ‘SEG’
   BaseLib::HTTP* http = SEG(http);
                         ^
Libraries/ScriptEngine/php_sapi.cpp: In function ‘void zif_hg_invoke(int, zval*, zval**, zval*, int)’:
Libraries/ScriptEngine/php_sapi.cpp:437:115: error: ‘tsrm_ls’ was not declared in this scope
  php_homegear_invoke_rpc(methodName, parameters, ht, return_value, return_value_ptr, this_ptr, return_value_used, tsrm_ls);
                                                                                                                   ^
Libraries/ScriptEngine/php_sapi.cpp: In function ‘void zif_hg_get_meta(int, zval*, zval**, zval*, int)’:
Libraries/ScriptEngine/php_sapi.cpp:485:115: error: ‘tsrm_ls’ was not declared in this scope
  php_homegear_invoke_rpc(methodName, parameters, ht, return_value, return_value_ptr, this_ptr, return_value_used, tsrm_ls);
                                                                                                                   ^
Libraries/ScriptEngine/php_sapi.cpp: In function ‘void zif_hg_get_system(int, zval*, zval**, zval*, int)’:
Libraries/ScriptEngine/php_sapi.cpp:496:115: error: ‘tsrm_ls’ was not declared in this scope
  php_homegear_invoke_rpc(methodName, parameters, ht, return_value, return_value_ptr, this_ptr, return_value_used, tsrm_ls);
                                                                                                                   ^
Libraries/ScriptEngine/php_sapi.cpp: In function ‘void zif_hg_get_value(int, zval*, zval**, zval*, int)’:
Libraries/ScriptEngine/php_sapi.cpp:511:115: error: ‘tsrm_ls’ was not declared in this scope
  php_homegear_invoke_rpc(methodName, parameters, ht, return_value, return_value_ptr, this_ptr, return_value_used, tsrm_ls);
                                                                                                                   ^
Libraries/ScriptEngine/php_sapi.cpp: In function ‘void zif_hg_set_meta(int, zval*, zval**, zval*, int)’:
Libraries/ScriptEngine/php_sapi.cpp:527:115: error: ‘tsrm_ls’ was not declared in this scope
  php_homegear_invoke_rpc(methodName, parameters, ht, return_value, return_value_ptr, this_ptr, return_value_used, tsrm_ls);
                                                                                                                   ^
Libraries/ScriptEngine/php_sapi.cpp: In function ‘void zif_hg_set_system(int, zval*, zval**, zval*, int)’:
Libraries/ScriptEngine/php_sapi.cpp:541:115: error: ‘tsrm_ls’ was not declared in this scope
  php_homegear_invoke_rpc(methodName, parameters, ht, return_value, return_value_ptr, this_ptr, return_value_used, tsrm_ls);
                                                                                                                   ^
Libraries/ScriptEngine/php_sapi.cpp: In function ‘void zif_hg_set_value(int, zval*, zval**, zval*, int)’:
Libraries/ScriptEngine/php_sapi.cpp:559:115: error: ‘tsrm_ls’ was not declared in this scope
  php_homegear_invoke_rpc(methodName, parameters, ht, return_value, return_value_ptr, this_ptr, return_value_used, tsrm_ls);
                                                                                                                   ^
Libraries/ScriptEngine/php_sapi.cpp: In function ‘int php_homegear_init()’:
Libraries/ScriptEngine/php_sapi.cpp:582:28: error: ‘tsrm_startup’ was not declared in this scope
  tsrm_startup(1, 1, 0, NULL);
                            ^
Libraries/ScriptEngine/php_sapi.cpp:587:172: error: ‘ts_allocate_id’ was not declared in this scope
  ts_allocate_id(&homegear_globals_id, sizeof(zend_homegear_globals), (void(*)(void*, void***))php_homegear_globals_ctor, (void(*)(void*, void***))php_homegear_globals_dtor);
                                                                                                                                                                            ^
Libraries/ScriptEngine/php_sapi.cpp: In function ‘void php_homegear_shutdown()’:
Libraries/ScriptEngine/php_sapi.cpp:596:16: error: ‘tsrm_shutdown’ was not declared in this scope
  tsrm_shutdown();
                ^
Libraries/ScriptEngine/php_sapi.cpp: In function ‘zend_homegear_globals* php_homegear_get_globals()’:
Libraries/ScriptEngine/php_sapi.cpp:45:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
scriptengine.make:165: recipe for target 'obj/Release/scriptengine/php_sapi.o' failed
make[1]: *** [obj/Release/scriptengine/php_sapi.o] Error 1
Makefile:64: recipe for target 'scriptengine' failed

Hallo LSD,

genau, das liegt an PHP. PHP muss mit ZTS-Unterstützung (“Zend Thread Support” - Multithreadunterstützung) kompiliert sein. Das einfachste ist, du installierst PHP aus dem Homegear-Repository. Da die PHP-Version die gleiche ist, wie im offiziellen Repository, muss in die Datei “/etc/apt/preferences.d/homegear” noch folgendes rein:

Package: *
Pin: origin "homegear.eu"
Pin-Priority: 999

Die benötigten Pakete sind “php5-dev” und “libphp5-embed”.

Du kannst PHP auch selbst kompilieren. Dann muss dem configure-Skript “–enable-maintainer-zts” übergeben werden. Es gibt fürs leichtere Kompilieren auch ein PHP-Build-Docker-Image, welches dir Debian-Pakete erzeugt (homegear/phpbuild:debian-jessie-amd64).

Liebe Grüße

Sathya

Hallo Sathya

–enable-maintainer-zts hätte ich gedachter weise gehabt, aber war wohl nicht ganz so :slight_smile:, nachdem jetzt 5.6.7-1 Pakete in deinem Repository sind und ich dadurch keine Konflikte mit einem anderen Paket auf meinem Rechner mehr habe (eventuell könnte man die lib ja static linken, dann funktioniert es auch noch wenn ein anderes Paket einmal eine neuere Version ohne zts drüberspielt) funktioniert das jetzt. Was mir aufgefallen ist, in deinem git Repository fehlen die Sourcen von paho.mqtt.c, nach einem Clonen an die richtige Stelle passt dann alles (oder vielleicht hab ich es auch einfach überlesen).

In der Doku fehlt noch ein:

sudo cp lib/Modules/Release/mod_miscellaneous.so /var/lib/homegear/modules/mod_miscellaneous.so

Soweit so gut. Starten lässt es sich jetzt auch (das deb Package der 6er Versionen hat bei mir mit einem Symbol Fehler den Dienst verweigert), nur das Timing scheint bei mir noch nicht ganz perfekt zu klappen (CUL), da homematic aber einstweilen noch auf einem PI mit CC1101 läuft ist das nicht weiter schlimm, ist ja schließlich eine Testversion

Danke noch für deinen schnellen Support

LG LSD

Hallo LSD,

ja die Dokumentation muss mal wieder überarbeitet werden… :unamused:. Danke für die Hinweise. paho.mqtt.c ist als Untermodul im Git-Repository - das muss natürlich in die Doku bzw. vor dem Kompilieren automatisch heruntergeladen werden.

Muss ich mir auch anschauen :wink:.

Liebe Grüße

Sathya