Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build error for uwsgi when php plugin enabled #24357

Closed
jluttine opened this issue Mar 26, 2017 · 2 comments
Closed

Build error for uwsgi when php plugin enabled #24357

jluttine opened this issue Mar 26, 2017 · 2 comments

Comments

@jluttine
Copy link
Member

Issue description

Enabling PHP plugin for uWSGI causes nixos-rebuild to fail.

The error message:

unpacking source archive /nix/store/lm6ip32cyhsxxwfc4fnr4m8zrmdjb4x3-uwsgi-2.0.14.tar.gz source root is uwsgi-2.0.14 setting SOURCE_DATE_EPOCH to timestamp 1475482619 of file uwsgi-2.0.14/vhosttest/nginx.conf patching sources configuring building 2 97.7M 2 2015k 0 0 605k 0 0:02:45 0:00:03 0:02:42 605kPackage libsystemd-journal was not found in the pkg-config search path. Perhaps you should add the directory containing `libsystemd-journal.pc' to the PKG_CONFIG_PATH environment variable No package 'libsystemd-journal' found Package libsystemd-journal was not found in the pkg-config search path. Perhaps you should add the directory containing `libsystemd-journal.pc' to the PKG_CONFIG_PATH environment variable No package 'libsystemd-journal' found 1 90.0M 1 1151k 0 0 213k 0 0:07:12 0:00:05 0:07:07 249kusing profile: buildconf/nixos.ini detected include path: ['/nix/store/x0q9h4d38ydggbn340ypb89ljxkqvnq3-gcc-5.4.0/lib/gcc/x86_64-unknown-linux-gnu/5.4.0/include', '/nix/store/x0q9h4d38ydggbn340ypb89ljxkqvnq3-gcc-5.4.0/include', '/nix/store/x0q9h4d38ydggbn340ypb89ljxkqvnq3-gcc-5.4.0/lib/gcc/x86_64-unknown-linux-gnu/5.4.0/include-fixed', '/nix/store/hrgvzzs1j58cr0ngb7awjxad1lp2zrqh-glibc-2.25-dev/include'] detected CPU cores: 8 configured CFLAGS: -O2 -I. -Wall -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -DUWSGI_HAS_IFADDRS -DUWSGI_LOCK_USE_MUTEX -DUWSGI_EVENT_USE_EPOLL -DUWSGI_EVENT_TIMER_USE_TIMERFD -DUWSGI_EVENT_FILEMONITOR_USE_INOTIFY -DUWSGI_VERSION="\"2.0.14\"" -DUWSGI_VERSION_BASE="2" -DUWSGI_VERSION_MAJOR="0" -DUWSGI_VERSION_MINOR="14" -DUWSGI_VERSION_REVISION="0" -DUWSGI_VERSION_CUSTOM="\"\"" -I/nix/store/gf2lg08xgcd0zykcyz4f3kilsi68s484-jansson-2.9/include -DUWSGI_JSON -I/nix/store/lb0ddhqzjpd1imk23wy6ipv8k946qhgi-libxml2-2.9.4-dev/include/libxml2 -DUWSGI_XML -DUWSGI_XML_LIBXML2 -DUWSGI_PLUGIN_DIR="\"/nix/store/23ncapii692ws5c9ppqzghxgcywcnnz9-uwsgi-2.0.14/lib/uwsgi\"" -DUWSGI_DECLARE_EMBEDDED_PLUGINS="UDEP(pam);UDEP(systemd_logger);UDEP(ping);UDEP(cache);UDEP(nagios);UDEP(rrdtool);UDEP(carbon);UDEP(rpc);UDEP(corerouter);UDEP(fastrouter);UDEP(http);UDEP(ugreen);UDEP(signal);UDEP(syslog);UDEP(rsyslog);UDEP(logsocket);UDEP(router_uwsgi);UDEP(router_redirect);UDEP(router_basicauth);UDEP(zergpool);UDEP(redislog);UDEP(mongodblog);UDEP(router_rewrite);UDEP(router_http);UDEP(logfile);UDEP(router_cache);UDEP(rawrouter);UDEP(router_static);UDEP(sslrouter);UDEP(spooler);UDEP(cheaper_busyness);UDEP(symcall);UDEP(transformation_tofile);UDEP(transformation_gzip);UDEP(transformation_chunked);UDEP(transformation_offload);UDEP(router_memcached);UDEP(router_redis);UDEP(router_hash);UDEP(router_expires);UDEP(router_metrics);UDEP(transformation_template);UDEP(stats_pusher_socket);" -DUWSGI_LOAD_EMBEDDED_PLUGINS="ULEP(pam);ULEP(systemd_logger);ULEP(ping);ULEP(cache);ULEP(nagios);ULEP(rrdtool);ULEP(carbon);ULEP(rpc);ULEP(corerouter);ULEP(fastrouter);ULEP(http);ULEP(ugreen);ULEP(signal);ULEP(syslog);ULEP(rsyslog);ULEP(logsocket);ULEP(router_uwsgi);ULEP(router_redirect);ULEP(router_basicauth);ULEP(zergpool);ULEP(redislog);ULEP(mongodblog);ULEP(router_rewrite);ULEP(router_http);ULEP(logfile);ULEP(router_cache);ULEP(rawrouter);ULEP(router_static);ULEP(sslrouter);ULEP(spooler);ULEP(cheaper_busyness);ULEP(symcall);ULEP(transformation_tofile);ULEP(transformation_gzip);ULEP(transformation_chunked);ULEP(transformation_offload);ULEP(router_memcached);ULEP(router_redis);ULEP(router_hash);ULEP(router_expires);ULEP(router_metrics);ULEP(transformation_template);ULEP(stats_pusher_socket);" *** uWSGI compiling server core *** [thread 2][gcc] core/utils.o [thread 7][gcc] core/protocol.o [thread 0][gcc] core/socket.o [thread 4][gcc] core/logging.o [thread 5][gcc] core/master.o [thread 3][gcc] core/master_utils.o [thread 1][gcc] core/emperor.o [thread 6][gcc] core/notify.o [thread 6][gcc] core/mule.o [thread 5][gcc] core/subscription.o [thread 6][gcc] core/stats.o [thread 3][gcc] core/sendfile.o [thread 4][gcc] core/async.o [thread 0][gcc] core/master_checks.o [thread 1][gcc] core/fifo.o [thread 7][gcc] core/offload.o [thread 3][gcc] core/io.o [thread 1][gcc] core/static.o [thread 2][gcc] core/websockets.o [thread 4][gcc] core/spooler.o [thread 0][gcc] core/snmp.o [thread 6][gcc] core/exceptions.o [thread 7][gcc] core/config.o [thread 5][gcc] core/setup_utils.o [thread 1][gcc] core/clock.o [thread 2][gcc] core/init.o [thread 0][gcc] core/buffer.o [thread 4][gcc] core/reader.o [thread 5][gcc] core/writer.o [thread 6][gcc] core/alarm.o [thread 7][gcc] core/cron.o [thread 3][gcc] core/hooks.o [thread 1][gcc] core/plugins.o [thread 2][gcc] core/lock.o [thread 0][gcc] core/cache.o [thread 6][gcc] core/daemons.o [thread 4][gcc] core/errors.o [thread 7][gcc] core/hash.o [thread 5][gcc] core/master_events.o [thread 2][gcc] core/chunked.o [thread 3][gcc] core/queue.o [thread 4][gcc] core/event.o [thread 1][gcc] core/signal.o [thread 7][gcc] core/strings.o [thread 5][gcc] core/progress.o [thread 6][gcc] core/timebomb.o [thread 3][gcc] core/ini.o [thread 2][gcc] core/fsmon.o [thread 6][gcc] core/mount.o [thread 5][gcc] core/metrics.o [thread 4][gcc] core/plugins_builder.o [thread 7][gcc] core/sharedarea.o [thread 1][gcc] core/rpc.o [thread 2][gcc] core/gateway.o [thread 3][gcc] core/loop.o [thread 6][gcc] core/cookie.o [thread 0][gcc] core/querystring.o [thread 4][gcc] core/rb_timers.o [thread 2][gcc] core/transformations.o [thread 1][gcc] core/uwsgi.o [thread 3][gcc] proto/base.o [thread 6][gcc] proto/uwsgi.o [thread 7][gcc] proto/http.o [thread 0][gcc] proto/fastcgi.o [thread 4][gcc] proto/scgi.o [thread 5][gcc] proto/puwsgi.o [thread 2][gcc] lib/linux_ns.o [thread 6][gcc] core/json.o [thread 3][gcc] core/xmlconf.o [thread 4][gcc] core/dot_h.o [thread 4][gcc] core/config_py.o *** uWSGI compiling embedded plugins *** [thread 5][gcc] plugins/pam/pam.o [thread 0][gcc] plugins/systemd_logger/systemd_logger.o [thread 4][gcc] plugins/ping/ping_plugin.o [thread 2][gcc] plugins/cache/cache.o [thread 6][gcc] plugins/nagios/nagios.o [thread 7][gcc] plugins/rrdtool/rrdtool.o [thread 3][gcc] plugins/carbon/carbon.o [thread 5][gcc] plugins/rpc/rpc_plugin.o [thread 0][gcc] plugins/corerouter/cr_common.o [thread 6][gcc] plugins/corerouter/cr_map.o [thread 4][gcc] plugins/corerouter/corerouter.o [thread 7][gcc] plugins/fastrouter/fastrouter.o [thread 2][gcc] plugins/http/http.o [thread 3][gcc] plugins/http/keepalive.o [thread 5][gcc] plugins/http/https.o [thread 6][gcc] plugins/http/spdy3.o [thread 0][gcc] plugins/ugreen/ugreen.o [thread 5][gcc] plugins/signal/signal_plugin.o [thread 3][gcc] plugins/syslog/syslog_plugin.o [thread 7][gcc] plugins/rsyslog/rsyslog_plugin.o [thread 6][gcc] plugins/logsocket/logsocket_plugin.o [thread 0][gcc] plugins/router_uwsgi/router_uwsgi.o [thread 4][gcc] plugins/router_redirect/router_redirect.o [thread 5][gcc] plugins/router_basicauth/router_basicauth.o [thread 3][gcc] plugins/zergpool/zergpool.o [thread 2][gcc] plugins/redislog/redislog_plugin.o [thread 0][gcc] plugins/mongodblog/mongodblog_plugin.o [thread 6][gcc] plugins/router_rewrite/router_rewrite.o [thread 7][gcc] plugins/router_http/router_http.o [thread 4][gcc] plugins/logfile/logfile.o [thread 5][gcc] plugins/router_cache/router_cache.o [thread 3][gcc] plugins/rawrouter/rawrouter.o [thread 2][gcc] plugins/router_static/router_static.o [thread 6][gcc] plugins/sslrouter/sslrouter.o [thread 0][gcc] plugins/spooler/spooler_plugin.o [thread 7][gcc] plugins/cheaper_busyness/cheaper_busyness.o [thread 4][gcc] plugins/symcall/symcall_plugin.o [thread 5][gcc] plugins/transformation_tofile/tofile.o [thread 2][gcc] plugins/transformation_gzip/gzip.o [thread 6][gcc] plugins/transformation_chunked/chunked.o [thread 1][gcc] plugins/transformation_offload/offload.o [thread 0][gcc] plugins/router_memcached/router_memcached.o [thread 5][gcc] plugins/router_redis/router_redis.o [thread 4][gcc] plugins/router_hash/router_hash.o [thread 3][gcc] plugins/router_expires/expires.o [thread 1][gcc] plugins/router_metrics/plugin.o [thread 2][gcc] plugins/transformation_template/tt.o [thread 6][gcc] plugins/stats_pusher_socket/plugin.o *** uWSGI linking *** gcc -o uwsgi core/utils.o core/protocol.o core/socket.o core/logging.o core/master.o core/master_utils.o core/emperor.o core/notify.o core/mule.o core/subscription.o core/stats.o core/sendfile.o core/async.o core/master_checks.o core/fifo.o core/offload.o core/io.o core/static.o core/websockets.o core/spooler.o core/snmp.o core/exceptions.o core/config.o core/setup_utils.o core/clock.o core/init.o core/buffer.o core/reader.o core/writer.o core/alarm.o core/cron.o core/hooks.o core/plugins.o core/lock.o core/cache.o core/daemons.o core/errors.o core/hash.o core/master_events.o core/chunked.o core/queue.o core/event.o core/signal.o core/strings.o core/progress.o core/timebomb.o core/ini.o core/fsmon.o core/mount.o core/metrics.o core/plugins_builder.o core/sharedarea.o core/rpc.o core/gateway.o core/loop.o core/cookie.o core/querystring.o core/rb_timers.o core/transformations.o core/uwsgi.o proto/base.o proto/uwsgi.o proto/http.o proto/fastcgi.o proto/scgi.o proto/puwsgi.o lib/linux_ns.o core/json.o core/xmlconf.o core/dot_h.o core/config_py.o plugins/pam/pam.o plugins/systemd_logger/systemd_logger.o plugins/ping/ping_plugin.o plugins/cache/cache.o plugins/nagios/nagios.o plugins/rrdtool/rrdtool.o plugins/carbon/carbon.o plugins/rpc/rpc_plugin.o plugins/corerouter/cr_common.o plugins/corerouter/cr_map.o plugins/corerouter/corerouter.o plugins/fastrouter/fastrouter.o plugins/http/http.o plugins/http/keepalive.o plugins/http/https.o plugins/http/spdy3.o plugins/ugreen/ugreen.o plugins/signal/signal_plugin.o plugins/syslog/syslog_plugin.o plugins/rsyslog/rsyslog_plugin.o plugins/logsocket/logsocket_plugin.o plugins/router_uwsgi/router_uwsgi.o plugins/router_redirect/router_redirect.o plugins/router_basicauth/router_basicauth.o plugins/zergpool/zergpool.o plugins/redislog/redislog_plugin.o plugins/mongodblog/mongodblog_plugin.o plugins/router_rewrite/router_rewrite.o plugins/router_http/router_http.o plugins/logfile/logfile.o plugins/router_cache/router_cache.o plugins/rawrouter/rawrouter.o plugins/router_static/router_static.o plugins/sslrouter/sslrouter.o plugins/spooler/spooler_plugin.o plugins/cheaper_busyness/cheaper_busyness.o plugins/symcall/symcall_plugin.o plugins/transformation_tofile/tofile.o plugins/transformation_gzip/gzip.o plugins/transformation_chunked/chunked.o plugins/transformation_offload/offload.o plugins/router_memcached/router_memcached.o plugins/router_redis/router_redis.o plugins/router_hash/router_hash.o plugins/router_expires/expires.o plugins/router_metrics/plugin.o plugins/transformation_template/tt.o plugins/stats_pusher_socket/plugin.o -lpthread -lm -rdynamic -ldl -L/nix/store/gf2lg08xgcd0zykcyz4f3kilsi68s484-jansson-2.9/lib -ljansson -L/nix/store/yk68qdpngs5ngsysqg0iqqb47sz6c04b-libxml2-2.9.4/lib -lxml2 -lz -lm -ldl -lpam -L/nix/store/s3hyvnb36pahywcm4m7yra3r0pcmjy1f-systemd-232-lib/lib -lsystemd -lcrypt ################# uWSGI configuration #################

pcre = False
xml = libxml2
locking = pthread_mutex
timer = timerfd
debug = False
kernel = Linux
ifaddrs = True
zlib = False
capabilities = False
malloc = libc
yaml = False
filemonitor = inotify
json = jansson
ssl = False
event = epoll
routing = False
ucontext = True
execinfo = False
plugin_dir = /nix/store/23ncapii692ws5c9ppqzghxgcywcnnz9-uwsgi-2.0.14/lib/uwsgi

############## end of uWSGI configuration #############
total build time: 5 seconds
*** uWSGI is ready, launch it with ./uwsgi ***
/nix/store/vfdz6kar96xlzqljh7l6lprm4la84diz-php-7.1.2/bin/php-config: line 20: out: command not found
/nix/store/vfdz6kar96xlzqljh7l6lprm4la84diz-php-7.1.2/bin/php-config: line 20: out: command not found
/nix/store/vfdz6kar96xlzqljh7l6lprm4la84diz-php-7.1.2/bin/php-config: line 20: out: command not found
/nix/store/vfdz6kar96xlzqljh7l6lprm4la84diz-php-7.1.2/bin/php-config: line 20: out: command not found
In file included from plugins/php/php_plugin.c:1:0:
plugins/php/common.h:1:17: fatal error: php.h: No such file or directory
compilation terminated.
4 27.7M 4 1271k 0 0 199k 0 0:02:22 0:00:06 0:02:16 244k053k 0 0 165k 0 0:03:46 0:00:06 0:03:40 204kIn file included from plugins/php/session.c:1:0:
plugins/php/common.h:1:17: fatal error: php.h: No such file or directory
compilation terminated.
using profile: buildconf/nixos.ini
detected include path: ['/nix/store/x0q9h4d38ydggbn340ypb89ljxkqvnq3-gcc-5.4.0/lib/gcc/x86_64-unknown-linux-gnu/5.4.0/include', '/nix/store/x0q9h4d38ydggbn340ypb89ljxkqvnq3-gcc-5.4.0/include', '/nix/store/x0q9h4d38ydggbn340ypb89ljxkqvnq3-gcc-5.4.0/lib/gcc/x86_64-unknown-linux-gnu/5.4.0/include-fixed', '/nix/store/hrgvzzs1j58cr0ngb7awjxad1lp2zrqh-glibc-2.25-dev/include']
*** uWSGI building and linking plugin plugins/php ***
[gcc] /nix/store/23ncapii692ws5c9ppqzghxgcywcnnz9-uwsgi-2.0.14/lib/uwsgi/php_plugin.so
*** unable to build php plugin ***
builder for ‘/nix/store/syqyzf7zxzjb1rinp49xzzxn3zqgz2fp-uwsgi-2.0.14.drv’ failed with exit code 1
cannot build derivation ‘/nix/store/lakb9c5d5vp09ma2c8cg7p4gmlwggq4h-unit-uwsgi.service.drv’: 1 dependencies couldn't be built
cannot build derivation ‘/nix/store/pylfxalqn31ayq165fadzbqq4qhd5chw-system-units.drv’: 1 dependencies couldn't be built
cannot build derivation ‘/nix/store/1frx9vamz5gayxd45wa2n1a9zip3f8dq-etc.drv’: 1 dependencies couldn't be built
killing process 18114
killing process 18113
killing process 18112
killing process 18111
killing process 18110
cannot build derivation ‘/nix/store/can71fc3mnz85ddbd3948gsa1frw29ir-nixos-system-leevi-17.09pre104410.65593e6.drv’: 1 dependencies couldn't be built
error: build of ‘/nix/store/can71fc3mnz85ddbd3948gsa1frw29ir-nixos-system-leevi-17.09pre104410.65593e6.drv’ failed

Steps to reproduce

Here's the relevant snippet from my configuration:

  services.uwsgi = {
    enable = true;
    plugins = [ "php" ];
    instance = {
      type = "normal";
      socket = "/run/uwsgi/nextcloud.sock";
      # Run with at least 1 process but increase up to 4 when needed
      cheaper = 1;
      processes = 4;
      php-docroot = "${pkgs.nextcloud}";
    };
  };

If I remove plugins = [ "php" ];, then it builds successfully. Note: this uWSGI configuration is just a stub, I'm working on it. But I'd expect the nixos-rebuild process not to fail.

Technical details

  • System: (NixOS: nixos-version, Ubuntu/Fedora: lsb_release -a, ...)
# nixos-version 
17.09pre104259.73a6832 (Hummingbird)
  • Nix version: (run nix-env --version)
# nix-env --version
nix-env (Nix) 1.11.8
  • Nixpkgs version: (run nix-instantiate --eval '<nixpkgs>' -A lib.nixpkgsVersion)
# nix-instantiate --eval '<nixpkgs>' -A lib.nixpkgsVersion
"17.09pre104410.65593e6"
@bachp
Copy link
Member

bachp commented Sep 9, 2017

Is this resolved now?

@spinus
Copy link
Member

spinus commented Feb 10, 2018

works for me on 18.03pre126729.2e4aded3669

@flokli flokli closed this as completed Nov 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants