OpenPLC_v2 icon indicating copy to clipboard operation
OpenPLC_v2 copied to clipboard

Build system has issues with non-interactive use

Open blm768 opened this issue 7 years ago • 3 comments

I've been looking into using OpenPLC as part of a student project. I was planning to build a Debian package and/or a Docker image for easy deployment, but I've found that the build system isn't very well suited to non-interactive use because it prompts interactively for a number of configuration options. I've made some modifications in my own fork that allow passing the necessary values non-interactively, but I'm curious as to whether you'd be interested in merging those changes into the main project and/or looking into other ways to make the build system more robust and distribution-agnostic.

blm768 avatar Oct 24 '17 22:10 blm768

Your changes seems nice, I don't think it is a problem to incorporate them. The only issue is your last commit, where you removed the lines to install Libmodbus. This will break support for Modbus external devices.

thiagoralves avatar Oct 24 '17 22:10 thiagoralves

Yeah, I'll have to figure out how to handle that. The main issue is that to build a typical Debian package, the build scripts generally can't (or at least shouldn't) rely on sudo to install files to the host that's building the package. I'll have to think about how to handle that properly; the easiest way is probably to link libmodbus statically.

blm768 avatar Oct 25 '17 18:10 blm768

There is actually a Debian package for libmodbus (https://packages.debian.org/stretch/libmodbus-dev), so libmodbus should definitely not be included in the Debian package.

I'd propose using a Makefile with different targets for different build steps, such as make install-dep to install dependencies. That way you could configure your build very flexibly and easily include it in the debian packaging toolchain.

st31ny avatar May 18 '18 18:05 st31ny