Undefined subroutine &main::open_quote called at /usr/local/bin/autom4te line 262 - xdebug

Hi I try to install xdebug via pecl on macox (Big Sur 11.5.2)
But I get error message
xdebug volodymyr$ pecl install xdebug
downloading xdebug-3.0.4.tgz ...
Starting to download xdebug-3.0.4.tgz (215,870 bytes)
.............................................done: 215,870 bytes
87 source files, building
running: phpize
Configuring for:
PHP Api Version: 20190902
Zend Module Api No: 20190902
Zend Extension Api No: 320190902
Undefined subroutine &main::open_quote called at /usr/local/bin/autom4te line 262.
ERROR: `phpize' failed
I update perl but it did help me (I can't catch if the open_quote is a part of perl)
Also I didn't find any information in the internet that is related with open_quote function issue
I tried to install xdebug from source and get the same bug on the ./phpize step
Resolve:
Just reinstall autoconf automake libtool
I run
brew reinstall autoconf automake libtool
After that I run brew link --force autoconf and it resolved the trouble

The error here comes from autom4te, not pecl or ./phpize. You need to update automake and autoconf, and/or related packages.

Related

Problem installing/rebuilding Xdebug under Apple Silicon M1

Failing to install XDebug under the new Apple Silicon M1 under Big Sur - After using pecl install xdebug and running php --ini I am getting the following error:
PHP Warning: Failed loading Zend extension 'xdebug.so' (tried: /opt/homebrew/lib/php/pecl/20190902/xdebug.so (dlopen(/opt/homebrew/lib/php/pecl/20190902/xdebug.so, 9): no suitable image found. Did find:
/opt/homebrew/lib/php/pecl/20190902/xdebug.so: mach-o, but wrong architecture
/opt/homebrew/lib/php/pecl/20190902/xdebug.so: stat() failed with errno=22), /opt/homebrew/lib/php/pecl/20190902/xdebug.so.so (dlopen(/opt/homebrew/lib/php/pecl/20190902/xdebug.so.so, 9): image not found)) in Unknown on line 0
Warning: Failed loading Zend extension 'xdebug.so' (tried: /opt/homebrew/lib/php/pecl/20190902/xdebug.so (dlopen(/opt/homebrew/lib/php/pecl/20190902/xdebug.so, 9): no suitable image found. Did find:
/opt/homebrew/lib/php/pecl/20190902/xdebug.so: mach-o, but wrong architecture
/opt/homebrew/lib/php/pecl/20190902/xdebug.so: stat() failed with errno=22), /opt/homebrew/lib/php/pecl/20190902/xdebug.so.so (dlopen(/opt/homebrew/lib/php/pecl/20190902/xdebug.so.so, 9): image not found)) in Unknown on line 0
I tried recompiling xdebug from source (git clone git://github.com/xdebug/xdebug.git) with the same results. Can I force the correct architecture in the config.m4 when recompiling xdebug? - ANy other suggestions?
I needed to specify the architecture.
It worked with :
arch -arm64 sudo pecl install xdebug
tried install with pecl install xdebug and got this error:
Build process completed successfully
Installing '/opt/homebrew/Cellar/php#7.4/7.4.15_1/pecl/20190902/xdebug.so'
Warning: mkdir(): File exists in System.php on line 294
Warning: mkdir(): File exists in /opt/homebrew/Cellar/php#7.4/7.4.15_1/share/php#7.4/pear/System.php on line 294
ERROR: failed to mkdir /opt/homebrew/Cellar/php#7.4/7.4.15_1/pecl/20190902
I used fix from this link https://patriqueouimet.ca/tip/installing-php-and-pecl-extensions-on-macos and it helped
Your warnings are about architecture, maybe need to remove and install again - i was do all from arm64 terminal...
Simply open your php.ini file and replace this line:
zend_extension="xdebug.so"
with whatever the installation process offered you
in my case it's:
/opt/homebrew/Cellar/php/8.1.5/pecl/20210902/xdebug.so
And remember to restart your services!
On a fresh MacOS installation I was getting an error:
Warning: mkdir(): File exists in System.php on line 294 PHP Warning: mkdir(): File exists in /usr/local/Cellar/php/7.3.3/share/php/pear/System.php on line 294
Warning: mkdir(): File exists in /usr/local/Cellar/php/7.3.3/share/php/pear/System.php on line 294 ERROR: failed to mkdir /usr/local/Cellar/php/7.3.3/pecl/20180731
You simply need to make the directory the script cannot, to accomplish this, run the following:
pecl config-get ext_dir | pbcopy
mkdir -p {paste clipboard value}
Now you can install PECL extensions
pecl install xdebug
You will likely have to install Xdebug through PECL with:
arch -x86_64 sudo pecl install xdebug
Not sure if this was the problem. However, I did a full reset of my M1 Macbook. And this time I only used arm software (iterm, homebrew...), this time it installed without any issue.

PHPUnit gives No Code Coverage Driver Is Available

I have a laravel project and I tried to run phpunit to give me a coverage report. I ran the command vendor/bin/phpunit --coverage-html storage/test-output-data/coverage-html and it gave the output:
PHPUnit 8.5.8 by Sebastian Bergmann and contributors.
Error: No code coverage driver is available
I tried to resolve this situation by doing a sudo pecl install pcov, but running the phpunit still gave the same error above.
I noticed that I have the file /usr/lib/php/20170718/pcov.so. So I added the line extension=/usr/lib/php/20170718/pcov.so to my /etc/php/7.4/cli/php.ini file. But when I type php -v, I get this error:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20170718/pcov.so' (tried: /usr/lib/php/20170718/pcov.so (/usr/lib/php/20170718/pcov.so: undefined symbol: _zval_ptr_dtor), /usr/lib/php/20190902//usr/lib/php/20170718/pcov.so.so (/usr/lib/php/20190902//usr/lib/php/20170718/pcov.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP 7.4.11 (cli) (built: Oct 10 2020 19:44:50) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.11, Copyright (c), by Zend Technologies
I also have a folder called /usr/lib/php/20190902 but it does not have a pcov.so file.
I also tried doing a sudo pecl install xdebug, but I run into similar errors as above where phpunit says there's no driver and typing php -v says some global variable is missing similar to the pcov issue.
What am I doing wrong?
I noticed that I have the file /usr/lib/php/20170718/pcov.so. So I added the line extension=/usr/lib/php/20170718/pcov.so to my /etc/php/7.4/cli/php.ini file.
This file is for PHP 7.2 (based on 20170718 part) while you are trying to use it in PHP 7.4.
You need to get the right version of Xdebug (or PCOV) for your PHP 7.4. (NOTE: for PHP 7.4 the API version (and the right folder in the path) will be 20190902.)
Try this solution from the following answer to switch / install extensions via PECL for specific PHP version (7.4 instead of your current 7.2): https://stackoverflow.com/a/54594604/783119
sudo pecl -d php_suffix=7.4 install <package-name>
This has nothing to do with PHPUnit. You have a problem with your PHP environment: "PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20170718/pcov.so' (tried: /usr/lib/php/20170718/pcov.so (/usr/lib/php/20170718/pcov.so: undefined symbol: _zval_ptr_dtor), /usr/lib/php/20190902//usr/lib/php/20170718/pcov.so.so (/usr/lib/php/20190902//usr/lib/php/20170718/pcov.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0"
You just need to install xdebug, so the coverage knows how to run.
For example, for PHP 7.1, it's this package:
sudo apt install php7.1-xdebug
Just fixed it today for my scenario. In your case, just change the PHP version to:
sudo apt install php7.4-xdebug

/usr/bin/mingw32-cmake: line 84: fg: no job control (Midori cross-compiling error)

I'm trying to compile Midori Web Browser for Windows on Fedora 22. For that purpose I'm following this tutorial.
I installed these dependencies except faenza-icon-theme:
yum install gcc vala intltool
yum install libsoup-devel webkitgtk3-devel sqlite-devel
yum install mingw{32,64}-webkitgtk3 mingw{32,64}-glib-networking mingw{32,64}-gdb mingw{32,64}-gstreamer-plugins-good
yum install faenza-icon-theme p7zip mingw32-nsis greybird-gtk3-theme
Later I installed faenzai-icon-theme via using a third party rpm.
I downloaded source:
bzr branch lp:midori
cd midori
mkdir _mingw32
cd _mingw32
But at this step:
mingw32-cmake .. -DUSE_ZEITGEIST=0 -DUSE_GTK3=1 -DCMAKE_INSTALL_PREFIX=/usr/i686-w64-mingw32/sys-root/mingw -DCMAKE_VERBOSE_MAKEFILE=0
I'm getting an error:
/usr/bin/mingw32-cmake: line 84: fg: no job control
I don't know how to solve this problem and the meaning of this error. I made a research on internet but nothing came up.
FWIW: I had the same error message trying to build a project of mine. It went away after
yum install cmake
Both mingw32-cmake and mingw64-cmake need cmake to function. (Actually, make that dnf install cmake nowadays.)

MacPorts failed install port

I have trouble installing PHP, MySQL and Apache2 using MacPorts. Currently my OS is Mavericks and i'm downloading the official binary package for mavericks (also tried compile from source and running selfupdate) but I got this error message:
---> Building readline
Error: org.macports.build for port readline returned: command execution failed
Error: Failed to install readline
Please see the log file for port readline for details:
/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_readline/readline/main.log
Error: The following dependencies were not installed: apache2 apr-util mysql5 readline tcp_wrappers sqlite3 libedit pcre bzip2 autoconf213 gawk xz m4 gsed libtool libxml2 mhash pkgconfig
To report a bug, follow the instructions in the guide:
http://guide.macports.org/#project.tickets
Error: Processing of port php5 failed
How can I solve this?
Thanks
Can you please check the error message block within the log file:
/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_readline/readline/main.log
Also make sure xcode command line tools are installed.
FYI: I faced similar error in Mavericks. My case was:
opt is a different partition which is mounted in /Volumes/opt
/opt is a symbolic link to /Volumes/opt.
It has been solved after editing /opt/local/etc/macports/macports.conf by replacing /opt with /Volumes/opt. Note sure this can help your case.

Help installing static binary for wkhtmltopdf

I am trying to use the static binary of wkhtmltopdf on Ubuntu server 10.0.4. The reason for is that it apparently has a built in modified QT that will allow me to run wkhtmltopdf without an X Server.
Result:
Once installed (see steps below), when I execute wkhtmltopdf in the terminal, it does not fire up... just returns me to the prompt - like it ran and did something, no error but no output:
:/usr/bin$ wkhtmltopdf
:/usr/bin$
Same behavior if I put args:
:/usr/bin$ wkhtmltopdf http://www.google.com test.pdf
:/usr/bin$
Am I doing something wrong --- my understanding that the static binary should just fire up. Perhaps missing some dependency? Is there a way to get some verbose output?
These are the steps I have followed:
In /usr/bin:
1) Confirmed that the existing (non-static) wkhtmltopdf resides there and that it executes. When I execute it with no args I get the help/about output from the app.
2) Moved the existing wkhtmltopdf out of the directory (renamed it)
3) Get the static binary: sudo curl -C - -O http:
//wkhtmltopdf.googlecode.com/files/wkhtmltopdf-0.9.9-static-i386.tar.bz2
4) Untar: tar xvjf wkhtmltopdf-0.9.9-static-i386.tar.bz2
5) Rename: mv wkhtmltopdf-i386 wkthtmltopdf
6) Get (apparently) necessary packages: sudo apt-get install openssl build-essential xorg libssl-dev
I was having the same problem. I removed the existing wkhtmltopdf and followed the steps below and the installation worked.
First, installing dependencies
sudo aptitude install openssl build-essential xorg libssl-dev
for 64-bit OS
wget http://wkhtmltopdf.googlecode.com/files/wkhtmltopdf-0.9.2-static-amd64.tar.bz2
tar xvjf wkhtmltopdf-0.9.2-static-amd64.tar.bz2
chown root:root wkhtmltopdf-amd64
mv wkhtmltopdf-amd64 /usr/bin/wkhtmltopdf
The only difference is that I put it in /usr/local/bin/wkhtmltopdf.
I hope this helps!
Following deb's answer got it working for me on Ubuntu 10.04 64bit - thanks!
Although rather than downloading 0.9.2 as per deb's instructions, I would suggest people download the latest version by:
Go to http://code.google.com/p/wkhtmltopdf/downloads/list
Download the latest version of wkhtmltopdf-[version number]-static-amd64.tar.bz2
At this time, the latest 64bit is http://wkhtmltopdf.googlecode.com/files/wkhtmltopdf-0.11.0_rc1-static-amd64.tar.bz2.
In my debian server trying to run wkhtmltopdf-i386 lead to same blank prompt.
Non-static (with non-patched QT) version of wkhtmltopdf installed with "aptitude install wkhtmltopdf" is worked.
Problem solved by switching to wkhtmltopdf-amd64, server was a 64 bit and i missed it.
After that, wkhtmltopdf-amd64 says 'libxrender shared library not found', this problem was solved by "aptitude install xorg"
0.11.0_rc1 seems to be buggy.
It keeps throwing the error "Cannot create a QPixmap when no GUI is being used".
Reverting to 0.9.9 worked for me.

Resources