Subject: Re: clisp build fail.
To: None <tech-pkg@pkgsrc.org, pts@bom.gov.au>
From: Gilles Dauphin <Gilles.Dauphin@enst.fr>
List: tech-pkg
Date: 06/20/2006 11:03:10
> From: "Paul (NCC/CS)" <pts@bom.gov.au>
> 
> Hi,
> 
> can anyone help me with this please?
> 
> builddir="`pwd`"; cd avcall && make && make check && make install-lib 
libdir="$b
> uilddir" includedir="$builddir"
> ./minitests > minitests.out
> LC_ALL=C uniq -u < minitests.out > minitests.output.sparc--netbsdelf
> test '!' -s minitests.output.sparc--netbsdelf
> *** Error code 1
> 
> I can't get clisp to build.
> 
> thanks,
> Paul.

I had problem whith readline and 64bit ABI (float part , libffi)
Here is the (crazy) patch I apply to Solaris10 amd64.
-------------------------------------------------------
--- Makefile.orig       Tue Apr 11 17:01:19 2006
+++ Makefile    Tue May  2 17:23:38 2006
@@ -15,7 +15,9 @@
 
 PKG_INSTALLATION_TYPES= overwrite pkgviews
 
+TOOLS_PLATFORM.test=   /bin/test
 .include "../../mk/bsd.prefs.mk"
+TOOLS_PLATFORM.test=   /bin/test
 
 .if ${MACHINE_ARCH:Malpha} || ${MACHINE_ARCH:Mamd64} || ${MACHINE_ARCH:Mx86_64}
 MODULES+=              --disable-mmap
@@ -22,17 +24,58 @@
 .endif
 
 USE_PKGLOCALEDIR=      YES
+USE_GNU_READLINE=      no
+
+.if ${OPSYS} != "SunOS"
 BUILD_DIRS=            src
 CONFIGURE_DIRS=                . modules/i18n modules/syscalls modules/pcre 
modules/rawsock \
                        modules/readline modules/regexp modules/wildcard 
modules/zlib
-CONFIGURE_ENV+=                CC=${CC:Q} CFLAGS=${CFLAGS:M*:Q} 
CPPFLAGS=${CPPFLAGS:M*:Q}
-GNU_CONFIGURE=         YES
-UNLIMIT_RESOURCES=     stacksize
-USE_LIBTOOL=           YES
-USE_GNU_READLINE=      YES
 MODULES+=              --with-module=pcre --with-module=rawsock
 MODULES+=              --with-module=wildcard --with-module=zlib
+MODULES+=              --with-dynamic-ffi --fsstnd=netbsd
+MAKEMAKE_PARAM=                --with-dynamic-ffi --fsstnd=netbsd 
--with-readline --with-gettext
 CONFIGURE_ARGS+=       ${MODULES}
+USE_LIBTOOL=           YES
+USE_GNU_READLINE=      YES
+.else
+# on Solaris 9/10 sparc/amd 32/64 , I try and found this only way GD 28Apr2006
+CONFIGURE_DIRS=                . 
+CONFIGURE_ARGS+=       --ignore-absence-of-libsigsegv
+CONFIGURE_ARGS+=       --without-dynamic-ffi --disable-mmap 
--without-libintl-prefix --without-libreadline-prefix
+MAKEMAKE_PARAM=                --without-dynamic-ffi --disable-mmap 
--with-libintl-prefix=/usr/lib --without-librea
dline-prefix
+CONFIGURE_ARGS+=       with-pkgsrc
+BUILD_DIRS=            with-pkgsrc
+CONFIGURE_ENV+=                
ac_cv_env_host_alias_value=${MACHINE_GNU_PLATFORM}
+CONFIGURE_ENV+=                host_alias=${MACHINE_GNU_PLATFORM}
+MAKE_ENV+=             host_alias=${MACHINE_GNU_PLATFORM}
+CONFIGURE_ENV+=                CPP=${CPP}
+MAKE_ENV+=             CPP=${CPP}
+TOOLS_PLATFORM.test=   /bin/test
+
+
+wrapper: patch
+       ${_PKG_SILENT}${_PKG_DEBUG}${TOUCH} ${TOUCH_FLAGS} ${_WRAPPER_COOKIE}
+
+##########
+# ./configure --ignore-absence-of-libsigsegv --without-dynamic-ffi 
--disable-mmap manuel-with-pkgsrc-param --prefix
=/usr/pkg --host=x86_64-sun-solaris2 --with-libintl-prefix=/usr/lib 
--without-libreadline-prefix
+# 1049  cd manuel-with-pkgsrc-param
+# 1050  ./makemake  --disable-mmap --prefix=/usr/pkg 
--with-libintl-prefix=/usr/lib --without-libreadline-prefix --
srcdir=../src   > Makefile
+# 1051    make config.lisp
+# 1052     make
+# 1053  env |grep host
+# 1054  h
+#[root@u2 1055] env|grep host
+#ac_cv_env_host_alias_value=x86_64-sun-solaris2
+#DISPLAY=localhost:14.0
+#host_alias=x86_64-sun-solaris2
+#[root@u2 1056] 
+########
+.endif
+
+CONFIGURE_ENV+=                CC=${CC:Q} CFLAGS=${CFLAGS:M*:Q} 
CPPFLAGS=${CPPFLAGS:M*:Q}
+GNU_CONFIGURE=         yes
+UNLIMIT_RESOURCES=     stacksize
+
 TEST_TARGET=           check
 
 post-patch:
@@ -41,20 +84,29 @@
        ${CP} files/vacall-rs6000-netbsd.s ${WRKSRC}/ffcall/callback/vacall_r
 
 post-configure:
-       cd ${WRKSRC}/src && \
-       ./makemake --prefix=${PREFIX} --with-readline --with-gettext \
-               --with-dynamic-ffi --fsstnd=netbsd ${MODULES} >Makefile
+       host_alias=${MACHINE_GNU_PLATFORM} ;\
+       export host_alias ;\
+       cd ${WRKSRC}/${BUILD_DIRS} && \
+       ./makemake --prefix=${PREFIX} ${MAKEMAKE_PARAM} \
+               ${MODULES} >Makefile ;\
+       make config.lisp
 
+.if ${OPSYS} != "SunOS"
 pre-build:
        cd ${WRKSRC}/src/avcall && ${MAKE}
        cd ${WRKSRC}/src/callback && ${MAKE}
+.endif
 
+.if ${OPSYS} != "SunOS"
 .include "../../converters/libiconv/buildlink3.mk"
 .include "../../devel/gettext-lib/buildlink3.mk"
-.include "../../devel/libsigsegv/buildlink3.mk"
 .include "../../devel/readline/buildlink3.mk"
+.include "../../devel/libsigsegv/buildlink3.mk"
 .include "../../devel/pcre/buildlink3.mk"
 BUILDLINK_API_DEPENDS.zlib+=   zlib>=1.2
 .include "../../devel/zlib/buildlink3.mk"
+.endif
 
 .include "../../mk/bsd.pkg.mk"
+
+TOOLS_PLATFORM.test=   /bin/test
----------------------------------------------------