OpenWRT errors with 10.6.2

Machine-specific discussion
Unix, Linux, OS X, OS/2, Windows, ..?

OpenWRT errors with 10.6.2

Postby kanen » Wed Mar 11, 2015 2:11 am

I'm porting 10.6.2 to OpenWRT (both Intel x86 and MIPS) and I keep getting the error below with the makefile_openwrt below.

Any suggestions?

Code: Select all
nl-filesys.c: In function 'p_spawn':
nl-filesys.c:1498:42: error: 'MAP_ANON' undeclared (first use in this function)
     PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANON, -1, 0)) == (void*)-1)
                                          ^
nl-filesys.c:1498:42: note: each undeclared identifier is reported only once for each function it appears in
nl-filesys.c: In function 'p_share':
nl-filesys.c:2152:55: error: 'MAP_ANON' undeclared (first use in this function)
     0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANON, -1, 0)) == (void*)-1)
                                                       ^
make[5]: *** [nl-filesys.o] Error 1
make[4]: *** [default] Error 2
make[3]: *** [/Volumes/OpenPipe/build_dir/target-i386_i486_uClibc-0.9.33.2/newlisp-10.6.2/.configured_] Error 2
make[3]: Leaving directory `/Volumes/OpenPipe/package/devel/newlisp'
make[2]: *** [package/devel/newlisp/compile] Error 2
make[2]: Leaving directory `/Volumes/OpenPipe'
make[1]: *** [/Volumes/OpenPipe/staging_dir/target-i386_i486_uClibc-0.9.33.2/stamp/.package_compile] Error 2
make[1]: Leaving directory `/Volumes/OpenPipe'
make: *** [world] Error 2


I'm using this makefile:
Code: Select all
# makefile for newLISP v.10.x.x on Openwrt LINUX without readline support
# I use upx to compress as hell as I can on newlisp
# Note, that readline support may require different libraries on different OSs
#

OBJS = newlisp.o         nl-liststr.o      nl-symbol.o       pcre.o  \
nl-debug.o        nl-math.o         nl-utf8.o         unix-lib.o   \
nl-filesys.o      nl-matrix.o       nl-web.o          win32-path.o \
nl-import.o       nl-sock.o         nl-xml-json.o     win32-util.o \
nl-list.o         nl-string.o       pcre-chartables.o win32dll.o

#CFLAGS = -Wall -pedantic -Wno-uninitialized -c -O2 -g -DLINUX
CFLAGS = -Wall -Wl,--gc-sections  -ffunction-sections -fdata-sections \
 -c -Os  -fno-threadsafe-statics  -DLINUX -I$(TARGET_DIR)/usr/include/ \
 -std=gnu99
LDFLAGS = -L$(TARGET_DIR)/usr/lib/  -W1,--gc-sections -lm -ldl
CC = openwrt-linux-gcc
LD = openwrt-linux-ld


default: $(OBJS)
        $(CC) $(OBJS)  -o newlisp $(LDFLAGS)   #for openwrt
#    $(CC) $(OBJS) -g -lm -ldl -lreadline -ltermcap -o newlisp # slackware
#    $(CC) $(OBJS) -g -lm -ldl -lreadline -lncurses -o newlisp # other Linux Dist
#    $(CC) $(OBJS) -g -lm -ldl -o newlisp # without readline support
        $(STRIP) newlisp
        upx --best -o newlisp_s newlisp
        rm newlisp
        mv newlisp_s newlisp

.c.o:
        $(CC) $(CFLAGS) $<

$(OBJS): primes.h protos.h pcre.h pcre-config.h
. Kanen Flowers http://kanen.me .
kanen
 
Posts: 144
Joined: Thu Mar 25, 2010 6:24 pm

Re: OpenWRT errors with 10.6.2

Postby kanen » Thu Mar 12, 2015 4:21 am

I may have figured it out. If so, I'll post my OpenWRT Makefile and the upstream .tgz needed to get newLisp 10.6.2 to compile on the latest OpenWRT (14.07 or even trunk).

The OpenWRT build system is just complicated.
. Kanen Flowers http://kanen.me .
kanen
 
Posts: 144
Joined: Thu Mar 25, 2010 6:24 pm

Re: OpenWRT errors with 10.6.2

Postby kanen » Thu Mar 12, 2015 6:13 pm

It works. The newLisp sources are on our servers, but...

Code: Select all
cd openwrt/devel
mkdir newlisp
cd newlisp
wget http://dev.kanen.me/trusted/Makefile

Then... change back to your openwrt directory and enable newLisp...
Code: Select all
cd ../..
make menu_config

Under Base System, find newLisp and hit "y" to enable it.

then, run
Code: Select all
make V=99

and you'll have a system with newLisp 10.6.2 installed.
. Kanen Flowers http://kanen.me .
kanen
 
Posts: 144
Joined: Thu Mar 25, 2010 6:24 pm

Re: OpenWRT errors with 10.6.2

Postby Lutz » Fri Mar 13, 2015 3:09 pm

Thanks Kanen, there are links to this on this page: http://www.newlisp.org/index.cgi?Downloads
Lutz
 
Posts: 5258
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California


Return to newLISP and the O.S.

Who is online

Users browsing this forum: No registered users and 1 guest

cron