pilot-link icon indicating copy to clipboard operation
pilot-link copied to clipboard

Issues compiling

Open t3kk3n opened this issue 2 years ago • 8 comments

So when I try to compile with autogen, along with trying to run configure, I get the following:

checking for socklen_t... yes checking whether to enable userland conduits... no checking for pkg-config... /usr/bin/pkg-config checking pkg-config is at least version 0.9.0... yes checking for BLUEZ... yes ./configure: line 18631: syntax error near unexpected token )' ./configure: line 18631: )'

Line 18631 contains a close parenthesis, so for the heck of it, I commented it out, to then get the following:

checking for pkg-config... /usr/bin/pkg-config checking pkg-config is at least version 0.9.0... yes checking for BLUEZ... yes ./configure: line 19040: syntax error near unexpected token 'newline' ./configure: line 19040: '''

Before I start going edit crazy, is anyone else having this issue? Has anyone solved or fixed this?

Thanks!

t3kk3n avatar Feb 19 '23 18:02 t3kk3n

Same here https://gist.github.com/parkerlreed/19a7c0501770e2a2063921f9a11eda9b

parkerlreed avatar Feb 28 '23 18:02 parkerlreed

did anyone manage to solve this?

sintezcs avatar May 15 '23 19:05 sintezcs

I was able to get this built/compiled using the pilot-link-git package on the Arch Linux AUR - hope this helps.

t3kk3n avatar May 30 '23 22:05 t3kk3n

I'll try to take a look and push a fix this weekend. I'm pretty backed up on some other PRs as well. Sorry for delays on this!

desrod avatar May 31 '23 06:05 desrod

This patch appears to fix the compilation issues related to the -Werror CFLAG and configure malformation.

https://aur.archlinux.org/cgit/aur.git/plain/configure-checks.patch?h=pilot-link-git

durrendal avatar Jan 04 '24 02:01 durrendal

I was able to get this built/compiled using the pilot-link-git package on the Arch Linux AUR - hope this helps.

I'm trying to do the same, but I get this error when compiling, anyone know how to fix it?

pilot-read-todos.c: In function ‘main’:
pilot-read-todos.c:220:53: error: passing argument 4 of ‘pi_file_read_record’ from incompatible pointer type [-Wincompatible-pointer-types]
  220 |                             (pif, i, (void *) &ptr, &len, &attr, &category,
      |                                                     ^~~~
      |                                                     |
      |                                                     int *
In file included from ../include/pi-socket.h:58,
                 from pilot-read-todos.c:32:
../include/pi-file.h:268:72: note: expected ‘size_t *’ {aka ‘long unsigned int *’} but argument is of type ‘int *’
  268 |             PI_ARGS((pi_file_t *pf, int recindex, void **bufp, size_t *sizep,
      |                                                                ~~~~~~~~^~~~~
../include/pi-args.h:29:29: note: in definition of macro ‘PI_ARGS’
   29 | #   define PI_ARGS(x)       x
      |                             ^

Well, after some fiddling I can pretend the errors don't exist by editing the Makefiles to make GCC not error out, and then it all compiles and works. I might try to figure out auoconf enough to do this more "properly" but I'm now trying to work out what to do with my Palm now I can sync it with my machine.

To do this you need to change the CFLAGS in the Makefiles to contain

-Wno-incompatible-pointer-types instead of -Wall

ncot-tech avatar Jul 24 '24 19:07 ncot-tech

Back to some new errors. Using the two patches from pilot-link-git AUR PKGBUILD and the incompatible pointer types fix above, still getting an error

mv -f .deps/libpisock_la-usb.Tpo .deps/libpisock_la-usb.Plo
/bin/sh ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../include -I../include      -g2 -Wall -MT libpisock_la-linuxusb.lo -MD -MP -MF .deps/libpisock_la-linuxusb.Tpo -c -o libpisock_la-linuxusb.lo `test -f 'linuxusb.c' || echo './'`linuxusb.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../include -I../include -g2 -Wall -MT libpisock_la-linuxusb.lo -MD -MP -MF .deps/libpisock_la-linuxusb.Tpo -c linuxusb.c  -fPIC -DPIC -o .libs/libpisock_la-linuxusb.o
linuxusb.c: In function 'pi_usb_impl_init':
linuxusb.c:60:33: error: assignment to 'ssize_t (*)(pi_socket_t *, const unsigned char *, size_t,  int)' {aka 'long int (*)(struct pi_socket *, const unsigned char *, long unsigned int,  int)'} from incompatible pointer type 'int (*)(pi_socket_t *, unsigned char *, size_t,  int)' {aka 'int (*)(struct pi_socket *, unsigned char *, long unsigned int,  int)'} [-Wincompatible-pointer-types]
   60 |         impl->write             = u_write;
      |                                 ^
linuxusb.c:61:33: error: assignment to 'ssize_t (*)(pi_socket_t *, pi_buffer_t *, size_t,  int)' {aka 'long int (*)(struct pi_socket *, pi_buffer_t *, long unsigned int,  int)'} from incompatible pointer type 'int (*)(pi_socket_t *, pi_buffer_t *, size_t,  int)' {aka 'int (*)(struct pi_socket *, pi_buffer_t *, long unsigned int,  int)'} [-Wincompatible-pointer-types]
   61 |         impl->read              = u_read;
      |                                 ^
linuxusb.c: In function 'u_flush':
linuxusb.c:384:32: error: implicit declaration of function 'recv' [-Wimplicit-function-declaration]
  384 |                         while (recv(ps->sd, buf, sizeof(buf), 0) > 0)
      |                                ^~~~
make[2]: *** [Makefile:746: libpisock_la-linuxusb.lo] Error 1
make[2]: Leaving directory '/home/parker/build/cloudpilot-emu/src/cloudpilot/pilot-link/libpisock'
make[1]: *** [Makefile:590: all-recursive] Error 1
make[1]: Leaving directory '/home/parker/build/cloudpilot-emu/src/cloudpilot/pilot-link'
make: *** [Makefile:468: all] Error 2

parkerlreed avatar Jan 19 '25 22:01 parkerlreed

I now found a way how to build pilot-link, libpisock etc. on Ubuntu 24.04, see: https://forum-ubuntuusers-de.translate.goog/topic/make-von-aelteren-projekt-geht-nicht-mehr/2/?_x_tr_sl=auto&_x_tr_tl=de&_x_tr_hl=de&_x_tr_pto=wapp#post-9468424

CoSoCo avatar Mar 07 '25 16:03 CoSoCo