From owner-freebsd-questions Wed Jun 19 17:21:07 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id RAA04536 for questions-outgoing; Wed, 19 Jun 1996 17:21:07 -0700 (PDT) Received: from jraynard.demon.co.uk (jraynard.demon.co.uk [158.152.42.77]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id RAA04451 for ; Wed, 19 Jun 1996 17:19:43 -0700 (PDT) Received: (from fqueries@localhost) by jraynard.demon.co.uk (8.7.5/8.6.12) id NAA20774; Wed, 19 Jun 1996 13:20:09 GMT Date: Wed, 19 Jun 1996 13:20:09 GMT Message-Id: <199606191320.NAA20774@jraynard.demon.co.uk> From: James Raynard To: hasegawa@rdpc1.ahs.kitasato-u.ac.jp CC: questions@freebsd.org, hasegawa@rdpc1.ahs.kitasato-u.ac.jp In-reply-to: <31C7E127.41C67EA6@rdpc1.ahs.kitasato-u.ac.jp> (message from Tomoyuki Hasegawa on Wed, 19 Jun 1996 11:14:47 +0000) Subject: Re: [Q]cap60 compile error Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > I can not compile cap60 > "make install" output the following error message. > I have read in FAQs that cap60 was running on FreeBSD. I'm not familiar with that program (it doesn't seem to be in the ports collection), but here's my thoughts on your make output:- > mkdir /usr/local/cap /usr/local/cap > mkdir: /usr/local/cap: File exists > mkdir: /usr/local/cap: File exists > *** Error code 1 (ignored) This looks harmless - it's just making sure the install directory exists. > cp atis /usr/local/cap > (cd samples; make install) > "makefile", line 97: Need an operator > Fatal errors encountered -- cannot continue > *** Error code 1 (ignored) This often happens with Makefiles designed to be used with GNU make - FreeBSD uses BSD make, which is slightly different. (You can install GNU make as 'gmake' from the ports or packages distributions). However, you mention you're using 2.0.5. If I remember rightly, the make in 2.0.5 was much stricter than in 2.0 and gave this error if the action line in a Makefile didn't start with a tab character. eg foobar.o: foobar.c foobar.h $(CC) -c -I$(INCLUDE) foobar.c ^ | \----------- tab character here - no problem foobar.o: foobar.c foobar.h $(CC) -c -I$(INCLUDE) foobar.c ^ | \----------- 8 space characters here - error! This is actually more correct, but there are so many broken Makefiles in the world that it had to be changed back in 2.1.0. If this is the problem, it can be fixed with a text editor - or by upgrading! 8-) > (cd contrib; make install) > strip cvt2apple cvt2cap lwrename printqueue snitch aufsmkusr aufsmkkey > cp cvt2apple cvt2cap /usr/local/cap > cp lwrename printqueue snitch aufsmkusr aufsmkkey /usr/local/cap > (cd applications; make install) > (cd lwsrv; make install) > cc -DBYTESWAPPED -DPHASE2 -O -c lwsrvconfig.c > lwsrvconfig.c: In function `strdup': > lwsrvconfig.c:675: argument `str' doesn't match prototype > /usr/include/string.h:85: prototype declaration > *** Error code 1 This looks like the program is trying to provide its own version of strdup() for systems that don't have one and it's using a char * instead of a const char * for the argument. This can be fixed by something like before:- char *strdup(char *str) { after:- char *strdup(const char *str) { You may then see warnings like "assignment to pointer discards const", but these can be ignored. Alternatively, there may be a make option (called something like HAVE_STRDUP, perhaps) you can define to tell it that you have strdup() so it doesn't need to supply its own. BTW, if you find you have to make changes to a program to get it to work on FreeBSD, it's always a good idea to keep a record of them, so you can ask the author to incorporate the changes into the next version of the program. And they come in useful if you want to submit your work as a FreeBSD port 8-) -- James Raynard, Edinburgh, Scotland james@jraynard.demon.co.uk