Bug #72953 [Opn]: src/ext/standard/dns.c:328:2: error: unknown type name 'HEADER'
| From: | cmb@php.net | Date: | Tue, 30 Aug 2016 14:05:28 +0000 |
| Subject: | Bug #72953 [Opn]: src/ext/standard/dns.c:328:2: error: unknown type name 'HEADER' | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-203681@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=72953&edit=1
ID: 72953
Updated by: cmb@php.net
Reported by: subins2000 at gmail dot com
Summary: src/ext/standard/dns.c:328:2: error: unknown type
name 'HEADER'
Status: Open
Type: Bug
Package: Unknown/Other Function
Operating System: Ubuntu 16.04 Xenial Xerus
PHP Version: 7.0.10
Block user comment: N
Private report: N
New Comment:
struct HEADER and the other missing macros are supposed to be
declared in arpa/nameser_compat.h, which again is supposed to be
included from arpa/nameser.h. However, the Android SDK keeps
arpa/nameser.h intentionally blank[1].
I have some doubts that this is a good idea, and I don't know how
to solve this issue properly for PHP, but for a start you may try
to also include arpa/nameser_compat.h (see the attached patch
nameser_compat_hack).
[1] <https://android.googlesource.com/platform/prebuilts/ndk/+/6d8fd94e317c06e91e93c161bc7da0ca0ffeffb2/5/platforms/android-3/arch-arm/usr/include/arpa/nameser.h>
Previous Comments:
------------------------------------------------------------------------
[2016-08-27 15:18:35] subins2000 at gmail dot com
Description:
------------
This bug is similar to https://bugs.php.net/bug.php?id=51706
But (^) it has been closed. The bug exists for fresh versions of PHP 5.6.25 & PHP 7.0.10
I tried to simply cross compile PHP with this :
./configure --host=arm-linux-androideabi --disable-all
Before doing the above, I set the environment variables :
export ARCH=arm
export TOOLCHAINROOT="/media/simsu/hello/Android/toolchain"
export PATH=$PATH:$TOOLCHAINROOT/bin/
export CC="arm-linux-androideabi-gcc --sysroot=$TOOLCHAINROOT/sysroot"
export CXX="arm-linux-androideabi-g++ --sysroot=$TOOLCHAINROOT/sysroot"
As you can see, I'm using the Android toolchain.
Expected result:
----------------
PHP should compile
Actual result:
--------------
http://pastebin.com/uv7B4tes
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=72953&edit=1