Porting Help

Hey all just rebuilt my Haiku box. I would like to port JPilot (which requires pilot-link). Any tips or pointers on porting Linux apps over to Haiku?

Haven’t checked the buildtools used for the ports you mention, Haiku (haikuports) should have all the needed tools to get you started.
When I check something new I use a prefix to /boot/home/destdir to check the build/install part (and later the content of the installed directory to prepare a recipe for packaging).
Feel free to ask.

I’m getting an error in ./Configure that also happens when I try to build it on Linux. There’s a random ) when commented out allows the configure script to run until it find another issue with some empty fi statements. Going to try to build an older version of pilot-link to see it that works.

For pilot-link there seem to be several patches around (one mentioned in the open issue there, a few others can be found at: repology

Look: Compiling pilot-link - #5 by marcoapc

Made some progress after patching with the links @Begasus provided. Finally got through building the make file and I see this error:

Making all in libpisock
make[2]: Entering directory '/boot/home/pilot-link/pilot-link/libpisock'
/bin/sh ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../include -I../include     -I/usr/local/include -g2 -Wall -MT libpisock_la-unixserial.lo -MD -MP -MF .deps/libpisock_la-unixserial.Tpo -c -o libpisock_la-unixserial.lo `test -f 'unixserial.c' || echo './'`unixserial.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../include -I../include -I/usr/local/include -g2 -Wall -MT libpisock_la-unixserial.lo -MD -MP -MF .deps/libpisock_la-unixserial.Tpo -c unixserial.c  -DPIC -o .libs/libpisock_la-unixserial.o
In file included from unixserial.c:39:
../include/pi-source.h:26:11: fatal error: sys/errno.h: No such file or directory
   26 | # include <sys/errno.h>
      |           ^~~~~~~~~~~~~

Can you try to patch it to **#include <errno.h>** ? Some patches around for that at haikuports.

Ok, so make finishes now. When I do a ‘make install’ it appears to copy over a bunch of libs but no pilot-link executable to run. Need to look at it more.

There is this old code for BeOS:

https://beos.jp.ax/beos_files/pulkomandy%20BeOS%20Archive%202023/MIRROR.BeOS/develop/pilot-link.txt

https://beos.jp.ax/beos_files/pulkomandy%20BeOS%20Archive%202023/MIRROR.BeOS/develop/pilot-link.zip

I got it to compile but configure is unable to find libusb. I made sure the dev pkg is installed. Can anyone give me a clue on how to pass libusb to configure?

Issue was missing libusb_compat_devel

1 Like

Hit another wall. Apparently you need udev to use USB syncing. Haiku can see the USB device in listusb but that’s as far as I can get.

Any ideas on how to get around this?

From attempts here I think getting udev to work was a nogo. There are some mentions at haikuports related to udev, maybe check some things there?

udev does not exist on Haiku. If that part of the code does something useful, you will have to rewrite it using some other methods.

It depends what the code is doing exactly with it.

@Begasus where on Haikuports are the discussions? I can’t seem to find it… maybe I am looking at the wrong site, but I am going to the github Haikuports

some issues (hits) at: Code search results · GitHub

@PulkoMandy So from what I have read, udev is creating the entry in /dev for the Palm device. I think Haiku needs a driver for Palm devices so that it can be recognized and an entry created in /dev. I found visor.c I wonder if that would even be possible to port over to Haiku, maybe a step further. Haiku is seeing the Palm device but is not able to create an entry because it doesn’t know what to do with it.

Yes, that code would need to be ported to our usb_serial driver and then the device would appear in /dev/ports/. Unless there’s a way to communicate with the palm without a kernel side driver, for example by using libusb?