Hi all ,
i’m very interesting in PLC (programmable logic control) and i’m interesting on how this device can be run via our beloved os…
PLC application that i want to port need libmodbus that not yet available on haiku…
so i have to port it first…
so this is my attempt to port it but… stuck on error
/sources/libmodbus-3.0.8/tests/bandwidth-server-many-up.c:104: undefined reference to
accept' /boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/8.3.0/../../../../x86_64-unknown-haiku/bin/ld: /sources/libmodbus-3.0.8/tests/bandwidth-server-many-up.c:114: undefined reference to
inet_ntoa’
this is the content of recipe file: libmodbus-3.0.8.recipe
SUMMARY="A groovy modbus library"
DESCRIPTION="
libmodbus is a free software library to send or receive data with a device which respects \
the Modbus protocol. This library can use a serial port or an Ethernet connection.
The functions included in the library have been derived from the Modicon Modbus Protocol \
Reference Guide which can be obtained from www.modbus.org.
"
HOMEPAGE="https://github.com/stephane/libmodbus"
COPYRIGHT="
Stéphane Raimbault
Tobias Doerffel
Florian Forster
oldfaber
Hannu Vuolasaho
Michael Heimpold
Jimmy Bergström
Jakob Bysewski
"
LICENSE="GNU LGPL v2.1"
REVISION="1"
SOURCE_URI="https://github.com/stephane/libmodbus/archive/v$portVersion.tar.gz"
CHECKSUM_SHA256="0e236c3d4fe0a7a3f7c6292a3d1183c584b03bb06154e0b95e71bc763559ac5d"
ARCHITECTURES="!x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
libmodbus$secondaryArchSuffix = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
"
PROVIDES_devel="
libmodbus${secondaryArchSuffix}_devel = $portVersion
"
REQUIRES_devel="
libmodbus$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
cmd:aclocal
cmd:autoconf
cmd:automake
cmd:gcc$secondaryArchSuffix
cmd:libtoolize
cmd:make
cmd:pkg_config$secondaryArchSuffix
"
BUILD()
{
autogen.sh
runConfigure ./configure
make
}
INSTALL()
{
make install
rm $libDir/lib*.la
# prepare development lib links
prepareInstalledDevelLibs libmodbus
fixPkgconfig
# devel package
packageEntries devel $developDir
}
TEST()
{
make check
}
thanks All