Bug #76825 [NEW]: Undefined symbols ___cpuid_count

From: Date: Fri, 31 Aug 2018 02:35:32 +0000
Subject: Bug #76825 [NEW]: Undefined symbols ___cpuid_count
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-216819@lists.php.net to get a copy of this message
From:             php-bugs-2018 at ryandesign dot com
Operating system: Mac OS X 10.7.5
PHP version:      7.3.0beta3
Package:          Compile Failure
Bug Type:         Bug
Bug description:Undefined symbols ___cpuid_count

Description:
------------
Hello, php 7.3.0beta3 fails to build on Mac OS X 10.7.5 using the clang
425.0.28 compiler that ships with Xcode 4.6.3:


Zend/zend_cpuinfo.c:34:2: warning: implicit declaration of function
'__cpuid_count' is invalid in C99 [-Wimplicit-function-declaration]
        __cpuid_count(func, subfunc, cpuinfo->eax, cpuinfo->ebx,
cpuinfo->ecx, cpuinfo->edx);
        ^

...

Undefined symbols for architecture x86_64:
  "___cpuid_count", referenced from:
      _zend_cpu_startup in zend_cpuinfo.o


On Mac OS X 10.6.8 using the Apple gcc 4.2.1 compiler that ships with
Xcode 3.2.6, there is a different but seemingly related error:


Zend/zend_cpuinfo.c:32:19: error: cpuid.h: No such file or directory


The commit that probably introduced this problem is
https://github.com/php/php-src/commit/1a078117b5ae862b18ef5362accef4b4d0a6b7c4

Using a newer compiler does work around the problem, but requiring users
to install or possibly even build a newer compiler can be an imposition.
It looks like php used to have some custom assembly that was replaced
with a call to __cpuid_count, and there was discussion in
https://github.com/php/php-src/pull/3395
about whether the old code
should be retained as a fallback, and it was decided not to do so until
someone reported a build failure; this ticket is that build failure
report.


-- 
Edit bug report at https://bugs.php.net/bug.php?id=76825&edit=1
-- 
Try a snapshot (PHP 5.4):   https://bugs.php.net/fix.php?id=76825&r=trysnapshot54
Try a snapshot (PHP 5.5):   https://bugs.php.net/fix.php?id=76825&r=trysnapshot55
Try a snapshot (trunk):     https://bugs.php.net/fix.php?id=76825&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=76825&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=76825&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=76825&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=76825&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=76825&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=76825&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=76825&r=notwrong
Not enough info:            https://bugs.php.net/fix.php?id=76825&r=notenoughinfo
Submitted twice:            https://bugs.php.net/fix.php?id=76825&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=76825&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=76825&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=76825&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=76825&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=76825&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=76825&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=76825&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=76825&r=mysqlcfg



Thread (13 messages)

« previous php.bugs (#216819) next »