telescope-browser / telescope

browser for the small internet
https://telescope-browser.org
ISC License
43 stars 1 forks source link

Compilation error with imsg-compat #18

Open Narrat opened 2 weeks ago

Narrat commented 2 weeks ago

Hello, when trying to compile telescope with the latest imsg-compat 7.4.0 and --with-imsg I get the following errors:

net.c: In function ‘load_cert’:
net.c:545:19: error: implicit declaration of function ‘imsg_get_fd’; did you mean ‘imsg_get’? [-Wimplicit-function-declaration]
  545 |         if ((fd = imsg_get_fd(imsg)) == -1)
      |                   ^~~~~~~~~~~
      |                   imsg_get
net.c: In function ‘handle_dispatch_imsg’:
net.c:600:25: error: implicit declaration of function ‘imsg_get_type’; did you mean ‘imsg_get’? [-Wimplicit-function-declaration]
  600 |                 switch (imsg_get_type(&imsg)) {
      |                         ^~~~~~~~~~~~~
      |                         imsg_get
net.c:602:29: error: implicit declaration of function ‘imsg_get_data’; did you mean ‘imsg_get’? [-Wimplicit-function-declaration]
  602 |                         if (imsg_get_data(&imsg, &r, sizeof(r)) == -1 ||
      |                             ^~~~~~~~~~~~~
      |                             imsg_get
net.c:619:35: error: implicit declaration of function ‘imsg_get_id’; did you mean ‘imsg_get’? [-Wimplicit-function-declaration]
  619 |                         req->id = imsg_get_id(&imsg);
      |                                   ^~~~~~~~~~~
      |                                   imsg_get
make[2]: *** [Makefile:819: net.o] Error 1
make[2]: Leaving directory '/tmp/makepkg/telescope/src/telescope-0.10.1'
make[1]: *** [Makefile:885: all-recursive] Error 1
make[1]: Leaving directory '/tmp/makepkg/telescope/src/telescope-0.10.1'
make: *** [Makefile:598: all] Error 2

Oddly enough going back to 6.8.2 also throws a compilation error.

omar-polo commented 2 weeks ago

@Narrat I'm using the latest imsg API which are not yet in a imsg-compat release. I'll ping @epsilon-0 about it. In the meantime, please use the bundled version, it's up-to-date with OpenBSD src.

ThomasAdam commented 2 weeks ago

@omar-polo in the case where someone uses the system version of imsg, we should probably explicitly check for some of these definitions and error out, so it doesn't become a compilation error.

I'll add it to my TODO list. 🙂

omar-polo commented 2 weeks ago

@ThomasAdam yeah, that would also make sense. It should only be a matter of changing the function used in the check in the configure (imsg_get_fd maybe), and making sure we use the right imsg.h when compiling.

Narrat commented 2 weeks ago

@Narrat I'm using the latest imsg API which are not yet in a imsg-compat release. I'll ping @epsilon-0 about it. In the meantime, please use the bundled version, it's up-to-date with OpenBSD src.

I see. Alright, will use the bundled one then :) Thank you for your help. As this particular issue is solved/explained I will close this issue.

ThomasAdam commented 2 weeks ago

I'd like to leave this open until I put some autotools checks in place.