Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues compiling #16

Open
t3kk3n opened this issue Feb 19, 2023 · 7 comments
Open

Issues compiling #16

t3kk3n opened this issue Feb 19, 2023 · 7 comments

Comments

@t3kk3n
Copy link

t3kk3n commented Feb 19, 2023

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!

@parkerlreed
Copy link

@sintezcs
Copy link

did anyone manage to solve this?

@t3kk3n
Copy link
Author

t3kk3n commented May 30, 2023

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

@desrod
Copy link
Owner

desrod commented May 31, 2023

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!

@durrendal
Copy link

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

@ncot-tech
Copy link

ncot-tech commented Jul 24, 2024

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

@parkerlreed
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants