hallard / ArduiPi_OLED

Common used OLED driver for Raspberry PI
http://hallard.me/adafruit-oled-display-driver-for-pi/
113 stars 59 forks source link

Compilation on Raspberry Pi 3 with Ubuntu Mate 16.04 #16

Open teute03 opened 7 years ago

teute03 commented 7 years ago

I had a issue to compile the library on a Raspberry Pi 3 with Ubuntu Mate 16.04, with this error: g++ -Wall -fPIC -fno-rtti -Ofast -mfpu=vfp -mfloat-abi=hard -march=armv6zk -mtune=arm1176jzf-s -c ArduiPi_OLED.cpp In file included from /usr/include/stdio.h:933:0, from ./ArduiPi_OLED_lib.h:21, from ArduiPi_OLED.cpp:36: /usr/include/arm-linux-gnueabihf/bits/stdio.h: In function ‘int getchar()’: /usr/include/arm-linux-gnueabihf/bits/stdio.h:44:14: sorry, unimplemented: Thumb-1 hard-float VFP ABI getchar (void) ^

I just updated the Makefile to change the CCFLAGS to "-march-native" and it works.

brianfordin commented 6 years ago

Boom! Thank you! After searching for ever for problems compiling the ArduiPi_OLED library on Mate:

Makefile:54: recipe for target 'ArduiPi_OLED.o' failed make: *** [ArduiPi_OLED.o] Error 1

This was the fix! I changed it to "-march=native" (not -march-native) in two places in Makefile and make worked with just a couple of insignificant warnings like "unused variable." Thanks again!