[MacPorts] #69068: php83-intl fails to compile on 10.6.8

MacPorts noreply at macports.org
Sun Jan 7 14:04:34 UTC 2024


#69068: php83-intl fails to compile on 10.6.8
------------------------+------------------------
 Reporter:  BjarneDMat  |      Owner:  (none)
     Type:  defect      |     Status:  new
 Priority:  Normal      |  Milestone:
Component:  ports       |    Version:  2.8.1
 Keywords:              |       Port:  php83-intl
------------------------+------------------------
 {{{
 #=> system_profiler -detaillevel mini SPHardwareDataType
 SPSoftwareDataType
 Hardware:
     Hardware Overview:
       Model Name: Mac mini
       Model Identifier: Macmini2,1
       Processor Name: Intel Core 2 Duo
       Processor Speed: 2 GHz
       Number Of Processors: 1
       Total Number Of Cores: 2
       L2 Cache: 4 MB
       Memory: 4 GB
       Bus Speed: 667 MHz
       Boot ROM Version: MM21.009A.B00
       SMC Version (system): 1.19f2
 Software:
     System Software Overview:
       System Version: Mac OS X 10.6.8 (10K549)
       Kernel Version: Darwin 10.8.0
       64-bit Kernel and Extensions: No
 }}}


 compiling gives this error :
 {{{
 :info:build /opt/local/include/php83/php/Zend/zend_operators.h:272:14:
 error: cannot initialize a variable of type 'const char *' with an rvalue
 of type 'const void *'
 :info:build         const char *p = memchr(s, '\0', maxlen);
 :info:build                     ^   ~~~~~~~~~~~~~~~~~~~~~~~
 :info:build 1 error generated.
 :info:build make: *** [intl_convertcpp.lo] Error 1
 :info:build make: *** Waiting for unfinished jobs....
 :info:build make: Leaving directory
 `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_php/php83-intl/work/php-8.3.1/ext/intl'
 }}}

 The problem is in /opt/local/include/php83/php/Zend/zend_operators.h -
 specifically these new lines in php83 :
 (this is a diff -u w/ the php82 version)
 {{{
 @@ -261,6 +264,16 @@
         }
  }

 +static zend_always_inline size_t zend_strnlen(const char* s, size_t
 maxlen)
 +{
 +#if defined(HAVE_STRNLEN)
 +       return strnlen(s, maxlen);
 +#else
 +       const char *p = memchr(s, '\0', maxlen);
 +       return p ? p-s : maxlen;
 +#endif
 +}
 +
  ZEND_API zend_result ZEND_FASTCALL increment_function(zval *op1);
  ZEND_API zend_result ZEND_FASTCALL decrement_function(zval *op2);
 }}}
 It looks af if !only! 10.6.8 hits the #else and triggers the bug

 possible workaround : copy the php82 version of zend_operators.h to php83
 \\
 I tried that; and it did compile; but I haven't done any checks

 Note :\\
 I DO have :
 {{{
 #=> cat com.apple.Boot.plist
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
 "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
 <plist version="1.0">
 <dict>
         <key>Kernel Flags</key>
         <string>arch=x86_64</string>
 </dict>
 </plist>
 }}}

-- 
Ticket URL: <https://trac.macports.org/ticket/69068>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list