3 Replies Latest reply on Dec 7, 2014 10:54 AM by Pb1

    MQTT PubSubClient library does not compile for Gen2, Arduino o.k.

    Husky

      I try to get MQTT library PubSubClient running and compile the mqtt_basic example.

       

      On Arduino 1.5.3-Intel.1.0.3 this fails with:

       

      Arduino: 1.5.3-Intel.1.0.3 (Windows 7), Board: "Intel® Galileo Gen2"

       

      C:\mx\arduino-1.5.3-Intel.1.0.3/hardware/tools/x86/i686-pokysdk-mingw32/usr/bin/i586-poky-linux-uclibc/i586-poky-linux-uclibc-g++ -m32 -march=i586 --sysroot=C:\mx\arduino-1.5.3-Intel.1.0.3/hardware/tools/x86/i586-poky-linux-uclibc -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -MMD -D__ARDUINO_X86__ -Xassembler -mquark-strip-lock=yes -march=i586 -m32 -DARDUINO=153 -IC:\mx\arduino-1.5.3-Intel.1.0.3\hardware\arduino\x86\cores\arduino -IC:\mx\arduino-1.5.3-Intel.1.0.3\hardware\arduino\x86\variants\galileo_fab_g -IC:\mx\arduino-1.5.3-Intel.1.0.3\hardware\arduino\x86\libraries\SPI -IC:\mx\arduino-1.5.3-Intel.1.0.3\hardware\arduino\x86\libraries\Ethernet -IC:\mx\arduino-1.5.3-Intel.1.0.3\libraries\PubSubClient C:\Users\marxp\AppData\Local\Temp\build9090114803670460198.tmp\mqtt_demo3.cpp -o C:\Users\marxp\AppData\Local\Temp\build9090114803670460198.tmp\mqtt_demo3.cpp.o

       

       

      ......

      everthing fine until:

      ......

      C:\mx\arduino-1.5.3-Intel.1.0.3/hardware/tools/x86/i686-pokysdk-mingw32/usr/bin/i586-poky-linux-uclibc/i586-poky-linux-uclibc-g++ -m32 -march=i586 --sysroot=C:\mx\arduino-1.5.3-Intel.1.0.3/hardware/tools/x86/i586-poky-linux-uclibc -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -MMD -D__ARDUINO_X86__ -Xassembler -mquark-strip-lock=yes -march=i586 -m32 -DARDUINO=153 -IC:\mx\arduino-1.5.3-Intel.1.0.3\hardware\arduino\x86\cores\arduino -IC:\mx\arduino-1.5.3-Intel.1.0.3\hardware\arduino\x86\variants\galileo_fab_g -IC:\mx\arduino-1.5.3-Intel.1.0.3\hardware\arduino\x86\libraries\SPI -IC:\mx\arduino-1.5.3-Intel.1.0.3\hardware\arduino\x86\libraries\Ethernet -IC:\mx\arduino-1.5.3-Intel.1.0.3\libraries\PubSubClient -IC:\mx\arduino-1.5.3-Intel.1.0.3\libraries\PubSubClient\utility C:\mx\arduino-1.5.3-Intel.1.0.3\libraries\PubSubClient\PubSubClient.cpp -o C:\Users\marxp\AppData\Local\Temp\build9090114803670460198.tmp\PubSubClient\PubSubClient.cpp.o

       

      C:\mx\arduino-1.5.3-Intel.1.0.3\libraries\PubSubClient\PubSubClient.cpp: In member function 'boolean PubSubClient::publish_P(char*, uint8_t*, unsigned int, boolean)':

      C:\mx\arduino-1.5.3-Intel.1.0.3\libraries\PubSubClient\PubSubClient.cpp:321:64: error: 'pgm_read_byte_near' was not declared in this scope

      ---------------------

       

      On Arduino 1.0.5-r2 a compile of the same example with target set to Mega2560 runs perfect.

       

      If this is some sort of porting issue with x86 ?  How can it be fixed ?

       

      Peter