Subject: Anyone get pkgsrc/editors/emacs to build on recent (3.x) NetBSD?
To: Port-Cobalt <port-cobalt@netbsd.org>
From: Robert Thille <list-netbsd-port-cobalt@rangat.org>
List: port-cobalt
Date: 07/28/2006 13:27:00
I'm trying to get editors/emacs or editors/emacs-nox11 to build on my
Raq2+, and it initially failed, with no rule to make target
'/lib/crt0.o'  (or something like that, that's from memory).  I
figured out a patch which has emacs building, but it fails when it
tries to run temacs to dump itself (as I understand it, it's a speed optimization):

LC_ALL=C ./temacs -batch -l loadup dump
[1]   Segmentation fault (core dumped) LC_ALL=C ./temac...
gmake[1]: *** [emacs] Error 139
gmake[1]: Leaving directory `/usr/tmp/pkgsrc/editors/emacs-nox11/work/emacs-21.4/src'


Here's my patch:
#----------------------------------------------------------------
# Robert Thille
# patch-xx sets START_FILES and LIB_STANDARD via netbsd.h,
# don't let pmax.h undef it

--- src/m/pmax.h.orig   Fri Jan  7 22:02:46 2005
+++ src/m/pmax.h        Fri Jan  7 22:04:12 2005
@@ -12,7 +12,9 @@

 #undef WORDS_BIG_ENDIAN
+#if !defined (__NetBSD__)
 #undef LIB_STANDARD
 #undef START_FILES
+#endif
 #undef COFF
 #undef TERMINFO
 #define MAIL_USE_FLOCK
@@ -24,11 +26,12 @@
 #else
 /* This line starts being needed with ultrix 4.0.  */
 /* You must delete it for version 3.1.  */
+#if !defined (__NetBSD__)
 #define START_FILES pre-crt0.o /usr/lib/cmplrs/cc/crt0.o
 #endif
+#endif

 #if defined (__NetBSD__) || defined (__OpenBSD__)
-#undef START_FILES
 #undef RUN_TIME_REMAP
 #undef UNEXEC
 #define UNEXEC unexelf.o

#-------------------------------------------------------------

I've been trying to figure out what's going on with GDB, but I'm not
getting much of anywhere :-(

Thanks,

Robert

--
Robert Thille                7575 Meadowlark Dr.; Sebastopol, CA 95472
Home: 707.824.9753    Office/VOIP: 707.780.1560     Cell: 707.217.7544
Robert.Thille@rangat.org   YIM:rthille   http://www.rangat.org/rthille
Cyclist, Mountain Biker, Freediver, Kayaker, Rock Climber, Hiker, Geek
May your spirit dive deep the blue, where the fish are many and large!