-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[mainly solved] can't install the lib on my Raspberry Pi (OS Raspbian Stretch) #24
Comments
apt install libi2c-dev this fixed that error for me on raspian buster, can you confirm that solve for you too ? |
libi2c-dev is already installed:
Nonetheless, no installation via make possible. |
hmm, that's bit strange, if I remove the lib the make fail as expected
while reinstalling the lib it worked
This the contents of libi2c-dev package
if I move libi2c.a to temp folder to test build fails
I can build wrapping with flag to specify where the lib is, in the example case
I suggest you to try execute |
dpkg -L libi2c-dev only finds but it lists no libi2c.a or libi2c.so and also no smbus.h |
you could try to search for libi2c.a using apt-file utility as follows apt-get install apt-file after installed refresh the search archive with apt-file search libi2c.a this way you will find which package should contains the library, may your distro moved the library binary to other package. in my case the cmd reports searched file belongs to root@main:~# apt-file search libi2c.a
libi2c-dev: /usr/lib/x86_64-linux-gnu/libi2c.a |
$ sudo apt-get install apt-file then, as stated, apt-file search libi2c.a |
In fact I just seen from https://packages.debian.org/index that your distro missing libi2c.a at all Could you try to run the latest line from your source dir ( I removed -li2c ) g++ -shared -Wl,-soname,libArduiPi_OLED.so.1 -Ofast -mfpu=vfp -mfloat-abi=hard -march=armv6zk -mtune=arm1176jzf-s -o libArduiPi_OLED.so.1.0 ArduiPi_OLED.o Adafruit_GFX.o bcm2835.o Wrapper.o |
tbh, I don't understand what you mean ..? |
from your source of ArduiPi_OLED if you run make the result should
so try to copy paste the |
so first, and then ? |
as expected, but insert the command by hand ( better with mouse select then middle btn to paste ) g++ -shared -Wl,-soname,libArduiPi_OLED.so.1 -Ofast -mfpu=vfp -mfloat-abi=hard -march=armv6zk -mtune=arm1176jzf-s -o libArduiPi_OLED.so.1.0 ArduiPi_OLED.o Adafruit_GFX.o bcm2835.o Wrapper.o alternatively remove it from |
ok, so without the -li2c at the end. |
:) but it worked ? |
just of interest, meanwhile: |
I'm unsure, but seems it was from kernel, while in recent os exported to user space and requires -li2c ; if you go to |
weird... anyway, after
|
better to modify Makefile and remove |
if I retry in the examples folder:
|
I have a clean git clone, no make since then.
|
if I remove -li2c in the section"# Make the library"
|
if I retry with "sudo" then I get
|
Line 54 in 4119148
in this line remove ending
seems compilation successfully finished, it works under examples and if so the hardware you need to make it work ( oled display ) works ? |
can't make an example work, make in folder examples failes, too.
|
what a mess, I think I give up. |
strange behavior, if I run make in examples, note that compile line is the same as your root@raspberrypi:/usr/src/ArduiPi_OLED/examples# make
g++ -Ofast -mfpu=vfp -mfloat-abi=hard -march=armv6zk -mtune=arm1176jzf-s -Wall -lArduiPi_OLED oled_demo.cpp -o oled_demo
g++ -Ofast -mfpu=vfp -mfloat-abi=hard -march=armv6zk -mtune=arm1176jzf-s -Wall -lArduiPi_OLED teleinfo-oled.cpp -o teleinfo-oled
teleinfo-oled.cpp: In function ‘int tlf_check_frame(char*)’:
teleinfo-oled.cpp:476:9: warning: ‘char* strncpy(char*, const char*, size_t)’ specified bound depends on the length of the source argument [-Wstringop-overflow=]
strncpy( buff, pframe, len+1);
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
teleinfo-oled.cpp:474:14: note: length computed here
len = strlen(pframe);
~~~~~~^~~~~~~~
root@raspberrypi:/usr/src/ArduiPi_OLED/examples# other things that could help:
|
Too complicated, I am quite a noob, no idea how to check if LD_PRELOAD and LD_LIBRARY_PATH isn't set. |
how to check if these parameters have been set? and in case, how to delete? |
these are environment variables so you can check if they are set supposing you are using bash through to search quickly export | grep LD_ if no result they are already unset; if present to remove them ( that works for current shell session )
Its a check but I think that this isn't the problem, may some development environment broken in some way, btw you could try just for check to see if these variables are setup. The last approach excluding a fresh os install, is to try a compile from fresh repo: (note sudo -i
apt install build-essential
cd /usr/src/
git clone https://github.com/hallard/ArduiPi_OLED.git
cd ArduiPi_OLED
sed -i 's/-li2c//' Makefile
make
cd examples
make |
thanks, no such env vars existed. Best would be if the author provieded a fully functioning lib for Raspi Stretch, |
solved by now: clean boot from SD without having followed the instruction at http://hallard.me/adafruit-oled-display-driver-for-pi/:
then then patched the makefile by out-commenting -li2c :
then sudo make example program works. compile from either working dir: linker flag (edit, no further problems so far) |
@dsyleixa thx for your feedback |
I can't install the lib on my Raspberry Pi (OS Raspbian Stretch), downloading and then typing "make" or even "sudo make" does not work at all, e.g.,
how to fix that?
The text was updated successfully, but these errors were encountered: