asdf-community / asdf-community/asdf-php

Compilation issues with ICU 68

Open
#90 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Shell
Stars
256
Forks
117
PR merge metrics
No merged PRs in 30d

Description

Hello, and first of all, thanks for the work done so far.

#

There seems to be no possibility to build using asdf-php when ICU is v68 or above. Indeed, as stated here http://site.icu-project.org/download/68, the v68 ICU library doesn't define `TRUE` and `FALSE`, which results in the following issue (regardless of minor version installed, the 7.{0-2} cannot build), example for 7.1.33) :

```
/tmp/tmp.JS3ZQ5bJJH/php-src-php-7.1.33/ext/intl/timezone/timezone_class.cpp: In function ‘HashTable* TimeZone_get_debug_info(zval*, int*)’:
/tmp/tmp.JS3ZQ5bJJH/php-src-php-7.1.33/ext/intl/timezone/timezone_class.cpp:324:28: error: ‘FALSE’ was not declared in this scope
324 | tz->getOffset(now, FALSE, rawOffset, dstOffset, uec);
| ^~~~~
make: *** [Makefile:1244: ext/intl/timezone/timezone_class.lo] Error 1
make: *** Waiting for unfinished jobs....
/tmp/tmp.JS3ZQ5bJJH/php-src-php-7.1.33/ext/intl/timezone/timezone_methods.cpp: In function ‘void zif_intltz_from_date_time_zone(zend_execute_data*, zval*)’:
/tmp/tmp.JS3ZQ5bJJH/php-src-php-7.1.33/ext/intl/timezone/timezone_methods.cpp:94:64: error: ‘FALSE’ was not declared in this scope
94 | tz = timezone_convert_datetimezone(tzobj->type, tzobj, FALSE, NULL,
| ^~~~~
make: *** [Makefile:1246: ext/intl/timezone/timezone_methods.lo] Error 1
```
From what I could gather, the a "temporary" way to fix this would be to define the `U_DEFINE_FALSE_AND_TRUE` to `1` for `gcc` not to error at compile time, but I don't really know where or how it would fit with the rest of the existing code (in asdf-php), or if it even should be considered.

Any ideas / suggestions ?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the PHP 7.1.33 build with ICU 68 or newer and inspect the reported ext/intl/timezone/timezone_class.cpp and timezone_methods.cpp failures. Determine where asdf-php configures the PHP build and verify completion by building the affected PHP 7.x versions successfully with ICU 68+.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, shell
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.