audiovibe / openzwave-control-panel

Automatically exported from code.google.com/p/openzwave-control-panel
0 stars 0 forks source link

Unable to compile under ubuntu 11.04 and openzwave 312 #1

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I am trying to compile under ubuntu 11.04 and get the following error:

jaime@jaime-AO532h:~/openzwave-control-panel-read-only$ make
g++ -c -Wall -Wno-format -g -DDEBUG -Werror -I ../open-zwave/cpp/src -I 
../open-zwave/cpp/src/command_classes/ -I ../open-zwave/cpp/src/value_classes/ 
-I ../open-zwave/cpp/src/platform/ -I ../open-zwave/cpp/src/platform/unix -I 
../open-zwave/cpp/tinyxml/ -I ../libmicrohttpd/src/include -o webserver.o 
webserver.cpp
webserver.cpp: In function ‘int web_send_file(MHD_Connection*, const char*, 
int, bool)’:
webserver.cpp:174:23: error: invalid conversion from ‘ssize_t (*)(void*, 
uint64_t, char*, size_t)’ to ‘int (*)(void*, uint64_t, char*, int)’
webserver.cpp:174:23: error:   initializing argument 3 of ‘MHD_Response* 
MHD_create_response_from_callback(uint64_t, size_t, int (*)(void*, uint64_t, 
char*, int), void*, void (*)(void*))’
make: *** [webserver.o] Error 1

Original issue reported on code.google.com by ja...@iguana-farm.com on 23 Aug 2011 at 9:09

GoogleCodeExporter commented 8 years ago
I got a similar error under Ubuntu 11.10:

sethg@iochroma:~/openzwave-control-panel-read-only$ make
g++ -c -Wall -Wno-format -g -DDEBUG -Werror -I ../open-zwave/cpp/src -I 
../open-zwave/cpp/src/command_classes/ -I ../open-zwave/cpp/src/value_classes/ 
-I ../open-zwave/cpp/src/platform/ -I ../open-zwave/cpp/src/platform/unix -I 
../open-zwave/cpp/tinyxml/ -I ../libmicrohttpd/src/include -o ozwcp.o ozwcp.cpp
g++ -c -Wall -Wno-format -g -DDEBUG -Werror -I ../open-zwave/cpp/src -I 
../open-zwave/cpp/src/command_classes/ -I ../open-zwave/cpp/src/value_classes/ 
-I ../open-zwave/cpp/src/platform/ -I ../open-zwave/cpp/src/platform/unix -I 
../open-zwave/cpp/tinyxml/ -I ../libmicrohttpd/src/include -o webserver.o 
webserver.cpp
webserver.cpp: In function ‘int web_send_file(MHD_Connection*, const char*, 
int, bool)’:
webserver.cpp:174:23: error: invalid conversion from ‘ssize_t (*)(void*, 
uint64_t, char*, size_t) {aka int (*)(void*, long long unsigned int, char*, 
unsigned int)}’ to ‘MHD_ContentReaderCallback {aka int (*)(void*, long long 
unsigned int, char*, int)}’ [-fpermissive]
/usr/include/microhttpd.h:1085:22: error:   initializing argument 3 of 
‘MHD_Response* MHD_create_response_from_callback(uint64_t, size_t, 
MHD_ContentReaderCallback, void*, MHD_ContentReaderFreeCallback)’ 
[-fpermissive]
make: *** [webserver.o] Error 1
sethg@iochroma:~/openzwave-control-panel-read-only$ uname -a
Linux iochroma 3.0.0-12-generic-pae #20-Ubuntu SMP Fri Oct 7 16:37:17 UTC 2011 
i686 athlon i386 GNU/Linux

Original comment by sethgatr...@gmail.com on 23 Nov 2011 at 3:50

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
I got the same problem on Debian Squeeze. I installed the libmicrohttpd using
apt-get install libmicrohttpd-dev

Seems the package contain a old version with old declaration in .h file (0.4.6 
of the library)

I downloaded the latest from (0.9.19) from ftp://ftp.gnu.org/gnu/libmicrohttpd/
Then unzip untar and the folder and go into it then
./configure
make
make install

then go into the openzwave-control-panel folder
I needed to edit the makefile, replacing the line 
LIBMICROHTTPD := ../libmicrohttpd/src/daemon/.libs/libmicrohttpd.a
by 
LIBMICROHTTPD := /usr/local/lib/libmicrohttpd.a

On my debian, this is where the lib is located

I could also get it working changing the line 
LIBMICROHTTPD := ../libmicrohttpd/src/daemon/.libs/libmicrohttpd.a
by
LIBMICROHTTPD := ~/libmicrohttpd-0.9.19/src/daemon/.libs/libmicrohttpd.a

Hope this help

file size ozwcp is about 5.6MB

Original comment by ch.hall...@gmail.com on 15 May 2012 at 10:01

GoogleCodeExporter commented 8 years ago
I had this problem and getting the latest microhttpd lib was the solution. On 
Ubuntu 12.04, OZW 527:

Change to your base OZW directory (the directory where ozw and 
ozw-control-panel reside), then:

wget ftp://ftp.gnu.org/gnu/libmicrohttpd/libmicrohttpd-0.9.20.tar.gz
tar xf libmicrohttpd-0.9.20.tar.gz
#change dir name so Makefile can find it
mv libmicrohttpd-0.9.20 libmicrohttpd
cd libmicrohttpd
./configure
make

#optional
sudo make install

Then try and rebuild the ozw-control-panel.

Original comment by nearw...@gmail.com on 8 Jun 2012 at 7:55

GoogleCodeExporter commented 8 years ago
Also, apparently not changing the Makefile for ozw-control-panel where it says:

# for Linux uncomment out next two lines
#LIBZWAVE := $(wildcard $(OPENZWAVE)/cpp/lib/linux/*.a)
#LIBUSB := -ludev

to:

# for Linux uncomment out next two lines
LIBZWAVE := $(wildcard $(OPENZWAVE)/cpp/lib/linux/*.a)
LIBUSB := -ludev

Can cause this, among other issues with TinyXML.

Original comment by nearw...@gmail.com on 8 Jun 2012 at 8:01

GoogleCodeExporter commented 8 years ago
Seems like this issue has been resolved.

Original comment by glsatz on 4 Dec 2012 at 11:22