Subject: Re: Problems building XEmacs 20.4 on Mac68k - Solved
To: #List NetBSD current users <current-users@NetBSD.ORG>
From: Paul Goyette <paul@whooppee.com>
List: current-users
Date: 06/15/1999 05:20:50
Well, I don't know why, but it seems that the configure script was
screwing up when checking for png.  In particular, it failed to
determine that lining with -lpng required -lz (or -lbz) in order to
get _crc32 defined!  funny thing is, the same original configure
script worked just fine on both the I386 and Alpha platforms.

I've managed to work around this by modifying the install script
slightly.  If someone can verify the this problem exists, you may
want to include this patch to the configure script:

*** /home/paul/configure	Tue Jun 15 05:17:44 1999
--- ./configure	Sun Jun 13 20:55:07 1999
***************
*** 6121,6127 ****
  fi
   }
    if test "$with_png" != "no"; then
!     for extra_libs in "" "-lz" "-lgz"; do
        
  xe_msg_checking="for png_read_image in -lpng"
  test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs"
--- 6121,6127 ----
  fi
   }
    if test "$with_png" != "no"; then
!     for extra_libs in "-lz" "-lgz"; do
        
  xe_msg_checking="for png_read_image in -lpng"
  test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs"


---------- Forwarded message ----------
Date: Tue, 1 Jun 1999 11:51:44 -0700 (PDT)
From: Paul Goyette <paul@pc1.whooppee.com>
Reply-To: paul@whooppee.com
To: #List NetBSD current users <current-users@NetBSD.ORG>
Cc: #List NetBSD Mac68k <port-mac68k@NetBSD.org>
Subject: Problems building XEmacs 20.4 on Mac68k

I'm trying to install XEmacs on my NetBSD/Mac68k system, and ran into a
couple problems.

First, for some reason, the configure process doesn't properly indicate
that getpgrp(2) takes no arguments.  It doesn't set GETPGRP_VOID in the
config.h file:

	cc -c -O2  -Demacs -I. -DHAVE_CONFIG_H -I/usr/pkg/include
	-I/usr/X11R6/include process.c
	process.c: In function `create_process':
	process.c:999: too many arguments to function `getpgrp'

I've managed to work around this by manually editting src/config.h ...

So, it gets past that point, and then I run into this error (manually
wrapped for readability):

	EMACSLOADPATH="/usr/src/pkgsrc/editors/xemacs20/work/xemacs-20.4/src/..\
	/lisp/prim" ./temacs -batch -l ../prim/update-elc.el
	/usr/libexec/ld.so: Undefined symbol "_crc32" in \
	temacs:/usr/pkg/lib/libpng.so.1.1

Now, I've gone and rebuilt libpng just to be certain, and I verified the
build of temacs, and everything looks good.

So, what have I done wrong?  I've installed the identical package on
both of my i386 NetBSD machines with no issues!


--------------------------------------------------------------------------
| Paul Goyette      | PGP DSS Key fingerprint:   | E-mail addresses:     |
| Network Engineer  |   BCD7 5301 9513 58A6 0DBC |  paul@whooppee.com    |
| and kernel hacker |   91EB ADB1 A280 3B79 9221 |  pgoyette@juniper.net |
--------------------------------------------------------------------------