libimobiledevice: remove runtime configure check
PATCH 1/2 libimobiledevice: remove runtime configure check
configure.ac had a runtime check for large file support that got run on 64-bit architectures, and all runtime checks must go away to be cross-compile safe.
Luckily that runtime check was extraneous, so just remove it; standard AC_SYS_LARGEFILE macro should be sufficient for figuring out proper settings to get large file support.
Also un-blacklist libimobiledevice, since this problem was the reason for the blacklist.
--- .../files/configure-fix-largefile.patch | 38 ++++++++++++++++++++ .../libimobiledevice/libimobiledevice_1.1.4.bb | 6 +--- 2 files changed, 39 insertions(+), 5 deletions(-) create mode 100644 meta-oe/recipes-connectivity/libimobiledevice/files/configure-fix-largefile.patch
meta-oe/recipes-connectivity/libimobiledevice/files/configure-fix-largefile.patch new file +38 -0
@@ -0,0 +1,38 @@ +Fix configure error in large file checks on 64-bit architectures + + configure:17888: checking for native large file support + configure:17891: error: in `/home/jenkins/oe/shr-core-branches/shr-core/tmp-eglibc/work/core2-64-oe-linux/libimobiledevice/1.1.4-r0/libimobiledevice-1.1.4': + configure:17893: error: cannot run test program while cross compiling + +configure.ac was using AC_SYS_LARGEFILE macro as is typical, but then +there was an extra runtime check added beyond that: +check if off_t is 8 bytes (64 bits) long. +If that runtime check passed, _FILE_OFFSET_BITS was defined as 64. + +Runtime checks need to go away for cross compiling, and luckily this extra +check was not serving any useful purpose. Note that off_t was *already* +64 bits, *without* setting _FILE_OFFSET_BITS, which makes _FILE_OFFSET_BITS +unneeded for large file support. + +If AC_SYS_LARGEFILE macro sets ac_cv_sys_file_offset_bits=no, +just leave _FILE_OFFSET_BITS undefined! + +--- libimobiledevice-1.1.4/configure.ac.old 2015-07-15 01:38:50.900143927 -0700 ++++ libimobiledevice-1.1.4/configure.ac 2015-07-15 01:39:13.300144430 -0700 +@@ -174,16 +174,6 @@ + if test "$enable_largefile" != no; then + if test "$ac_cv_sys_file_offset_bits" != 'no'; then + LFS_CFLAGS="$LFS_CFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits" +- else +- AC_MSG_CHECKING(for native large file support) +- AC_RUN_IFELSE([AC_LANG_SOURCE([#include <unistd.h> +- int main (int argc, char **argv) +- { +- exit(!(sizeof(off_t) == 8)); +- }])], +- [ac_cv_sys_file_offset_bits=64; AC_DEFINE(_FILE_OFFSET_BITS,64) +- AC_MSG_RESULT(yes)], +- [AC_MSG_RESULT(no)]) + fi + if test "$ac_cv_sys_large_files" != 'no'; then + LFS_CFLAGS="$LFS_CFLAGS -D_LARGE_FILES=1"
meta-oe/recipes-connectivity/libimobiledevice/libimobiledevice_1.1.4.bb +1 -5
@@ -5,17 +5,13 @@ LIC_FILES_CHKSUM = "\ file://COPYING.LESSER;md5=6ab17b41640564434dda85c06b7124f7 \ " -#| configure:17888: checking for native large file support -#| configure:17891: error: in `/home/jenkins/oe/shr-core-branches/shr-core/tmp-eglibc/work/core2-64-oe-linux/libimobiledevice/1.1.4-r0/libimobiledevice-1.1.4': -#| configure:17893: error: cannot run test program while cross compiling -PNBLACKLIST[libimobiledevice] ?= "cannot run test program while cross compiling" - HOMEPAGE ="http://www.libimobiledevice.org/" DEPENDS = "libplist usbmuxd libtasn1 gnutls libgcrypt" SRC_URI = " \ http://www.libimobiledevice.org/downloads/libimobiledevice-${PV}.tar.bz2 \ + file://configure-fix-largefile.patch \ " SRC_URI[md5sum] = "3f28cbc6a2e30d34685049c0abde5183"
Signature · 1 line
1.7.10.4
Quoted 7 lines · S. Lockwood-Childs
configure.ac had a runtime check for large file support that got run on 64-bit architectures, and all runtime checks must go away to be cross-compile safe.
Quoted 7 lines
Luckily that runtime check was extraneous, so just remove it; standard
AC_SYS_LARGEFILEmacro should be sufficient for figuring out proper settings to get large file support.Also un-blacklist libimobiledevice, since this problem was the reason for the blacklist.
one difference is that now it will depend on --enable-largefile secondly, what does AC_SYS_LARGEFILE check do in the end ? is it a link time check ?
Quoted 82 lines
Signed-off-by S. Lockwood-Childs <[email protected]>---
.../files/configure-fix-largefile.patch| 38 ++++++++++++++++++++
.../libimobiledevice/libimobiledevice_1.1.4.bb | 6 +---2 files changed, 39 insertions(+), 5 deletions(-)create mode 100644
meta-oe/recipes-connectivity/libimobiledevice/files/configure-fix-largefile.patchmeta-oe/recipes-connectivity/libimobiledevice/files/configure-fix-largefile.patch new file +38
-0@@ -0,0 +1,38 @@ +Fix configure error in large file checks on 64-bit architectures + + configure:17888: checking for native large file support + configure:17891: error: in `/home/jenkins/oe/shr-core-branches/shr-core/tmp-eglibc/work/core2-64-oe-linux/libimobiledevice/1.1.4-r0/libimobiledevice-1.1.4': + configure:17893: error: cannot run test program while cross compiling + +configure.ac was using AC_SYS_LARGEFILE macro as is typical, but then +there was an extra runtime check added beyond that: +check if off_t is 8 bytes (64 bits) long. +If that runtime check passed, _FILE_OFFSET_BITS was defined as 64. + +Runtime checks need to go away for cross compiling, and luckily this extra +check was not serving any useful purpose. Note that off_t was *already* +64 bits, *without* setting _FILE_OFFSET_BITS, which makes _FILE_OFFSET_BITS +unneeded for large file support. + +If AC_SYS_LARGEFILE macro sets ac_cv_sys_file_offset_bits=no, +just leave _FILE_OFFSET_BITS undefined! + +--- libimobiledevice-1.1.4/configure.ac.old 2015-07-15 01:38:50.900143927 -0700 ++++ libimobiledevice-1.1.4/configure.ac 2015-07-15 01:39:13.300144430 -0700 +@@ -174,16 +174,6 @@ + if test "$enable_largefile" != no; then + if test "$ac_cv_sys_file_offset_bits" != 'no'; then + LFS_CFLAGS="$LFS_CFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits" +- else +- AC_MSG_CHECKING(for native large file support) +- AC_RUN_IFELSE([AC_LANG_SOURCE([#include <unistd.h> +- int main (int argc, char **argv) +- { +- exit(!(sizeof(off_t) == 8)); +- }])], +- [ac_cv_sys_file_offset_bits=64; AC_DEFINE(_FILE_OFFSET_BITS,64) +- AC_MSG_RESULT(yes)], +- [AC_MSG_RESULT(no)]) + fi + if test "$ac_cv_sys_large_files" != 'no'; then + LFS_CFLAGS="$LFS_CFLAGS -D_LARGE_FILES=1"meta-oe/recipes-connectivity/libimobiledevice/libimobiledevice_1.1.4.bb +0
-0@@ -5,17 +5,13 @@ LIC_FILES_CHKSUM = "\ file://COPYING.LESSER;md5=6ab17b41640564434dda85c06b7124f7 \"
meta-oe/recipes-connectivity/libimobiledevice/libimobiledevice_1.1.4.bb +0
-5-#| configure:17888: checking for native large file support -#| configure:17891: error: in `/home/jenkins/oe/shr-core-branches/shr-core/tmp-eglibc/work/core2-64-oe-linux/libimobiledevice/1.1.4-r0/libimobiledevice-1.1.4': -#| configure:17893: error: cannot run test program while cross compiling -PNBLACKLIST[libimobiledevice] ?= "cannot run test program while cross compiling" -HOMEPAGE ="http://www.libimobiledevice.org/"
DEPENDS = "libplist usbmuxd libtasn1 gnutls libgcrypt"
SRC_URI = " \ http://www.libimobiledevice.org/downloads/libimobiledevice-${PV}.tar.bz2 \+ file://configure-fix-largefile.patch \
"SRC_URI[md5sum] = "
3f28cbc6a2e30d34685049c0abde5183" --
1.7.10.4--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
Apologies for managing to reply to the wrong thread the first time...
Quoted 11 lines · Khem Raj
Quoted 11 lines · S. Lockwood-Childs
configure.ac had a runtime check for large file support that got run on 64-bit architectures, and all runtime checks must go away to be cross-compile safe.
Luckily that runtime check was extraneous, so just remove it; standard
AC_SYS_LARGEFILEmacro should be sufficient for figuring out proper settings to get large file support.
Quoted 6 lines
Quoted 3 lines
Also un-blacklist libimobiledevice, since this problem was the reason for the blacklist.
one difference is that now it will depend on --enable-largefile secondly, what does
AC_SYS_LARGEFILEcheck do in the end ? is it a link time check ?
Not sure what you mean by 'now it will depend on --enable-largefile' since the handling of that flag isn't being changed. I didn't add AC_SYS_LARGEFILE macro; it was already there. The recipe still doesn't need to set that flag... large file support should get enabled if the platform supports it.
AC_SYS_LARGEFILE does a compile-time check that off_t is large as expected, and if not it tries some defines (such as _FILE_OFFSET_BITS) to see if they can make off_t check pass. In the 64-bit Linux case, the first check passes, since no tinkering with extra defines is needed, but for 32-bit case _FILE_OFFSET_BITS will get defined.
Quoted 10 lines · S. Lockwood-Childs
configure.ac had a runtime check for large file support that got run on 64-bit architectures, and all runtime checks must go away to be cross-compile safe.
Luckily that runtime check was extraneous, so just remove it; standard
AC_SYS_LARGEFILEmacro should be sufficient for figuring out proper settings to get large file support.Also un-blacklist libimobiledevice, since this problem was the reason for the blacklist.
There is another issue, probably triggered by switch to gcc-5, are you willing to fix it?
| /home/jenkins/oe/world/shr-core/tmp-glibc/work/armv5te-oe-linux-gnueabi/libimobiledevice/1.1.4-r0/libimobiledevice-1.1.4/src/afc.c:258: error: undefined reference to 'debug_buffer' | /home/jenkins/oe/world/shr-core/tmp-glibc/work/armv5te-oe-linux-gnueabi/libimobiledevice/1.1.4-r0/libimobiledevice-1.1.4/src/afc.c:273: error: undefined reference to 'debug_buffer' | /home/jenkins/oe/world/shr-core/tmp-glibc/work/armv5te-oe-linux-gnueabi/libimobiledevice/1.1.4-r0/libimobiledevice-1.1.4/src/afc.c:247: error: undefined reference to 'debug_buffer' | /home/jenkins/oe/world/shr-core/tmp-glibc/work/armv5te-oe-linux-gnueabi/libimobiledevice/1.1.4-r0/libimobiledevice-1.1.4/src/afc.c:258: error: undefined reference to 'debug_buffer' | collect2: error: ld returned 1 exit status | make[2]: *** [libimobiledevice.la] Error 1 | make[2]: Leaving directory `/home/jenkins/oe/world/shr-core/tmp-glibc/work/armv5te-oe-linux-gnueabi/libimobiledevice/1.1.4-r0/build/src' | make[1]: *** [all-recursive] Error 1 | make[1]: Leaving directory `/home/jenkins/oe/world/shr-core/tmp-glibc/work/armv5te-oe-linux-gnueabi/libimobiledevice/1.1.4-r0/build' | make: *** [all] Error 2
otherwise I'll blacklist it again in few days (it was reported in couple world builds already).
Quoted 83 lines
Signed-off-by S. Lockwood-Childs <[email protected]>--- .../files/configure-fix-largefile.patch | 38 ++++++++++++++++++++ .../libimobiledevice/libimobiledevice_1.1.4.bb | 6 +--- 2 files changed, 39 insertions(+), 5 deletions(-) create mode 100644 meta-oe/recipes-connectivity/libimobiledevice/files/configure-fix-largefile.patchmeta-oe/recipes-connectivity/libimobiledevice/files/configure-fix-largefile.patch new file +38
-0@@ -0,0 +1,38 @@ +Fix configure error in large file checks on 64-bit architectures + + configure:17888: checking for native large file support + configure:17891: error: in `/home/jenkins/oe/shr-core-branches/shr-core/tmp-eglibc/work/core2-64-oe-linux/libimobiledevice/1.1.4-r0/libimobiledevice-1.1.4': + configure:17893: error: cannot run test program while cross compiling + +configure.ac was using AC_SYS_LARGEFILE macro as is typical, but then +there was an extra runtime check added beyond that: +check if off_t is 8 bytes (64 bits) long. +If that runtime check passed, _FILE_OFFSET_BITS was defined as 64. + +Runtime checks need to go away for cross compiling, and luckily this extra +check was not serving any useful purpose. Note that off_t was *already* +64 bits, *without* setting _FILE_OFFSET_BITS, which makes _FILE_OFFSET_BITS +unneeded for large file support. + +If AC_SYS_LARGEFILE macro sets ac_cv_sys_file_offset_bits=no, +just leave _FILE_OFFSET_BITS undefined! + +--- libimobiledevice-1.1.4/configure.ac.old 2015-07-15 01:38:50.900143927 -0700 ++++ libimobiledevice-1.1.4/configure.ac 2015-07-15 01:39:13.300144430 -0700 +@@ -174,16 +174,6 @@ + if test "$enable_largefile" != no; then + if test "$ac_cv_sys_file_offset_bits" != 'no'; then + LFS_CFLAGS="$LFS_CFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits" +- else +- AC_MSG_CHECKING(for native large file support) +- AC_RUN_IFELSE([AC_LANG_SOURCE([#include <unistd.h> +- int main (int argc, char **argv) +- { +- exit(!(sizeof(off_t) == 8)); +- }])], +- [ac_cv_sys_file_offset_bits=64; AC_DEFINE(_FILE_OFFSET_BITS,64) +- AC_MSG_RESULT(yes)], +- [AC_MSG_RESULT(no)]) + fi + if test "$ac_cv_sys_large_files" != 'no'; then + LFS_CFLAGS="$LFS_CFLAGS -D_LARGE_FILES=1"meta-oe/recipes-connectivity/libimobiledevice/libimobiledevice_1.1.4.bb +1
-5@@ -5,17 +5,13 @@ LIC_FILES_CHKSUM = "\ file://COPYING.LESSER;md5=6ab17b41640564434dda85c06b7124f7 \ " -#| configure:17888: checking for native large file support -#| configure:17891: error: in `/home/jenkins/oe/shr-core-branches/shr-core/tmp-eglibc/work/core2-64-oe-linux/libimobiledevice/1.1.4-r0/libimobiledevice-1.1.4': -#| configure:17893: error: cannot run test program while cross compiling -PNBLACKLIST[libimobiledevice] ?= "cannot run test program while cross compiling" - HOMEPAGE ="http://www.libimobiledevice.org/" DEPENDS = "libplist usbmuxd libtasn1 gnutls libgcrypt" SRC_URI = " \ http://www.libimobiledevice.org/downloads/libimobiledevice-${PV}.tar.bz2 \ + file://configure-fix-largefile.patch \ " SRC_URI[md5sum] = "3f28cbc6a2e30d34685049c0abde5183"Signature · 7 lines
1.7.10.4 -- _______________________________________________ Openembedded-devel mailing list [email protected] http://lists.openembedded.org/mailman/listinfo/openembedded-devel
Signature · 1 line
Martin 'JaMa' Jansa jabber: [email protected]
Quoted 26 lines · Martin Jansa
Quoted 10 lines · S. Lockwood-Childs
configure.ac had a runtime check for large file support that got run on 64-bit architectures, and all runtime checks must go away to be cross-compile safe.
Luckily that runtime check was extraneous, so just remove it; standard
AC_SYS_LARGEFILEmacro should be sufficient for figuring out proper settings to get large file support.Also un-blacklist libimobiledevice, since this problem was the reason for the blacklist.
There is another issue, probably triggered by switch to gcc-5, are you willing to fix it?
| /home/jenkins/oe/world/shr-core/tmp-glibc/work/armv5te-oe-linux-gnueabi/libimobiledevice/1.1.4-r0/libimobiledevice-1.1.4/src/afc.c:258: error: undefined reference to 'debug_buffer' | /home/jenkins/oe/world/shr-core/tmp-glibc/work/armv5te-oe-linux-gnueabi/libimobiledevice/1.1.4-r0/libimobiledevice-1.1.4/src/afc.c:273: error: undefined reference to 'debug_buffer' | /home/jenkins/oe/world/shr-core/tmp-glibc/work/armv5te-oe-linux-gnueabi/libimobiledevice/1.1.4-r0/libimobiledevice-1.1.4/src/afc.c:247: error: undefined reference to 'debug_buffer' | /home/jenkins/oe/world/shr-core/tmp-glibc/work/armv5te-oe-linux-gnueabi/libimobiledevice/1.1.4-r0/libimobiledevice-1.1.4/src/afc.c:258: error: undefined reference to 'debug_buffer' | collect2: error: ld returned 1 exit status | make[2]: *** [libimobiledevice.la] Error 1 | make[2]: Leaving directory `/home/jenkins/oe/world/shr-core/tmp-glibc/work/armv5te-oe-linux-gnueabi/libimobiledevice/1.1.4-r0/build/src' | make[1]: *** [all-recursive] Error 1 | make[1]: Leaving directory `/home/jenkins/oe/world/shr-core/tmp-glibc/work/armv5te-oe-linux-gnueabi/libimobiledevice/1.1.4-r0/build' | make: *** [all] Error 2
Quoted 1 line
otherwise I'll blacklist it again in few days (it was reported in couple world builds already).
Yes, I can take a look this weekend. Thanks for the heads up.