Bug #72953 [Com]: src/ext/standard/dns.c:328:2: error: unknown type name 'HEADER'
| From: | subins2000 at gmail dot com | Date: | Tue, 30 Aug 2016 14:49:49 +0000 |
| Subject: | Bug #72953 [Com]: 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-203685@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
Comment by: subins2000 at gmail dot com
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:
I applied the patch. But the nameser_compat.h file is not found :
ext/standard/dns.c:51:33: fatal error: arpa/nameser_compat.h: No such file or directory
The Android toolchain doesn't have the nameser_compat.h header file[1]
[1] https://android.googlesource.com/platform/prebuilts/ndk/+/6d8fd94e317c06e91e93c161bc7da0ca0ffeffb2/5/platforms/android-3/arch-arm/usr/include/arpa/
Previous Comments:
------------------------------------------------------------------------
[2016-08-30 14:05:57] cmb@php.net
The following patch has been added/updated:
Patch Name: nameser_compat_hack
Revision: 1472565957
URL: https://bugs.php.net/patch-display.php?bug=72953&patch=nameser_compat_hack&revision=1472565957
------------------------------------------------------------------------
[2016-08-30 14:05:27] cmb@php.net
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>
------------------------------------------------------------------------
[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