Closed hreuver0183 closed 3 years ago
I believe the issue for "make pkg" is the amount of memory used. On a RPI4/2GB (don't ask) I needed more than 4GB swap too build the plugin.
I don't think I need that much for compiling OpenCPN, perhaps there is an issue with the linking stage using too much memory.
I encountered a few small issues when building a package for Ubuntu/Arm64.
(1) According to the documentation the commands should be: $ cmake .. $ make pkg
If you run into a problem like "CMake Error at CMakeLists.txt: XX (configure_file): configure_file Problem configuring file" you might want to run "make tarball" first. Haven't checked what exactly changes, but after the tarball is made the deb pkg can also be made.
(2) Some files are installed which should not be: dpkg -L oesenc_pi /home /home/user /home/user/git /home/user/git/oesenc_pi /home/user/git/oesenc_pi/build /home/user/git/oesenc_pi/build/app /home/user/git/oesenc_pi/build/app/files /home/user/git/oesenc_pi/build/app/files/etc /home/user/git/oesenc_pi/build/app/files/etc/udev /home/user/git/oesenc_pi/build/app/files/etc/udev/rules.d /home/user/git/oesenc_pi/build/app/files/etc/udev/rules.d/98-sglock.rules /usr /usr/lib ..
I commented out the 98-sglock rule, but it can be removed since it is provided by opencpn:
if (EXISTS "/etc/udev/rules.d")
install(
FILES "linux/98-sglock.rules"
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
DESTINATION "${CMAKE_INSTALL_PREFIX}/etc/udev/rules.d"
)
endif ()
(3) the oeserverd and libsglock are not installed. Perhaps that issue is connected with (1). Copying oeserverd and libsglock both by hand to /usr/local/bin/ solves the immediate problem but it probably should be fixed.
After installing libusb-0.1-4 the plugin works as usual (using opencpn-5.5.0-1). Not big issues, but one might run into trouble when building the plugin the first time. Main aim for this post is therefore to document the problem since fewer people are building deb-packages these days.