TrippyLighting / EthernetBonjour

Bonjour Library for Arduino & Teensyduino
53 stars 46 forks source link

Compilation never finishes on Teensyduino 1.23 / Arduino 1.6.4 #4

Closed benkuper closed 7 years ago

benkuper commented 9 years ago

Hello, i'm trying to get your library working, for now i'm stuck at trying to compile the RegisteringService example.

It doesn't seem to have compilation error but when i hit compile, it starts and then get stuck in the middle. With verbose compilation on, here is the log

Build options changed, rebuilding all
Using library SPI in folder: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SPI (1.0.x format)
Using library Ethernet in folder: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Ethernet (1.0.x format)
Using library EthernetBonjour in folder: D:\Documents\Arduino\libraries\EthernetBonjour (1.0.x format)

C:\Program Files (x86)\Arduino/hardware/tools/arm/bin/arm-none-eabi-g++ -c -O -g -Wall -ffunction-sections -fdata-sections -MMD -nostdlib -fno-exceptions -felide-constructors -std=gnu++0x -fno-rtti -mthumb -mcpu=cortex-m4 -D__MK20DX256__ -DTEENSYDUINO=123 -DARDUINO=10604 -DF_CPU=96000000 -DARDUINO_ARCH_AVR -DUSB_SERIAL -DLAYOUT_US_ENGLISH -IC:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3 -IC:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SPI -IC:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Ethernet -ID:\Documents\Arduino\libraries\EthernetBonjour C:\Users\Ben\AppData\Local\Temp\build9214198383973268655.tmp\RegisteringServices.cpp -o C:\Users\Ben\AppData\Local\Temp\build9214198383973268655.tmp\RegisteringServices.cpp.o 
C:\Program Files (x86)\Arduino/hardware/tools/arm/bin/arm-none-eabi-g++ -c -O -g -Wall -ffunction-sections -fdata-sections -MMD -nostdlib -fno-exceptions -felide-constructors -std=gnu++0x -fno-rtti -mthumb -mcpu=cortex-m4 -D__MK20DX256__ -DTEENSYDUINO=123 -DARDUINO=10604 -DF_CPU=96000000 -DARDUINO_ARCH_AVR -DUSB_SERIAL -DLAYOUT_US_ENGLISH -IC:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3 -IC:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SPI -IC:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Ethernet -ID:\Documents\Arduino\libraries\EthernetBonjour -IC:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SPI\utility C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SPI\SPI.cpp -o C:\Users\Ben\AppData\Local\Temp\build9214198383973268655.tmp\SPI\SPI.cpp.o 
C:\Program Files (x86)\Arduino/hardware/tools/arm/bin/arm-none-eabi-g++ -c -O -g -Wall -ffunction-sections -fdata-sections -MMD -nostdlib -fno-exceptions -felide-constructors -std=gnu++0x -fno-rtti -mthumb -mcpu=cortex-m4 -D__MK20DX256__ -DTEENSYDUINO=123 -DARDUINO=10604 -DF_CPU=96000000 -DARDUINO_ARCH_AVR -DUSB_SERIAL -DLAYOUT_US_ENGLISH -IC:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3 -IC:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SPI -IC:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Ethernet -ID:\Documents\Arduino\libraries\EthernetBonjour -IC:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Ethernet\utility C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Ethernet\Dhcp.cpp -o C:\Users\Ben\AppData\Local\Temp\build9214198383973268655.tmp\Ethernet\Dhcp.cpp.o 
C:\Program Files (x86)\Arduino/hardware/tools/arm/bin/arm-none-eabi-g++ -c -O -g -Wall -ffunction-sections -fdata-sections -MMD -nostdlib -fno-exceptions -felide-constructors -std=gnu++0x -fno-rtti -mthumb -mcpu=cortex-m4 -D__MK20DX256__ -DTEENSYDUINO=123 -DARDUINO=10604 -DF_CPU=96000000 -DARDUINO_ARCH_AVR -DUSB_SERIAL -DLAYOUT_US_ENGLISH -IC:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3 -IC:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SPI -IC:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Ethernet -ID:\Documents\Arduino\libraries\EthernetBonjour -IC:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Ethernet\utility C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Ethernet\Dns.cpp -o C:\Users\Ben\AppData\Local\Temp\build9214198383973268655.tmp\Ethernet\Dns.cpp.o 
C:\Program Files (x86)\Arduino/hardware/tools/arm/bin/arm-none-eabi-g++ -c -O -g -Wall -ffunction-sections -fdata-sections -MMD -nostdlib -fno-exceptions -felide-constructors -std=gnu++0x -fno-rtti -mthumb -mcpu=cortex-m4 -D__MK20DX256__ -DTEENSYDUINO=123 -DARDUINO=10604 -DF_CPU=96000000 -DARDUINO_ARCH_AVR -DUSB_SERIAL -DLAYOUT_US_ENGLISH -IC:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3 -IC:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SPI -IC:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Ethernet -ID:\Documents\Arduino\libraries\EthernetBonjour -IC:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Ethernet\utility C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Ethernet\Ethernet.cpp -o C:\Users\Ben\AppData\Local\Temp\build9214198383973268655.tmp\Ethernet\Ethernet.cpp.o 
C:\Program Files (x86)\Arduino/hardware/tools/arm/bin/arm-none-eabi-g++ -c -O -g -Wall -ffunction-sections -fdata-sections -MMD -nostdlib -fno-exceptions -felide-constructors -std=gnu++0x -fno-rtti -mthumb -mcpu=cortex-m4 -D__MK20DX256__ -DTEENSYDUINO=123 -DARDUINO=10604 -DF_CPU=96000000 -DARDUINO_ARCH_AVR -DUSB_SERIAL -DLAYOUT_US_ENGLISH -IC:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3 -IC:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SPI -IC:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Ethernet -ID:\Documents\Arduino\libraries\EthernetBonjour -IC:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Ethernet\utility C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Ethernet\EthernetClient.cpp -o C:\Users\Ben\AppData\Local\Temp\build9214198383973268655.tmp\Ethernet\EthernetClient.cpp.o 
C:\Program Files (x86)\Arduino/hardware/tools/arm/bin/arm-none-eabi-g++ -c -O -g -Wall -ffunction-sections -fdata-sections -MMD -nostdlib -fno-exceptions -felide-constructors -std=gnu++0x -fno-rtti -mthumb -mcpu=cortex-m4 -D__MK20DX256__ -DTEENSYDUINO=123 -DARDUINO=10604 -DF_CPU=96000000 -DARDUINO_ARCH_AVR -DUSB_SERIAL -DLAYOUT_US_ENGLISH -IC:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3 -IC:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SPI -IC:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Ethernet -ID:\Documents\Arduino\libraries\EthernetBonjour -IC:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Ethernet\utility C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Ethernet\EthernetServer.cpp -o C:\Users\Ben\AppData\Local\Temp\build9214198383973268655.tmp\Ethernet\EthernetServer.cpp.o 
C:\Program Files (x86)\Arduino/hardware/tools/arm/bin/arm-none-eabi-g++ -c -O -g -Wall -ffunction-sections -fdata-sections -MMD -nostdlib -fno-exceptions -felide-constructors -std=gnu++0x -fno-rtti -mthumb -mcpu=cortex-m4 -D__MK20DX256__ -DTEENSYDUINO=123 -DARDUINO=10604 -DF_CPU=96000000 -DARDUINO_ARCH_AVR -DUSB_SERIAL -DLAYOUT_US_ENGLISH -IC:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3 -IC:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SPI -IC:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Ethernet -ID:\Documents\Arduino\libraries\EthernetBonjour -IC:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Ethernet\utility C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Ethernet\EthernetUdp.cpp -o C:\Users\Ben\AppData\Local\Temp\build9214198383973268655.tmp\Ethernet\EthernetUdp.cpp.o 
C:\Program Files (x86)\Arduino/hardware/tools/arm/bin/arm-none-eabi-g++ -c -O -g -Wall -ffunction-sections -fdata-sections -MMD -nostdlib -fno-exceptions -felide-constructors -std=gnu++0x -fno-rtti -mthumb -mcpu=cortex-m4 -D__MK20DX256__ -DTEENSYDUINO=123 -DARDUINO=10604 -DF_CPU=96000000 -DARDUINO_ARCH_AVR -DUSB_SERIAL -DLAYOUT_US_ENGLISH -IC:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3 -IC:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SPI -IC:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Ethernet -ID:\Documents\Arduino\libraries\EthernetBonjour -IC:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Ethernet\utility C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Ethernet\utility\socket.cpp -o C:\Users\Ben\AppData\Local\Temp\build9214198383973268655.tmp\Ethernet\utility\socket.cpp.o 
C:\Program Files (x86)\Arduino/hardware/tools/arm/bin/arm-none-eabi-g++ -c -O -g -Wall -ffunction-sections -fdata-sections -MMD -nostdlib -fno-exceptions -felide-constructors -std=gnu++0x -fno-rtti -mthumb -mcpu=cortex-m4 -D__MK20DX256__ -DTEENSYDUINO=123 -DARDUINO=10604 -DF_CPU=96000000 -DARDUINO_ARCH_AVR -DUSB_SERIAL -DLAYOUT_US_ENGLISH -IC:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3 -IC:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SPI -IC:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Ethernet -ID:\Documents\Arduino\libraries\EthernetBonjour -IC:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Ethernet\utility C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Ethernet\utility\w5100.cpp -o C:\Users\Ben\AppData\Local\Temp\build9214198383973268655.tmp\Ethernet\utility\w5100.cpp.o 
C:\Program Files (x86)\Arduino/hardware/tools/arm/bin/arm-none-eabi-g++ -c -O -g -Wall -ffunction-sections -fdata-sections -MMD -nostdlib -fno-exceptions -felide-constructors -std=gnu++0x -fno-rtti -mthumb -mcpu=cortex-m4 -D__MK20DX256__ -DTEENSYDUINO=123 -DARDUINO=10604 -DF_CPU=96000000 -DARDUINO_ARCH_AVR -DUSB_SERIAL -DLAYOUT_US_ENGLISH -IC:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3 -IC:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SPI -IC:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Ethernet -ID:\Documents\Arduino\libraries\EthernetBonjour -ID:\Documents\Arduino\libraries\EthernetBonjour\utility D:\Documents\Arduino\libraries\EthernetBonjour\EthernetBonjour.cpp -o C:\Users\Ben\AppData\Local\Temp\build9214198383973268655.tmp\EthernetBonjour\EthernetBonjour.cpp.o 

when reaching this last line, it stays here forever (compiling for teensy 3.1). I've successfully compiled sketches using Ethernet and EthernetUdp, only the EthernetBonjour seems to get it stuck.

Any idea ?

Thanks

TrippyLighting commented 9 years ago

Hi Ben,

Could you try to compile with either Arduino 1.6.3 or 1.6.6 ? 1.6.4 had some issues and stalled compilations for some people was amongs those.

Also, I hope you are aware that you need to make slight modifications to the EthernetUDP.cpp and EthernetUDP.h files of the current Ethernet library. If you're not aware of it, please let me know and I'll explains the details.

benkuper commented 9 years ago

thanks for the answers, i read at various places that modifications where sometimes necessary but i thought that it was meant for previous versions. Can you explain it or give a link to that ? (or maybe attach the modified EthernetUdp.h and EhternetUdp.cpp files) Also, i saw that it's using the teensy's EthernetUdp library, not the original arduino one, i don't know what is different between them, but as you tested mainly on teensy, i assume you know which file to modify :)

Indeed, with Arduino 1.6.5 r2 (1.6.6 is not out yet, is it ?) and teensyduino 1.24, i got those compile error :

In file included from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Ethernet/Dhcp.h:7:0,
from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Ethernet/Ethernet.h:9,
from D:\Documents\Arduino\libraries\EthernetBonjour\EthernetBonjour.cpp:27:
C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Ethernet/EthernetUdp.h: In constructor 'EthernetBonjourClass::EthernetBonjourClass()':
C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Ethernet/EthernetUdp.h:46:11: error: 'uint8_t EthernetUDP::_sock' is private
uint8_t _sock;  // socket ID for Wiz5100
^
D:\Documents\Arduino\libraries\EthernetBonjour\EthernetBonjour.cpp:120:10: error: within this context
this->_sock = -1;
^
D:\Documents\Arduino\libraries\EthernetBonjour\EthernetBonjour.cpp: In member function 'MDNSError_t EthernetBonjourClass::_sendMDNSMessage(uint32_t, uint32_t, int, int)':
D:\Documents\Arduino\libraries\EthernetBonjour\EthernetBonjour.cpp:489:1: warning: label 'errorReturn' defined but not used [-Wunused-label]
errorReturn:
^
In file included from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Ethernet/Dhcp.h:7:0,
from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Ethernet/Ethernet.h:9,
from D:\Documents\Arduino\libraries\EthernetBonjour\EthernetBonjour.cpp:27:
C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Ethernet/EthernetUdp.h: In member function 'MDNSError_t EthernetBonjourClass::_processMDNSQuery()':
C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Ethernet/EthernetUdp.h:49:12: error: 'uint16_t EthernetUDP::_remotePort' is private
uint16_t _remotePort; // remote port for the incoming packet whilst it's being processed
^
D:\Documents\Arduino\libraries\EthernetBonjour\EthernetBonjour.cpp:554:34: error: within this context
MDNS_SERVER_PORT == this->_remotePort)
^
D:\Documents\Arduino\libraries\EthernetBonjour\EthernetBonjour.cpp:620:48: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
ir = (tr > sizeof(DNSHeader_t)) ? sizeof(DNSHeader_t) : tr;
^
In file included from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Ethernet/Dhcp.h:7:0,
from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Ethernet/Ethernet.h:9,
from D:\Documents\Arduino\libraries\EthernetBonjour\EthernetBonjour.cpp:27:
C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Ethernet/EthernetUdp.h:49:12: error: 'uint16_t EthernetUDP::_remotePort' is private
uint16_t _remotePort; // remote port for the incoming packet whilst it's being processed
^
D:\Documents\Arduino\libraries\EthernetBonjour\EthernetBonjour.cpp:667:35: error: within this context
MDNS_SERVER_PORT == _remotePort &&
^
D:\Documents\Arduino\libraries\EthernetBonjour\EthernetBonjour.cpp:762:54: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
ir = (tr > sizeof(DNSHeader_t)) ? sizeof(DNSHeader_t) : tr;
^
D:\Documents\Arduino\libraries\EthernetBonjour\EthernetBonjour.cpp:855:54: warning: value computed is not used [-Wunused-value]
ptrName[buf[0]]; // this catches uncompressed names
^
D:\Documents\Arduino\libraries\EthernetBonjour\EthernetBonjour.cpp:855:54: warning: statement has no effect [-Wunused-value]
In file included from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Ethernet/Dhcp.h:7:0,
from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Ethernet/Ethernet.h:9,
from D:\Documents\Arduino\libraries\EthernetBonjour\EthernetBonjour.cpp:27:
C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Ethernet/EthernetUdp.h:48:13: error: 'IPAddress EthernetUDP::_remoteIP' is private
IPAddress _remoteIP; // remote IP address for the incoming packet whilst it's being processed
^
D:\Documents\Arduino\libraries\EthernetBonjour\EthernetBonjour.cpp:1026:48: error: within this context
(void)this->_sendMDNSMessage(this->_remoteIP, xid, (int)MDNSPacketTypeMyIPAnswer, 0);
^
In file included from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Ethernet/Dhcp.h:7:0,
from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Ethernet/Ethernet.h:9,
from D:\Documents\Arduino\libraries\EthernetBonjour\EthernetBonjour.cpp:27:
C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Ethernet/EthernetUdp.h:48:13: error: 'IPAddress EthernetUDP::_remoteIP' is private
IPAddress _remoteIP; // remote IP address for the incoming packet whilst it's being processed
^
D:\Documents\Arduino\libraries\EthernetBonjour\EthernetBonjour.cpp:1032:48: error: within this context
(void)this->_sendMDNSMessage(this->_remoteIP, xid, (int)MDNSPacketTypeServiceRecord, j-2);
^
In file included from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Ethernet/Dhcp.h:7:0,
from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Ethernet/Ethernet.h:9,
from D:\Documents\Arduino\libraries\EthernetBonjour\EthernetBonjour.cpp:27:
C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Ethernet/EthernetUdp.h:48:13: error: 'IPAddress EthernetUDP::_remoteIP' is private
IPAddress _remoteIP; // remote IP address for the incoming packet whilst it's being processed
^
D:\Documents\Arduino\libraries\EthernetBonjour\EthernetBonjour.cpp:1038:42: error: within this context
(void)this->_sendMDNSMessage(this->_remoteIP, xid, (int)MDNSPacketTypeNoIPv6AddrAvailable, 0);
^
Error compiling.
benkuper commented 9 years ago

I looked at the other issues and made the necessary changes to EthernetUdp.h / cpp and EthernetBonjour.h / cpp It now compiles fine, thanks !!