joelkoz / xtwsd

Json Tide and Current Prediction Web Service for XTide
GNU General Public License v3.0
20 stars 4 forks source link

Minor: Could you add dependencies to build instructions? #5

Open ralphhughes opened 4 years ago

ralphhughes commented 4 years ago

Hi,

On a fairly blank Ubuntu 18.04 server I needed to run sudo apt install cmake zlib1g-dev libpng-dev libssl-dev libtcd-dev to install the dependencies needed to build xtwsd, could this be added to the instructions somewhere?

Other than that, its a fantastic piece of software that got me up and running very quickly, many thanks :-)

joelkoz commented 4 years ago

libtcd-dev is actually built by make - it is one of the libraries from the xtide source that is built on the fly. You shouldn't have had to download that one. It is possible, however, that it did not build because it in turn has a dependency on one of the other libraries you listed. Ideally, all dependencies are listed in the CMakeList.txt file, which does a check to make sure everything required to build is in place before the build is attempted. cmake should have either warned you of a missing library, or downloaded it and built it. So to me, this is not a defect in the instructions but is instead a defect in CMakeList.txt I've only built on Mac OS and Raspian, which apparently already has those other libraries installed. I'll try to dig a little deeper. Thanks for the feedback!

joelkoz commented 4 years ago

Actually - I see that CMakeList.txt already includes a "FIND_PACKAGE" line for PNG and OpenSSL. Did you get a warning about those missing when you tried to run CMake? Perhaps the instructions could use a word or two about how to find and install a missing package.

ralphhughes commented 4 years ago

Thanks for that info. It's perfectly possible I did something wrong - I'm a Java developer so the build process for this is quite alien to me! I tried to follow your instructions to the letter and when I got an error trying to build it, I googled around until I found the name of what I was missing. Perhaps the package names are different on my system! I have a Pi somewhere, I'll try building it on that.