Leap 15 - troubles compiling PHP 5.6 and 7.1 with mariadb

Hi all,

I recently upgraded my main development machine from 42.3 to 15.0 and started having troubles compiling PHP.
With my setup I was able to have a number of local virtual hosts, each with its own PHP version to support a number of PHP-based sites.

After the upgrade I downloaded PHP 7.1.28 and, after some struggle to find the right 64bit libmcrypt to start compiling, I am getting:

/opt/php-7.1.28/ext/mysqli/php_mysqli_structs.h:63:10: fatal error: my_global.h: No such file or directory

and in my searches I could not find a ‘devel’ package for mariadb that would provide the file.

Is there anyone that could offer some clues ?

Instead of first searching for a package providing my_global.h I would search if it is already somehow present on the system.

The next thing you could do is find out to which package php_mysqli_structs.h belongs, maybe that is giving some clues.

Also found this thread on the forum: Cannot find package providing file my_global.h

Thanks for answering.

I did search for the missing file in the whole file system to no avail.

As I mentioned, I used to compile at least 3 versions of PHP on this machine when I was running 42.3.

As you saw in the other thread (where I also posted the question), those header files should be in the libmysqlclient-devel package, which is not available for Leap 15.0.

Bump…

I spent a bit more time on this and noticed that Yast claims that the package libmysqld-devel (I have installed 10.2.22-lp150.2.9.1), has the description:

This package contains the development header files and libraries for developing applications that embed the MariaDB

but inside there are only 2 files:

/usr/lib64/libmysqld.a
/usr/lib64/libmysqld.so

No headers.

Try libmariadb-devel.

Thanks.

I have libmariadb-devel installed, but in the list of files there’s no my_global.h.


# rpm -ql libmariadb-devel 
/usr/bin/mariadb_config
/usr/bin/mysql_config
/usr/include/mysql
/usr/include/mysql/errmsg.h
/usr/include/mysql/ma_list.h
/usr/include/mysql/ma_pvio.h
/usr/include/mysql/ma_tls.h
/usr/include/mysql/mariadb
/usr/include/mysql/mariadb/ma_io.h
/usr/include/mysql/mariadb_com.h
/usr/include/mysql/mariadb_ctype.h
/usr/include/mysql/mariadb_dyncol.h
/usr/include/mysql/mariadb_stmt.h
/usr/include/mysql/mariadb_version.h
/usr/include/mysql/my_config.h
/usr/include/mysql/mysql
/usr/include/mysql/mysql.h
/usr/include/mysql/mysql/client_plugin.h
/usr/include/mysql/mysql/plugin_auth.h
/usr/include/mysql/mysql/plugin_auth_common.h
/usr/include/mysql/mysql_version.h
/usr/include/mysql/mysqld_error.h
/usr/lib64/libmariadb.so
/usr/lib64/libmysqlclient.so
/usr/lib64/libmysqlclient_r.so
/usr/lib64/pkgconfig/libmariadb.pc

I’d say it is packaging bug. mariadb package conditionally included headers (and other development files) in libmysqlclient-devel. In https://build.opensuse.org/request/show/539319 condition was removed and baby lost with the water - apparently whoever created this patch did not realize that condition was always true in mariadb package.

Open bug report.

Thank you.

For some reason I am not getting notifications of new replies on threads.

I opened a new bug.