Free Ground Shipping on all orders over $100 (US Only)
login   |   Register

Welcome Forums Tarts for Raspberry Pi Minor Correction To Raspberry Pi Library Makefile

This topic contains 3 replies, has 3 voices, and was last updated by Michael Skripek Michael 2 years, 4 months ago.

  • Author
    Posts
  • #3647
    Andrew Batchelor
    Andrew
    Participant

    Hi,

    Just a quick one…

    I downloaded “Tarts_RaspberryPi_V11_092415” from “http://www.tartssensors.com/libraries/raspberrypi” and ran “sudo ./build all” but was getting the following error:

    g++: error: unrecognized command line option “-W1,-soname,libTarts.so”

    during the “[Linking (Dynamic)]” stage.

    This is due to a typo on line 39 in the “libTarts/Makefile” where the command line gcc option for passing options to the linker is “-W1” instead of “-Wl” – i.e. the Makefile is using a “1” (number 1) instead of an “l” (letter l) – easily done.

    If you correct the typo (replace “-W1” with “-Wl”) everything else compiles without error.

    Thanks.

    Andy

  • #3745
    Mazz
    Mazz
    Participant

    Hi Andy,

    That was very helpful and sadly this is the only place where it’s mentioned.

    Thanks a lot .

  • #3940
    Michael Skripek
    Michael
    Participant

    Now I get this message after your fix. Gets much farther thank you for the tip.

    root@raspberrypi:/home/mike/Tarts_RaspberryPi_V11_092415# ./build all
    [Uninstalling Tarts]
    [Cleaning all example object and executable files]
    [Tarts library files are not detected — Loading library]
    ./build: line 35: test: /usr/local/lib/libTarts.so: binary operator expected
    [Making Example Applications Now…]
    [Compiling] TartsBasic.cpp
    [Compiling] TartsSniffer.cpp
    [Compiling] TartsAdvanced.cpp
    [Compiling] TartsBasicControl.cpp
    [Compiling] TartsPersistence.cpp
    TartsPersistence.cpp: In function ‘void OnSenMsgEv(SensorMessage*)’:
    TartsPersistence.cpp:323:40: warning: argument to ‘sizeof’ in ‘char* strncpy(char*, const char*, size_t)’ call is the same expression as the source; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess]
    strncpy(thisSensorID, msg->ID, sizeof(msg->ID));
    ^
    [Linking : TartsBasic]
    [Linking : TartsSniffer]
    [Linking : TartsAdvanced]
    [Linking : TartsBasicControl]
    [Linking : TartsPersistence]
    root@raspberrypi:/home/mike/Tarts_RaspberryPi_V11_092415#

    When I execute I get this message. So I am not sure if the previous error causes this.

    root@raspberrypi:/home/mike/Tarts_RaspberryPi_V11_092415# ./TartsSniffer
    TARTs Sniffer application running…All Event Handlers Registered.
    TARTs Gateway Registration Failed!

    • This reply was modified 2 years, 4 months ago by Michael Skripek Michael.
  • #3942
    Michael Skripek
    Michael
    Participant

    Quick note. I changed back to an older PI and that seems to compile much better. I was using Pi3 and that one did not work correctly.

You must be logged in to reply to this topic.

Support
Contact Us!

Your Name (required)

Your Email (required)

Subject

Your Message

Enter this code below: To use CAPTCHA, you need Really Simple CAPTCHA plugin installed.