repsheet / repsheet-nginx

The nginx module for Repsheet
Apache License 2.0
82 stars 11 forks source link

hiredis version error in compile #50

Open sp0kky opened 3 years ago

sp0kky commented 3 years ago

Hi, I'm tryinig to compile but I'm receiving this error:

# make modules
  make -f objs/Makefile modules
  make[1]: Entering directory '/opt/nginx-1.19.3'
  cc -c -fPIC -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event modules I src/os/unix -I objs -I src/http -I src/http/modules \
        -o objs/addon/repsheet-nginx-5.1.0/ngx_http_repsheet_module.o \
        ../repsheet-nginx-5.1.0/ngx_http_repsheet_module.c
  In file included from ../repsheet-nginx-5.1.0/ngx_http_repsheet_module.c:5:
 ../repsheet-nginx-5.1.0/ngx_http_repsheet_module.h:17:10: fatal error: hiredis/hiredis.h: No such file or directory
    17 | #include <hiredis/hiredis.h>
        |          ^~~~~~~~~~~~~~~~~~~
  compilation terminated.
  make[1]: *** [objs/Makefile:1226: objs/addon/repsheet-nginx-5.1.0/ngx_http_repsheet_module.o] Error 1
  make[1]: Leaving directory '/opt/nginx-1.19.3'
  make: *** [Makefile:14: modules] Error 2

The system is Ubuntu 20, which has libhiredis0.14, I've tried changing the libhiredis version to 0.13 but the problem still remain.

abedra commented 3 years ago

Hi @sp0kky,

It looks like you are missing the -dev package, which provides the headers

$ apt search libhiredis
Sorting... Done
Full Text Search... Done
libhiredis-dev/focal,now 0.14.0-6 amd64 [installed]
  minimalistic C client library for Redis (development files)

libhiredis0.14/focal,now 0.14.0-6 amd64 [installed]
  minimalistic C client library for Redis

I am able to build properly on 20.04 with both these libraries installed.