Coder Social home page Coder Social logo

rasbats / dr_pi Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 29.0 4.53 MB

Add DR positions to a route (saved as a GPX file)

License: GNU General Public License v3.0

C++ 31.17% C 63.00% CMake 1.77% Shell 1.44% Batchfile 0.18% Python 2.27% Makefile 0.03% HTML 0.07% Meson 0.08%

dr_pi's People

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

dr_pi's Issues

Forcing option GTK3 induces an error as findGTK3.cmake is not in path (OpenSUSE)

@Rasbats
@jongough

When force the selection of GTK3 (as auto selection still complains of missing gtk2) by the option in make cmake command and fails to complete the configuration.

BUILD_GTK3="true";\
cmake -DCMAKE_SKIP_RPATH=ON \
      -DOCPN_FORCE_GTK3=ON  \
      -DCMAKE_INSTALL_PREFIX=%{_prefix} \
      -DCFLAGS="-O2 -march=native" \
      ../
make

I still get an configuration error (see details bellow).
The following patch corrects the GTK3 issue.

diff --git a/cmake/PluginConfigure.cmake b/cmake/PluginConfigure.cmake
index 069bfd7..03e1fe6 100644
--- a/cmake/PluginConfigure.cmake
+++ b/cmake/PluginConfigure.cmake
@@ -393,7 +393,8 @@ if(NOT WIN32
         set(GTK_LIBRARIES ${GTK2_LIBRARIES})
         message(STATUS "${CMLOC}Building against GTK2...")
     else(GTK2_FOUND)
-        find_package(GTK3)
+       find_package(PkgConfig)
+        pkg_check_modules(GTK3 gtk+-3.0)
         include_directories(${GTK3_INCLUDE_DIRS})
         set(GTK_LIBRARIES ${GTK3_LIBRARIES})
         set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__WXGTK3__")

---------- configuration error log extract without the patch----------------

[    5s] CMake Warning at cmake/PluginConfigure.cmake:396 (find_package):
[    5s]   By not providing "FindGTK3.cmake" in CMAKE_MODULE_PATH this project has
[    5s]   asked CMake to find a package configuration file provided by "GTK3", but
[    5s]   CMake did not find one.
[    5s] 
[    5s]   Could not find a package configuration file provided by "GTK3" with any of
[    5s]   the following names:
[    5s] 
[    5s]     GTK3Config.cmake
[    5s]     gtk3-config.cmake
[    5s] 
[    5s]   Add the installation prefix of "GTK3" to CMAKE_PREFIX_PATH or set
[    5s]   "GTK3_DIR" to a directory containing one of the above files.  If "GTK3"
[    5s]   provides a separate development package or SDK, be sure it has been
[    5s]   installed.
[    5s] Call Stack (most recent call first):
[    5s]   CMakeLists.txt:123 (include)

Building Dead Reckoning Plugin fails on ARM RPI3 & Tegra TK1.

While trying to build this plugin the build stops with this error:

`Building Dead Reckoning Plugin.....
Checking for Pre-Existing Dead Reckoning Plugin Folder.....
Checking to see if you have the latest updates...
From git://github.com/Rasbats/DR_pi
d110497..4b3dc7e master -> origin/master

  • [new tag] v1.0 -> v1.0
    Updating d110497..4b3dc7e
    Fast-forward
    src/DRgui_impl.cpp | 88 +++++----
    src/DRgui_impl.h | 12 +-
    src/NavFunc.cpp | 517 +++++++++++++++++++++++++++++++++++++++++++++--------
    src/NavFunc.h | 31 +++-
    4 files changed, 519 insertions(+), 129 deletions(-)
    Checking for DR_pi build directory.....
    Removing CMakeCache.txt from build directory for a fresh build.....
    Configuring Dead Reckoning Plugin with Cmake.....
    -- *** Staging to build DR_pi ***
    -- Found wxWidgets: TRUE
    -- Looking for XOpenDisplay in /usr/lib/arm-linux-gnueabihf/libX11.so;/usr/lib/arm-linux-gnueabihf/libXext.so
    -- Looking for XOpenDisplay in /usr/lib/arm-linux-gnueabihf/libX11.so;/usr/lib/arm-linux-gnueabihf/libXext.so - found
    -- Looking for gethostbyname
    -- Looking for gethostbyname - found
    -- Looking for connect
    -- Looking for connect - found
    -- Looking for remove
    -- Looking for remove - found
    -- Looking for shmat
    -- Looking for shmat - found
    -- Looking for IceConnectionNumber in ICE
    -- Looking for IceConnectionNumber in ICE - found
    -- Found X11: /usr/lib/arm-linux-gnueabihf/libX11.so
    -- Found OpenGL: /usr/lib/arm-linux-gnueabihf/libGL.so
    -- Found OpenGL...
    -- Lib: /usr/lib/arm-linux-gnueabihf/libGLU.so/usr/lib/arm-linux-gnueabihf/libGL.so/usr/lib/arm-linux-gnueabihf/libSM.so/usr/lib/arm-linux-gnueabihf/libICE.so/usr/lib/arm-linux-gnueabihf/libX11.so/usr/lib/arm-linux-gnueabihf/libXext.so
    -- Include: /usr/include
    -- Found Gettext: /usr/bin/msgmerge (found version "0.19.3")
    -- Found BZip2: /usr/lib/arm-linux-gnueabihf/libbz2.so (found version "1.0.6")
    -- Looking for BZ2_bzCompressInit in /usr/lib/arm-linux-gnueabihf/libbz2.so
    -- Looking for BZ2_bzCompressInit in /usr/lib/arm-linux-gnueabihf/libbz2.so - found
    -- Found ZLIB: /usr/lib/arm-linux-gnueabihf/libz.so (found version "1.2.8")
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /home/pi/GitOpenCPN/Seans_Plugins/DR_pi/build
    Configuring with cmake of Dead Reckoning Plugin was Successful...
    Scanning dependencies of target DR-i18n
    [ 3%] DR_pi-i18n: Done.
    [ 74%] Built target DR-i18n
    Scanning dependencies of target DR_pi
    [ 77%] Building CXX object CMakeFiles/DR_pi.dir/src/DR_pi.cpp.o
    [ 80%] Building CXX object CMakeFiles/DR_pi.dir/src/DRgui_impl.cpp.o
    /home/pi/GitOpenCPN/Seans_Plugins/DR_pi/src/DRgui_impl.cpp: In member function ‘bool Dlg::OpenXML()’:
    /home/pi/GitOpenCPN/Seans_Plugins/DR_pi/src/DRgui_impl.cpp:112:33: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
    else if(response = wxID_CANCEL){
    ^
    /home/pi/GitOpenCPN/Seans_Plugins/DR_pi/src/DRgui_impl.cpp:94:6: warning: unused variable ‘my_count’ [-Wunused-variable]
    int my_count = 0;
    ^
    /home/pi/GitOpenCPN/Seans_Plugins/DR_pi/src/DRgui_impl.cpp: In member function ‘void Dlg::Calculate(wxCommandEvent&, bool, int)’:
    /home/pi/GitOpenCPN/Seans_Plugins/DR_pi/src/DRgui_impl.cpp:294:7: warning: unused variable ‘routepoints’ [-Wunused-variable]
    int routepoints = n+1; //3
    ^
    /home/pi/GitOpenCPN/Seans_Plugins/DR_pi/src/DRgui_impl.cpp:299:26: warning: variable ‘myLast’ set but not used [-Wunused-but-set-variable]
    double remaining_dist, myLast, route_dist;
    ^
    /home/pi/GitOpenCPN/Seans_Plugins/DR_pi/src/DRgui_impl.cpp:306:8: warning: unused variable ‘skip’ [-Wunused-variable]
    bool skip = false;
    ^
    /home/pi/GitOpenCPN/Seans_Plugins/DR_pi/src/DRgui_impl.cpp:307:8: warning: unused variable ‘inloop’ [-Wunused-variable]
    bool inloop = false;
    ^
    /home/pi/GitOpenCPN/Seans_Plugins/DR_pi/src/DRgui_impl.cpp:308:8: warning: unused variable ‘setF’ [-Wunused-variable]
    bool setF = false;
    ^
    /home/pi/GitOpenCPN/Seans_Plugins/DR_pi/src/DRgui_impl.cpp:187:6: warning: variable ‘num_hours’ set but not used [-Wunused-but-set-variable]
    int num_hours;
    ^
    [ 83%] Building CXX object CMakeFiles/DR_pi.dir/src/NavFunc.cpp.o
    /home/pi/GitOpenCPN/Seans_Plugins/DR_pi/src/NavFunc.cpp: In function ‘double fromDMStodouble(char_)’:
    /home/pi/GitOpenCPN/Seans_Plugins/DR_pi/src/NavFunc.cpp:125:19: error: ‘abs’ is not a member of ‘std’
    s = (double) (std::abs(d)) + ((double) m + s / 60.0) / 60.0;
    ^
    /home/pi/GitOpenCPN/Seans_Plugins/DR_pi/src/NavFunc.cpp:125:19: note: suggested alternative:
    In file included from /usr/include/wx-3.0/wx/string.h:42:0,
    from /usr/include/wx-3.0/wx/memory.h:15,
    from /usr/include/wx-3.0/wx/object.h:19,
    from /usr/include/wx-3.0/wx/event.h:16,
    from /usr/include/wx-3.0/wx/window.h:18,
    from /usr/include/wx-3.0/wx/nonownedwnd.h:14,
    from /usr/include/wx-3.0/wx/toplevel.h:20,
    from /usr/include/wx-3.0/wx/dialog.h:14,
    from /usr/include/wx-3.0/wx/msgdlg.h:18,
    from /home/pi/GitOpenCPN/Seans_Plugins/DR_pi/src/NavFunc.h:36,
    from /home/pi/GitOpenCPN/Seans_Plugins/DR_pi/src/NavFunc.cpp:27:
    /usr/include/stdlib.h:775:12: note: ‘abs’
    extern int abs (int x) __THROW __attribute ((const)) wur;
    ^
    /home/pi/GitOpenCPN/Seans_Plugins/DR_pi/src/NavFunc.cpp: In function ‘bool destLoxodrome(double, double, double, double, double
    , double
    )’:
    /home/pi/GitOpenCPN/Seans_Plugins/DR_pi/src/NavFunc.cpp:282:7: error: ‘abs’ is not a member of ‘std’
    if (std::abs(brng - 90)< 1e-10) {
    ^
    /home/pi/GitOpenCPN/Seans_Plugins/DR_pi/src/NavFunc.cpp:282:7: note: suggested alternative:
    In file included from /usr/include/wx-3.0/wx/string.h:42:0,
    from /usr/include/wx-3.0/wx/memory.h:15,
    from /usr/include/wx-3.0/wx/object.h:19,
    from /usr/include/wx-3.0/wx/event.h:16,
    from /usr/include/wx-3.0/wx/window.h:18,
    from /usr/include/wx-3.0/wx/nonownedwnd.h:14,
    from /usr/include/wx-3.0/wx/toplevel.h:20,
    from /usr/include/wx-3.0/wx/dialog.h:14,
    from /usr/include/wx-3.0/wx/msgdlg.h:18,
    from /home/pi/GitOpenCPN/Seans_Plugins/DR_pi/src/NavFunc.h:36,
    from /home/pi/GitOpenCPN/Seans_Plugins/DR_pi/src/NavFunc.cpp:27:
    /usr/include/stdlib.h:775:12: note: ‘abs’
    extern int abs (int x) __THROW __attribute ((const)) wur;
    ^
    /home/pi/GitOpenCPN/Seans_Plugins/DR_pi/src/NavFunc.cpp:286:7: error: ‘abs’ is not a member of ‘std’
    if (std::abs(brng - 270) < 1e-10) {
    ^
    /home/pi/GitOpenCPN/Seans_Plugins/DR_pi/src/NavFunc.cpp:286:7: note: suggested alternative:
    In file included from /usr/include/wx-3.0/wx/string.h:42:0,
    from /usr/include/wx-3.0/wx/memory.h:15,
    from /usr/include/wx-3.0/wx/object.h:19,
    from /usr/include/wx-3.0/wx/event.h:16,
    from /usr/include/wx-3.0/wx/window.h:18,
    from /usr/include/wx-3.0/wx/nonownedwnd.h:14,
    from /usr/include/wx-3.0/wx/toplevel.h:20,
    from /usr/include/wx-3.0/wx/dialog.h:14,
    from /usr/include/wx-3.0/wx/msgdlg.h:18,
    from /home/pi/GitOpenCPN/Seans_Plugins/DR_pi/src/NavFunc.h:36,
    from /home/pi/GitOpenCPN/Seans_Plugins/DR_pi/src/NavFunc.cpp:27:
    /usr/include/stdlib.h:775:12: note: ‘abs’
    extern int abs (int __x) __THROW __attribute
    ((const)) wur;
    ^
    /home/pi/GitOpenCPN/Seans_Plugins/DR_pi/src/NavFunc.cpp: In function ‘void toSM_ECC(double, double, double, double, double
    , double
    )’:
    /home/pi/GitOpenCPN/Seans_Plugins/DR_pi/src/NavFunc.cpp:379:15: warning: unused variable ‘y4’ [-Wunused-variable]
    const double y4 = y3 - y30;
    ^
    CMakeFiles/DR_pi.dir/build.make:146: recipe for target 'CMakeFiles/DR_pi.dir/src/NavFunc.cpp.o' failed
    make[2]: *_* [CMakeFiles/DR_pi.dir/src/NavFunc.cpp.o] Error 1
    CMakeFiles/Makefile2:153: recipe for target 'CMakeFiles/DR_pi.dir/all' failed
    make[1]: *** [CMakeFiles/DR_pi.dir/all] Error 2
    Makefile:127: recipe for target 'all' failed
    make: *** [all] Error 2
    Building Dead Reckoning Plugin Failed

Any advice on how to fix this problem?

Thanks,
Freddie

please tag releases

Dear developer,

I would like to make your plugin available to the users of Gentoo Linux.

Right now this is not possible because there are no releases available for your plugin.

It would be very usefull to have tagged releases, so the source for a specific version of the plugin can be downloaded. Please add a release/tag for your released versions. This makes packaging a lot easier.

Please see: Creating Releases

Thanks in advance!

FS#2698 - Many plugins cannot compile with new PluginConfigure.cmake requiring to run from a git repo

FS#2698 - Many plugins cannot compile with new PluginConfigure.cmake requiring to run from a git repo

The new version of PluginConfigure.cmake file written by John Gaugh and reused for several plugins (see list bellow) requires the build to be run fro ma git valid repo.
When building packages in the distro system (my case Open Build System from OpenSUSE), the source used for the build is a copy and not a valid git repo, so the cmake fails miserably.

Having at least an option to deactivate that feature to allow and off git build is required.

Could we have a clean solution to by overcome that feature when not needded ?

Thanks.

Dominig

OpenCPN-DR_pi
OpenCPN-nmeaconverter_pi
OpenCPN-ocpn_draw_pi
OpenCPN-photolayer_pi
OpenCPN-UKTides_pi
OpenCPN-vfkaps_pi

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.