hzeller / gmrender-resurrect

Resource efficient UPnP/DLNA renderer, optimal for Raspberry Pi, CuBox or a general MediaServer. Fork of GMediaRenderer to add some features to make it usable.
GNU General Public License v2.0
832 stars 202 forks source link

problems compiling the renderer in openWRT #107

Closed VincentKuscher closed 7 years ago

VincentKuscher commented 8 years ago

There is a problem with the webserver.c file with the new openWRT version.

include in webserver.c is not working anymore.

It seems that the error.h file of the gnu lib is missing. I deleted the include and uncommented all error() messages in webserver.c

Another issue is that the define of PATH_MAX is missing in webserver.c I added #define MAX_PATH 200 in webserver.h and the compilation runs fine.

tristan-k commented 8 years ago

Can you give some more instructions on how to compile for openwrt or provide some binaries?

HugoPoi commented 7 years ago

Same here, I try to compile for openwrt (master) and get

webserver.c:34:19: fatal error: error.h: No such file or directory
compilation terminated.

What package or dependencies provide the <error.h> libc no?

@tristan-k you successfully build with this kind of setup ? i can provide more info about my build environment if needed

hzeller commented 7 years ago

Could you try again with a fresh git pull ?

HugoPoi commented 7 years ago

Missing PATH_MAX constant now.

webserver.c: In function 'webserver_register_file':
webserver.c:89:19: error: 'PATH_MAX' undeclared (first use in this function)
  char local_fname[PATH_MAX];
                   ^
webserver.c:89:19: note: each undeclared identifier is reported only once for each function it appears in
webserver.c:89:7: warning: unused variable 'local_fname' [-Wunused-variable]
  char local_fname[PATH_MAX];
       ^
make[5]: *** [Makefile:391: webserver.o] Error 1

Adding #define PATH_MAX 200 in webserver.h resolve this. I don't if it's a good value ?

hzeller commented 7 years ago

200 should be fine. I now got rid of of the use of PATH_MAX, so if you do a git pull again, it should work.