Closed pvint closed 6 years ago
Ah, it can run in non- ncurses mode but still needs the header to compile. Duh. I'll either leave the demo out of the default compile or #ifdef out the ncurses include. Thanks for the feedback. EDIT: I'll also look into getting rid of the warning.
Just thought of something. You can prob
$ cd libPCA9685/src
$ mkdir build && cd build
$ cmake ..
$ make && sudo make install
Because the lib (src/
) has it's own CMakeLists.txt
but I think building only the lib should be the default. Better to run a separate make examples
.
Okay, #54 merged into develop
. This removes examples/
and test/
from the default make. If you want to make test
and run the tests, do make PCA9685test && ctest -V
. If you want to make quickstart
, do make quickstart
. Once you've confirmed that your builds are fixed, we can close this issue.
Thanks! But new issue ;) Console history after fresh pull :
106 rm -fR build/
107 mkdir build
108 cd build/
109 cmake ..
110 make
111 make install
Result:
root@uniform /usr/local/src/libPCA9685/build [0]$ make install
[ 25%] Built target PCA9685
[ 50%] Built target quickstart
[ 75%] Built target PCA9685demo
[100%] Built target PCA9685test
Install the project...
-- Install configuration: ""
-- Installing: /usr/local/lib/libPCA9685.so
-- Up-to-date: /usr/local/include/PCA9685.h
CMake Error at examples/olaclient/cmake_install.cmake:42 (file):
file INSTALL cannot find
"/usr/local/src/libPCA9685/build/examples/olaclient/olaclient".
Call Stack (most recent call first):
cmake_install.cmake:38 (include)
Makefile:72: recipe for target 'install' failed
make: *** [install] Error 1
As you suggested above:
$ cd libPCA9685/src
$ mkdir build && cd build
$ cmake ..
$ make && sudo make install
This worked like a charm... just have 30 minutes or so to try to do some stuff and wanted a fresh pull of the lib, and I got it... trying not to get distracted on the cmake issue just now ;)
Ah, I think I know what that's about. I made the examples
optional in the build but they have mandatory installation rules. I'll look into it before closing this issue.
Related, when I get the netinst sorted out, you'll be able to pull down one file to execute that will perform all of the download, compile, and install steps. So this will get much simpler for the user. "Nobody knew build could be so complicated."
Resolved in #56.
Released in v0.7.
Forgive me if it's already the case and it's a RTFM issue, but I am short on time and wanted to document this:
Compiling on a fresh Pi and getting the following error:
I will just install ncurses (
apt-get install libncurses5-dev
) which stops the issue, but I just want the lib and it is only required for the demo.Cheers! Paul