build problems

Samuel Tardieu <>
Wed Oct 20 11:27:07 CEST 1999


Here are the patches I use for my own compilation (I'm not the Debian
maintainer of Erlang). Patches called *.official.dpatch come from the
Erlang home page.

  Sam
-------------- next part --------------
#PATCHOPTIONS: -p1
--- erlang-47.4.1.orig/erts/system/emulator/runtime/bif.c	Tue Feb 23 10:28:55 1999
+++ erlang-47.4.1/erts/system/emulator/runtime/bif.c	Fri May 21 12:22:24 1999
@@ -55,7 +55,9 @@
 #include "dist.h"
 #include "erl_version.h"
 
-#if defined(sparc)
+/* this is buggy -- this test should be for SunOS, not for Sparc
+ * I've done this hack for now, below are more */
+#if defined(sparc) && ! defined(linux)
 #include <sys/ioccom.h>
 #define PERFMON_SETPCR			_IOW('P', 1, unsigned long long)
 #define PERFMON_GETPCR			_IOR('P', 2, unsigned long long)
@@ -3940,7 +3942,7 @@
 	    return 0;
 	return attributes_for_module(BIF_P, tp[0], tp[1]);
 #endif
-#if defined(__GNUC__) && defined(sparc)
+#if defined(__GNUC__) && defined(sparc) && ! defined(linux)
     } else if (sel == am_ultrasparc_set_pcr) {
 	unsigned long long tmp;
 	int fd;
@@ -4115,7 +4117,7 @@
 	}
 	BIF_RET(res);
 #endif
-#if defined(__GNUC__) && defined(sparc)
+#if defined(__GNUC__) && defined(sparc) && ! defined(linux)
     } else if (BIF_ARG_1 == am_ultrasparc_read_tick1) {
 	register unsigned high asm("%l0");
 	register unsigned low asm("%l1");

-------------- next part --------------
#PATCHOPTIONS: -p0
--- lib/gs/c_src/lib/tcl7.6/generic/tclPosixStr.c.orig	Tue Sep 28 15:45:49 1999
+++ lib/gs/c_src/lib/tcl7.6/generic/tclPosixStr.c	Tue Sep 28 15:46:37 1999
@@ -336,7 +336,7 @@
 #ifdef ENXIO
 	case ENXIO: return "ENXIO";
 #endif
-#ifdef EOPNOTSUPP
+#if defined (EOPNOTSUPP) && (!defined (ENOTSUP) || (EOPNOTSUPP != ENOTSUP))
 	case EOPNOTSUPP: return "EOPNOTSUPP";
 #endif
 #ifdef EPERM
@@ -785,2 +785,2 @@
 #endif
-#ifdef EOPNOTSUPP
+#if defined (EOPNOTSUPP) && (!defined (ENOTSUP) || (EOPNOTSUPP != ENOTSUP))
-------------- next part --------------
#PATCHOPTIONS: -p1
--- erlang-47.4.1/erts/autoconf/configure.ORIG	Tue Feb 23 16:16:17 1999
+++ erlang-47.4.1/erts/autoconf/configure	Wed Sep  1 15:00:35 1999
@@ -1291,7 +1291,7 @@
 
 
 case $host in
-  *-*-solaris*|free_source)
+  *-*-solaris*|free_source|*-univel-*)
     if test -x /usr/ucb/install; then
       INSTALL="/usr/ucb/install -c"
     fi
-------------- next part --------------
#PATCHOPTIONS: -p1
--- erlang-47.4.1.orig/erts/autoconf/config.guess	Tue Feb 23 17:16:18 1999
+++ erlang-47.4.1/erts/autoconf/config.guess	Mon May 24 18:22:12 1999
@@ -347,6 +347,8 @@
 	  echo "${UNAME_MACHINE}-unknown-linux" ; exit 0
 	elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: m68klinux"; then
 	  echo "${UNAME_MACHINE}-unknown-linuxaout" ; exit 0
+        elif test "${UNAME_MACHINE}" = "ppc" ; then
+          echo "powerpc-unknown-linux"; exit 0
 	elif test "${UNAME_MACHINE}" = "alpha" ; then
 	  echo alpha-unknown-linux ; exit 0
 	else
-------------- next part --------------
#PATCHOPTIONS: -p1
--- erlang-47.4.1/erts/system/emulator/runtime/erl_posix_str.c.ORIG	Tue Feb 23 16:28:59 1999
+++ erlang-47.4.1/erts/system/emulator/runtime/erl_posix_str.c	Thu May 27 16:22:14 1999
@@ -362,7 +362,7 @@
 #ifdef ENXIO
     case ENXIO: return "enxio";
 #endif
-#ifdef EOPNOTSUPP
+#if defined(EOPNOTSUPP) && (!defined(ENOTSUP) || (EOPNOTSUPP != ENOTSUP))
     case EOPNOTSUPP: return "eopnotsupp";
 #endif
 #ifdef EPERM


More information about the erlang-questions mailing list