Giter VIP home page Giter VIP logo

Comments (23)

prologic avatar prologic commented on June 28, 2024

The Adafruit CC3000 examples themselves compile just fine.

The aRest Serial example compiles just fine.

The aRest Ethernet example does not also:

$ ino clean && ino build
Searching for Board description file (boards.txt) ... /usr/share/arduino/hardware/arduino/boards.txt
Searching for Arduino lib version file (version.txt) ... /usr/share/arduino/lib/version.txt
Detecting Arduino software version ...  1.0.5 (1.0.5)
Searching for Arduino core library ... /usr/share/arduino/hardware/arduino/cores/arduino
Searching for Arduino standard libraries ... /usr/share/arduino/libraries
Searching for Arduino variants directory ... /usr/share/arduino/hardware/arduino/variants
Searching for make ... /usr/bin/make
Searching for avr-gcc ... /usr/bin/avr-gcc
Searching for avr-g++ ... /usr/bin/avr-g++
Searching for avr-ar ... /usr/bin/avr-ar
Searching for avr-objcopy ... /usr/bin/avr-objcopy
src/sketch.ino
Searching for Arduino lib version file (version.txt) ... /usr/share/arduino/lib/version.txt
Detecting Arduino software version ...  1.0.5 (1.0.5)
Scanning dependencies of src
Scanning dependencies of arduino
Scanning dependencies of Ethernet
Scanning dependencies of SPI
Scanning dependencies of aREST
Scanning dependencies of Adafruit_CC3000
src/sketch.cpp
Linking libaREST.a
Ethernet/EthernetServer.cpp
Ethernet/Dhcp.cpp
Ethernet/Ethernet.cpp
Ethernet/Dns.cpp
Ethernet/utility/w5100.cpp
Ethernet/utility/socket.cpp
Ethernet/EthernetClient.cpp
Ethernet/EthernetUdp.cpp
Linking libEthernet.a
Adafruit_CC3000/utility/evnt_handler.cpp
Adafruit_CC3000/utility/debug.cpp
Adafruit_CC3000/utility/cc3000_common.cpp
Adafruit_CC3000/utility/sntp.cpp
lib/Adafruit_CC3000/utility/sntp.cpp: In member function 'char sntp::GetNTPServerList(const char**, uint32_t*, int)':
lib/Adafruit_CC3000/utility/sntp.cpp:371:64: error: 'gethostbyname' was not declared in this scope
    gethostbyname(*ntpPoolName, strlen(*ntpPoolName), &ntpServer);
                                                                ^
lib/Adafruit_CC3000/utility/sntp.cpp: In member function 'bool sntp::SNTP_GetTime(int, uint32_t*)':
lib/Adafruit_CC3000/utility/sntp.cpp:393:2: error: 'sockaddr_in' was not declared in this scope
  sockaddr_in   socketAddr;
  ^
lib/Adafruit_CC3000/utility/sntp.cpp:393:16: error: expected ';' before 'socketAddr'
  sockaddr_in   socketAddr;
                ^
lib/Adafruit_CC3000/utility/sntp.cpp:394:2: error: 'socklen_t' was not declared in this scope
  socklen_t   sockLen;
  ^
lib/Adafruit_CC3000/utility/sntp.cpp:394:14: error: expected ';' before 'sockLen'
  socklen_t   sockLen;
              ^
lib/Adafruit_CC3000/utility/sntp.cpp:406:10: error: 'socketAddr' was not declared in this scope
  memset(&socketAddr, 0, sizeof(sockaddr_in));
          ^
lib/Adafruit_CC3000/utility/sntp.cpp:407:26: error: 'AF_INET' was not declared in this scope
  socketAddr.sin_family = AF_INET;
                          ^
lib/Adafruit_CC3000/utility/sntp.cpp:409:39: error: 'htons' was not declared in this scope
  socketAddr.sin_port = htons(SNTP_PORT);
                                       ^
lib/Adafruit_CC3000/utility/sntp.cpp:422:2: error: 'sockLen' was not declared in this scope
  sockLen = sizeof(sockaddr_in);
  ^
lib/Adafruit_CC3000/utility/sntp.cpp:423:76: error: 'sockaddr' was not declared in this scope
  byteCount = sendto(sntpSocket, &sntp_message, sizeof(SNTP_Message_t), 0, (sockaddr*)&socketAddr, sockLen);
                                                                            ^
lib/Adafruit_CC3000/utility/sntp.cpp:423:85: error: expected primary-expression before ')' token
  byteCount = sendto(sntpSocket, &sntp_message, sizeof(SNTP_Message_t), 0, (sockaddr*)&socketAddr, sockLen);
                                                                                     ^
lib/Adafruit_CC3000/utility/sntp.cpp:435:26: error: 'SOL_SOCKET' was not declared in this scope
   setsockopt(sntpSocket, SOL_SOCKET, SOCKOPT_RECV_TIMEOUT, &recvTimeout, (socklen_t)sizeof(recvTimeout));
                          ^
lib/Adafruit_CC3000/utility/sntp.cpp:435:38: error: 'SOCKOPT_RECV_TIMEOUT' was not declared in this scope
   setsockopt(sntpSocket, SOL_SOCKET, SOCKOPT_RECV_TIMEOUT, &recvTimeout, (socklen_t)sizeof(recvTimeout));
                                      ^
lib/Adafruit_CC3000/utility/sntp.cpp:435:85: error: expected ')' before 'sizeof'
   setsockopt(sntpSocket, SOL_SOCKET, SOCKOPT_RECV_TIMEOUT, &recvTimeout, (socklen_t)sizeof(recvTimeout));
                                                                                     ^
lib/Adafruit_CC3000/utility/sntp.cpp:435:104: error: 'setsockopt' was not declared in this scope
   setsockopt(sntpSocket, SOL_SOCKET, SOCKOPT_RECV_TIMEOUT, &recvTimeout, (socklen_t)sizeof(recvTimeout));
                                                                                                        ^
lib/Adafruit_CC3000/utility/sntp.cpp:437:88: error: expected primary-expression before ')' token
   byteCount = recvfrom(sntpSocket, &sntp_message, sizeof(SNTP_Message_t), 0, (sockaddr*)&socketAddr, &sockLen);
                                                                                        ^
lib/Adafruit_CC3000/utility/sntp.cpp:452:74: error: 'htonl' was not declared in this scope
    sntp_message.tsReceive.seconds  = htonl(sntp_message.tsReceive.seconds);
                                                                          ^
lib/Adafruit_CC3000/utility/sntp.cpp: In member function 'bool sntp::UpdateNTPTime()':
lib/Adafruit_CC3000/utility/sntp.cpp:515:2: error: 'sockaddr_in' was not declared in this scope
  sockaddr_in   socketAddr;
  ^
lib/Adafruit_CC3000/utility/sntp.cpp:515:16: error: expected ';' before 'socketAddr'
  sockaddr_in   socketAddr;
                ^
lib/Adafruit_CC3000/utility/sntp.cpp:528:22: error: 'AF_INET' was not declared in this scope
  sntpSocket = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
                      ^
lib/Adafruit_CC3000/utility/sntp.cpp:528:31: error: 'SOCK_DGRAM' was not declared in this scope
  sntpSocket = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
                               ^
lib/Adafruit_CC3000/utility/sntp.cpp:528:43: error: 'IPPROTO_UDP' was not declared in this scope
  sntpSocket = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
                                           ^
lib/Adafruit_CC3000/utility/sntp.cpp:534:12: error: 'socketAddr' was not declared in this scope
    memset(&socketAddr, 0, sizeof(sockaddr_in));     //zero it
            ^
lib/Adafruit_CC3000/utility/sntp.cpp:538:41: error: 'htons' was not declared in this scope
    socketAddr.sin_port = htons(localPort);                     //well-known NTP port number, assigned by IANA
                                         ^
lib/Adafruit_CC3000/utility/sntp.cpp:540:42: error: 'sockaddr' was not declared in this scope
    portIsBound = (0 == bind(sntpSocket, (sockaddr*)&socketAddr, sizeof(sockaddr_in)));
                                          ^
lib/Adafruit_CC3000/utility/sntp.cpp:540:51: error: expected primary-expression before ')' token
    portIsBound = (0 == bind(sntpSocket, (sockaddr*)&socketAddr, sizeof(sockaddr_in)));
                                                   ^
lib/Adafruit_CC3000/utility/sntp.cpp:540:84: error: 'bind' was not declared in this scope
    portIsBound = (0 == bind(sntpSocket, (sockaddr*)&socketAddr, sizeof(sockaddr_in)));
                                                                                    ^
lib/Adafruit_CC3000/utility/sntp.cpp:579:60: error: 'htonl' was not declared in this scope
       uint32_t serverAddr = htonl(*(uint32_t*)pServerList++);
                                                            ^
lib/Adafruit_CC3000/utility/sntp.cpp:636:26: error: 'closesocket' was not declared in this scope
    closesocket(sntpSocket);
                          ^
lib/Adafruit_CC3000/utility/sntp.cpp:642:26: error: 'closesocket' was not declared in this scope
    closesocket(sntpSocket);
                          ^
.build/uno/Makefile:126: recipe for target '.build/uno/Adafruit_CC3000/utility/sntp.o' failed
make: *** [.build/uno/Adafruit_CC3000/utility/sntp.o] Error 1
Make failed with code 2

from arest.

prologic avatar prologic commented on June 28, 2024

Did d little digging around (not so good with C:?):

Discover the following changes to the Adafruit_CC3000 and CC3000_MDNS libraries got through the compilation.

prologic@daisy
Thu May 29 23:55:15
~/chickencoup/lib
$ hg -R Adafruit_CC3000 diff --pager=""
diff --git a/utility/sntp.h b/utility/sntp.h
--- a/utility/sntp.h
+++ b/utility/sntp.h
@@ -272,8 +272,8 @@
    #include "WProgram.h"
 #endif

-#include "utility/socket.h"
-#include "utility/netapp.h"
+#include "../utility/socket.h"
+#include "../utility/netapp.h"

 //#define CLOCK_DEBUG
 //#define CLOCK_DEEP_DEBUG

prologic@daisy
Thu May 29 23:55:24
~/chickencoup/lib
$ hg -R CC3000_MDNS diff --pager=""
diff --git a/CC3000_MDNS.h b/CC3000_MDNS.h
--- a/CC3000_MDNS.h
+++ b/CC3000_MDNS.h
@@ -43,8 +43,8 @@
 #ifndef CC3000_MDNS_H
 #define CC3000_MDNS_H

-#include "Adafruit_CC3000.h"
-#include "utility/socket.h"
+#include "../Adafruit_CC3000/Adafruit_CC3000.h"
+#include "../Adafruit_CC3000/utility/socket.h"

 class MDNSResponder {
 public:

But now linking fails with:

prologic@daisy
Thu May 29 23:53:53
~/chickencoup
$ ino clean && ino build
Searching for Board description file (boards.txt) ... /usr/share/arduino/hardware/arduino/boards.txt
Searching for Arduino lib version file (version.txt) ... /usr/share/arduino/lib/version.txt
Detecting Arduino software version ...  1.0.5 (1.0.5)
Searching for Arduino core library ... /usr/share/arduino/hardware/arduino/cores/arduino
Searching for Arduino standard libraries ... /usr/share/arduino/libraries
Searching for Arduino variants directory ... /usr/share/arduino/hardware/arduino/variants
Searching for make ... /usr/bin/make
Searching for avr-gcc ... /usr/bin/avr-gcc
Searching for avr-g++ ... /usr/bin/avr-g++
Searching for avr-ar ... /usr/bin/avr-ar
Searching for avr-objcopy ... /usr/bin/avr-objcopy
src/sketch.ino
Searching for Arduino lib version file (version.txt) ... /usr/share/arduino/lib/version.txt
Detecting Arduino software version ...  1.0.5 (1.0.5)
Scanning dependencies of src
Scanning dependencies of arduino
Scanning dependencies of Adafruit_MotorShield
Scanning dependencies of SPI
Scanning dependencies of aREST
Scanning dependencies of CC3000_MDNS
Scanning dependencies of Ethernet
Scanning dependencies of Wire
Scanning dependencies of Adafruit_CC3000
src/sketch.cpp
Adafruit_MotorShield/utility/Adafruit_PWMServoDriver.cpp
Adafruit_MotorShield/Adafruit_MotorShield.cpp
Linking libAdafruit_MotorShield.a
Linking libaREST.a
CC3000_MDNS/CC3000_MDNS.cpp
Linking libCC3000_MDNS.a
Ethernet/EthernetServer.cpp
Ethernet/Dhcp.cpp
Ethernet/Ethernet.cpp
Ethernet/Dns.cpp
Ethernet/utility/w5100.cpp
Ethernet/utility/socket.cpp
Ethernet/EthernetClient.cpp
Ethernet/EthernetUdp.cpp
Linking libEthernet.a
Wire/utility/twi.c
Wire/Wire.cpp
Linking libWire.a
Adafruit_CC3000/utility/evnt_handler.cpp
Adafruit_CC3000/utility/debug.cpp
Adafruit_CC3000/utility/cc3000_common.cpp
Adafruit_CC3000/utility/sntp.cpp
Adafruit_CC3000/utility/wlan.cpp
Adafruit_CC3000/utility/nvmem.cpp
Adafruit_CC3000/utility/security.cpp
Adafruit_CC3000/utility/hci.cpp
Adafruit_CC3000/utility/socket.cpp
Adafruit_CC3000/utility/netapp.cpp
Adafruit_CC3000/ccspi.cpp
Adafruit_CC3000/Adafruit_CC3000.cpp
Adafruit_CC3000/Adafruit_CC3000_Server.cpp
Linking libAdafruit_CC3000.a
SPI/SPI.cpp
Linking libSPI.a
arduino/wiring_analog.c
arduino/avr-libc/realloc.c
arduino/avr-libc/malloc.c
arduino/wiring.c
arduino/wiring_shift.c
arduino/wiring_pulse.c
arduino/wiring_digital.c
arduino/WInterrupts.c
arduino/HardwareSerial.cpp
arduino/Print.cpp
arduino/IPAddress.cpp
arduino/new.cpp
arduino/HID.cpp
arduino/Tone.cpp
arduino/USBCore.cpp
arduino/WMath.cpp
arduino/Stream.cpp
arduino/CDC.cpp
arduino/main.cpp
arduino/WString.cpp
Linking libarduino.a
Linking firmware.elf
.build/uno/src/sketch.o: In function `setup':
/home/prologic/chickencoup/src/sketch.ino:53: undefined reference to `__dso_handle'
/home/prologic/chickencoup/src/sketch.ino:88: undefined reference to `__dso_handle'
/home/prologic/chickencoup/src/sketch.ino:88: undefined reference to `__cxa_atexit'
/home/prologic/chickencoup/src/sketch.ino:88: undefined reference to `__dso_handle'
/home/prologic/chickencoup/src/sketch.ino:88: undefined reference to `__dso_handle'
/home/prologic/chickencoup/src/sketch.ino:88: undefined reference to `__cxa_atexit'
/usr/bin/avr-ld: .build/uno/firmware.elf: hidden symbol `__dso_handle' isn't defined
/usr/bin/avr-ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
.build/uno/Makefile:459: recipe for target '.build/uno/firmware.elf' failed
make: *** [.build/uno/firmware.elf] Error 1
Make failed with code 2

from arest.

prologic avatar prologic commented on June 28, 2024

Various versions of tools/dependencies:

$ prt-get listinst -v | egrep "(avr|arduino|rxtx|jdk)"
arduino 1.0.5-3
avr-binutils 2.24-1
avr-gcc 4.8.2-1
avr-libc 1.8.0-1
avrdude 5.11-3
java-rxtx 2.2pre2-2
jdk 1.7.0_55-1

from arest.

marcoschwartz avatar marcoschwartz commented on June 28, 2024

Hello,

Thanks for reporting this issue. I don't have much experience with Ino, but that's something I want to test to do automated build tests after each change in the library. Have you tried compiling the examples directly from the Arduino IDE ?

from arest.

prologic avatar prologic commented on June 28, 2024

No I haven't as such yet. I've gotten so used to
using Ino :) I'm a UNIX as an IDE kind of dveloper!

Anything I can do to help?

cheers
James

James Mills / prologic

E: [email protected]
W: prologic.shortcircuit.net.au

On Mon, Jun 2, 2014 at 10:34 PM, marcoschwartz [email protected]
wrote:

Hello,

Thanks for reporting this issue. I don't have much experience with Ino,
but that's something I want to test to do automated build tests after each
change in the library. Have you tried compiling the examples directly from
the Arduino IDE ?


Reply to this email directly or view it on GitHub
#1 (comment).

from arest.

marcoschwartz avatar marcoschwartz commented on June 28, 2024

Well the first step is that I'll test it with Ino myself after familiarising with the tool :) I'll get back to this issue then.

Cheers,
Marco

from arest.

prologic avatar prologic commented on June 28, 2024

So just an FYI. My sketch as per above compiles fine with the Arduino IDE and avr toolchain 4.8.2 (failed with 4.9.x). I'd still like to get this working properly with Ino :)

from arest.

marcoschwartz avatar marcoschwartz commented on June 28, 2024

Hello James,

Just made some tests with Ino & made it work (for the WiFi version). I had some initial compile errors however. These were the steps I took:

  • get the latest version of aREST (some changes were made recently to simplify the code)
  • create a new Ino repository and put the CC3000 library, the MDNS library and the aREST library in the lib folder.
  • put the sketch in the src folder
  • delete the robot_control library from my arduino libraries folder (I don't understand why, but Arduino was looking for this library ...)
  • ino clean
  • ino build

And it should work. Can't explain the robot control thing (maybe because I have Arduino 1.5 installed too), but it's possible to make it work with Ino. Hope that helps !

from arest.

prologic avatar prologic commented on June 28, 2024

I shall try this. Could you also comment on my code
https://gist.github.com/therealprologic/48dc9d8684b01c01d721 ?
I've had to change the hard coded define for NUMBER_FUNCTIONS to 4 here.

Will try out the latest code with Ino again :)
I find using the IDE painful at best ;P

Also another thing I've noticed is that sometimes
the aREST server gets stuck... Two things I've noticed:

  1. Sometimes the connection is not closed
  2. Sometimes a response is never recieved.

cheers
James

James Mills / prologic

E: [email protected]
W: prologic.shortcircuit.net.au

On Mon, Jun 9, 2014 at 10:02 PM, marcoschwartz [email protected]
wrote:

Hello James,

Just made some tests with Ino & made it work (for the WiFi version). I had
some initial compile errors however. These were the steps I took:

  • get the latest version of aREST (some changes were made recently to
    simplify the code)
  • create a new Ino repository and put the CC3000 library, the MDNS
    library and the aREST library in the lib folder.
  • put the sketch in the src folder
  • delete the robot_control library from my arduino libraries folder (I
    don't understand why, but Arduino was looking for this library ...)
  • ino clean
  • ino build

And it should work. Can't explain the robot control thing (maybe because I
have Arduino 1.5 installed too), but it's possible to make it work with
Ino. Hope that helps !


Reply to this email directly or view it on GitHub
#1 (comment).

from arest.

prologic avatar prologic commented on June 28, 2024

Was there anything else you did? See: http://codepad.org/DSCjxovm

I cannot get this compiled with Ino. Arduino IDe works fine.

Sektch here: http://codepad.org/cq6B5ERY

from arest.

marcoschwartz avatar marcoschwartz commented on June 28, 2024

I still have some issues to understand what Ino is doing, for example in your sketch why it is trying to access the sntp part of the library that you don't use ... I would suggest staying with the Arduino IDE for now :)

Can you tell me more about when the aREST library get stuck ? Only with WiFi ? I have a unit test to check that the API works, but I might include a longer test to see if it breaks at some point.

from arest.

prologic avatar prologic commented on June 28, 2024

Yeah let's keep this issue about the Ino issues :)

I'll file a separate Issue re stability/reliability.
(I have to do some more testing! -- At least my prototype works well enough
for now...)

cheers
James

James Mills / prologic

E: [email protected]
W: prologic.shortcircuit.net.au

On Tue, Jun 10, 2014 at 10:09 PM, marcoschwartz [email protected]
wrote:

I still have some issues to understand what Ino is doing, for example in
your sketch why it is trying to access the sntp part of the library that
you don't use ... I would suggest staying with the Arduino IDE for now :)

Can you tell me more about when the aREST library get stuck ? Only with
WiFi ? I have a unit test to check that the API works, but I might include
a longer test to see if it breaks at some point.


Reply to this email directly or view it on GitHub
#1 (comment).

from arest.

marcoschwartz avatar marcoschwartz commented on June 28, 2024

Any news on this one? I managed to compile using Ino by putting every required libraries inside the Ino folder. Let me know if I can close the issue :)

from arest.

prologic avatar prologic commented on June 28, 2024

Oh last time I tried it still failed to compiled with Ino
but works fine with the Arduino IDE. Let me try again...

James Mills / prologic

E: [email protected]
W: prologic.shortcircuit.net.au

On Wed, Jul 2, 2014 at 9:26 PM, marcoschwartz [email protected]
wrote:

Any news on this one? I managed to compile using Ino by putting every
required libraries inside the Ino folder. Let me know if I can close the
issue :)


Reply to this email directly or view it on GitHub
#1 (comment).

from arest.

prologic avatar prologic commented on June 28, 2024

I still end up with this compile error:

.build/uno/src/sketch.o: In function `setup':
/home/prologic/chickencoup/src/sketch.ino:72: undefined reference to `__dso_handle'
/home/prologic/chickencoup/src/sketch.ino:112: undefined reference to `__dso_handle'
/home/prologic/chickencoup/src/sketch.ino:112: undefined reference to `__cxa_atexit'
/usr/bin/avr-ld: .build/uno/firmware.elf: hidden symbol `__dso_handle' isn't defined
/usr/bin/avr-ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
.build/uno/Makefile:371: recipe for target '.build/uno/firmware.elf' failed
make: *** [.build/uno/firmware.elf] Error 1
Make failed with code 2

from arest.

prologic avatar prologic commented on June 28, 2024

For reference this is my sketch: http://codepad.org/3jkJv9ex

from arest.

nerdyscout avatar nerdyscout commented on June 28, 2024

Hi,

I just tried to use aREST straight in the Arduino IDE.
Unfortunately it will not compile at all, either the Serial, nor the Ethernet nor the CC3000 Version.
Any suggestions?

Ethernet

avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega644p -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=103 -I/usr/share/arduino/hardware/Microduino/cores/arduino -I/usr/share/arduino/hardware/Microduino/variants/plus -I/usr/share/arduino/libraries/SPI -I/usr/share/arduino/libraries/Ethernet -I/home/stefan/Projects/libraries/Arduino/libraries/arest /tmp/build6701088547090237851.tmp/Ethernet.cpp -o /tmp/build6701088547090237851.tmp/Ethernet.cpp.o 
In file included from /usr/share/arduino/libraries/Ethernet/Ethernet.h:6:0,
                 from Ethernet.ino:11:
/usr/share/arduino/hardware/Microduino/cores/arduino/IPAddress.h: In member function ‘IPAddress::operator uint32_t()’:
/usr/share/arduino/hardware/Microduino/cores/arduino/IPAddress.h:51:55: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
/usr/share/arduino/hardware/Microduino/cores/arduino/IPAddress.h: In member function ‘bool IPAddress::operator==(const IPAddress&)’:
/usr/share/arduino/hardware/Microduino/cores/arduino/IPAddress.h:52:75: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
/usr/share/arduino/hardware/Microduino/cores/arduino/IPAddress.h:52:108: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
In file included from Ethernet.ino:12:0:
/home/stefan/Projects/libraries/Arduino/libraries/arest/aREST.h: In constructor ‘aREST::aREST()’:
/home/stefan/Projects/libraries/Arduino/libraries/arest/aREST.h:80:13: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
/home/stefan/Projects/libraries/Arduino/libraries/arest/aREST.h: In member function ‘void aREST::handle_proto(T&, bool)’:
/home/stefan/Projects/libraries/Arduino/libraries/arest/aREST.h:268:18: warning: comparison with string literal results in unspecified behaviour [-Waddress]
/home/stefan/Projects/libraries/Arduino/libraries/arest/aREST.h:289:53: error: ‘class String’ has no member named ‘c_str’
/home/stefan/Projects/libraries/Arduino/libraries/arest/aREST.h:496:23: warning: comparison with string literal results in unspecified behaviour [-Waddress]
Ethernet.ino: In function ‘void setup()’:
Ethernet.ino:39:43: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
Ethernet.ino:40:37: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
Ethernet.ino:43:33: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
Ethernet.ino:46:20: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
Ethernet.ino:47:31: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
In file included from Ethernet.ino:12:0:
/home/stefan/Projects/libraries/Arduino/libraries/arest/aREST.h: In instantiation of ‘void aREST::handle_proto(T&, bool) [with T = EthernetClient]’:
/home/stefan/Projects/libraries/Arduino/libraries/arest/aREST.h:214:29:   required from here
/home/stefan/Projects/libraries/Arduino/libraries/arest/aREST.h:268:3: warning: comparison with string literal results in unspecified behaviour [-Waddress]
/home/stefan/Projects/libraries/Arduino/libraries/arest/aREST.h:496:8: warning: comparison with string literal results in unspecified behaviour [-Waddress]
/home/stefan/Projects/libraries/Arduino/libraries/arest/aREST.h: In instantiation of ‘void aREST::handle_proto(T&, bool) [with T = HardwareSerial]’:
/home/stefan/Projects/libraries/Arduino/libraries/arest/aREST.h:250:30:   required from here
/home/stefan/Projects/libraries/Arduino/libraries/arest/aREST.h:268:3: warning: comparison with string literal results in unspecified behaviour [-Waddress]
/home/stefan/Projects/libraries/Arduino/libraries/arest/aREST.h:496:8: warning: comparison with string literal results in unspecified behaviour [-Waddress]

Serial

avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega644p -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=103 -I/usr/share/arduino/hardware/Microduino/cores/arduino -I/usr/share/arduino/hardware/Microduino/variants/plus -I/usr/share/arduino/libraries/SPI -I/home/stefan/Projects/libraries/Arduino/libraries/arest /tmp/build6701088547090237851.tmp/Serial.cpp -o /tmp/build6701088547090237851.tmp/Serial.cpp.o 
In file included from Serial.ino:10:0:
/home/stefan/Projects/libraries/Arduino/libraries/arest/aREST.h: In constructor ‘aREST::aREST()’:
/home/stefan/Projects/libraries/Arduino/libraries/arest/aREST.h:80:13: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
/home/stefan/Projects/libraries/Arduino/libraries/arest/aREST.h: In member function ‘void aREST::handle_proto(T&, bool)’:
/home/stefan/Projects/libraries/Arduino/libraries/arest/aREST.h:268:18: warning: comparison with string literal results in unspecified behaviour [-Waddress]
/home/stefan/Projects/libraries/Arduino/libraries/arest/aREST.h:289:53: error: ‘class String’ has no member named ‘c_str’
/home/stefan/Projects/libraries/Arduino/libraries/arest/aREST.h:496:23: warning: comparison with string literal results in unspecified behaviour [-Waddress]
Serial.ino: In function ‘void setup()’:
Serial.ino:28:43: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
Serial.ino:29:37: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
Serial.ino:32:33: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
Serial.ino:35:20: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
Serial.ino:36:31: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
In file included from Serial.ino:10:0:
/home/stefan/Projects/libraries/Arduino/libraries/arest/aREST.h: In instantiation of ‘void aREST::handle_proto(T&, bool) [with T = HardwareSerial]’:
/home/stefan/Projects/libraries/Arduino/libraries/arest/aREST.h:250:30:   required from here
/home/stefan/Projects/libraries/Arduino/libraries/arest/aREST.h:268:3: warning: comparison with string literal results in unspecified behaviour [-Waddress]
/home/stefan/Projects/libraries/Arduino/libraries/arest/aREST.h:496:8: warning: comparison with string literal results in unspecified behaviour [-Waddress]

CC3000

avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega644p -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=103 -I/usr/share/arduino/hardware/Microduino/cores/arduino -I/usr/share/arduino/hardware/Microduino/variants/plus -I/home/stefan/Projects/libraries/Arduino/libraries/cc3000 -I/usr/share/arduino/libraries/SPI -I/home/stefan/Projects/libraries/Arduino/libraries/cc33000mdns -I/home/stefan/Projects/libraries/Arduino/libraries/arest /tmp/build6701088547090237851.tmp/WiFi_CC3000.cpp -o /tmp/build6701088547090237851.tmp/WiFi_CC3000.cpp.o 
In file included from /usr/share/arduino/hardware/Microduino/cores/arduino/Client.h:5:0,
                 from /home/stefan/Projects/libraries/Arduino/libraries/cc3000/Adafruit_CC3000.h:32,
                 from WiFi_CC3000.ino:9:
/usr/share/arduino/hardware/Microduino/cores/arduino/IPAddress.h: In member function ‘IPAddress::operator uint32_t()’:
/usr/share/arduino/hardware/Microduino/cores/arduino/IPAddress.h:51:55: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
/usr/share/arduino/hardware/Microduino/cores/arduino/IPAddress.h: In member function ‘bool IPAddress::operator==(const IPAddress&)’:
/usr/share/arduino/hardware/Microduino/cores/arduino/IPAddress.h:52:75: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
/usr/share/arduino/hardware/Microduino/cores/arduino/IPAddress.h:52:108: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
In file included from WiFi_CC3000.ino:12:0:
/home/stefan/Projects/libraries/Arduino/libraries/arest/aREST.h: In constructor ‘aREST::aREST()’:
/home/stefan/Projects/libraries/Arduino/libraries/arest/aREST.h:80:13: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
/home/stefan/Projects/libraries/Arduino/libraries/arest/aREST.h: In member function ‘void aREST::handle_proto(T&, bool)’:
/home/stefan/Projects/libraries/Arduino/libraries/arest/aREST.h:268:18: warning: comparison with string literal results in unspecified behaviour [-Waddress]
/home/stefan/Projects/libraries/Arduino/libraries/arest/aREST.h:289:53: error: ‘class String’ has no member named ‘c_str’
/home/stefan/Projects/libraries/Arduino/libraries/arest/aREST.h:496:23: warning: comparison with string literal results in unspecified behaviour [-Waddress]
WiFi_CC3000.ino: In function ‘void setup()’:
WiFi_CC3000.ino:52:43: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
WiFi_CC3000.ino:53:37: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
WiFi_CC3000.ino:56:33: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
WiFi_CC3000.ino:59:20: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
WiFi_CC3000.ino:60:29: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
In file included from WiFi_CC3000.ino:12:0:
/home/stefan/Projects/libraries/Arduino/libraries/arest/aREST.h: In instantiation of ‘void aREST::handle_proto(T&, bool) [with T = Adafruit_CC3000_ClientRef]’:
/home/stefan/Projects/libraries/Arduino/libraries/arest/aREST.h:139:29:   required from here
/home/stefan/Projects/libraries/Arduino/libraries/arest/aREST.h:268:3: warning: comparison with string literal results in unspecified behaviour [-Waddress]
/home/stefan/Projects/libraries/Arduino/libraries/arest/aREST.h:496:8: warning: comparison with string literal results in unspecified behaviour [-Waddress]
/home/stefan/Projects/libraries/Arduino/libraries/arest/aREST.h: In instantiation of ‘void aREST::handle_proto(T&, bool) [with T = HardwareSerial]’:
/home/stefan/Projects/libraries/Arduino/libraries/arest/aREST.h:250:30:   required from here
/home/stefan/Projects/libraries/Arduino/libraries/arest/aREST.h:268:3: warning: comparison with string literal results in unspecified behaviour [-Waddress]
/home/stefan/Projects/libraries/Arduino/libraries/arest/aREST.h:496:8: warning: comparison with string literal results in unspecified behaviour [-Waddress]

from arest.

marcoschwartz avatar marcoschwartz commented on June 28, 2024

What Arduino board are you using when trying to compile ? It seems to look into folders like:

/usr/share/arduino/hardware/Microduino/cores/arduino/IPAddress.h

from arest.

nerdyscout avatar nerdyscout commented on June 28, 2024

hi,
yes, this is the correct folder including alle the files (Arduino.h, IPAddress.h, etc).

I do use a Microduino-Core, assembled with an ATmega 328p@5V/16Mhz

Examples of other projects can be assembled with this setup, just this one fails allways. And looking to these logs I don't realy get a clou how to solve this... what is a shame as I am really interessted in using this lib in 2 other projects.

from arest.

nerdyscout avatar nerdyscout commented on June 28, 2024

so far I've used Arduino 1.0.3 as this is in the repsoitory of my linux distro.
After I upgraded now to 1.0.5 it does compile perfectly.

from arest.

marcoschwartz avatar marcoschwartz commented on June 28, 2024

Great to hear! Seems to be that there are some issues with 1.0.3. Can I close the issue ?

from arest.

nerdyscout avatar nerdyscout commented on June 28, 2024

in my point of view you may close this issue.

from arest.

larsskj avatar larsskj commented on June 28, 2024

I have exactly the same problem: Trying to compile the WiFi_CC3000 example. Arduino IDE upgraded to 1.0.6 - trying to compile for a Microduino Core with an Atmega328P/8M3,3. Compiles fine with Arduino Uno.

Regards,
Lars

Error message:

Arduino: 1.0.6 (Windows 7), Board: "Microduino Core (Atmega328P@8M,3.3V)"
C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=8000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=106 -IC:\Users\las\Documents\Arduino\hardware\Microduino\cores\arduino -IC:\Users\las\Documents\Arduino\hardware\Microduino\variants\standard -IC:\Users\las\Documents\Arduino\libraries\Microduino_CC3000 -IC:\Program Files (x86)\Arduino\libraries\SPI -IC:\Users\las\Documents\Arduino\libraries\Microduino_CC3000_MDNS -IC:\Users\las\Documents\Arduino\libraries\aREST C:\Users\las\AppData\Local\Temp\build7118237425657068009.tmp\WiFi_CC3000.cpp -o C:\Users\las\AppData\Local\Temp\build7118237425657068009.tmp\WiFi_CC3000.cpp.o 

In file included from WiFi_CC3000.ino:12:
C:\Users\las\Documents\Arduino\libraries\aREST/aREST.h: In constructor 'aREST::aREST()':
C:\Users\las\Documents\Arduino\libraries\aREST/aREST.h:78: warning: deprecated conversion from string constant to 'char*'
C:\Users\las\Documents\Arduino\libraries\aREST/aREST.h: In member function 'void aREST::send_http_headers(T&)':
C:\Users\las\Documents\Arduino\libraries\aREST/aREST.h:106: warning: only initialized variables can be placed into program memory area
C:\Users\las\Documents\Arduino\libraries\aREST/aREST.h: In member function 'void aREST::handle_proto(T&, bool)':
C:\Users\las\Documents\Arduino\libraries\aREST/aREST.h:257: warning: comparison with string literal results in unspecified behaviour
C:\Users\las\Documents\Arduino\libraries\aREST/aREST.h:277: error: 'class String' has no member named 'c_str'
C:\Users\las\Documents\Arduino\libraries\aREST/aREST.h:424: warning: comparison with string literal results in unspecified behaviour
C:\Users\las\Documents\Arduino\libraries\aREST/aREST.h:434: warning: only initialized variables can be placed into program memory area
C:\Users\las\Documents\Arduino\libraries\aREST/aREST.h:445: warning: only initialized variables can be placed into program memory area
C:\Users\las\Documents\Arduino\libraries\aREST/aREST.h:455: warning: only initialized variables can be placed into program memory area
C:\Users\las\Documents\Arduino\libraries\aREST/aREST.h:470: warning: only initialized variables can be placed into program memory area
C:\Users\las\Documents\Arduino\libraries\aREST/aREST.h:472: warning: only initialized variables can be placed into program memory area
C:\Users\las\Documents\Arduino\libraries\aREST/aREST.h:476: warning: only initialized variables can be placed into program memory area
C:\Users\las\Documents\Arduino\libraries\aREST/aREST.h:486: warning: only initialized variables can be placed into program memory area
C:\Users\las\Documents\Arduino\libraries\aREST/aREST.h:489: warning: only initialized variables can be placed into program memory area
C:\Users\las\Documents\Arduino\libraries\aREST/aREST.h:491: warning: only initialized variables can be placed into program memory area
C:\Users\las\Documents\Arduino\libraries\aREST/aREST.h:493: warning: only initialized variables can be placed into program memory area
C:\Users\las\Documents\Arduino\libraries\aREST/aREST.h:504: warning: only initialized variables can be placed into program memory area
C:\Users\las\Documents\Arduino\libraries\aREST/aREST.h:506: warning: only initialized variables can be placed into program memory area
C:\Users\las\Documents\Arduino\libraries\aREST/aREST.h:508: warning: only initialized variables can be placed into program memory area
C:\Users\las\Documents\Arduino\libraries\aREST/aREST.h:523: warning: only initialized variables can be placed into program memory area
C:\Users\las\Documents\Arduino\libraries\aREST/aREST.h:525: warning: only initialized variables can be placed into program memory area
C:\Users\las\Documents\Arduino\libraries\aREST/aREST.h:529: warning: only initialized variables can be placed into program memory area
C:\Users\las\Documents\Arduino\libraries\aREST/aREST.h:539: warning: only initialized variables can be placed into program memory area
C:\Users\las\Documents\Arduino\libraries\aREST/aREST.h:542: warning: only initialized variables can be placed into program memory area
C:\Users\las\Documents\Arduino\libraries\aREST/aREST.h:544: warning: only initialized variables can be placed into program memory area
C:\Users\las\Documents\Arduino\libraries\aREST/aREST.h:546: warning: only initialized variables can be placed into program memory area
C:\Users\las\Documents\Arduino\libraries\aREST/aREST.h:556: warning: only initialized variables can be placed into program memory area
C:\Users\las\Documents\Arduino\libraries\aREST/aREST.h:558: warning: only initialized variables can be placed into program memory area
C:\Users\las\Documents\Arduino\libraries\aREST/aREST.h:560: warning: only initialized variables can be placed into program memory area
C:\Users\las\Documents\Arduino\libraries\aREST/aREST.h:571: warning: only initialized variables can be placed into program memory area
C:\Users\las\Documents\Arduino\libraries\aREST/aREST.h:573: warning: only initialized variables can be placed into program memory area
C:\Users\las\Documents\Arduino\libraries\aREST/aREST.h:575: warning: only initialized variables can be placed into program memory area
C:\Users\las\Documents\Arduino\libraries\aREST/aREST.h:587: warning: only initialized variables can be placed into program memory area
C:\Users\las\Documents\Arduino\libraries\aREST/aREST.h:589: warning: only initialized variables can be placed into program memory area
C:\Users\las\Documents\Arduino\libraries\aREST/aREST.h:591: warning: only initialized variables can be placed into program memory area
C:\Users\las\Documents\Arduino\libraries\aREST/aREST.h:598: warning: only initialized variables can be placed into program memory area
C:\Users\las\Documents\Arduino\libraries\aREST/aREST.h:604: warning: only initialized variables can be placed into program memory area
C:\Users\las\Documents\Arduino\libraries\aREST/aREST.h:609: warning: only initialized variables can be placed into program memory area
C:\Users\las\Documents\Arduino\libraries\aREST/aREST.h:611: warning: only initialized variables can be placed into program memory area
C:\Users\las\Documents\Arduino\libraries\aREST/aREST.h:613: warning: only initialized variables can be placed into program memory area
C:\Users\las\Documents\Arduino\libraries\aREST/aREST.h:624: warning: only initialized variables can be placed into program memory area
C:\Users\las\Documents\Arduino\libraries\aREST/aREST.h: In member function 'void aREST::addToBuffer(char*)':
C:\Users\las\Documents\Arduino\libraries\aREST/aREST.h:671: warning: comparison between signed and unsigned integer expressions
C:\Users\las\Documents\Arduino\libraries\aREST/aREST.h: In member function 'void aREST::addToBuffer(const __FlashStringHelper*)':
C:\Users\las\Documents\Arduino\libraries\aREST/aREST.h:691: warning: '__progmem__' attribute ignored
WiFi_CC3000.ino: In function 'void setup()':
WiFi_CC3000.ino:52: warning: deprecated conversion from string constant to 'char*'
WiFi_CC3000.ino:53: warning: deprecated conversion from string constant to 'char*'
WiFi_CC3000.ino:56: warning: deprecated conversion from string constant to 'char*'
WiFi_CC3000.ino:59: warning: deprecated conversion from string constant to 'char*'
WiFi_CC3000.ino:60: warning: deprecated conversion from string constant to 'char*'
WiFi_CC3000.ino:88: warning: only initialized variables can be placed into program memory area
WiFi_CC3000.ino: In function 'bool displayConnectionDetails()':
WiFi_CC3000.ino:117: warning: only initialized variables can be placed into program memory area
WiFi_CC3000.ino:122: warning: only initialized variables can be placed into program memory area
WiFi_CC3000.ino:123: warning: only initialized variables can be placed into program memory area
WiFi_CC3000.ino:124: warning: only initialized variables can be placed into program memory area
WiFi_CC3000.ino:125: warning: only initialized variables can be placed into program memory area
WiFi_CC3000.ino:126: warning: only initialized variables can be placed into program memory area
C:\Users\las\Documents\Arduino\libraries\aREST/aREST.h: In member function 'void aREST::handle_proto(T&, bool) [with T = Adafruit_CC3000_ClientRef]':
C:\Users\las\Documents\Arduino\libraries\aREST/aREST.h:132:   instantiated from here
C:\Users\las\Documents\Arduino\libraries\aREST/aREST.h:257: warning: comparison with string literal results in unspecified behaviour
C:\Users\las\Documents\Arduino\libraries\aREST/aREST.h:424: warning: comparison with string literal results in unspecified behaviour
C:\Users\las\Documents\Arduino\libraries\aREST/aREST.h: In member function 'void aREST::handle_proto(T&, bool) [with T = HardwareSerial]':
C:\Users\las\Documents\Arduino\libraries\aREST/aREST.h:239:   instantiated from here
C:\Users\las\Documents\Arduino\libraries\aREST/aREST.h:257: warning: comparison with string literal results in unspecified behaviour
C:\Users\las\Documents\Arduino\libraries\aREST/aREST.h:424: warning: comparison with string literal results in unspecified behaviour

from arest.

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.