• 10 dec 2017: forum version update. In case of issues use this topic.
  • 30 nov 2017: pilight moved servers. In case of issues use this topic.
Hello There, Guest! Login Register


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Compilation errors
#1
Hi, I wanted to give the unittests another shot, and tried to compile the latest head from the rewrite branch. I'm getting this compilation error:

Code:
martin@linux-4ih5:~/git/pilight/rewrite>  make -j1
[  0%] Building C object CMakeFiles/pilight.dir/libs/mbedtls/version.c.o
[  1%] Building C object CMakeFiles/pilight.dir/libs/mbedtls/x509_crt.c.o
[  1%] Building C object CMakeFiles/pilight.dir/libs/mbedtls/entropy_poll.c.o
[  1%] Building C object CMakeFiles/pilight.dir/libs/mbedtls/ssl_cli.c.o
[  2%] Building C object CMakeFiles/pilight.dir/libs/mbedtls/arc4.c.o
[  2%] Building C object CMakeFiles/pilight.dir/libs/mbedtls/net.c.o
[  2%] Building C object CMakeFiles/pilight.dir/libs/mbedtls/ripemd160.c.o
[  2%] Building C object CMakeFiles/pilight.dir/libs/mbedtls/dhm.c.o
[  3%] Building C object CMakeFiles/pilight.dir/libs/mbedtls/ssl_ciphersuites.c.o
[  3%] Building C object CMakeFiles/pilight.dir/libs/mbedtls/blowfish.c.o
[  3%] Building C object CMakeFiles/pilight.dir/libs/mbedtls/ecdsa.c.o
[  4%] Building C object CMakeFiles/pilight.dir/libs/mbedtls/asn1parse.c.o
[  4%] Building C object CMakeFiles/pilight.dir/libs/mbedtls/md.c.o
[  4%] Building C object CMakeFiles/pilight.dir/libs/mbedtls/rsa.c.o
[  5%] Building C object CMakeFiles/pilight.dir/libs/mbedtls/ssl_ticket.c.o
[  5%] Building C object CMakeFiles/pilight.dir/libs/mbedtls/timing.c.o
[  5%] Building C object CMakeFiles/pilight.dir/libs/mbedtls/platform.c.o
[  5%] Building C object CMakeFiles/pilight.dir/libs/mbedtls/error.c.o
[  6%] Building C object CMakeFiles/pilight.dir/libs/mbedtls/ecdh.c.o
[  6%] Building C object CMakeFiles/pilight.dir/libs/mbedtls/aes.c.o
[  6%] Building C object CMakeFiles/pilight.dir/libs/mbedtls/padlock.c.o
[  7%] Building C object CMakeFiles/pilight.dir/libs/mbedtls/md_wrap.c.o
[  7%] Building C object CMakeFiles/pilight.dir/libs/mbedtls/memory_buffer_alloc.c.o
[  7%] Building C object CMakeFiles/pilight.dir/libs/mbedtls/sha512.c.o
[  7%] Building C object CMakeFiles/pilight.dir/libs/mbedtls/ssl_cookie.c.o
[  8%] Building C object CMakeFiles/pilight.dir/libs/mbedtls/gcm.c.o
[  8%] Building C object CMakeFiles/pilight.dir/libs/mbedtls/cipher.c.o
[  8%] Building C object CMakeFiles/pilight.dir/libs/mbedtls/md4.c.o
[  9%] Building C object CMakeFiles/pilight.dir/libs/mbedtls/sha256.c.o
[  9%] Building C object CMakeFiles/pilight.dir/libs/mbedtls/pkcs11.c.o
[  9%] Building C object CMakeFiles/pilight.dir/libs/mbedtls/ctr_drbg.c.o
[ 10%] Building C object CMakeFiles/pilight.dir/libs/mbedtls/threading.c.o
[ 10%] Building C object CMakeFiles/pilight.dir/libs/mbedtls/asn1write.c.o
[ 10%] Building C object CMakeFiles/pilight.dir/libs/mbedtls/havege.c.o
[ 10%] Building C object CMakeFiles/pilight.dir/libs/mbedtls/ssl_srv.c.o
[ 11%] Building C object CMakeFiles/pilight.dir/libs/mbedtls/pkcs5.c.o
[ 11%] Building C object CMakeFiles/pilight.dir/libs/mbedtls/oid.c.o
[ 11%] Building C object CMakeFiles/pilight.dir/libs/mbedtls/ssl_tls.c.o
[ 12%] Building C object CMakeFiles/pilight.dir/libs/mbedtls/pem.c.o
[ 12%] Building C object CMakeFiles/pilight.dir/libs/mbedtls/x509_create.c.o
[ 12%] Building C object CMakeFiles/pilight.dir/libs/mbedtls/version_features.c.o
[ 12%] Building C object CMakeFiles/pilight.dir/libs/mbedtls/x509_csr.c.o
[ 13%] Building C object CMakeFiles/pilight.dir/libs/mbedtls/hmac_drbg.c.o
[ 13%] Building C object CMakeFiles/pilight.dir/libs/mbedtls/ccm.c.o
[ 13%] Building C object CMakeFiles/pilight.dir/libs/mbedtls/pkparse.c.o
[ 14%] Building C object CMakeFiles/pilight.dir/libs/mbedtls/cipher_wrap.c.o
[ 14%] Building C object CMakeFiles/pilight.dir/libs/mbedtls/camellia.c.o
[ 14%] Building C object CMakeFiles/pilight.dir/libs/mbedtls/ecp.c.o
[ 15%] Building C object CMakeFiles/pilight.dir/libs/mbedtls/ecp_curves.c.o
[ 15%] Building C object CMakeFiles/pilight.dir/libs/mbedtls/pkwrite.c.o
[ 15%] Building C object CMakeFiles/pilight.dir/libs/mbedtls/x509write_csr.c.o
[ 15%] Building C object CMakeFiles/pilight.dir/libs/mbedtls/pkcs12.c.o
[ 16%] Building C object CMakeFiles/pilight.dir/libs/mbedtls/md2.c.o
[ 16%] Building C object CMakeFiles/pilight.dir/libs/mbedtls/xtea.c.o
[ 16%] Building C object CMakeFiles/pilight.dir/libs/mbedtls/pk.c.o
[ 17%] Building C object CMakeFiles/pilight.dir/libs/mbedtls/certs.c.o
[ 17%] Building C object CMakeFiles/pilight.dir/libs/mbedtls/pk_wrap.c.o
[ 17%] Building C object CMakeFiles/pilight.dir/libs/mbedtls/ecjpake.c.o
[ 17%] Building C object CMakeFiles/pilight.dir/libs/mbedtls/aesni.c.o
[ 18%] Building C object CMakeFiles/pilight.dir/libs/mbedtls/des.c.o
[ 18%] Building C object CMakeFiles/pilight.dir/libs/mbedtls/x509_crl.c.o
[ 18%] Building C object CMakeFiles/pilight.dir/libs/mbedtls/debug.c.o
[ 19%] Building C object CMakeFiles/pilight.dir/libs/mbedtls/md5.c.o
[ 19%] Building C object CMakeFiles/pilight.dir/libs/mbedtls/x509write_crt.c.o
[ 19%] Building C object CMakeFiles/pilight.dir/libs/mbedtls/base64.c.o
[ 20%] Building C object CMakeFiles/pilight.dir/libs/mbedtls/bignum.c.o
[ 20%] Building C object CMakeFiles/pilight.dir/libs/mbedtls/entropy.c.o
[ 20%] Building C object CMakeFiles/pilight.dir/libs/mbedtls/ssl_cache.c.o
[ 20%] Building C object CMakeFiles/pilight.dir/libs/mbedtls/x509.c.o
[ 21%] Building C object CMakeFiles/pilight.dir/libs/mbedtls/sha1.c.o
[ 21%] Building C object CMakeFiles/pilight.dir/libs/wiringx/soc/amlogic/s905.c.o
[ 21%] Building C object CMakeFiles/pilight.dir/libs/wiringx/soc/amlogic/s805.c.o
[ 22%] Building C object CMakeFiles/pilight.dir/libs/wiringx/soc/allwinner/a10.c.o
[ 22%] Building C object CMakeFiles/pilight.dir/libs/wiringx/soc/allwinner/a31s.c.o
[ 22%] Building C object CMakeFiles/pilight.dir/libs/wiringx/soc/samsung/exynos5422.c.o
[ 22%] Building C object CMakeFiles/pilight.dir/libs/wiringx/soc/broadcom/2835.c.o
[ 23%] Building C object CMakeFiles/pilight.dir/libs/wiringx/soc/broadcom/2836.c.o
[ 23%] Building C object CMakeFiles/pilight.dir/libs/wiringx/soc/soc.c.o
[ 23%] Building C object CMakeFiles/pilight.dir/libs/wiringx/soc/nxp/imx6sdlrm.c.o
[ 24%] Building C object CMakeFiles/pilight.dir/libs/wiringx/soc/nxp/imx6dqrm.c.o
[ 24%] Building C object CMakeFiles/pilight.dir/libs/wiringx/wiringX.c.o
In file included from /home/martin/git/pilight/rewrite/libs/wiringx/wiringX.c:26:0:
/home/martin/git/pilight/rewrite/libs/wiringx/i2c-dev.h:36:14: warning: inline function ‘i2c_smbus_write_word_data’ declared but never defined [enabled by default]
inline __s32 i2c_smbus_write_word_data(int fd, int cmd, __u16 value);
              ^
/home/martin/git/pilight/rewrite/libs/wiringx/i2c-dev.h:35:14: warning: inline function ‘i2c_smbus_read_word_data’ declared but never defined [enabled by default]
inline __s32 i2c_smbus_read_word_data(int fd, int cmd);
              ^
/home/martin/git/pilight/rewrite/libs/wiringx/i2c-dev.h:34:14: warning: inline function ‘i2c_smbus_write_byte_data’ declared but never defined [enabled by default]
inline __s32 i2c_smbus_write_byte_data(int fd, int cmd, int value);
              ^
/home/martin/git/pilight/rewrite/libs/wiringx/i2c-dev.h:33:14: warning: inline function ‘i2c_smbus_read_byte_data’ declared but never defined [enabled by default]
inline __s32 i2c_smbus_read_byte_data(int fd, int cmd);
              ^
/home/martin/git/pilight/rewrite/libs/wiringx/i2c-dev.h:32:14: warning: inline function ‘i2c_smbus_write_byte’ declared but never defined [enabled by default]
inline __s32 i2c_smbus_write_byte(int fd, int value);
              ^
/home/martin/git/pilight/rewrite/libs/wiringx/i2c-dev.h:31:14: warning: inline function ‘i2c_smbus_read_byte’ declared but never defined [enabled by default]
inline __s32 i2c_smbus_read_byte(int fd);
              ^
/home/martin/git/pilight/rewrite/libs/wiringx/i2c-dev.h:30:14: warning: inline function ‘i2c_smbus_access’ declared but never defined [enabled by default]
inline __s32 i2c_smbus_access(int fd, char rw, int cmd, int size, union i2c_smbus_data *data);
              ^
/home/martin/git/pilight/rewrite/libs/wiringx/i2c-dev.h:36:14: warning: inline function ‘i2c_smbus_write_word_data’ declared but never defined [enabled by default]
inline __s32 i2c_smbus_write_word_data(int fd, int cmd, __u16 value);
              ^
/home/martin/git/pilight/rewrite/libs/wiringx/i2c-dev.h:35:14: warning: inline function ‘i2c_smbus_read_word_data’ declared but never defined [enabled by default]
inline __s32 i2c_smbus_read_word_data(int fd, int cmd);
              ^
/home/martin/git/pilight/rewrite/libs/wiringx/i2c-dev.h:34:14: warning: inline function ‘i2c_smbus_write_byte_data’ declared but never defined [enabled by default]
inline __s32 i2c_smbus_write_byte_data(int fd, int cmd, int value);
              ^
/home/martin/git/pilight/rewrite/libs/wiringx/i2c-dev.h:33:14: warning: inline function ‘i2c_smbus_read_byte_data’ declared but never defined [enabled by default]
inline __s32 i2c_smbus_read_byte_data(int fd, int cmd);
              ^
/home/martin/git/pilight/rewrite/libs/wiringx/i2c-dev.h:32:14: warning: inline function ‘i2c_smbus_write_byte’ declared but never defined [enabled by default]
inline __s32 i2c_smbus_write_byte(int fd, int value);
              ^
/home/martin/git/pilight/rewrite/libs/wiringx/i2c-dev.h:31:14: warning: inline function ‘i2c_smbus_read_byte’ declared but never defined [enabled by default]
inline __s32 i2c_smbus_read_byte(int fd);
              ^
/home/martin/git/pilight/rewrite/libs/wiringx/i2c-dev.h:30:14: warning: inline function ‘i2c_smbus_access’ declared but never defined [enabled by default]
inline __s32 i2c_smbus_access(int fd, char rw, int cmd, int size, union i2c_smbus_data *data);
              ^
[ 24%] Building C object CMakeFiles/pilight.dir/libs/wiringx/i2c-dev.c.o
[ 25%] Building C object CMakeFiles/pilight.dir/libs/wiringx/platform/linksprite/pcduino1.c.o
[ 25%] Building C object CMakeFiles/pilight.dir/libs/wiringx/platform/platform.c.o
[ 25%] Building C object CMakeFiles/pilight.dir/libs/wiringx/platform/hardkernel/odroidc1.c.o
[ 25%] Building C object CMakeFiles/pilight.dir/libs/wiringx/platform/hardkernel/odroidc2.c.o
[ 26%] Building C object CMakeFiles/pilight.dir/libs/wiringx/platform/hardkernel/odroidxu4.c.o
[ 26%] Building C object CMakeFiles/pilight.dir/libs/wiringx/platform/raspberrypi/raspberrypi1b2.c.o
[ 26%] Building C object CMakeFiles/pilight.dir/libs/wiringx/platform/raspberrypi/raspberrypi3.c.o
[ 27%] Building C object CMakeFiles/pilight.dir/libs/wiringx/platform/raspberrypi/raspberrypi1b1.c.o
[ 27%] Building C object CMakeFiles/pilight.dir/libs/wiringx/platform/raspberrypi/raspberrypi1b+.c.o
[ 27%] Building C object CMakeFiles/pilight.dir/libs/wiringx/platform/raspberrypi/raspberrypi2.c.o
[ 27%] Building C object CMakeFiles/pilight.dir/libs/wiringx/platform/lemaker/bananapim2.c.o
[ 28%] Building C object CMakeFiles/pilight.dir/libs/wiringx/platform/lemaker/bananapi1.c.o
[ 28%] Building C object CMakeFiles/pilight.dir/libs/wiringx/platform/solidrun/hummingboard_base_pro_dq.c.o
[ 28%] Building C object CMakeFiles/pilight.dir/libs/wiringx/platform/solidrun/hummingboard_gate_edge_sdl.c.o
[ 29%] Building C object CMakeFiles/pilight.dir/libs/wiringx/platform/solidrun/hummingboard_base_pro_sdl.c.o
[ 29%] Building C object CMakeFiles/pilight.dir/libs/wiringx/platform/solidrun/hummingboard_gate_edge_dq.c.o
[ 29%] Building C object CMakeFiles/pilight.dir/libs/avrdude/ser_posix.c.o
[ 30%] Building C object CMakeFiles/pilight.dir/libs/avrdude/arduino.c.o
[ 30%] Building C object CMakeFiles/pilight.dir/libs/avrdude/stk500.c.o
/home/martin/git/pilight/rewrite/libs/avrdude/stk500.c: In function ‘stk500_initpgm’:
/home/martin/git/pilight/rewrite/libs/avrdude/stk500.c:635:22: warning: assignment from incompatible pointer type [enabled by default]
  pgm->cmd            = stk500_cmd;
                      ^
[ 30%] Building C object CMakeFiles/pilight.dir/libs/avrdude/avr.c.o
[ 30%] Building C object CMakeFiles/pilight.dir/libs/avrdude/fileio.c.o
[ 31%] Building C object CMakeFiles/pilight.dir/libs/avrdude/safemode.c.o
[ 31%] Building C object CMakeFiles/pilight.dir/libs/avrdude/avrupd.c.o
[ 31%] Building C object CMakeFiles/pilight.dir/libs/avrdude/pgm.c.o
[ 32%] Building C object CMakeFiles/pilight.dir/libs/avrdude/avrgpio.c.o
[ 32%] Building C object CMakeFiles/pilight.dir/libs/avrdude/avrbitbang.c.o
[ 32%] Building C object CMakeFiles/pilight.dir/libs/avrdude/avrpart.c.o
[ 32%] Building C object CMakeFiles/pilight.dir/libs/avrdude/avrconfig.c.o
[ 33%] Building C object CMakeFiles/pilight.dir/libs/avrdude/ser_win32.c.o
[ 33%] Building C object CMakeFiles/pilight.dir/libs/libuv/version.c.o
[ 33%] Building C object CMakeFiles/pilight.dir/libs/libuv/fs-poll.c.o
[ 34%] Building C object CMakeFiles/pilight.dir/libs/libuv/inet.c.o
[ 34%] Building C object CMakeFiles/pilight.dir/libs/libuv/uv-common.c.o
[ 34%] Building C object CMakeFiles/pilight.dir/libs/libuv/threadpool.c.o
[ 35%] Building C object CMakeFiles/pilight.dir/libs/libuv/unix/linux-syscalls.c.o
[ 35%] Building C object CMakeFiles/pilight.dir/libs/libuv/unix/fs.c.o
[ 35%] Building C object CMakeFiles/pilight.dir/libs/libuv/unix/linux-core.c.o
[ 35%] Building C object CMakeFiles/pilight.dir/libs/libuv/unix/timer.c.o
[ 36%] Building C object CMakeFiles/pilight.dir/libs/libuv/unix/pthread-fixes.c.o
[ 36%] Building C object CMakeFiles/pilight.dir/libs/libuv/unix/core.c.o
[ 36%] Building C object CMakeFiles/pilight.dir/libs/libuv/unix/tty.c.o
[ 37%] Building C object CMakeFiles/pilight.dir/libs/libuv/unix/process.c.o
[ 37%] Building C object CMakeFiles/pilight.dir/libs/libuv/unix/loop-watcher.c.o
[ 37%] Building C object CMakeFiles/pilight.dir/libs/libuv/unix/loop.c.o
[ 37%] Building C object CMakeFiles/pilight.dir/libs/libuv/unix/signal.c.o
[ 38%] Building C object CMakeFiles/pilight.dir/libs/libuv/unix/stream.c.o
[ 38%] Building C object CMakeFiles/pilight.dir/libs/libuv/unix/poll.c.o
[ 38%] Building C object CMakeFiles/pilight.dir/libs/libuv/unix/proctitle.c.o
[ 39%] Building C object CMakeFiles/pilight.dir/libs/libuv/unix/pipe.c.o
[ 39%] Building C object CMakeFiles/pilight.dir/libs/libuv/unix/getnameinfo.c.o
[ 39%] Building C object CMakeFiles/pilight.dir/libs/libuv/unix/getaddrinfo.c.o
[ 40%] Building C object CMakeFiles/pilight.dir/libs/libuv/unix/async.c.o
[ 40%] Building C object CMakeFiles/pilight.dir/libs/libuv/unix/udp.c.o
[ 40%] Building C object CMakeFiles/pilight.dir/libs/libuv/unix/tcp.c.o
[ 40%] Building C object CMakeFiles/pilight.dir/libs/libuv/unix/dl.c.o
[ 41%] Building C object CMakeFiles/pilight.dir/libs/libuv/unix/linux-inotify.c.o
[ 41%] Building C object CMakeFiles/pilight.dir/libs/libuv/unix/thread.c.o
[ 41%] Building C object CMakeFiles/pilight.dir/libs/lirc/config_file.c.o
[ 42%] Building C object CMakeFiles/pilight.dir/libs/lirc/transmit.c.o
[ 42%] Building C object CMakeFiles/pilight.dir/libs/pilight/core/ntp.c.o
[ 42%] Building C object CMakeFiles/pilight.dir/libs/pilight/core/ping.c.o
[ 42%] Building C object CMakeFiles/pilight.dir/libs/pilight/core/log.c.o
[ 43%] Building C object CMakeFiles/pilight.dir/libs/pilight/core/eventpool.c.o
/home/martin/git/pilight/rewrite/libs/pilight/core/eventpool.c: In function ‘fib’:
/home/martin/git/pilight/rewrite/libs/pilight/core/eventpool.c:981:21: warning: unused variable ‘cpu_usage’ [-Wunused-variable]
  struct cpu_usage_t cpu_usage;
                     ^
/home/martin/git/pilight/rewrite/libs/pilight/core/eventpool.c:979:4: warning: unused variable ‘timestamp’ [-Wunused-variable]
  } timestamp;
    ^
[ 43%] Building C object CMakeFiles/pilight.dir/libs/pilight/core/options.c.o
[ 43%] Building C object CMakeFiles/pilight.dir/libs/pilight/core/ssdp.c.o
[ 44%] Building C object CMakeFiles/pilight.dir/libs/pilight/core/CuTest.c.o
[ 44%] Building C object CMakeFiles/pilight.dir/libs/pilight/core/firmware.c.o
[ 44%] Building C object CMakeFiles/pilight.dir/libs/pilight/core/webserver.c.o
[ 45%] Building C object CMakeFiles/pilight.dir/libs/pilight/core/arp.c.o
[ 45%] Building C object CMakeFiles/pilight.dir/libs/pilight/core/timerpool.c.o
[ 45%] Building C object CMakeFiles/pilight.dir/libs/pilight/core/mail.c.o
[ 45%] Building C object CMakeFiles/pilight.dir/libs/pilight/core/threadpool.c.o
/home/martin/git/pilight/rewrite/libs/pilight/core/threadpool.c: In function ‘threadpool_init’:
/home/martin/git/pilight/rewrite/libs/pilight/core/threadpool.c:382:17: warning: variable ‘tv1’ set but not used [-Wunused-but-set-variable]
  struct timeval tv1, tv2;
                 ^
[ 46%] Building C object CMakeFiles/pilight.dir/libs/pilight/core/binary.c.o
[ 46%] Building C object CMakeFiles/pilight.dir/libs/pilight/core/http.c.o
[ 46%] Building C object CMakeFiles/pilight.dir/libs/pilight/core/common.c.o
[ 47%] Building C object CMakeFiles/pilight.dir/libs/pilight/core/sha256cache.c.o
[ 47%] Building C object CMakeFiles/pilight.dir/libs/pilight/core/mem.c.o
[ 47%] Building C object CMakeFiles/pilight.dir/libs/pilight/core/dso.c.o
[ 47%] Building C object CMakeFiles/pilight.dir/libs/pilight/core/pilight.c.o
[ 48%] Building C object CMakeFiles/pilight.dir/libs/pilight/core/ssl.c.o
[ 48%] Building C object CMakeFiles/pilight.dir/libs/pilight/core/socket.c.o
[ 48%] Building C object CMakeFiles/pilight.dir/libs/pilight/core/json.c.o
[ 49%] Building C object CMakeFiles/pilight.dir/libs/pilight/core/datetime.c.o
/home/martin/git/pilight/rewrite/libs/pilight/core/datetime.c: In function ‘determine_applicable_rule’:
/home/martin/git/pilight/rewrite/libs/pilight/core/datetime.c:1433:9: warning: missing braces around initializer [-Wmissing-braces]
  struct ruleset ruleset = { 0 };
         ^
/home/martin/git/pilight/rewrite/libs/pilight/core/datetime.c:1433:9: warning: (near initialization for ‘ruleset.rules’) [-Wmissing-braces]
[ 49%] Building C object CMakeFiles/pilight.dir/libs/pilight/core/gc.c.o
[ 49%] Building C object CMakeFiles/pilight.dir/libs/pilight/core/network.c.o
[ 50%] Building C object CMakeFiles/pilight.dir/libs/pilight/core/proc.c.o
[ 50%] Building C object CMakeFiles/pilight.dir/libs/pilight/storage/storage.c.o
[ 50%] Building C object CMakeFiles/pilight.dir/libs/pilight/storage/json.c.o
[ 50%] Building C object CMakeFiles/pilight.dir/libs/pilight/events/actions/pushover.c.o
/home/martin/git/pilight/rewrite/libs/pilight/events/actions/pushover.c: In function ‘run’:
/home/martin/git/pilight/rewrite/libs/pilight/events/actions/pushover.c:178:2: warning: passing argument 5 of ‘threadpool_add_work’ from incompatible pointer type [enabled by default]
  threadpool_add_work(REASON_END, NULL, action_pushover->name, 0, thread, NULL, (void *)obj);
  ^
In file included from /home/martin/git/pilight/rewrite/libs/pilight/events/actions/pushover.c:14:0:
/home/martin/git/pilight/rewrite/libs/pilight/events/actions/../../core/threadpool.h:70:15: note: expected ‘void * (*)(int,  void *)’ but argument is of type ‘void * (*)(void *)’
unsigned long threadpool_add_work(int, uv_sem_t *, char *, int, void *(*)(int, void *), void *(*)(void *), void *);
               ^
[ 51%] Building C object CMakeFiles/pilight.dir/libs/pilight/events/actions/label.c.o
/home/martin/git/pilight/rewrite/libs/pilight/events/actions/label.c: In function ‘prepare’:
/home/martin/git/pilight/rewrite/libs/pilight/events/actions/label.c:681:2: warning: passing argument 3 of ‘uv_queue_work’ from incompatible pointer type [enabled by default]
  if(uv_queue_work(uv_default_loop(), tp_work_req, "action_label", thread, thread_free) < 0) {
  ^
In file included from /home/martin/git/pilight/rewrite/libs/pilight/events/actions/../../core/eventpool.h:28:0,
                 from /home/martin/git/pilight/rewrite/libs/pilight/events/actions/../../core/pilight.h:42,
                 from /home/martin/git/pilight/rewrite/libs/pilight/events/actions/../../core/common.h:30,
                 from /home/martin/git/pilight/rewrite/libs/pilight/events/actions/../action.h:17,
                 from /home/martin/git/pilight/rewrite/libs/pilight/events/actions/label.c:15:
/home/martin/git/pilight/rewrite/libs/pilight/events/actions/../../core/../../libuv/uv.h:972:15: note: expected ‘uv_work_cb’ but argument is of type ‘char *’
UV_EXTERN int uv_queue_work(uv_loop_t* loop,
               ^
/home/martin/git/pilight/rewrite/libs/pilight/events/actions/label.c:681:2: warning: passing argument 4 of ‘uv_queue_work’ from incompatible pointer type [enabled by default]
  if(uv_queue_work(uv_default_loop(), tp_work_req, "action_label", thread, thread_free) < 0) {
  ^
In file included from /home/martin/git/pilight/rewrite/libs/pilight/events/actions/../../core/eventpool.h:28:0,
                 from /home/martin/git/pilight/rewrite/libs/pilight/events/actions/../../core/pilight.h:42,
                 from /home/martin/git/pilight/rewrite/libs/pilight/events/actions/../../core/common.h:30,
                 from /home/martin/git/pilight/rewrite/libs/pilight/events/actions/../action.h:17,
                 from /home/martin/git/pilight/rewrite/libs/pilight/events/actions/label.c:15:
/home/martin/git/pilight/rewrite/libs/pilight/events/actions/../../core/../../libuv/uv.h:972:15: note: expected ‘uv_after_work_cb’ but argument is of type ‘void (*)(struct uv_work_t *)’
UV_EXTERN int uv_queue_work(uv_loop_t* loop,
               ^
/home/martin/git/pilight/rewrite/libs/pilight/events/actions/label.c:681:2: error: too many arguments to function ‘uv_queue_work’
  if(uv_queue_work(uv_default_loop(), tp_work_req, "action_label", thread, thread_free) < 0) {
  ^
In file included from /home/martin/git/pilight/rewrite/libs/pilight/events/actions/../../core/eventpool.h:28:0,
                 from /home/martin/git/pilight/rewrite/libs/pilight/events/actions/../../core/pilight.h:42,
                 from /home/martin/git/pilight/rewrite/libs/pilight/events/actions/../../core/common.h:30,
                 from /home/martin/git/pilight/rewrite/libs/pilight/events/actions/../action.h:17,
                 from /home/martin/git/pilight/rewrite/libs/pilight/events/actions/label.c:15:
/home/martin/git/pilight/rewrite/libs/pilight/events/actions/../../core/../../libuv/uv.h:972:15: note: declared here
UV_EXTERN int uv_queue_work(uv_loop_t* loop,
               ^
CMakeFiles/pilight.dir/build.make:3994: recipe for target 'CMakeFiles/pilight.dir/libs/pilight/events/actions/label.c.o' failed
make[2]: *** [CMakeFiles/pilight.dir/libs/pilight/events/actions/label.c.o] Error 1
CMakeFiles/Makefile2:617: recipe for target 'CMakeFiles/pilight.dir/all' failed
make[1]: *** [CMakeFiles/pilight.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2
martin@linux-4ih5:~/git/pilight/rewrite>

It's hidden in a number of warnings, the actual error is:
Code:
/home/martin/git/pilight/rewrite/libs/pilight/events/actions/label.c:681:2: error: too many arguments to function ‘uv_queue_work’
  if(uv_queue_work(uv_default_loop(), tp_work_req, "action_label", thread, thread_free) < 0) {
  ^
 
Reply
#2
After removing the "action_label" that snuck its way into the args, label.c compiles fine. Did the same in the other libs/pilight/events/actions/ files where uv_queue_work was being called (dim.c, label.c, switch.c). @curlymo were these added by mistake? It seems that uv_queue_work does not need (or take) this argument.

Now compilation fails here instead:
Code:
[ 83%] Building C object CMakeFiles/pilight-daemon.dir/daemon.c.o
/home/martin/git/pilight/rewrite/daemon.c: In function ‘start_pilight’:
/home/martin/git/pilight/rewrite/daemon.c:2391:3: error: too few arguments to function ‘socket_start’
   socket_start((unsigned short)port);
   ^
In file included from /home/martin/git/pilight/rewrite/daemon.c:53:0:
/home/martin/git/pilight/rewrite/libs/pilight/core/socket.h:20:5: note: declared here
int socket_start(unsigned short, void (*)(int, char *, ssize_t, char **, ssize_t *));
     ^
CMakeFiles/pilight-daemon.dir/build.make:61: recipe for target 'CMakeFiles/pilight-daemon.dir/daemon.c.o' failed
make[2]: *** [CMakeFiles/pilight-daemon.dir/daemon.c.o] Error 1
CMakeFiles/Makefile2:104: recipe for target 'CMakeFiles/pilight-daemon.dir/all' failed
make[1]: *** [CMakeFiles/pilight-daemon.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2
 
Reply
#3
Bug fixed. The daemon bug should be ignored. The rest should just work.
 
Reply
#4
Yup, the event actions compile fine now Smile Just noticed that pilight-unittest does get built even if daemon.c does not compile, I'll post my latest progress in the thread from a few weeks ago sometime soon (the mail test works now, but there are new issues) if I can't get it fixed myself.
 
Reply
  


Possibly Related Threads...
Thread Author Replies Views Last Post
  errors in gui terrar 2 1,147 09-02-2016, 04:03 PM
Last Post: curlymo
  [Solved] Compilation error under openSUSE pilino1234 4 2,091 04-16-2016, 08:23 AM
Last Post: pilino1234

Forum Jump:


Browsing: 1 Guest(s)