This is the mail archive of the
libffi-discuss@sourceware.org
mailing list for the libffi project.
Re: libffi 3.0.9 rc4
On 12/24/2009 11:44 AM, Samuli Suominen wrote:
> On 12/24/2009 07:07 AM, Anthony Green wrote:
>> Greetings...
>>
>> Unless there's anything terribly wrong with the following...
>
> This change between rc3 and rc4 broke the include installation target,
>
> --- libffi-3.0.9rc3/include/Makefile.am
> +++ libffi-3.0.9rc4/include/Makefile.am
> @@ -5,5 +5,8 @@
> DISTCLEANFILES=ffitarget.h
> EXTRA_DIST=ffi.h.in ffi_common.h
>
> -includesdir = $(libdir)/@PACKAGE_NAME@-@PACKAGE_VERSION@/include
> -nodist_includes_HEADERS = ffi.h ffitarget.h
> +# Where generated headers like ffitarget.h get installed.
> +gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
> +toollibffidir := $(libdir)/gcc/$(target_alias)/$(gcc_version)/include
> +
> +toollibffi_HEADERS = ffi.h ffitarget.h
>
> As shown here:
>
> unique libffi-3.0.9rc4 # ls -l /usr/lib64/gcc/x86_64-pc-linux-gnu/include/
> total 16
> -rw-r--r-- 1 root root 10889 Dec 24 11:28 ffi.h
> -rw-r--r-- 1 root root 3496 Dec 24 11:28 ffitarget.h
> unique libffi-3.0.9rc4 # pkg-config --cflags libffi
> -I/usr/lib64/libffi-3.0.9rc4/include
> unique libffi-3.0.9rc4 # ls -l /usr/lib64/libffi-3.0.9rc4/include
> ls: cannot access /usr/lib64/libffi-3.0.9rc4/include: No such file or
> directory
> unique libffi-3.0.9rc4 #
This line that was added to rc4 in Makefile.am
ACLOCAL_AMFLAGS=$(ACLOCAL_AMFLAGS) -I m4
Is failing aclocal because there is no m4 directory in the tarball.
This removal of:
m4_undefine([_AC_ARG_VAR_PRECIOUS])
from configure.ac is causing it to fail with Autoconf 2.64 and 2.65 again,
configure.ac:23: error: m4_copy: won't overwrite defined macro:
_AC_ARG_VAR_PRECIOUS
configure.ac:23: the top level
autom4te-2.65: /usr/bin/m4 failed with exit status: 1
aclocal-1.10: autom4te failed with exit status: 1
Here's what I applied on rc4 so it'll work like rc3 used to:
For Autoconf 2.64 and 2.65:
--- configure.ac
+++ configure.ac
@@ -20,6 +20,7 @@
m4_rename([_AC_ARG_VAR_PRECIOUS],[real_PRECIOUS])
m4_define([_AC_ARG_VAR_PRECIOUS],[])
AC_PROG_CC
+m4_undefine([_AC_ARG_VAR_PRECIOUS])
m4_rename([real_PRECIOUS],[_AC_ARG_VAR_PRECIOUS])
AC_SUBST(CFLAGS)
For non-existing m4 directory:
--- Makefile.am
+++ Makefile.am
@@ -80,8 +80,6 @@
MAKEOVERRIDES=
-ACLOCAL_AMFLAGS=$(ACLOCAL_AMFLAGS) -I m4
-
lib_LTLIBRARIES = libffi.la
noinst_LTLIBRARIES = libffi_convenience.la
To restore includes back where they belong (re: pkg-config file) and
avoid messing around in gcc's own directory:
--- include/Makefile.am
+++ include/Makefile.am
@@ -5,8 +5,5 @@
DISTCLEANFILES=ffitarget.h
EXTRA_DIST=ffi.h.in ffi_common.h
-# Where generated headers like ffitarget.h get installed.
-gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
-toollibffidir := $(libdir)/gcc/$(target_alias)/$(gcc_version)/include
-
-toollibffi_HEADERS = ffi.h ffitarget.h
+includesdir = $(libdir)/@PACKAGE_NAME@-@PACKAGE_VERSION@/include
+nodist_includes_HEADERS = ffi.h ffitarget.h