OpenWrt Forum Archive

Topic: Assembler error making GPSD 2.30 from /trunk/openwrt buildroot

The content of this topic has been archived on 25 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Ok I've followed the buildroot through twice first with the stable and it sucesfully did a make but I couldn't get GPSD 2.30 to make. So, I'm assuming that I have all the needed programs installed so my buildroot environment is valid. So I changed to the devel trunk since GPSD is in there already and it should be a simple mattter to just do a make. I was wrong.

I ran a make and here's what happened:

/home/user/trunk/openwrt/staging_dir_mipsel/bin/mipsel-linux-uclibc-gcc -DHAVE_CONFIG -I. -I. -I. 
-I/home/user/trunk/openwrt/staging_dir_mipsel/usr/include -I/home/user/trunk/openwrt/staging_dir_mipsel/include -I/usr/include -Os -pipe 
-mips32 -mtune=mips32 -funit-at-a-time -Wall -Wcast-align -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith
 -Wreturn-type -D_GNU_SOURCE -I/usr/include -MT netlib.lo -MD -MP -MF .deps/netlib.TPo -c -netlib.c -fPIC -DPIIC -o .libs/netlib.0
{standard input}: Assembler messages:
{standard input}:65: Error: unrecognized opcode 'rorw $8, $2'
{standard input}:69: Error: unrecognized opcode 'rorw $8, $2'
{standard input}:89: Error: unrecognized opcode 'rorw $8, $2'
make[6]: *** leaving [netlib.lo] Error 1
make[6]: Leaving directory '/home/usr/trunk/openwrt/build_mipsel/gpsd-2.30'

So, this leads me to believe there is an error in the netlib.lo file. However I'm not sure how to go about tracking it down and fixing or what the error really is. I assumed that gpsd was stable since Nico has successfully built a gpsd 2.30.ipk. I assumed that the source would build if it's in the buildroot.

If you ask why the heck are you trying to build it if it's already done? Well, this a learning excercise that I can learn how to build other packages later.

In case other have issues here's the solution

replace
-I/usr/include
with
-I/home/user/trunk/openwrt/staging_dir_mipsel/usr/include

This can be done with the use of CFLAGS and CPPFLAGS (consult your source ./configure --help

otherwise you can search and replace in the the Makefile

The discussion might have continued from here.