Closed marcobergman closed 1 year ago
Same error on Ubuntu 18, OpenCPN 5.2.4 but in this version the plugin is not jailed.
Is it fixed now?
Yup seems to work on Raspberry. I have not checked at Ubuntu yet but I'll close the issue in good confidence.
Forgot to say I had to move src/WatchdogUI.h to include/ to make it compile
does it work now?
Which platform? What error did you get? It should just be in src
This is an openplotter image on a raspberry 4;
pi@openplotter:~/watchdog_pi/include $ mv WatchdogUI.h ../src/
pi@openplotter:~/watchdog_pi/include $ cd ../build
pi@openplotter:~/watchdog_pi/build $ cmake ..
CMake Error at cmake/PluginSetup.cmake:27 (add_library):
Cannot find source file:
include/WatchdogUI.h
This prompted me to look for that file and move it to where is was expected to be.
see full output in attached file watchdog.txt
After all, it is the only .h file in the src directory...
Weirdly enough, with the change you made to PluginConfigure.cmake it compiles on my Ubuntu machine, but still the same error message on raspberry:
pi@openplotter:~/watchdog_pi/build $ grep -n include_directories ../cmake/PluginConfigure.cmake | head -n 2
134: include_directories(${BUILD_INCLUDE_PATH}/include)
135: include_directories(${BUILD_INCLUDE_PATH}/src)
pi@openplotter:~/watchdog_pi/build $ cmake ..
...
CMake Error at cmake/PluginSetup.cmake:27 (add_library):
Cannot find source file:
include/WatchdogUI.h
did you delete the build directory and rerun cmake?
On 1/17/22, marcobergman @.***> wrote:
Weirdly enough, with the change you made to PluginConfigure.cmake it compiles on my Ubuntu machine, but still the same error message on raspberry:
***@***.***:~/watchdog_pi/build $ grep -n include_directories ../cmake/PluginConfigure.cmake | head -n 2 134: include_directories(${BUILD_INCLUDE_PATH}/include) 135: include_directories(${BUILD_INCLUDE_PATH}/src) ***@***.***:~/watchdog_pi/build $ cmake .. ... CMake Error at cmake/PluginSetup.cmake:27 (add_library): Cannot find source file: include/WatchdogUI.h
-- Reply to this email directly or view it on GitHub: https://github.com/seandepagnier/watchdog_pi/issues/121#issuecomment-1014395646 You are receiving this because you commented.
Message ID: @.***>
The only changes you should have to make are to CMakeLists.txt in lines 152 - 162, this is where all the files for the project are defined. This area needs to reflect where the files are located, in this case WatchdogUI.h is in the src directory and not the include directory. So changing line 181 from include/WatchdogUI.h
to src/WatchdogUI.h
should be sufficient.
If you change other files that are provided by frontend2 then you will invalidate the update process for building and will no-longer be able to simply upgrade the building process by copying/replacing the requisite files. The failure that is happening is due to cmake being told that a file is in the project when it doesn't exist.
If you find issues with fronend2 then you need to make a pull request to the 'testpluing_pi' project, https://github.com/jongough/testplugin_pi, so that it can be incorporated into frontend2 and therefore not cause issues in the future.
did you delete the build directory and rerun cmake?
You're right - I cleaned the build dir and did a git pull, but the .h file must have been left in the include directory where I moved it to before. Still don't get why this is the only .h file in the src directory.
Having opened my eyes, I think line 181 is the culprit
EDIT: jongough beat me to it
Marco, I think this is old and should be fixed in v2.4.70 although there are some other issues to be fixed. Please close.
Closed it, as I could see the change in CMakeLists.txt.
But could not check it because of my long standing nemesis: Could NOT find wxWidgets (missing: wxWidgets_LIBRARIES wxWidgets_INCLUDE_DIRS). This one is going to be the death of me...
marco isn't there a plugin in PIM?
Oh yeah there is, and no jails there!
Compiled from this source on Raspberry 4/Raspbian 10, OpenCPN 5.6.0 cannot load the plugin, with the following message in the opencpn log: