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

Fixed compilation on macOS arm64 #527

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

amv-bamboo
Copy link

@amv-bamboo amv-bamboo commented Apr 25, 2024

Had the similar issue as in #167, but on the newer system:

mkdir -p build/common
mkdir -p build/zend
c++ -Wall -c -std=c++11 -fvisibility=hidden -DBUILDING_PHPCPP -Wno-write-strings -MD -fpic `php-config --includes` -g -o build/zend/base.o zend/base.cpp
In file included from zend/base.cpp:8:
In file included from zend/includes.h:134:
zend/hashiterator.h:75:32: warning: 'clone' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
    virtual ValueIteratorImpl *clone()
                               ^
zend/valueiteratorimpl.h:37:32: note: overridden virtual function is here
    virtual ValueIteratorImpl *clone() = 0;
                               ^
In file included from zend/base.cpp:8:
In file included from zend/includes.h:135:
zend/invaliditerator.h:26:32: warning: 'clone' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
    virtual ValueIteratorImpl *clone()
                               ^
zend/valueiteratorimpl.h:37:32: note: overridden virtual function is here
    virtual ValueIteratorImpl *clone() = 0;
                               ^
zend/base.cpp:280:12: error: conversion from 'long' to 'Php::Value' is ambiguous
    return countable->count();
           ^~~~~~~~~~~~~~~~~~
zend/../include/value.h:55:5: note: candidate constructor
    Value(int16_t value);
    ^
zend/../include/value.h:56:5: note: candidate constructor
    Value(int32_t value);
    ^
zend/../include/value.h:57:5: note: candidate constructor
    Value(int64_t value);
    ^
zend/../include/value.h:58:5: note: candidate constructor
    Value(bool value);
    ^
zend/../include/value.h:60:5: note: candidate constructor
    Value(char value);
    ^
zend/../include/value.h:64:5: note: candidate constructor
    Value(double value);
    ^
2 warnings and 1 error generated.
make: *** [build/zend/base.o] Error 1

Applied a fix with the type conversion suggested in the issue, seems to work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant