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

Compiling from source, no extensions found #13837

Closed
remco-pc opened this issue Mar 29, 2024 · 4 comments
Closed

Compiling from source, no extensions found #13837

remco-pc opened this issue Mar 29, 2024 · 4 comments
Labels

Comments

@remco-pc
Copy link

remco-pc commented Mar 29, 2024

Description

i am trying to compile from source in a docker container without success. it will generate the opcache.so file but not the others i am doing this:


RUN apt-get update && apt-get install git build-essential pkg-config libxml2-dev \
    libonig-dev libreadline-dev libssl-dev libsqlite3-dev libcurl4-openssl-dev \
    libjpeg-dev libpng-dev libzip-dev libfreetype6-dev libmcrypt-dev apache2 \
    libapache2-mod-fcgid autoconf libsodium-dev -y

RUN mkdir "/root/tmp/php" -p
RUN mkdir "/root/php" -p
COPY ./Docker/Packages/php/php-8.3.4.tar.gz /root/tmp/php/php-8.3.4.tar.gz
RUN tar -xvzf /root/tmp/php/php-8.3.4.tar.gz -C /root/tmp/php

COPY . /Application

RUN cd /root/tmp/php/php-8.3.4 && \
    ./buildconf --force && \
    ./configure --prefix=/root/php \
        --with-mysqli --with-pdo-mysql --with-curl --with-openssl --with-zlib \
        --with-jpeg --with-freetype --with-fpm-user=www-data --with-fpm-group=www-data \
        --enable-intl --with-pear --with-zip --with-readline --enable-opcache --with-sqlite3 \
        --with-libzip=/usr/lib/x86_64-linux-gnu --with-sodium \
        --enable-shmop --enable-pcntl --enable-sockets --enable-sysvsem --enable-sysvshm --enable-sysvmsg \
        --enable-mbstring --enable-mbregex --enable-bcmath --enable-calendar --enable-exif --enable-fpm  && \
    make -j$(nproc) && make install

COPY ./Docker/Packages/php/config/8.3/php.ini /usr/local/lib/php.ini
COPY ./Docker/Packages/php/config/8.3/php-fpm.conf /usr/local/etc/php-fpm.conf
COPY ./Docker/Packages/php/config/8.3/pool.d/www.conf /etc/php/8.3/fpm/pool.d/www.conf

When run make & make install manually it does not help, only the opcache.so is available.

What am i doing wrong, i am using this file https://www.php.net/distributions/php-8.3.4.tar.gz

PHP Warning:  PHP Startup: Unable to load dynamic library 'curl' (tried: /usr/local/lib/php/extensions/no-debug-non-zts-20230831/curl (/usr/local/lib/php/extensions/no-debug-non-zts-20230831/curl: cannot open shared object file: No such file or directory), /usr/local/lib/php/extensions/no-debug-non-zts-20230831/curl.so (/usr/local/lib/php/extensions/no-debug-non-zts-20230831/curl.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'gd' (tried: /usr/local/lib/php/extensions/no-debug-non-zts-20230831/gd (/usr/local/lib/php/extensions/no-debug-non-zts-20230831/gd: cannot open shared object file: No such file or directory), /usr/local/lib/php/extensions/no-debug-non-zts-20230831/gd.so (/usr/local/lib/php/extensions/no-debug-non-zts-20230831/gd.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'intl' (tried: /usr/local/lib/php/extensions/no-debug-non-zts-20230831/intl (/usr/local/lib/php/extensions/no-debug-non-zts-20230831/intl: cannot open shared object file: No such file or directory), /usr/local/lib/php/extensions/no-debug-non-zts-20230831/intl.so (/usr/local/lib/php/extensions/no-debug-non-zts-20230831/intl.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'mbstring' (tried: /usr/local/lib/php/extensions/no-debug-non-zts-20230831/mbstring (/usr/local/lib/php/extensions/no-debug-non-zts-20230831/mbstring: cannot open shared object file: No such file or directory), /usr/local/lib/php/extensions/no-debug-non-zts-20230831/mbstring.so (/usr/local/lib/php/extensions/no-debug-non-zts-20230831/mbstring.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'openssl' (tried: /usr/local/lib/php/extensions/no-debug-non-zts-20230831/openssl (/usr/local/lib/php/extensions/no-debug-non-zts-20230831/openssl: cannot open shared object file: No such file or directory), /usr/local/lib/php/extensions/no-debug-non-zts-20230831/openssl.so (/usr/local/lib/php/extensions/no-debug-non-zts-20230831/openssl.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'pdo_mysql' (tried: /usr/local/lib/php/extensions/no-debug-non-zts-20230831/pdo_mysql (/usr/local/lib/php/extensions/no-debug-non-zts-20230831/pdo_mysql: cannot open shared object file: No such file or directory), /usr/local/lib/php/extensions/no-debug-non-zts-20230831/pdo_mysql.so (/usr/local/lib/php/extensions/no-debug-non-zts-20230831/pdo_mysql.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'shmop' (tried: /usr/local/lib/php/extensions/no-debug-non-zts-20230831/shmop (/usr/local/lib/php/extensions/no-debug-non-zts-20230831/shmop: cannot open shared object file: No such file or directory), /usr/local/lib/php/extensions/no-debug-non-zts-20230831/shmop.so (/usr/local/lib/php/extensions/no-debug-non-zts-20230831/shmop.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'soap' (tried: /usr/local/lib/php/extensions/no-debug-non-zts-20230831/soap (/usr/local/lib/php/extensions/no-debug-non-zts-20230831/soap: cannot open shared object file: No such file or directory), /usr/local/lib/php/extensions/no-debug-non-zts-20230831/soap.so (/usr/local/lib/php/extensions/no-debug-non-zts-20230831/soap.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'sockets' (tried: /usr/local/lib/php/extensions/no-debug-non-zts-20230831/sockets (/usr/local/lib/php/extensions/no-debug-non-zts-20230831/sockets: cannot open shared object file: No such file or directory), /usr/local/lib/php/extensions/no-debug-non-zts-20230831/sockets.so (/usr/local/lib/php/extensions/no-debug-non-zts-20230831/sockets.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'sodium' (tried: /usr/local/lib/php/extensions/no-debug-non-zts-20230831/sodium (/usr/local/lib/php/extensions/no-debug-non-zts-20230831/sodium: cannot open shared object file: No such file or directory), /usr/local/lib/php/extensions/no-debug-non-zts-20230831/sodium.so (/usr/local/lib/php/extensions/no-debug-non-zts-20230831/sodium.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'sqlite3' (tried: /usr/local/lib/php/extensions/no-debug-non-zts-20230831/sqlite3 (/usr/local/lib/php/extensions/no-debug-non-zts-20230831/sqlite3: cannot open shared object file: No such file or directory), /usr/local/lib/php/extensions/no-debug-non-zts-20230831/sqlite3.so (/usr/local/lib/php/extensions/no-debug-non-zts-20230831/sqlite3.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'tidy' (tried: /usr/local/lib/php/extensions/no-debug-non-zts-20230831/tidy (/usr/local/lib/php/extensions/no-debug-non-zts-20230831/tidy: cannot open shared object file: No such file or directory), /usr/local/lib/php/extensions/no-debug-non-zts-20230831/tidy.so (/usr/local/lib/php/extensions/no-debug-non-zts-20230831/tidy.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'xsl' (tried: /usr/local/lib/php/extensions/no-debug-non-zts-20230831/xsl (/usr/local/lib/php/extensions/no-debug-non-zts-20230831/xsl: cannot open shared object file: No such file or directory), /usr/local/lib/php/extensions/no-debug-non-zts-20230831/xsl.so (/usr/local/lib/php/extensions/no-debug-non-zts-20230831/xsl.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'zip' (tried: /usr/local/lib/php/extensions/no-debug-non-zts-20230831/zip (/usr/local/lib/php/extensions/no-debug-non-zts-20230831/zip: cannot open shared object file: No such file or directory), /usr/local/lib/php/extensions/no-debug-non-zts-20230831/zip.so (/usr/local/lib/php/extensions/no-debug-non-zts-20230831/zip.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

PHP Version

php 8.3.4

Operating System

Debian 12

@nielsdos
Copy link
Member

nielsdos commented Mar 29, 2024

Your prefix is /root/php, but the modules are searched in /usr/local/....
The ini option extension_dir controls where it searches extensions. I think you can set the environment variable EXTENSION_DIR during configure to override this.
Note also that you can set a default ini file location using ./configure --with-config-file-path=PATH.

@remco-pc
Copy link
Author

Question then, you say the modules are searched /user/local, What do you mean by that ? The /root was a test if it matters.

It only generates the opcache.so.

Where are the extensions generated in by default ? The same as opcache ? I dont get any errors in make or make install.

I dont need to install the php extensions through apt get ? But the dev packages to generate?

@nielsdos
Copy link
Member

Question then, you say the modules are searched /user/local, What do you mean by that ?

If you look at the output, you see that it tried loading the extensions from a subpath of /usr/local, which is the default. Yet you installed in /root, so the extensions are not in the right place.

Where are the extensions generated in by default ? The same as opcache ? I dont get any errors in make or make install.

Normally the same as opcache. In your prefix, so in a subpath of /root.

I dont need to install the php extensions through apt get ? But the dev packages to generate?

The dev package should work.

Copy link

No feedback was provided. The issue is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants