Home > dmalloc configure > dmalloc configure error cannot run test program while cross compiling

Dmalloc Configure Error Cannot Run Test Program While Cross Compiling

here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Unix & Linux Questions Tags Users Badges Unanswered Ask Question _ Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top Cannot run test program while cross compiling - cross compiling Firebird up vote 0 down vote favorite I've tried to compile firebird server for arm linux, with cross-compiler (it's choosen - it's working properly). When using: ./autogen.sh --host=arm-linux-gnu I get this error: checking for working sem_init()... configure: error: in `/compile/code/firebird/trunk': configure: error: cannot run test program while cross compiling I know I'm cross-compiling, but maybe Firebird developers dissalow this (but i've read Firebird is ready to compilation for another architectures). linux arm cross-compilation sql sqlserver share|improve this question asked Dec 8 '15 at 11:49 Sławomir Kozok 12 add a comment| 1 Answer 1 active oldest votes up vote 0 down vote Configure determines the answer to certain questions by compiling and running programs on the fly ... which it can (usually) do when the build host is the same as the target host. When you are cross-compiling, (usually) your build machine can't run the binaries produced by the cross-compiler. To overcome this, locate where the test is in the configure script and if you are lucky, the configure script will allow for the caching of the result of the test ... you can use this to fool the configure script into thinking that it already knows the answer to the question, and therefore it will not try to compile and run the binary. For example, if you were trying to cross-compile openldap 2.3.11 (an old version, I know), you may need to pass in the environment the variable ac_cv_func_memcmp_working=yes (or I think you can call configure with this setting on the command line e.g. ./configure ac_cv

Jun 25 23:33:01 2014 +0200 (2014-06-25) changeset 3325 069f43a215cc permissions -rw-r--r-- all: fix wildcard to work with make-4.x In make-3.8x, the $(wildacrd) function would sort the entries, while in make-4.x, it would just return the entries in any unpredictable order [*] Use the $(sort) function to get reproducible behaviour. [*] Well, most probably the roder the entries appear when read from readdir() Reported-by: Andrew Ruder Signed-off-by: http://unix.stackexchange.com/questions/248088/cannot-run-test-program-while-cross-compiling-cross-compiling-firebird "Yann E. MORIN" Tested-by: Andrew Ruder 1 This patch sets the page size to a default 12, that is a 4KiB block size. 2 Testing for the correct block-size is impossible when cross-compiling. 3 4 It was build up by Yann E. MORIN from some 5 bits gathered from http://crosstool-ng.org/hg/crosstool-ng/file/tip/patches/dmalloc/5.5.2/110-block_size.patch buildroot, which is LGPL v2.1 6 License for dmalloc is: 7 * Permission to use, copy, modify, and distribute this software for 8 * any purpose and without fee is hereby granted, provided that the 9 * above copyright notice and this permission notice appear in all 10 * copies, and that the name of Gray Watson not be used in advertising 11 * or publicity pertaining to distribution of the document or software 12 * without specific, written prior permission. 13 * 14 * Gray Watson makes no representations about the suitability of the 15 * software described herein for any purpose. It is provided "as is" 16 * without express or implied warranty. 17 18 I personnaly believe that the resulting code should therefore be 19 LGPL v2.1, but don't believe me, ask your lawyers! 20 21 diff -dur dmalloc-5.5.2.orig/configure dmalloc-5.5.2/configure 22 --- dmalloc-5.5.2.orig/configure 2007-05-14 19:26:14.000000000 +0200 23 +++ dmalloc-5.5.2/configure 2007-05-1

revision: Visit: trunkbranches/8.09branches/attitude_adjustmentbranches/backfirebranches/barrier_breakerbranches/chaos_calmerbranches/kamikaze-before-brngbranches/packages_8.09branches/packages_10.03.1branches/packages_10.03.2branches/packages_12.09branches/packages_14.07branches/whiterussian tags/8.09tags/8.09.1tags/8.09.2tags/8.09_rc1tags/8.09_rc2tags/attitude_adjustment_12.09tags/backfire_10.03tags/backfire_10.03.1tags/kamikaze_7.06tags/kamikaze_7.07tags/kamikaze_7.09tags/whiterussian_0.9tags/whiterussian_rc1tags/whiterussian_rc2tags/whiterussian_rc3tags/whiterussian_rc4tags/whiterussian_rc5tags/whiterussian_rc6 Last change on this file was 20300, checked in by florian, 7 years ago [package] add dmalloc, patch from Raphael Huck File size: 1.6 https://dev.openwrt.org/browser/packages/devel/dmalloc/patches/100-configure_pagesize.patch KB configure a b Optional Features:  857857 --enable-threads build in thread support (disabled by default)  858858 --enable-shlib https://www.mail-archive.com/openwrt-devel@lists.openwrt.org/msg05151.html build shared libraries (disabled by default)  859859   860Optional Packages:   861 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]   862 --without-PACKAGE dmalloc configure do not use PACKAGE (same as --with-PACKAGE=no)   863 --with-pagesize=nbits log base 2 of machine page size   864  860865Some influential environment variables:  861866 CC C compiler command  862867 CFLAGS C compiler flags  … … done  53075312echo "$as_me:$LINENO: checking basic-block dmalloc configure error size" >&5  53085313echo $ECHO_N "checking basic-block size... $ECHO_C" >&6  53095314ac_cv_page_size=0   5315   5316# Check whether --with-pagesize or --without-pagesize was given.   5317if test "${with_pagesize+set}" = set; then   5318 withval="$with_pagesize"   5319 case "$withval" in ?|1?) ac_cv_page_size=$withval; esac   5320else   5321 : # default to probing, set above   5322fi;  53105323if test $ac_cv_page_size = 0; then  53115324 if test "$cross_compiling" = yes; then  53125325 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling  configure.ac a b AC_MSG_RESULT([$ac_cv_use_mmap])  349349AC_CHECK_FUNCS(getpagesize)  350350AC_MSG_CHECKING([basic-block size])  351351ac_cv_page_size=0   352AC_ARG_WITH(pagesize,   353 [ AC_HELP_STRING([--with-pagesize=nbits],   354 [log base 2 of machine page size] ) ],   355 [ case "$withval" in ?|1?) ac_cv_page_size=$withval; esac ],   356 [ : # default to probing, set above ],   357)  352358if test $ac_cv_page_size = 0; then  353359 AC_RU

detection, file/line number reporting, and general logging of statistics. -Raphaël diff -pruN devel.orig/dmalloc/Makefile devel/dmalloc/Makefile --- devel.orig/dmalloc/Makefile 1970-01-01 01:00:00.000000000 +0100 +++ devel/dmalloc/Makefile 2010-03-19 16:43:52.000000000 +0100 @@ -0,0 +1,77 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=dmalloc +PKG_VERSION:=5.5.2 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz +PKG_SOURCE_URL:=http://dmalloc.com/releases/ +PKG_MD5SUM:=f92e5606c23a8092f3d5694e8d1c932e + +PKG_FIXUP:=libtool +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/dmalloc/Default + SECTION:=devel + CATEGORY:=Development + TITLE:=Dmalloc + URL:=http://www.dmalloc.com/ +endef + +define Package/libdmalloc + $(call Package/dmalloc/Default) + TITLE+= (library) +endef + +define Package/dmalloc-utils + $(call Package/dmalloc/Default) + DEPENDS:=+libdmalloc + TITLE+= (utilities) +endef + +define Package/dmalloc/description +The debug memory allocation or dmalloc library has been designed as a drop in +replacement for the system's malloc, realloc, calloc, free and other memory +management routines while providing powerful debugging facilities configurable +at runtime. These facilities include such things as memory-leak tracking, +fence-post write detection, file/line number reporting, and general logging of +statistics. +endef + +CONFIGURE_ARGS += \ + --disable-cxx \ + --with-pagesize=12 + +TARGET_CFLAGS += $(FPIC) + +MAKE_INSTALL_FLAGS += installsl + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include/ + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/dmalloc.h $(1)/usr/include/ + + $(INSTALL_DIR) $(1)/usr/lib + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libdmalloc.{a,so*} $(1)/usr/lib/ +endef + +define Package/libdmalloc/install + $(INSTALL_DIR) $(1)/usr/lib + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libdmalloc.so* $(1)/usr/lib/ +endef + +define Package/dmalloc-utils/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dmalloc $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,libdmalloc)) +$(eval $(call BuildPackage,dmalloc-utils)) diff -pruN devel.orig/dmalloc/patches/100-configure_pagesize.patch devel/dmalloc/patches/100-configure_pagesize.patch --- devel.orig/dmalloc/patches/100-configure_pagesize.patch 1970-01-01 01:00:00.000000000 +0100 +++ devel/dmalloc/patches/100-configure_pagesize.patch 2010-03-19 16:43:51.000000000 +0100 @@ -0,0 +1,44 @@ +--- a/configur

 

Related content

No related pages.