php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #78097 error The mailparse extension requires the mbstring extension
Submitted: 2019-06-02 09:46 UTC Modified: -
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: mansion@php.net Assigned:
Status: Open Package: Compile Failure
PHP Version: 7.2.19 OS: Debian 9
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2019-06-02 09:46 UTC] mansion@php.net
Description:
------------
Cannot install the extension under Debian 9 with Php 7.2 Surry packages because config fails to detect that mbstring is already installed.



Test script:
---------------
pecl install mailparse

Actual result:
--------------
checking whether to enable mailparse support... yes, shared
checking libmbfl headers... found in /usr/include/php/20170718/ext/mbstring

...

running: make
/bin/bash /tmp/pear/temp/pear-build-rootNYhXoN/mailparse-3.0.3/libtool --mode=compile cc  -I. -I/tmp/pear/temp/mailparse -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootNYhXoN/mailparse-3.0.3/include -I/tmp/pear/temp/pear-build-rootNYhXoN/mailparse-3.0.3/main -I/tmp/pear/temp/mailparse -I/usr/include/php/20170718 -I/usr/include/php/20170718/main -I/usr/include/php/20170718/TSRM -I/usr/include/php/20170718/Zend -I/usr/include/php/20170718/ext -I/usr/include/php/20170718/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /tmp/pear/temp/mailparse/mailparse.c -o mailparse.lo
libtool: compile:  cc -I. -I/tmp/pear/temp/mailparse -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootNYhXoN/mailparse-3.0.3/include -I/tmp/pear/temp/pear-build-rootNYhXoN/mailparse-3.0.3/main -I/tmp/pear/temp/mailparse -I/usr/include/php/20170718 -I/usr/include/php/20170718/main -I/usr/include/php/20170718/TSRM -I/usr/include/php/20170718/Zend -I/usr/include/php/20170718/ext -I/usr/include/php/20170718/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/mailparse/mailparse.c  -fPIC -DPIC -o .libs/mailparse.o
/tmp/pear/temp/mailparse/mailparse.c:33:2: error: #error The mailparse extension requires the mbstring extension!
 #error The mailparse extension requires the mbstring extension!
  ^~~~~
Makefile:198 : la recette pour la cible « mailparse.lo » a échouée
make: *** [mailparse.lo] Erreur 1
ERROR: `make' failed

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-06-03 00:00 UTC] petk@php.net
Hello, thank you for reporting this issue.

After a quick test and recheck I can confirm this issue. I gave up with the installation somewhere after the last command (where the extension needs to be enabled in the ini file) because I get the expected usual errors which repeat from PHP version 5 on if not earlier. I got so far because I know how to get to that step (with quite a lot of adjustments and minor patches)... Other users will give up at the very first step - the "pecl install" step in most cases.

It is a known issue that was basically too problematic to fix. We have at least tried to fix it via this: 
https://github.com/php/php-src/pull/3898
but was reverted because it cause other breaks elsewhere:
https://github.com/php/php-src/commit/3ead67239419632eecb83f0f101ead2021ee6c14
revert:
https://github.com/php/php-src/commit/32e7b0864ca1e5094ecea73641c4dc87bcdaa684
and a bypass suggestion here:
https://bugs.php.net/bug.php?id=77609

So basically, I'll just leave this to others to move forward here with this. PHP build system is broken beyond reparation until we move to something better and accept few compromises with the extensions and other things...

A quick and hopefully helpful tip here: some packages (Linux repositories) also include this mailparse extension in their distros already, so I would suggest you to use that instead first before trying to install this manually yourself to not have a ruined day too much.

Good luck and hope we get forward one day more regarding this...
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Wed Jun 03 00:01:27 2020 UTC