Community discussions

 
sogico
just joined
Topic Author
Posts: 5
Joined: Mon May 14, 2012 1:26 pm

rb433u incompatible library -> /usr/bin/ld: skipping incompa

Thu May 17, 2012 12:02 pm

I've compiled an OpenWrt trunk version for a rb433uah mikrotik router board to be installed over a virtual machine (metarouter). It is successfully compiled following the instructions on [url]http://wiki.openwrt.org/toh/mikrotik/rb433[\url] and installed on the metarouter ([url]http://wiki.mikrotik.com/wiki/Manual:Metarouter[\url]).

Note that create your own image using the mikrotik tutorial is not possible because the trunk version of OpenWrt is updated since the wiki was written. You should use the OpenWrt tutorial

The problem appears when I try to compile a package, that was previously compiled and installed on a RSPro, in a mikrotik rb433uah. Other forum discuss about it's not possible to compile applications for a different number of bits (32 or 64 bits) but this is not my case. Any idea about how to solve it?

Bellow I show the error and the makefiles used to cross-compile

# using defaults found in .config
#


*** End of OpenWrt configuration.
*** Execute 'make' to build the OpenWrt or try 'make help'.

make[1]: Entering directory `/home/inst/mikroTik/kamikaze/build_dir/target-mips_r2_uClibc-0.9.33/OpenWrt-SDK-ar71xx-for-Linux-x86_64-gcc-4.6-linaro_uClibc-0.9.33'
make[2]: Entering directory `/home/inst/mikroTik/kamikaze/build_dir/target-mips_r2_uClibc-0.9.33/OpenWrt-SDK-ar71xx-for-Linux-x86_64-gcc-4.6-linaro_uClibc-0.9.33'
make[3]: Entering directory `/home/inst/mikroTik/kamikaze/build_dir/target-mips_r2_uClibc-0.9.33/OpenWrt-SDK-ar71xx-for-Linux-x86_64-gcc-4.6-linaro_uClibc-0.9.33/package/SkyeTek'
( make -C /home/inst/mikroTik/kamikaze/build_dir/target-mips_r2_uClibc-0.9.33/OpenWrt-SDK-ar71xx-for-Linux-x86_64-gcc-4.6-linaro_uClibc-0.9.33/build_dir/target-_-/SkyeTek/src/SkyeTekAPI/unix ; make -C /home/inst/mikroTik/kamikaze/build_dir/target-mips_r2_uClibc-0.9.33/OpenWrt-SDK-ar71xx-for-Linux-x86_64-gcc-4.6-linaro_uClibc-0.9.33/build_dir/target-_-/SkyeTek/src/Samples/linux ; )
make[4]: Entering directory `/home/inst/mikroTik/kamikaze/build_dir/target-mips_r2_uClibc-0.9.33/OpenWrt-SDK-ar71xx-for-Linux-x86_64-gcc-4.6-linaro_uClibc-0.9.33/build_dir/target-_-/SkyeTek/src/SkyeTekAPI/unix'

DEBUG


DEBUG build complete

make[4]: Leaving directory `/home/inst/mikroTik/kamikaze/build_dir/target-mips_r2_uClibc-0.9.33/OpenWrt-SDK-ar71xx-for-Linux-x86_64-gcc-4.6-linaro_uClibc-0.9.33/build_dir/target-_-/SkyeTek/src/SkyeTekAPI/unix'
make[4]: Entering directory `/home/inst/mikroTik/kamikaze/build_dir/target-mips_r2_uClibc-0.9.33/OpenWrt-SDK-ar71xx-for-Linux-x86_64-gcc-4.6-linaro_uClibc-0.9.33/build_dir/target-_-/SkyeTek/src/Samples/linux'

DEBUG

(cd ../../SkyeTekAPI/unix; make -j8)
make[5]: Entering directory `/home/inst/mikroTik/kamikaze/build_dir/target-mips_r2_uClibc-0.9.33/OpenWrt-SDK-ar71xx-for-Linux-x86_64-gcc-4.6-linaro_uClibc-0.9.33/build_dir/target-_-/SkyeTek/src/SkyeTekAPI/unix'

DEBUG


DEBUG build complete

make[5]: Leaving directory `/home/inst/mikroTik/kamikaze/build_dir/target-mips_r2_uClibc-0.9.33/OpenWrt-SDK-ar71xx-for-Linux-x86_64-gcc-4.6-linaro_uClibc-0.9.33/build_dir/target-_-/SkyeTek/src/SkyeTekAPI/unix'
g++ -o example example.o -L../../SkyeTekAPI/unix -lstapi -L/home/inst/mikroTik/kamikaze/staging_dir/target-mips_r2_uClibc-0.9.33/usr/lib -L/home/inst/mikroTik/kamikaze/staging_dir/target-mips_r2_uClibc-0.9.33/usr/lib -lusb -L/home/inst/mikroTik/kamikaze/build_dir/target-mips_r2_uClibc-0.9.33/OpenWrt-SDK-ar71xx-for-Linux-x86_64-gcc-4.6-linaro_uClibc-0.9.33/staging_dir/target-mips_r2_uClibc-0.9.33/root-ar71xx/lib -lpthread --static
/usr/bin/ld: skipping incompatible ../../SkyeTekAPI/unix/libstapi.a when searching for -lstapi
/usr/bin/ld: cannot find -lstapi
/usr/bin/ld: skipping incompatible /home/inst/mikroTik/kamikaze/staging_dir/target-mips_r2_uClibc-0.9.33/usr/lib/libusb.a when searching for -lusb
/usr/bin/ld: skipping incompatible /home/inst/mikroTik/kamikaze/staging_dir/target-mips_r2_uClibc-0.9.33/usr/lib/libusb.a when searching for -lusb
/usr/bin/ld: cannot find -lusb
/usr/bin/ld: skipping incompatible /home/inst/mikroTik/kamikaze/build_dir/target-mips_r2_uClibc-0.9.33/OpenWrt-SDK-ar71xx-for-Linux-x86_64-gcc-4.6-linaro_uClibc-0.9.33/staging_dir/target-mips_r2_uClibc-0.9.33/root-ar71xx/lib/libpthread.a when searching for -lpthread
/usr/bin/ld: skipping incompatible /home/inst/mikroTik/kamikaze/build_dir/target-mips_r2_uClibc-0.9.33/OpenWrt-SDK-ar71xx-for-Linux-x86_64-gcc-4.6-linaro_uClibc-0.9.33/staging_dir/target-mips_r2_uClibc-0.9.33/root-ar71xx/lib/libstdc++.a when searching for -lstdc++
/usr/bin/ld: skipping incompatible /home/inst/mikroTik/kamikaze/build_dir/target-mips_r2_uClibc-0.9.33/OpenWrt-SDK-ar71xx-for-Linux-x86_64-gcc-4.6-linaro_uClibc-0.9.33/staging_dir/target-mips_r2_uClibc-0.9.33/root-ar71xx/lib/libm.a when searching for -lm
/usr/bin/ld: skipping incompatible /home/inst/mikroTik/kamikaze/build_dir/target-mips_r2_uClibc-0.9.33/OpenWrt-SDK-ar71xx-for-Linux-x86_64-gcc-4.6-linaro_uClibc-0.9.33/staging_dir/target-mips_r2_uClibc-0.9.33/root-ar71xx/lib/libc.a when searching for -lc
collect2: ld returned 1 exit status
make[4]: *** [example] Error 1
make[4]: Leaving directory `/home/inst/mikroTik/kamikaze/build_dir/target-mips_r2_uClibc-0.9.33/OpenWrt-SDK-ar71xx-for-Linux-x86_64-gcc-4.6-linaro_uClibc-0.9.33/build_dir/target-_-/SkyeTek/src/Samples/linux'
make[3]: *** [/home/inst/mikroTik/kamikaze/build_dir/target-mips_r2_uClibc-0.9.33/OpenWrt-SDK-ar71xx-for-Linux-x86_64-gcc-4.6-linaro_uClibc-0.9.33/build_dir/target-_-/SkyeTek/.built] Error 2
make[3]: Leaving directory `/home/inst/mikroTik/kamikaze/build_dir/target-mips_r2_uClibc-0.9.33/OpenWrt-SDK-ar71xx-for-Linux-x86_64-gcc-4.6-linaro_uClibc-0.9.33/package/SkyeTek'
make[2]: *** [package/SkyeTek/compile] Error 2
make[2]: Leaving directory `/home/inst/mikroTik/kamikaze/build_dir/target-mips_r2_uClibc-0.9.33/OpenWrt-SDK-ar71xx-for-Linux-x86_64-gcc-4.6-linaro_uClibc-0.9.33'
make[1]: *** [/home/inst/mikroTik/kamikaze/build_dir/target-mips_r2_uClibc-0.9.33/OpenWrt-SDK-ar71xx-for-Linux-x86_64-gcc-4.6-linaro_uClibc-0.9.33/staging_dir/target-_-/stamp/.package_compile] Error 2
make[1]: Leaving directory `/home/inst/mikroTik/kamikaze/build_dir/target-mips_r2_uClibc-0.9.33/OpenWrt-SDK-ar71xx-for-Linux-x86_64-gcc-4.6-linaro_uClibc-0.9.33'
make: *** [world] Error 2
Makefile of the drivers
OS = $(shell uname -s)

VERSION = DEBUG
PRODUCT = ReaderWare
#PREFIX =
PREFIX = mips-openwrt-linux-

CC = $(PREFIX)gcc
LD = $(PREFIX)ld
AR = $(PREFIX)ar
RANLIB = $(PREFIX)ranlib

##############################################

# Common Directories
VPATH  = ..
VPATH  += ../Reader
VPATH  += ../Device
VPATH  += ../Protocol
VPATH  += ../Tag

INCLUDE  = -I.. -I/home/inst/mikroTik/kamikaze/build_dir/toolchain-mips_r2_gcc-4.6-linaro_uClibc-0.9.33/linux-3.3.6 -I/home/inst/mikroTik/kamikaze/staging_dir/target-mips_r2_uClibc-0.9.33/lib -I/home/inst/mikroTik/kamikaze/staging_dir/target-mips_r2_uClibc-0.9.33/usr/lib -I/home/inst/mikroTik/kamikaze/staging_dir/target-mips_r2_uClibc-0.9.33/usr/include


ifeq "$(VERSION)" "RELEASE"

# -fPIC option required for compilation of SWIG bindings
  CFLAGS = -O2
  #CFLAGS = -O2 -fPIC
#  LDFLAGS = 

else
ifeq "$(VERSION)" "DEBUG"

# -fPIC option required for compilation of SWIG bindings
#  CFLAGS = -g -O0 -Wall -DDEBUG
  CFLAGS = -g -Wall -DDEBUG -Os -pipe -mips32r2 -mtune=mips32r2 -funit-at-a-time -fhonour-copts -msoft-float --static
  #CFLAGS = -g -O0 -Wall -DDEBUG -fPIC

endif
endif

##############################################

# Definitions

EXE = libstapi
OUTPUT_DIR = build
OBJS += SkyeTekAPI.o \
	asn1.o utils.o CRC.o STPv2.o STPv3.o \
	TagFactory.o \
	Tag.o GenericTag.o DesfireTag.o Iso14443ATag.o Iso14443BTag.o \
	ReaderFactory.o \
	SkyeTekReader.o SkyeTekReaderFactory.o \
	DeviceFactory.o \
	SerialDeviceFactory.o  SerialDevice.o 

##############################################

ifeq ($(OS),Linux)
  VPATH  += ../Device/USB
  CFLAGS += -DLINUX -DHAVE_PTHREAD -DHAVE_LIBUSB
  OBJS += USBDeviceFactory.o USBDevice.o
endif

all: build_msg $(EXE).a
	@echo; echo $(VERSION) build complete; echo

$(EXE).a: $(OBJS)
	$(AR) ru $@ $(OBJS) 
	@echo

%.a: %.o
	$(RANLIB) $@
	@echo

%.o: %.c
	$(CC) -c $(INCLUDE) $(CFLAGS) $<
	@echo

clean:
	rm -f *.o *.elf *.lst *.s *.i *.a

build_msg:
	@echo; echo $(VERSION); echo
Makefile of the code
##############################################
#Definitions
##############################################

VERSION = DEBUG
PRODUCT =
#PREFIX =
#PREFIX = mips-openwrt-linux-

CC = $(PREFIX)g++
LD = $(PREFIX)ld
AR = $(PREFIX)ar
RANLIB = $(PREFIX)ranlib

VPATH  = ..
INCLUDE  += -I../../SkyeTekAPI -I/home/inst/OpenWrt/backfire/build_dir/toolchain-mips_r2_gcc-4.3.3+cs_glibc-2.6.1/linux-2.6.32.27 -I/home/inst/OpenWrt/backfire/staging_dir/target-mips_r2_glibc-2.6.1/lib -I/home/inst/OpenWrt/backfire/staging_dir/target-mips_r2_glibc-2.6.1/usr/lib -I/home/inst/OpenWrt/backfire/staging_dir/target-mips_r2_glibc-2.6.1/usr/include
LIBS += -L../../SkyeTekAPI/unix -lstapi
#  CFLAGS = -g -O0 -Wall -DDEBUG
CFLAGS = -g -Wall -DDEBUG -Os -pipe -mips32r2 -mtune=mips32r2 -funit-at-a-time -fhonour-copts -msoft-float
EXE = example
OBJS += example.o


OS = $(shell uname -s)
ifeq ($(OS),Linux)
  CFLAGS += -DLINUX
  LIBS += -L/home/inst/OpenWrt/backfire/staging_dir/target-mips_r2_glibc-2.6.1/usr/lib -L/home/inst/OpenWrt/backfire/staging_dir/target-mips_r2_glibc-2.6.1/usr/lib  -lusb -L/home/inst/OpenWrt/backfire/staging_dir/target-mips_r2_glibc-2.6.1/usr/lib -lpthread
endif


##############################################
#Rules
##############################################

all: build_msg $(EXE) 
	@echo; echo $(VERSION) build complete; echo

stapi:
	(cd ../../SkyeTekAPI/unix; $(MAKE) -j8)

$(EXE): $(OBJS) stapi
	$(CC) -o $@ $(OBJS) $(LIBS) --static
	@echo

%.a: %.o
	$(RANLIB) $@
	@echo

%.o: %.c
	$(CC) -c $(INCLUDE) $(CFLAGS) $<
	@echo

clean:
	rm -f *.o *.elf *.lst *.s *.i *.a $(EXE)

realclean: clean
	rm -f $(EXE)
	(cd ../../SkyeTekAPI/unix; $(MAKE) clean)

build_msg:
	@echo; echo $(VERSION); echo

Who is online

Users browsing this forum: No registered users and 4 guests