php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #77206 my_global.h: No such file or directory
Submitted: 2018-11-27 07:22 UTC Modified: 2018-12-09 04:22 UTC
Votes:1
Avg. Score:2.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: jackie dot luo at kpmg dot com Assigned: cmb (profile)
Status: No Feedback Package: Compile Failure
PHP Version: 7.2.12 OS: CentOS Linux release 7.5.1804 (C
Private report: No CVE-ID: None
 [2018-11-27 07:22 UTC] jackie dot luo at kpmg dot com
Description:
------------
I am setting up a PHP environment which is used to combine with mysql and Nginx server.

I already installed mysql and Nginx server. when I used source code installation method to compile the files.

it terminated with an error:

/usr/local/php-7.2.12/libtool --silent --preserve-dup-deps --mode=compile cc -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -Iext/mysqli/ -I/usr/local/php-7.2.12/ext/mysqli/ -DPHP_ATOM_INC -I/usr/local/php-7.2.12/include -I/usr/local/php-7.2.12/main -I/usr/local/php-7.2.12 -I/usr/local/php-7.2.12/ext/date/lib -I/usr/include/libxml2 -I/usr/include/freetype2 -I/usr/local/php-7.2.12/ext/mbstring/oniguruma -I/usr/local/php-7.2.12/ext/mbstring/libmbfl -I/usr/local/php-7.2.12/ext/mbstring/libmbfl/mbfl -I/usr/local/mysql/include -I/usr/local/php-7.2.12/ext/sqlite3/libsqlite -I/usr/local/php-7.2.12/ext/zip/lib -I/usr/local/php-7.2.12/TSRM -I/usr/local/php-7.2.12/Zend    -I/usr/include -g -O2 -fvisibility=hidden -DZEND_SIGNALS   -c /usr/local/php-7.2.12/ext/mysqli/mysqli.c -o ext/mysqli/mysqli.lo 
In file included from /usr/local/php-7.2.12/ext/mysqli/mysqli.c:34:0:
/usr/local/php-7.2.12/ext/mysqli/php_mysqli_structs.h:63:23: fatal error: my_global.h: No such file or directory
 #include <my_global.h>
                       ^
compilation terminated.
make: *** [ext/mysqli/mysqli.lo] Error 1


the PHP version is 7.2.12, I downloaded the source code from official website.



Test script:
---------------
none

Expected result:
----------------
none

Actual result:
--------------
I already installed all necessary features, but the compilation still failed

Patches

none (last revision 2018-11-27 07:22 UTC by )

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-11-27 07:46 UTC] spam2 at rhsoft dot net
do you really have the mysql DEVEL packages installed?

anyways, build with mysqlnd, libmysql is not needed for php over the last decade
 [2018-11-27 07:54 UTC] jackie dot luo at kpmg dot com
Hi spam2 at rhsoft dot net,

Thanks for your response.

May I know how to install the mysql devel packages?

actually I did not use the yum install mysql option, I directly download the mysql.tar.gz file and use the ./mysqld --initialize installation, which is not source code installation as well.

furthermore, build with mysqlnd, libmysql is not needed for php over the last decade. May I know if you are meaning I can directly use the embedded mysqlnd?
 [2018-11-27 09:05 UTC] spam2 at rhsoft dot net
this is not a support forum!

yum install mariadb-devel
Google mysqlnd
./configure --help 

frankly when you unpack binary tarballs and wonder why the needed headers and libs not found you are far away from report bugs about compilation

why don't you just start with the contents of the centos ot Fedora src.rpm at least it's build requires and configure
 [2018-11-27 13:07 UTC] cmb@php.net
-Status: Open +Status: Feedback
 [2018-11-27 13:07 UTC] cmb@php.net
Doesn't ./configure report a warning regarding missing development files?
 [2018-11-27 13:07 UTC] cmb@php.net
-Assigned To: +Assigned To: cmb
 [2018-11-28 01:33 UTC] jackie dot luo at kpmg dot com
Hi 
 
Thanks for the response.

Actually I passed the compilation process by inputting ./configure only.

Build complete.
Don't forget to run 'make test'.

Installing shared extensions:     /usr/local/lib/php/extensions/no-debug-non-zts-20131226/
Installing PHP CLI binary:        /usr/local/bin/
Installing PHP CLI man page:      /usr/local/php/man/man1/
Installing PHP CGI binary:        /usr/local/bin/
Installing PHP CGI man page:      /usr/local/php/man/man1/
Installing build environment:     /usr/local/lib/php/build/
Installing header files:           /usr/local/include/php/
Installing helper programs:       /usr/local/bin/
  program: phpize
  program: php-config
Installing man pages:             /usr/local/php/man/man1/
  page: phpize.1
  page: php-config.1
Installing PEAR environment:      /usr/local/lib/php/
[PEAR] Archive_Tar    - installed: 1.4.3
[PEAR] Console_Getopt - installed: 1.4.1
[PEAR] Structures_Graph- installed: 1.1.1
[PEAR] XML_Util       - installed: 1.4.2
[PEAR] PEAR           - installed: 1.10.5
Wrote PEAR system config file at: /usr/local/etc/pear.conf
You may want to add: /usr/local/lib/php to your php.ini include_path
/usr/local/php-5.6.38/build/shtool install -c ext/phar/phar.phar /usr/local/bin
ln -s -f phar.phar /usr/local/bin/phar
Installing PDO headers:           /usr/local/include/php/ext/pdo/




 
As you know I failed with error saying missing development files if I compile with some of parameters:

./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --enable-mbstring --enable-ftp --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-pdo-mysql=/usr/local/mysql --with-pear --enable-sockets --with-freetype-dir=/usr --with-zlib --with-libxml-dir=/usr --with-xmlrpc --enable-zip --enable-fpm --enable-xml --enable-sockets --with-gd --with-zlib --with-iconv --enable-zip --with-freetype-dir=/usr/lib/ --enable-soap --enable-pcntl --enable-cli --with-curl


I completely agree with your comment, maybe I can directly install the default mysql rpm using yum install instead of installing the mysql.tar.gz file.
 anyway, thanks for your advice.

besides, I did not receive any warnings about missing development file if I only input ./configure command.



regards,
 [2018-11-28 11:52 UTC] cmb@php.net
-Package: *General Issues +Package: Compile Failure
 [2018-11-28 11:52 UTC] cmb@php.net
The point is not whether make fails, but rather whether
./configure shows a warning (it should).
 [2018-12-09 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug 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 and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 15:01:29 2024 UTC