2

I have a Problem using wiringPi with crosstool-ng. First I got this Error:

libwiringPi.so: file not recognized: File format not recognized

I think the problem might be that ./build will not use crosstool-ng to build wiringPi? I also tried to change the makefile:

CC = arm-unknown-linux-gnueabi-gcc
#CC =gcc

Then, while building wiringPi I got this error:

make: arm-unknown-linux-gnueabi-gcc: Command not found

If I type the command right into the terminal, the command works. Any other suggestions how to make wiringPi work with crosstool-ng? I am using Ubuntu 14.04 on my Notebook and Raspbian on the Pi.

For installing I followed these tutorials:

Crosstool-NG

WiringPi

2 Answers 2

2

You might want to look at my project Nard SDK where I do what you require, crosstool-ng builds wiringPi. You could compare my file nard/apps/wiringpi-lib/Makefile with your Makefile.

1

Changing the compiler in wiringPi's make file didn't work for me then I changed compiler name in gpio , wiringPiD, wiringPi ,devLib folder's makefiles .I also faced issue compiler of not finding header "wiringPi.h", then include path is modified to

     INCLUDE = -I$(DESTDIR)$(PREFIX)/include

in respective folder's make file.

    CC = /path/ to / compiler/arm-linux-gnueabihf-gcc

Probably trying giving complete path of compiler. I used this repo https://github.com/raspberrypi/tools for raspian cross compiler tools.

In addition I faced issue that linker was unable to find wiringPi and wiringPiD libraries , so I added following in gpio/Makefile . Now, running "./build " gave me a dynamic library which is crosscompiled.

       LDFLAGS = -L$(DESTDIR)/lib

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.