NetBSD build failure

Machine-specific discussion
Unix, Linux, OS X, OS/2, Windows, ..?
Locked
ggeorgalis
Posts: 8
Joined: Tue Nov 16, 2010 7:08 am
Location: Mountain View, California

NetBSD build failure

Post by ggeorgalis »

Hi, I'm new to lisp here, hope this is the best forum. I get some errors when I build on NetBSD:

Code: Select all

                                                                                                                      
 geo@bonnie:/home/geo/tmp/newlisp-10.2.8 ./configure

removing old objects and setting correct permissions ...
chmod: *.lsp: No such file or directory
*** Error code 1discovering platform and default memory model ...

detected memory model ILP32
detected Operating System _BSD
creating makefile_build ...

to make for ILP32 on _BSD type:
    make
to make for any other system do:
    make -f makefile_xxx
where makefile_xxx is one of the preconfigured makefiles
Ignoring the error, I get the same failure with make and gmake.

Code: Select all

 geo@bonnie:/home/geo/tmp/newlisp-10.2.8 make        
make -f makefile_build
gcc -m32 -Wall -Wno-uninitialized -fno-strict-aliasing -O2 -c -g -DREADLINE -D_BSD -DSUPPORT_UTF8 newlisp.c
newlisp.c:855: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'PARAMS'
newlisp.c: In function 'getToken':
newlisp.c:3287: warning: array subscript has type 'char'
newlisp.c:3303: warning: array subscript has type 'char'
newlisp.c:3309: warning: array subscript has type 'char'
*** Error code 1

Stop.
make: stopped in /usr/home/geo/tmp/newlisp-10.2.8
*** Error code 1

Stop.
make: stopped in /usr/home/geo/tmp/newlisp-10.2.8
building and install with configure-alt works fine... (accept says to use make when I need gmake)

I don't really understand why there is an alt configure, but I am glad that it works! is there an issue system better for reporting things like this? I'm happy to run any diagnostic commands, but the error is over my head :-}

-George

cormullion
Posts: 2038
Joined: Tue Nov 29, 2005 8:28 pm
Location: latiitude 50N longitude 3W
Contact:

Re: NetBSD build failure

Post by cormullion »

Hi George! This is the best place for stuff like this.

Its all way over my head, tho, so I can't help. ;(

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Re: NetBSD build failure

Post by Lutz »

When using 'configure', the string returned by the UNIX 'uname' utility is searched for a known OS, then one of the 'makefile_xxxxxx' is copied to 'makefile_build' depending on the platform and memory model found.

'configure-alt' is a much more complex script, it creates a 'makefile_build' from scratch trying to detect capabilities beyond platform and memory model. It also allows to configure different install directories.

Note, that installs made by 'configure' and 'configure-alt' are not compatible. For details see the doc/INSTALL file.

The 'configure-alt' method is the more flexible, and the 'configure' method is the simpler one, easier to "hack". One of the numerous pre-configured makefiles can be modified without much UNIX shell scripting knowledge. If 'configure-alt' breaks, much shell scripting knowledge is required to fix or modify it.

I wonder what of the following methods works:

make clean
make -f makefile_bsd

or:

make clean
make -f makefile_netbsd

The 'makefile_netbsd' makes without the libreadline.

Perhaps you can post the two 'makefile_build' files generated by 'configure' and 'configure-alt' for further diagnostic?

And can you also do 'uname' and 'uname -a' , to see the strings returned?

ggeorgalis
Posts: 8
Joined: Tue Nov 16, 2010 7:08 am
Location: Mountain View, California

Re: NetBSD build failure

Post by ggeorgalis »

What do you mean the configure and configure-alt installs are not compatible? In what way are they incompatible?

Code: Select all

 geo@bonnie:/home/geo/tmp/newlisp-10.2.8 gmake -f makefile_bsd
gcc -m32 -Wall -Wno-uninitialized -fno-strict-aliasing -O2 -c -g -DREADLINE -D_BSD newlisp.c
newlisp.c:855: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'PARAMS'
newlisp.c: In function 'getToken':
newlisp.c:3287: warning: array subscript has type 'char'
newlisp.c:3303: warning: array subscript has type 'char'
newlisp.c:3309: warning: array subscript has type 'char'
gmake: *** [newlisp.o] Error 1
 geo@bonnie:/home/geo/tmp/newlisp-10.2.8 gmake clean           
rm -f *~ *.bak *.o *.obj *.map *.core core *.tgz guiserver/java/._* TEST newlisp-universal
rm -f guiserver/*.class doc/*~ util/*~ examples/*~ modules/*~
rm -f doc/*.bak util/*.bak examples/*.bak modules/*.bak
chmod 644 *.h *.c *.lsp Makefile makefile*
chmod: *.lsp: No such file or directory
gmake: [clean] Error 1 (ignored)
chmod 755 configure configure-alt examples/*
chmod 644 doc/* modules/*.lsp examples/*.lsp examples/*.html
chmod 644 guiserver/*
chmod 755 guiserver/images
chmod 644 guiserver/images/*
chmod 755 guiserver/java
chmod 644 guiserver/java/*
rm -f makefile_build makefile_install config.h test-*
 geo@bonnie:/home/geo/tmp/newlisp-10.2.8 gmake -f makefile_netbsd                                                                                                      
gcc -m32 -Wall -Wno-uninitialized -Wno-strict-aliasing -O2 -c -g -DREADLINE -D_BSD newlisp.c
newlisp.c:855: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'PARAMS'
newlisp.c: In function 'getToken':
newlisp.c:3287: warning: array subscript has type 'char'
newlisp.c:3303: warning: array subscript has type 'char'
newlisp.c:3309: warning: array subscript has type 'char'
gmake: *** [newlisp.o] Error 1
 geo@bonnie:/home/geo/tmp/newlisp-10.2.8 uname -a
NetBSD bonnie 5.0_STABLE NetBSD 5.0_STABLE (BONNIE) #0: Sat Feb 13 00:52:48 PST 2010  root@bonnie:/usr/obj/sys/arch/i386/compile/BONNIE i386
 geo@bonnie:/home/geo/tmp/newlisp-10.2.8 uname    
NetBSD
BTW I noticed this from my install log the other day...

Code: Select all

....
install -m 644 doc/newLISPdoc.html /usr/local/newlisp-10.2.8./share/doc/newlisp/newLISPdoc.html
install -m 644 doc/newLISP-10.2.6-Release.html /usr/local/newlisp-10.2.8./share/doc/newlisp/newLISP-10.2.6-Release.html
install: doc/newLISP-10.2.6-Release.html: stat: No such file or directory
*** Error code 1 (ignored)
install -m 644 doc/newlisp.1 /usr/local/newlisp-10.2.8./man/man1/newlisp.1
....
here is the makefile_build diff, the individual files are attached

Code: Select all

 geo@bonnie:/home/geo/tmp/newlisp-10.2.8 diff makefile_build*txt
1c1,10
< # makefile for newLISP v. 10.1.x generated by the configure script (configure-alt)
---
> # makefile for newLISP v. 10.x.x on BSDs: FreeBSD, OpenBSD and NetBSD with UTF8 support
> #
> 
> OBJS = newlisp.o nl-symbol.o nl-math.o nl-list.o nl-liststr.o nl-string.o nl-filesys.o \
>         nl-sock.o nl-import.o nl-xml.o nl-web.o nl-matrix.o nl-debug.o nl-utf8.o pcre.o
> 
> CFLAGS = -m32 -Wall -Wno-uninitialized -fno-strict-aliasing -O2 -c -g -DREADLINE -D_BSD -DSUPPORT_UTF8
> # or without readline lib
> #CFLAGS = -m32 -Wall -Wno-uninitialized -fno-strict-aliasing -O2 -c -g -D_BSD -DSUPPORT_UTF8
> 
3,9d11
< CFLAGS =  -Wall -pedantic -Wno-uninitialized -Wno-long-long -fno-strict-aliasing -O2 -c 
< LDFLAGS = -lm
< OBJS = newlisp.o nl-symbol.o nl-math.o nl-list.o nl-liststr.o nl-string.o nl-filesys.o  nl-sock.o nl-import.o nl-xml.o nl-web.o nl-matrix.o nl-debug.o pcre.o nl-utf8.o
< STRIP = strip
< TARG = newlisp
< RLFLAGS = 
< ARCHFLAGS = -m32
12,13c14,17
<         $(CC) $(OBJS) $(ARCHFLAGS) $(LDFLAGS) $(RLFLAGS) -o $(TARG)
<         $(STRIP) $(TARG)
---
>         $(CC) $(OBJS) -m32 -g -lm -lreadline -lncurses -o newlisp
> # or without readline lib
> #       $(CC) $(OBJS) -m32 -g -lm -o newlisp
>         strip newlisp
16c20,22
<         $(CC) $(ARCHFLAGS) $(CFLAGS) -DNEWCONFIG $<
---
>         $(CC) $(CFLAGS) $<
> 
> $(OBJS): primes.h protos.h makefile_bsd_utf8
18d23
< $(OBJS): primes.h protos.h config.h makefile_build
oops, the forum said .txt extension not allowed, I removed the extension and it said 'the extension is not allowed' ...the files are here http://iuxta.com/tmp28/101116-newlisp/ files there with an atime over 28 days are purged.

-George

ggeorgalis
Posts: 8
Joined: Tue Nov 16, 2010 7:08 am
Location: Mountain View, California

Re: NetBSD build failure

Post by ggeorgalis »

I changed the makefile_build from configure, observing the 'without readline lib' comments and it built fine with gmake.

...so what is the configure / configure-alt incompatibility?

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Re: NetBSD build failure

Post by Lutz »

'configure-alt' uses a version-numbered directories for the installation. By default it also uses /usr/local instead of /usr as a prefix for the bin, man, share/newlisp and share/doc/newlisp directories.

Installations generated by 'configure' only put a version number on the main executable in /usr/bin/.

ggeorgalis
Posts: 8
Joined: Tue Nov 16, 2010 7:08 am
Location: Mountain View, California

Re: NetBSD build failure

Post by ggeorgalis »

Okay, I can manage PATH issues :) and I manually copied over the newLISP-10.2.8-Release.html file. (I think NetBSD does something "non-legacy" with regard to terminals, seems readline is the most common build issue)
Best regards,
George

Locked