*BSD News Article 20081


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!agate!spool.mu.edu!bloom-beacon.mit.edu!ai-lab!life.ai.mit.edu!mycroft
From: mycroft@trinity.gnu.ai.mit.edu (Charles Hannum)
Newsgroups: comp.os.386bsd.questions
Subject: Re: Emacs 19-19 for NetBSD-0.9: not executable format!
Date: 26 Aug 1993 20:53:32 GMT
Organization: MIT Artificial Intelligence Lab
Lines: 266
Message-ID: <MYCROFT.93Aug26165332@trinity.gnu.ai.mit.edu>
References: <CCD5At.LMJ@hermes.hrz.uni-bielefeld.de>
NNTP-Posting-Host: trinity.gnu.ai.mit.edu
In-reply-to: uphya001@odie.uni-bielefeld.de's message of Thu, 26 Aug 1993 11:01:39 GMT


[also mailed]

   We try to compile emacs 19-19 for NetBSD-0.9 with the following
   call of configure:

	   ./configure i386-386bsd --with-x11 --run-in-place

   Everything looks fine, until we try to start emacs which generates
   the following error message:

	   emacs can not execute binary file

   But temacs is running. Who can help?

The executable Emacs dumps is in the wrong format unless you
specifically add the `-Z' flag to the `ld' command in xmakefile.  I
have submitted patches to the Emacs maintainers to fix this and a few
other things, and to automatically detect that you are running NetBSD
in configure, but they have not been put in the distribution yet.

These patches are as of Emacs 19.17.  I've seen too many serious bug
reports for 19.19 to want to compile it myself.  B-)

-----8<-----snip-----8<-----snip-----8<-----snip-----8<-----snip-----8<-----
*** ./config.guess.~1~	Sun Jul 18 04:29:04 1993
--- ./config.guess	Wed Aug  4 07:46:54 1993
***************
*** 118,123 ****
--- 118,126 ----
      CRAY-2:UNICOS:*:*)
  	echo cray2-cray-unicos
          exit 0 ;;
+     i[34]86:NetBSD:*:*)
+ 	echo ${UNAME_MACHINE}-unknown-netbsd${UNAME_RELEASE}
+ 	exit 0 ;;
      i[34]86:Linux:*:*)
  	echo ${UNAME_MACHINE}-unknown-linux
  	exit 0 ;;
*** ./configure.in.~1~	Sun Jul 18 02:02:46 1993
--- ./configure.in	Wed Aug  4 07:47:22 1993
***************
*** 880,885 ****
--- 880,886 ----
        *-sco3.2v4* )		opsys=sco4 ;;
        *-bsd386* )		opsys=bsd386 ;;
        *-386bsd )	        opsys=386bsd ;;
+       *-netbsd* )	        opsys=netbsd ;;
        ## Otherwise, we'll fall through to the generic opsys code at the bottom.
      esac
    ;;
***************
*** 1000,1006 ****
  
  ### If the user hasn't specified where we should find X, try
  ### letting autoconf figure that out.
! if [ "0${x_includes}" == 0 ] && [ "0${x_libraries}" == 0 ]; then
    ]
      AC_FIND_X
    [
--- 1001,1007 ----
  
  ### If the user hasn't specified where we should find X, try
  ### letting autoconf figure that out.
! if [ "0${x_includes}" = 0 ] && [ "0${x_libraries}" = 0 ]; then
    ]
      AC_FIND_X
    [
***************
*** 1145,1152 ****
  CFLAGS="$CFLAGS_save"
  LIBS="$LIBS_save"
  
! case "${window_system}:${LIBS}" in
!   x11:*-lXbsd* )
      if [ -d /usr/X386/include ]; then
        HAVE_XFREE386=yes
        if [ "${C_SWITCH_X_SITE}" = "" ]; then
--- 1146,1153 ----
  CFLAGS="$CFLAGS_save"
  LIBS="$LIBS_save"
  
! case "${window_system}:${LIBS}:${opsys}" in
!   x11:*-lXbsd*:* | x11:*:386bsd | x11:*:netbsd* )
      if [ -d /usr/X386/include ]; then
        HAVE_XFREE386=yes
        if [ "${C_SWITCH_X_SITE}" = "" ]; then
*** ./config.sub.~1~	Sun Jul 18 04:29:03 1993
--- ./config.sub	Sat Jul 31 14:05:50 1993
***************
*** 515,521 ****
  	      | -amigados* | -msdos* | -newsos* | -unicos* | -aos* \
  	      | -nindy* | -vxworks* | -ebmon* | -hms* | -mvs* | -clix* \
  	      | -riscos* | -linux* | -uniplus* | -iris* | -rtu* | -xenix* \
! 	      | -386bsd*)
  		;;
  	-sunos5*)
  		os=`echo $os | sed -e 's|sunos5|solaris2|'`
--- 515,521 ----
  	      | -amigados* | -msdos* | -newsos* | -unicos* | -aos* \
  	      | -nindy* | -vxworks* | -ebmon* | -hms* | -mvs* | -clix* \
  	      | -riscos* | -linux* | -uniplus* | -iris* | -rtu* | -xenix* \
! 	      | -386bsd* | -netbsd*)
  		;;
  	-sunos5*)
  		os=`echo $os | sed -e 's|sunos5|solaris2|'`
*** ./configure.~1~	Sat Jul 31 13:25:30 1993
--- ./configure	Wed Aug  4 07:47:49 1993
***************
*** 872,877 ****
--- 872,878 ----
        *-sco3.2v4* )		opsys=sco4 ;;
        *-bsd386* )		opsys=bsd386 ;;
        *-386bsd )	        opsys=386bsd ;;
+       *-netbsd* )	        opsys=netbsd ;;
        ## Otherwise, we'll fall through to the generic opsys code at the bottom.
      esac
    ;;
***************
*** 1721,1727 ****
  
  ### If the user hasn't specified where we should find X, try
  ### letting autoconf figure that out.
! if [ "0${x_includes}" == 0 ] && [ "0${x_libraries}" == 0 ]; then
    
      # If we find X, set shell vars x_includes and x_libraries to the paths.
  echo checking for X include and library files with xmkmf
--- 1722,1728 ----
  
  ### If the user hasn't specified where we should find X, try
  ### letting autoconf figure that out.
! if [ "0${x_includes}" = 0 ] && [ "0${x_libraries}" = 0 ]; then
    
      # If we find X, set shell vars x_includes and x_libraries to the paths.
  echo checking for X include and library files with xmkmf
***************
*** 1941,1948 ****
  CFLAGS="$CFLAGS_save"
  LIBS="$LIBS_save"
  
! case "${window_system}:${LIBS}" in
!   x11:*-lXbsd* )
      if [ -d /usr/X386/include ]; then
        HAVE_XFREE386=yes
        if [ "${C_SWITCH_X_SITE}" = "" ]; then
--- 1942,1949 ----
  CFLAGS="$CFLAGS_save"
  LIBS="$LIBS_save"
  
! case "${window_system}:${LIBS}:${opsys}" in
!   x11:*-lXbsd*:* | x11:*:386bsd | x11:*:netbsd*)
      if [ -d /usr/X386/include ]; then
        HAVE_XFREE386=yes
        if [ "${C_SWITCH_X_SITE}" = "" ]; then
*** ./src/ymakefile.~1~	Sun Jul 18 02:08:49 1993
--- ./src/ymakefile	Sat Jul 31 13:49:27 1993
***************
*** 483,489 ****
     Note that SunOS needs -lm to come before -lc; otherwise, you get
     duplicated symbols.  */
  LIBES = $(LIBX) LIBS_SYSTEM LIBS_MACHINE LIBS_TERMCAP \
!    LIBS_DEBUG $(GNULIB_VAR) LIB_MATH LIB_STANDARD
  
  /* Enable recompilation of certain other files depending on system type.  */
  
--- 483,489 ----
     Note that SunOS needs -lm to come before -lc; otherwise, you get
     duplicated symbols.  */
  LIBES = $(LIBX) LIBS_SYSTEM LIBS_MACHINE LIBS_TERMCAP \
!    LIBS_DEBUG $(GNULIB_VAR) LIB_MATH LIB_STANDARD $(GNULIB_VAR)
  
  /* Enable recompilation of certain other files depending on system type.  */
  
*** ./src/s/netbsd.h.~1~	Sat Jul 31 14:04:08 1993
--- ./src/s/netbsd.h	Wed Aug  4 11:56:58 1993
***************
*** 0 ****
--- 1,30 ----
+ /* s/ file for netbsd system.  */
+ 
+ /* Get most of the stuff from bsd4.3 */
+ #include "bsd4-3.h"
+ 
+ #undef SYSTEM_TYPE
+ #define SYSTEM_TYPE "netbsd"
+ 
+ #undef KERNEL_FILE
+ #define KERNEL_FILE "/netbsd"
+ 
+ #undef LDAV_SYMBOL
+ #define LDAV_SYMBOL "_averunnable"
+ 
+ #define SIGNALS_VIA_CHARACTERS
+ 
+ #define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base)
+ 
+ #define A_TEXT_OFFSET(x) (sizeof (struct exec))
+ #define A_TEXT_SEEK(hdr) (N_TXTOFF(hdr) + A_TEXT_OFFSET(hdr))
+ 
+ #define HAVE_SETSID
+ 
+ #define LIBS_DEBUG
+ #define LIBS_SYSTEM -lutil
+ 
+ #define HAVE_GETLOADAVG
+ 
+ /* For mem-limits.h.  */
+ #define BSD4_2
*** ./lisp/paths.el.~1~	Sat May 29 12:05:37 1993
--- ./lisp/paths.el	Wed Aug  4 11:26:16 1993
***************
*** 100,109 ****
  Will use `gnus-startup-file'-SERVER instead if exists.")
  
  (defconst rmail-spool-directory
!   (if (memq system-type '(dgux-unix hpux usg-unix-v unisoft-unix rtu
! 			  irix silicon-graphics-unix))
!       "/usr/mail/"
!     "/usr/spool/mail/")
    "Name of directory used by system mailer for delivering new mail.
  Its name should end with a slash.")
  
--- 100,113 ----
  Will use `gnus-startup-file'-SERVER instead if exists.")
  
  (defconst rmail-spool-directory
!   (case
!     ((memq system-type '(dgux-unix hpux usg-unix-v unisoft-unix rtu
! 			 irix silicon-graphics-unix))
!      "/usr/mail/")
!     ((memq system-type '(netbsd))
!      "/var/mail/")
!     (t
!      "/usr/spool/mail/"))
    "Name of directory used by system mailer for delivering new mail.
  Its name should end with a slash.")
  
*** lisp/paths.el.~1~	Sat May 29 12:05:37 1993
--- lisp/paths.el	Wed Aug  4 15:16:31 1993
***************
*** 108,118 ****
  Its name should end with a slash.")
  
  (defconst sendmail-program
!   (if (file-exists-p "/usr/lib/sendmail")
!       "/usr/lib/sendmail"
!     (if (file-exists-p "/usr/ucblib/sendmail")
! 	"/usr/ucblib/sendmail"
!       "fakemail"))			;In ../etc, to interface to /bin/mail.
    "Program used to send messages.")
  
  (defconst term-file-prefix (if (eq system-type 'vax-vms) "[.term]" "term/")
--- 112,122 ----
  Its name should end with a slash.")
  
  (defconst sendmail-program
!   (cond
!     ((file-exists-p "/usr/lib/sendmail") "/usr/lib/sendmail")
!     ((file-exists-p "/usr/sbin/sendmail") "/usr/sbin/sendmail")
!     ((file-exists-p "/usr/ucblib/sendmail") "/usr/ucblib/sendmail")
!     (t "fakemail"))			;In ../etc, to interface to /bin/mail.
    "Program used to send messages.")
  
  (defconst term-file-prefix (if (eq system-type 'vax-vms) "[.term]" "term/")
-----8<-----snip-----8<-----snip-----8<-----snip-----8<-----snip-----8<-----