Skip to content
This repository was archived by the owner on Oct 8, 2025. It is now read-only.
This repository was archived by the owner on Oct 8, 2025. It is now read-only.

[PATCH] Can't build NGINX Unit php module on NetBSD #497

@osokin

Description

@osokin

Hi,

the NGINX Unit's PHP module can't be built on NetBSD 9.0:

cd /pkgsrc/www/unit-php/work/unit-1.20.0 &&  ./configure php --lib-path=/usr/pkg/lib  --module=php5.6.40
configuring PHP module
checking for PHP ... found
 + PHP SAPI: [cli embed cgi]
checking for PHP version ... not found
checking for PHP embed SAPI ... not found

./configure: error: no PHP embed SAPI found.

*** Error code 1

Here's some lines at the end of the build/autoconf.err file:

----------------------------------------
checking for PHP embed SAPI
gcc: Missing argument for -Wl,-rpath
----------

    #include <php.h>
    #include <php_main.h>

    int main() {
        php_module_startup(NULL, NULL, 0);
        return 0;
    }
----------
gcc -O2 -D_FORTIFY_SOURCE=2 -I/usr/pkg/include -I/usr/include -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra
+-Wno-unused-parameter -Wwrite-strings -Wmissing-prototypes -Werror -g -I/usr/pkg/include/php -I/usr/pkg/include/php/main
+-I/usr/pkg/include/php/TSRM -I/usr/pkg/include/php/Zend -I/usr/pkg/include/php/ext -I/usr/pkg/include/php/ext/date/lib -o
+build/autotest build/autotest.c -lphp5 -L/usr/pkg/lib -Wl,-rpath /usr/pkg/lib -L/usr/pkg/lib
[patch-auto-modules-php.txt](https://github.com/nginx/unit/files/5556972/patch-auto-modules-php.txt)


Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions