Source: rlwrap Version: 0.42-3 Severity: normal Tags: patch upstream User: helm...@debian.org Usertags: rebootstrap
rlwrap fails to cross build from source, because it uses an uncacheable AC_CHECK_FILES where the cache variable contains the process id of ./configure. After thinking about it, I figured that replacing "/proc/$$" with "/proc/self" would be a reasonable compromise making the cache variable predictable. Thus it can be provided with a cross build. When using the attached patch and providing ac_cv_file__proc_self_cwd_cwdcheck (yes for linux-any and kfreebsd-any, no for hurd-any), rlwrap cross build successfully. Please consider applying the patch. Helmut
From: Helmut Grohne <hel...@subdivi.de> Subject: make cross building feasible The file chosen has two problems: * $$ varies across builds, so the variable essentially is not cacheable, but AC_CHECK_FILES must be cacheable for cross compilation. * configure.ac may not be present for out-of-tree builds. Create a file to be sure it actually exists. Index: rlwrap-0.42/configure.ac =================================================================== --- rlwrap-0.42.orig/configure.ac +++ rlwrap-0.42/configure.ac @@ -349,10 +349,12 @@ # but they wil fail unless /no is a procfs mountpoint ;-) echo "Will rlwrap find command's working directory under ${opt_proc_mountpoint}/<commands pid>/cwd? let's see..." -AC_CHECK_FILES($opt_proc_mountpoint/$$/cwd/configure.ac,[ +touch cwdcheck +AC_CHECK_FILES($opt_proc_mountpoint/self/cwd/cwdcheck,[ AC_DEFINE(HAVE_PROC_PID_CWD, 1 ,[Define to 1 if <opt_proc_mountpoint>/<pid>/cwd is a link to working directory of process <pid>]) AC_SUBST(HAVE_PROC_PID_CWD,[yes]) ],[AC_SUBST(HAVE_PROC_PID_CWD,[no])]) +rm -f $cwdcheck AC_DEFINE_UNQUOTED(PROC_MOUNTPOINT, "[$opt_proc_mountpoint]", [Define to location of Linux-style procfs mountpoint if provided and valid])