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

[BUG] Version mismatch error #165

Closed
ruudboon opened this issue Jan 28, 2020 · 30 comments
Closed

[BUG] Version mismatch error #165

ruudboon opened this issue Jan 28, 2020 · 30 comments
Labels

Comments

@ruudboon
Copy link

ruudboon commented Jan 28, 2020

When for example installing Swoole you get the following error:

Version mismatch - 'SWOOLE_VERSION' != '4.4.15' in source vs. XML
Swoole uses #define PHP_SWOOLE_VERSION SWOOLE_VERSION probably causing the issue.

Something similar occurs with Xdebug
Couldn't parse the version defined in the PHP_XDEBUG_VERSION macro
I assume that PHP_(package)_VERSION is replaced with (package)_VERSION

@Hywan Hywan added the bug label Jan 29, 2020
@Hywan
Copy link
Member

Hywan commented Jan 29, 2020

Can you give me the command lines you run please?

@ruudboon
Copy link
Author

ruudboon commented Jan 29, 2020

sudo bin/pickle install swoole

https://github.com/ruudboon/pickle/runs/412318671?check_suite_focus=true#step:7:8

@pierrejoye
Copy link
Member

This should be fixed now, we look for this constant in all files recursively.

@elovin
Copy link

elovin commented Jul 1, 2020

@pierrejoye I tried the latest release (0.6.0) and latest git master versions.

When I run sudo ./pickle.phar install xdebug
I also get this error:


In Version.php line 91:
                                                                              
  Couldn't parse or find the version defined in the PHP_XDEBUG_VERSION macro

@vstokarev
Copy link
Contributor

I cannot install xdebug too, same error, latest version (0.6.0), please reopen this issue.

@pierrejoye pierrejoye reopened this Jul 11, 2020
@pierrejoye
Copy link
Member

Ok, will try to take a look at it soon.

In the meantime, which command call did you use to install xdebug?

@vstokarev
Copy link
Contributor

I used pickle install xdebug

The problem is that xdebug does not have PHP_ prefix in version macro:
https://github.com/xdebug/xdebug/blob/master/php_xdebug.h#L23

It can be fixed by updating regexp which is used for searching versions in src/Package/Util/Header/Version.php. I updated it locally, made a new build and it worked just fine. I can submit a pull request later today.

vstokarev added a commit to vstokarev/pickle that referenced this issue Jul 11, 2020
@vstokarev
Copy link
Contributor

PR: #185

@faizanakram99
Copy link

image

Same issue with sqlsrv or pdo_sqlsrv extensions

@vstokarev
Copy link
Contributor

It is probably a different issue @faizanakram99 .

@faizanakram99
Copy link

It is probably a different issue @faizanakram99 .

Think it's the same as OP reported, the error messages are the same

@vstokarev
Copy link
Contributor

Yes, you're right. And this is probably a reason for that:
https://github.com/microsoft/msphpsql/blob/master/source/shared/version.h#L64

Not sure how it can be fixed in pickle though.

@pierrejoye
Copy link
Member

We could fix it but it would be endless fixes then (Been there in the old pear/pecl):

Pickle uses composer. Composer supports semver valid versions only.

What I was thinking is a kind of flags to allow users to install. However ideally upstream developers should use semver only versions.

@pierrejoye
Copy link
Member

As of SqlSrv they should use the macros, it is part of the php extension references. btw :)

@pierrejoye
Copy link
Member

(they removed them as I added them in the early days of this extension)

@faizanakram99
Copy link

As of SqlSrv they should use the macros, it is part of the php extension references. btw :)

Sorry I don't know anything about extension development, is this worth an issue in ext sqlsrv repository ?
If yes, could you help me in opening an issue there ?

@strarsis
Copy link

With latest pickle (v0.6.0) the installation of xdebug PHP extension fails:

> pickle install xdebug
pickle install xdebug
  - Installing xdebug (latest-stable): Downloading (100%)

In Version.php line 91:

  Couldn't parse or find the version defined in the PHP_XDEBUG_VERSION macro

@duncan3dc
Copy link
Contributor

I think the issue with sqlsrv is that they are building the constant dynamically, which Pickle doesn't support:
microsoft/msphpsql#1210

@mleczakm
Copy link

mleczakm commented Nov 9, 2020

I'm still unable to install latest swoole using pickle.

@TheHett
Copy link

TheHett commented Nov 27, 2020

Still not working :(

RUN set -ex \
	&& apk add \
		    libzip-dev \
	&& docker-php-ext-install -j$(nproc) zip \
	&& curl -L -o /usr/local/bin/pickle https://github.com/FriendsOfPHP/pickle/releases/latest/download/pickle.phar \
	&& chmod +x /usr/local/bin/pickle

RUN pickle install xdebug \
    && docker-php-ext-enable xdebug

Error

  - Installing xdebug (latest-stable): Downloading (100%)

In Version.php line 91:

  Couldn't parse or find the version defined in the PHP_XDEBUG_VERSION macro

@pierrejoye
Copy link
Member

pierrejoye commented Nov 28, 2020 via email

@faizanakram99
Copy link

msphpsql changed version number upstream but unfortunately it still doesn't work, tried with master branch too

microsoft/msphpsql#1210 (comment)

@TheHett
Copy link

TheHett commented Dec 9, 2020

@pierrejoye current git doesn't work on php 8 :(

# Pickle
RUN set -ex \
	&& apk add libzip-dev \
	&& docker-php-ext-install -j$(nproc) zip \
	&& git clone https://github.com/FriendsOfPHP/pickle.git /opt/pickle \
	&& cd /opt/pickle && /usr/bin/composer install \
	&& ln -s /opt/pickle/bin/pickle /usr/local/bin/pickle \
	&& chmod +x /usr/local/bin/pickle
    - Installation request for composer/composer 1.10.6 -> satisfiable by composer/composer[1.10.6].
    - composer/composer 1.10.6 requires php ^5.3.2 || ^7.0 -> your PHP version (8.0.0) does not satisfy that requirement.

Can you release?

@victordelva
Copy link

I still have same problem

@mlocati
Copy link
Collaborator

mlocati commented Jan 27, 2021

I still have same problem

@vicalle12

  1. what's your pickle version (pickle --version or php pickle.phar --version)?
  2. what's the command that fails for you (eg pickle install ...)?

@victordelva
Copy link

victordelva commented Jan 27, 2021

I still have same problem

@vicalle12

  1. what's your pickle version (pickle --version or php pickle.phar --version)?
  2. what's the command that fails for you (eg pickle install ...)?

Command
pickle install xdebug
in Dockerfile:
FROM php:8.0.0RC3-fpm-alpine
Error:

pickle install xdebug
  - Installing xdebug (latest-stable): Downloading (100%)

In Version.php line 91:

  Couldn't parse or find the version defined in the PHP_XDEBUG_VERSION macro

@mlocati
Copy link
Collaborator

mlocati commented Jan 27, 2021

@vicalle12 What's the version of pickle you are using? pickle --version

@Ahmard
Copy link

Ahmard commented Jun 18, 2022

Having same issue too, I simply ran

pickle install openswoole

Screenshot from 2022-06-18 09-11-10

Using v0.7.11

@nikspyratos
Copy link

Version mismatch - 'OpenSwoole-' != '22.0.0' in source vs. XML

Same thing for me on PHP8.2. Latest pickle.

@nikspyratos
Copy link

Gave this another go, adding --version-override 22.1.2 made it install. It has some other build issues (on my M1 at least), but what worked was copying a missing pcre2 file to my PHP installation:

cp /opt/homebrew/Cellar/pcre2/10.42/include/pcre2.h /opt/homebrew/Cellar/php/8.3.0/include/php/ext/pcre/pcre2.h (yours may differ in versions)

Then installing with version override worked, if using none of the install options.

Otherwise for dev right now, if you're using Laravel Octane, it may be simpler to use Roadrunner.

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