Giter Site home page Giter Site logo

Not compiling on buster about mpd_oled HOT 6 CLOSED

antiprism avatar antiprism commented on September 28, 2024
Not compiling on buster

from mpd_oled.

Comments (6)

antiprism avatar antiprism commented on September 28, 2024

Hi

Thanks for the build report.

There are 3 kinds of notification in the output.

  1. The lines with "changed in GCC 7.1" are a note indicating , I believe, that if you link with libraries built with an earlier version of GCC then there is a potential for errors.

  2. The lines with "directive output may be truncated" are warnings, due to the mpd_oled code assuming that certain values will never be negative. I'll try to enforce the positive values to remove the warnings.

  3. The build is failing because of

g++  -o mpd_oled main.o timer.o status.o status_msg.o utils.o display.o programopts.o ultragetopt.o ArduiPi_OLED.o Adafruit_GFX.o bcm2835.o -lmpdclient -lpthread 
/usr/bin/ld: bcm2835.o: in function `bcm2835_i2c_write':
bcm2835.c:(.text+0x27d0): undefined reference to `i2c_smbus_write_i2c_block_data'

It looks like on your system the i2c functions are in a library that needs to be specified when linking. You can hopefully link in the library by building mpd_oled with

LDFLAGS="-li2c" make

Adrian.

from mpd_oled.

wildestpixel avatar wildestpixel commented on September 28, 2024

from mpd_oled.

antiprism avatar antiprism commented on September 28, 2024

Hi

I have just installed GCC 8 on Ubuntu and I can see that the line I posted includes the library in the wrong place, and so does not fix the build error. The variable should really be LDLIBS, but the mpd_oled Makefile needs to be fixed to support this.

The i2c library nees to be included when building on RuneAudio, and there are no other changes with respect to a vanilla MPD build, so for now you should be able to build everything with

PLAYER=RUNEAUDIO make

Adrian

from mpd_oled.

antiprism avatar antiprism commented on September 28, 2024

Hi

You may need to install libi2c-dev (and also i2c-tools and lm-sensors) , as I have just noticed that you have lines in your output like "warning: implicit declaration of function 'i2c_smbus_write_byte_data'", meaning also that suitable i2c library headers are not being included. With these packages installed you may or may not need to link with -li2c, so try PLAYER=RUNEAUDIO make and PLAYER=MPD make. Also, run make clean between builds.

If this doen't work out, I'll see if I can find an SD card and put a copy of buster on it to look at what is needed, as this will certainly become an issue for more people.

Adrian.

from mpd_oled.

wildestpixel avatar wildestpixel commented on September 28, 2024

I can confirm that PLAYER=RUNEAUDIO make works well and now has a result the same for me as when running with the MPD flag under Stretch; i.e. I’ve attached a ssd1306 and we are up and running. Daemon enabled etc.

from mpd_oled.

antiprism avatar antiprism commented on September 28, 2024

Great, I am pleased it is working!

I managed to find an SD card and worked through the mpd_oled install on raspbian buster. I can see that there are still warnings for the i2c_smbus_* functions, because they do not appear in any included header, but everything else is in place and the build completes correctly.

I will update the docuimentation for the debian build and close the issue.

Thanks again for letting me know about this.

Adrian.

from mpd_oled.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.