Package Details: openambit 1:0.5-1

Git Clone URL: https://aur.archlinux.org/openambit.git (read-only, click to copy)
Package Base: openambit
Description: Open software for the Suunto Ambit(2)
Upstream URL: https://github.com/openambitproject/openambit
Licenses: GPL3+
Conflicts: openambit-git
Submitter: fanningert
Maintainer: gosciunew
Last Packager: gosciunew
Votes: 4
Popularity: 0.000000
First Submitted: 2015-08-23 14:56 (UTC)
Last Updated: 2021-07-04 23:45 (UTC)

Dependencies (5)

Required by (0)

Sources (1)

Latest Comments

1 2 Next › Last »

FMB commented on 2021-07-04 18:07 (UTC)

Indeed, now your last PKGBUILD works. Thanks for taking ownership of this package!

gosciunew commented on 2021-07-03 22:57 (UTC) (edited on 2021-07-04 10:22 (UTC) by gosciunew)

Problem on master is solved, so last PKGBUILD prepared by me in comments should work. I asked fanningert to add me as a maintainer. So probably today/tomorrow I will correct PKGBUILD in AUR for this package (to be build from 0.5 tag) and for openambit-git (to be build from master)

FMB commented on 2021-07-03 19:38 (UTC)

No longer compiles :-/

FMB commented on 2020-08-27 21:47 (UTC) (edited on 2020-08-27 21:48 (UTC) by FMB)

gosciunew's PKGBUILD file looks good.

gosciunew commented on 2020-08-26 21:28 (UTC) (edited on 2020-08-26 21:35 (UTC) by gosciunew)

Below version didn't work for me because of missing qt5-tools and missing libmovescount, so i prepared updated version of PKGBUILD which worked for me:

https://pastebin.com/iti73K7c

FMB commented on 2020-08-11 10:10 (UTC) (edited on 2020-08-11 10:15 (UTC) by FMB)

I was able to compile and install the master branch with this PKGBUILD file:

# Maintainer: Thomas Fanninger <thomas@fanninger.at>

pkgname=openambit
pkgver=0.5
pkgrel=1
epoch=1
pkgdesc="Open software for the Suunto Ambit(2)"
arch=('i686' 'x86_64')
url="https://github.com/openambitproject/openambit"
license=('GPL3+')
#depends=('qt4' 'qjson' 'zlib' 'libusb' 'libpcap')
optdepends=()
makedepends=('cmake' 'gcc' 'glibc' 'qt5-base' 'qjson' 'zlib' 'libusb' 'libpcap')
conflicts=('openambit-git')
options=('!strip' '!emptydirs')

source=("$pkgname::git+https://github.com/openambitproject/${pkgname}.git#branch=master")

sha512sums=('SKIP')

prepare() {
  msg2 "Prepare"
}

build() {
  msg2 "Build"
  cd "${srcdir}/${pkgname}"
  BUILD_EXTRAS=0 ./build.sh -DCMAKE_BUILD_TYPE=Release
}

package() {
  msg2 "Package"
  install -Dm0644 "${srcdir}/${pkgname}/libambit-build/libambit.so.0.5.0" "${pkgdir}/usr/lib/${pkgname}/libambit.so.0.5.0"
  ln -s /usr/lib/${pkgname}/libambit.so.0.5.0 $pkgdir/usr/lib/libambit.so.0
  ln -s /usr/lib/${pkgname}/libambit.so.0 $pkgdir/usr/lib/libambit.so

  install -Dm0755 "${srcdir}/${pkgname}/openambit-build/${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
  install -Dm0644 "${srcdir}/${pkgname}/src/libambit/libambit.rules" "${pkgdir}/usr/lib/udev/rules.d/99-suunto-ambit.rules"

  install -Dm0644 "${srcdir}/${pkgname}/tools/movescountXmlDiff.pl" "${pkgdir}/usr/share/${pkgname}/movescountXmlDiff.pl"
  install -Dm0644 "${srcdir}/${pkgname}/tools/openambit2gpx.py" "${pkgdir}/usr/share/${pkgname}/openambit2gpx.py"
}

FMB commented on 2020-08-09 14:32 (UTC)

This is what happens when I try to build the package by using the currently available PKGBUILD:

==> Making package: openambit 1:0.4-2 (Sun Aug  9 16:28:30 2020)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Cloning openambit git repo...
Cloning into bare repository '/tmp/essai/PKGBUILD.orig/openambit'...
remote: Enumerating objects: 209, done.
remote: Counting objects: 100% (209/209), done.
remote: Compressing objects: 100% (153/153), done.
remote: Total 3359 (delta 106), reused 108 (delta 56), pack-reused 3150
Receiving objects: 100% (3359/3359), 1.65 MiB | 3.57 MiB/s, done.
Resolving deltas: 100% (2259/2259), done.
==> Validating source files with sha512sums...
    openambit ... Skipped
==> Extracting sources...
  -> Creating working copy of openambit git repo...
Cloning into 'openambit'...
done.
Switched to a new branch 'makepkg'
==> Starting prepare()...
  -> Prepare
==> Starting build()...
  -> Build
------building libambit------
-- The C compiler identification is GNU 10.1.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Found UDev: /usr/include  
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/essai/PKGBUILD.orig/src/openambit/libambit-build
Scanning dependencies of target ambit
[ 22%] Building C object CMakeFiles/ambit.dir/device_driver_ambit.c.o
[ 22%] Building C object CMakeFiles/ambit.dir/crc16.c.o
[ 22%] Building C object CMakeFiles/ambit.dir/device_driver_ambit_navigation.c.o
[ 22%] Building C object CMakeFiles/ambit.dir/debug.c.o
[ 27%] Building C object CMakeFiles/ambit.dir/device_driver_ambit3.c.o
[ 38%] Building C object CMakeFiles/ambit.dir/device_support.c.o
[ 38%] Building C object CMakeFiles/ambit.dir/device_driver_common.c.o
[ 44%] Building C object CMakeFiles/ambit.dir/distance.c.o
[ 50%] Building C object CMakeFiles/ambit.dir/libambit.c.o
[ 55%] Building C object CMakeFiles/ambit.dir/personal.c.o
/tmp/essai/PKGBUILD.orig/src/openambit/src/libambit/device_driver_ambit3.c: In function 'log_read':
/tmp/essai/PKGBUILD.orig/src/openambit/src/libambit/device_driver_ambit3.c:199:14: warning: variable 'log_entries_notsynced' set but not used [-Wunused-but-set-variable]
  199 |     uint16_t log_entries_notsynced = 0;
      |              ^~~~~~~~~~~~~~~~~~~~~
[ 61%] Building C object CMakeFiles/ambit.dir/pmem20.c.o
[ 66%] Building C object CMakeFiles/ambit.dir/protocol.c.o
[ 72%] Building C object CMakeFiles/ambit.dir/sbem0102.c.o
In file included from /usr/include/string.h:495,
                 from /tmp/essai/PKGBUILD.orig/src/openambit/src/libambit/device_driver_ambit_navigation.c:32:
In function 'strncpy',
    inlined from 'ambit_navigation_read' at /tmp/essai/PKGBUILD.orig/src/openambit/src/libambit/device_driver_ambit_navigation.c:54:9:
/usr/include/bits/string_fortified.h:106:10: warning: '__builtin_strncpy' output may be truncated copying 15 bytes from a string of length 15 [-Wstringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'strncpy',
    inlined from 'ambit_navigation_read' at /tmp/essai/PKGBUILD.orig/src/openambit/src/libambit/device_driver_ambit_navigation.c:55:9:
/usr/include/bits/string_fortified.h:106:10: warning: '__builtin_strncpy' output may be truncated copying 15 bytes from a string of length 15 [-Wstringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ 77%] Building C object CMakeFiles/ambit.dir/sha256.c.o
[ 83%] Building C object CMakeFiles/ambit.dir/utils.c.o
In function 'strncpy',
    inlined from 'ambit_navigation_route_write' at /tmp/essai/PKGBUILD.orig/src/openambit/src/libambit/device_driver_ambit_navigation.c:296:9:
/usr/include/bits/string_fortified.h:106:10: warning: '__builtin_strncpy' output may be truncated copying 15 bytes from a string of length 49 [-Wstringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ 88%] Building C object CMakeFiles/ambit.dir/sport_mode_serialize.c.o
[ 94%] Building C object CMakeFiles/ambit.dir/hidapi/hid-linux.c.o
[100%] Linking C shared library libambit.so
/usr/bin/ld: CMakeFiles/ambit.dir/device_driver_ambit_navigation.c.o:/tmp/essai/PKGBUILD.orig/src/openambit/src/libambit/device_driver_ambit_navigation.h:119: multiple definition of `ambit_waypoint_types_to_movescount'; CMakeFiles/ambit.dir/device_driver_ambit.c.o:/tmp/essai/PKGBUILD.orig/src/openambit/src/libambit/device_driver_ambit_navigation.h:119: first defined here
/usr/bin/ld: CMakeFiles/ambit.dir/device_driver_ambit_navigation.c.o:/tmp/essai/PKGBUILD.orig/src/openambit/src/libambit/device_driver_ambit_navigation.h:118: multiple definition of `ambit_waypoint_types_from_movescount'; CMakeFiles/ambit.dir/device_driver_ambit.c.o:/tmp/essai/PKGBUILD.orig/src/openambit/src/libambit/device_driver_ambit_navigation.h:118: first defined here
/usr/bin/ld: CMakeFiles/ambit.dir/device_driver_ambit3.c.o:/tmp/essai/PKGBUILD.orig/src/openambit/src/libambit/device_driver_ambit_navigation.h:119: multiple definition of `ambit_waypoint_types_to_movescount'; CMakeFiles/ambit.dir/device_driver_ambit.c.o:/tmp/essai/PKGBUILD.orig/src/openambit/src/libambit/device_driver_ambit_navigation.h:119: first defined here
/usr/bin/ld: CMakeFiles/ambit.dir/device_driver_ambit3.c.o:/tmp/essai/PKGBUILD.orig/src/openambit/src/libambit/device_driver_ambit_navigation.h:118: multiple definition of `ambit_waypoint_types_from_movescount'; CMakeFiles/ambit.dir/device_driver_ambit.c.o:/tmp/essai/PKGBUILD.orig/src/openambit/src/libambit/device_driver_ambit_navigation.h:118: first defined here
/usr/bin/ld: CMakeFiles/ambit.dir/device_support.c.o:/tmp/essai/PKGBUILD.orig/src/openambit/src/libambit/device_driver_ambit_navigation.h:119: multiple definition of `ambit_waypoint_types_to_movescount'; CMakeFiles/ambit.dir/device_driver_ambit.c.o:/tmp/essai/PKGBUILD.orig/src/openambit/src/libambit/device_driver_ambit_navigation.h:119: first defined here
/usr/bin/ld: CMakeFiles/ambit.dir/device_support.c.o:/tmp/essai/PKGBUILD.orig/src/openambit/src/libambit/device_driver_ambit_navigation.h:118: multiple definition of `ambit_waypoint_types_from_movescount'; CMakeFiles/ambit.dir/device_driver_ambit.c.o:/tmp/essai/PKGBUILD.orig/src/openambit/src/libambit/device_driver_ambit_navigation.h:118: first defined here
/usr/bin/ld: CMakeFiles/ambit.dir/libambit.c.o:/tmp/essai/PKGBUILD.orig/src/openambit/src/libambit/device_driver_ambit_navigation.h:119: multiple definition of `ambit_waypoint_types_to_movescount'; CMakeFiles/ambit.dir/device_driver_ambit.c.o:/tmp/essai/PKGBUILD.orig/src/openambit/src/libambit/device_driver_ambit_navigation.h:119: first defined here
/usr/bin/ld: CMakeFiles/ambit.dir/libambit.c.o:/tmp/essai/PKGBUILD.orig/src/openambit/src/libambit/device_driver_ambit_navigation.h:118: multiple definition of `ambit_waypoint_types_from_movescount'; CMakeFiles/ambit.dir/device_driver_ambit.c.o:/tmp/essai/PKGBUILD.orig/src/openambit/src/libambit/device_driver_ambit_navigation.h:118: first defined here
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/ambit.dir/build.make:344: libambit.so.0.4.0] Error 1
make[1]: *** [CMakeFiles/Makefile2:95: CMakeFiles/ambit.dir/all] Error 2
make: *** [Makefile:149: all] Error 2
------building movescount------
-- The CXX compiler identification is GNU 10.1.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for Q_WS_X11
-- Looking for Q_WS_X11 - found
-- Looking for Q_WS_WIN
-- Looking for Q_WS_WIN - not found
-- Looking for Q_WS_QWS
-- Looking for Q_WS_QWS - not found
-- Looking for Q_WS_MAC
-- Looking for Q_WS_MAC - not found
-- Found Qt4: /usr/bin/qmake-qt4 (found version "4.8.7") 
-- Found ZLIB: /usr/lib/libz.so (found version "1.2.11") 
-- libambit not found, building from source in /tmp/essai/PKGBUILD.orig/src/openambit/src/movescount/../libambit/
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/essai/PKGBUILD.orig/src/openambit/movescount-build
Scanning dependencies of target movescount_autogen
[  7%] Automatic MOC for target movescount
[  7%] Built target movescount_autogen
Scanning dependencies of target movescount
[ 28%] Building CXX object CMakeFiles/movescount.dir/sportmode.cpp.o
[ 28%] Building CXX object CMakeFiles/movescount.dir/deviceinfo.cpp.o
[ 28%] Building CXX object CMakeFiles/movescount.dir/movescount_autogen/mocs_compilation.cpp.o
[ 35%] Building CXX object CMakeFiles/movescount.dir/sportmodegroup.cpp.o
[ 42%] Building CXX object CMakeFiles/movescount.dir/movescountsettings.cpp.o
[ 50%] Building CXX object CMakeFiles/movescount.dir/logentry.cpp.o
[ 57%] Building CXX object CMakeFiles/movescount.dir/logstore.cpp.o
[ 64%] Building CXX object CMakeFiles/movescount.dir/movescount.cpp.o
[ 71%] Building CXX object CMakeFiles/movescount.dir/movescountjson.cpp.o
[ 78%] Building CXX object CMakeFiles/movescount.dir/movescountlogdirentry.cpp.o
[ 85%] Building CXX object CMakeFiles/movescount.dir/movescountxml.cpp.o
make[2]: *** No rule to make target '../libambit/libambit.so.0', needed by 'libmovescount.so.0.3.0'.  Stop.
make[2]: *** Waiting for unfinished jobs....
[ 92%] Building CXX object CMakeFiles/movescount.dir/movescountlogchecker.cpp.o
make[1]: *** [CMakeFiles/Makefile2:96: CMakeFiles/movescount.dir/all] Error 2
make: *** [Makefile:149: all] Error 2
------building openambit------
-- The CXX compiler identification is GNU 10.1.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for Q_WS_X11
-- Looking for Q_WS_X11 - found
-- Looking for Q_WS_WIN
-- Looking for Q_WS_WIN - not found
-- Looking for Q_WS_QWS
-- Looking for Q_WS_QWS - not found
-- Looking for Q_WS_MAC
-- Looking for Q_WS_MAC - not found
-- Found Qt4: /usr/bin/qmake-qt4 (found version "4.8.7") 
-- libambit not found, building from source in /tmp/essai/PKGBUILD.orig/src/openambit/src/openambit/../libambit/
-- Movescount not found, building from source in /tmp/essai/PKGBUILD.orig/src/openambit/src/openambit/../
-- Found UDev: /usr/include  
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/essai/PKGBUILD.orig/src/openambit/openambit-build
Scanning dependencies of target openambit_autogen
[  3%] Automatic MOC for target openambit
[  3%] Built target openambit_autogen
[ 14%] Generating openambit_sv.qm
[ 14%] Generating ui_mainwindow.h
[ 14%] Generating ui_confirmbetadialog.h
[ 17%] Generating ui_settingsdialog.h
[ 21%] Generating qrc_resources.cxx
[ 25%] Generating openambit_de.qm
[ 28%] Generating openambit_it.qm
[ 32%] Generating openambit_fr.qm
Updating '/tmp/essai/PKGBUILD.orig/src/openambit/openambit-build/openambit_sv.qm'...
Updating '/tmp/essai/PKGBUILD.orig/src/openambit/openambit-build/openambit_de.qm'...
    Generated 66 translation(s) (66 finished and 0 unfinished)
    Ignored 3 untranslated source text(s)
    Generated 78 translation(s) (78 finished and 0 unfinished)
Updating '/tmp/essai/PKGBUILD.orig/src/openambit/openambit-build/openambit_fr.qm'...
Updating '/tmp/essai/PKGBUILD.orig/src/openambit/openambit-build/openambit_it.qm'...
    Generated 67 translation(s) (67 finished and 0 unfinished)
    Ignored 2 untranslated source text(s)
    Generated 68 translation(s) (68 finished and 0 unfinished)
    Ignored 1 untranslated source text(s)
[ 35%] Generating openambit_ja.qm
[ 42%] Generating openambit_nb_NO.qm
[ 46%] Generating openambit_pl.qm
[ 46%] Generating openambit_nl.qm
Updating '/tmp/essai/PKGBUILD.orig/src/openambit/openambit-build/openambit_ja.qm'...
    Generated 62 translation(s) (62 finished and 0 unfinished)
    Ignored 5 untranslated source text(s)
Updating '/tmp/essai/PKGBUILD.orig/src/openambit/openambit-build/openambit_nb_NO.qm'...
Updating '/tmp/essai/PKGBUILD.orig/src/openambit/openambit-build/openambit_nl.qm'...
    Generated 77 translation(s) (77 finished and 0 unfinished)
    Ignored 1 untranslated source text(s)
    Generated 62 translation(s) (62 finished and 0 unfinished)
    Ignored 5 untranslated source text(s)
Updating '/tmp/essai/PKGBUILD.orig/src/openambit/openambit-build/openambit_pl.qm'...
    Generated 67 translation(s) (64 finished and 3 unfinished)
    Ignored 2 untranslated source text(s)
[ 50%] Generating qrc_ts.cxx
Scanning dependencies of target openambit
[ 60%] Building CXX object CMakeFiles/openambit.dir/devicemanager.cpp.o
[ 60%] Building CXX object CMakeFiles/openambit.dir/openambit_autogen/mocs_compilation.cpp.o
[ 60%] Building CXX object CMakeFiles/openambit.dir/confirmbetadialog.cpp.o
[ 64%] Building CXX object CMakeFiles/openambit.dir/logview.cpp.o
[ 67%] Building CXX object CMakeFiles/openambit.dir/main.cpp.o
[ 75%] Building CXX object CMakeFiles/openambit.dir/mainwindow.cpp.o
[ 75%] Building CXX object CMakeFiles/openambit.dir/settings.cpp.o
[ 78%] Building CXX object CMakeFiles/openambit.dir/settingsdialog.cpp.o
[ 82%] Building CXX object CMakeFiles/openambit.dir/signalhandler.cpp.o
[ 85%] Building CXX object CMakeFiles/openambit.dir/single_application.cpp.o
[ 89%] Building CXX object CMakeFiles/openambit.dir/udevlistener.cpp.o
[ 92%] Building CXX object CMakeFiles/openambit.dir/qrc_resources.cxx.o
make[2]: *** No rule to make target '../libambit/libambit.so.0', needed by 'openambit'.  Stop.
make[2]: *** Waiting for unfinished jobs....
[ 96%] Building CXX object CMakeFiles/openambit.dir/qrc_ts.cxx.o
/tmp/essai/PKGBUILD.orig/src/openambit/src/openambit/signalhandler.cpp: In static member function 'static void SignalHandler::POSIX_handleFunc(int)':
/tmp/essai/PKGBUILD.orig/src/openambit/src/openambit/signalhandler.cpp:156:14: warning: ignoring return value of 'ssize_t write(int, const void*, size_t)' declared with attribute 'warn_unused_result' [-Wunused-result]
  156 |         write(POSIX_fd[0], &signo, sizeof(signo));
      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/essai/PKGBUILD.orig/src/openambit/src/openambit/signalhandler.cpp: In member function 'void SignalHandler::POSIX_socketRecv()':
/tmp/essai/PKGBUILD.orig/src/openambit/src/openambit/signalhandler.cpp:167:9: warning: ignoring return value of 'ssize_t read(int, void*, size_t)' declared with attribute 'warn_unused_result' [-Wunused-result]
  167 |     read(POSIX_fd[1], &signo, sizeof(signo));
      |     ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[1]: *** [CMakeFiles/Makefile2:96: CMakeFiles/openambit.dir/all] Error 2
make: *** [Makefile:149: all] Error 2
==> Entering fakeroot environment...
==> Starting package()...
  -> Package
install: cannot stat '/tmp/essai/PKGBUILD.orig/src/openambit/libambit-build/libambit.so.0.4.0': No such file or directory
==> ERROR: A failure occurred in package().
    Aborting...

On the other hand, when I try to use Strawpants' PKGBUILD (of course, I'd rather make this one work, since it is more recent):

==> Making package: openambit 1:0.5-1 (Sun Aug  9 16:22:15 2020)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Cloning openambit git repo...
Cloning into bare repository '/tmp/essai/PKGBUILD/openambit'...
remote: Enumerating objects: 209, done.
remote: Counting objects: 100% (209/209), done.
remote: Compressing objects: 100% (153/153), done.
remote: Total 3359 (delta 106), reused 108 (delta 56), pack-reused 3150
Receiving objects: 100% (3359/3359), 1.65 MiB | 3.57 MiB/s, done.
Resolving deltas: 100% (2259/2259), done.
==> Validating source files with sha512sums...
    openambit ... Skipped
==> Extracting sources...
  -> Creating working copy of openambit git repo...
Cloning into 'openambit'...
done.
Switched to a new branch 'makepkg'
==> Starting prepare()...
  -> Prepare
==> Starting build()...
  -> Build
------building libambit------
-- The C compiler identification is GNU 10.1.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Found UDev: /usr/include  
-- Found hidapi:  hidapi;/usr/include hidapi/hid-linux.c /usr/lib/libudev.so
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/essai/PKGBUILD/src/openambit/libambit-build
Scanning dependencies of target ambit
[ 16%] Building C object CMakeFiles/ambit.dir/device_driver_ambit.c.o
[ 16%] Building C object CMakeFiles/ambit.dir/debug.c.o
[ 16%] Building C object CMakeFiles/ambit.dir/crc16.c.o
[ 22%] Building C object CMakeFiles/ambit.dir/device_driver_ambit_navigation.c.o
[ 27%] Building C object CMakeFiles/ambit.dir/device_driver_ambit3.c.o
[ 33%] Building C object CMakeFiles/ambit.dir/device_driver_common.c.o
[ 38%] Building C object CMakeFiles/ambit.dir/device_support.c.o
[ 44%] Building C object CMakeFiles/ambit.dir/distance.c.o
[ 50%] Building C object CMakeFiles/ambit.dir/libambit.c.o
[ 55%] Building C object CMakeFiles/ambit.dir/personal.c.o
[ 61%] Building C object CMakeFiles/ambit.dir/pmem20.c.o
[ 66%] Building C object CMakeFiles/ambit.dir/protocol.c.o
[ 72%] Building C object CMakeFiles/ambit.dir/sbem0102.c.o
In file included from /usr/include/string.h:495,
                 from /tmp/essai/PKGBUILD/src/openambit/src/libambit/device_driver_ambit_navigation.c:32:
In function 'strncpy',
    inlined from 'ambit_navigation_read' at /tmp/essai/PKGBUILD/src/openambit/src/libambit/device_driver_ambit_navigation.c:54:9:
/usr/include/bits/string_fortified.h:106:10: warning: '__builtin_strncpy' output may be truncated copying 15 bytes from a string of length 15 [-Wstringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'strncpy',
    inlined from 'ambit_navigation_read' at /tmp/essai/PKGBUILD/src/openambit/src/libambit/device_driver_ambit_navigation.c:55:9:
/usr/include/bits/string_fortified.h:106:10: warning: '__builtin_strncpy' output may be truncated copying 15 bytes from a string of length 15 [-Wstringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ 77%] Building C object CMakeFiles/ambit.dir/sha256.c.o
[ 83%] Building C object CMakeFiles/ambit.dir/utils.c.o
In function 'strncpy',
    inlined from 'ambit_navigation_route_write' at /tmp/essai/PKGBUILD/src/openambit/src/libambit/device_driver_ambit_navigation.c:297:9:
/usr/include/bits/string_fortified.h:106:10: warning: '__builtin_strncpy' output may be truncated copying 15 bytes from a string of length 49 [-Wstringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ 88%] Building C object CMakeFiles/ambit.dir/sport_mode_serialize.c.o
[ 94%] Building C object CMakeFiles/ambit.dir/hidapi/hid-linux.c.o
[100%] Linking C shared library libambit.so
/usr/bin/ld: CMakeFiles/ambit.dir/device_driver_ambit_navigation.c.o:(.rodata+0x0): multiple definition of `ambit_waypoint_types_to_movescount'; CMakeFiles/ambit.dir/device_driver_ambit.c.o:(.rodata+0x0): first defined here
/usr/bin/ld: CMakeFiles/ambit.dir/device_driver_ambit_navigation.c.o:(.rodata+0x20): multiple definition of `ambit_waypoint_types_from_movescount'; CMakeFiles/ambit.dir/device_driver_ambit.c.o:(.rodata+0x20): first defined here
/usr/bin/ld: CMakeFiles/ambit.dir/device_driver_ambit3.c.o:(.rodata+0xf0): multiple definition of `ambit_waypoint_types_to_movescount'; CMakeFiles/ambit.dir/device_driver_ambit.c.o:(.rodata+0x0): first defined here
/usr/bin/ld: CMakeFiles/ambit.dir/device_driver_ambit3.c.o:(.rodata+0x120): multiple definition of `ambit_waypoint_types_from_movescount'; CMakeFiles/ambit.dir/device_driver_ambit.c.o:(.rodata+0x20): first defined here
/usr/bin/ld: CMakeFiles/ambit.dir/device_support.c.o:(.rodata+0x0): multiple definition of `ambit_waypoint_types_to_movescount'; CMakeFiles/ambit.dir/device_driver_ambit.c.o:(.rodata+0x0): first defined here
/usr/bin/ld: CMakeFiles/ambit.dir/device_support.c.o:(.rodata+0x20): multiple definition of `ambit_waypoint_types_from_movescount'; CMakeFiles/ambit.dir/device_driver_ambit.c.o:(.rodata+0x20): first defined here
/usr/bin/ld: CMakeFiles/ambit.dir/libambit.c.o:(.rodata+0x10): multiple definition of `ambit_waypoint_types_to_movescount'; CMakeFiles/ambit.dir/device_driver_ambit.c.o:(.rodata+0x0): first defined here
/usr/bin/ld: CMakeFiles/ambit.dir/libambit.c.o:(.rodata+0x40): multiple definition of `ambit_waypoint_types_from_movescount'; CMakeFiles/ambit.dir/device_driver_ambit.c.o:(.rodata+0x20): first defined here
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/ambit.dir/build.make:344: libambit.so.0.4.0] Error 1
make[1]: *** [CMakeFiles/Makefile2:95: CMakeFiles/ambit.dir/all] Error 2
make: *** [Makefile:149: all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...

Strawpants commented on 2020-04-11 21:08 (UTC)

A 'new' version tagged 0.5 is now available on github. Here's a PKGBUILD which worked for me. It also removes the qt4 dependency. all the best,

Roelof

# Maintainer: Thomas Fanninger <thomas@fanninger.at>

pkgname=openambit
pkgver=0.5
pkgrel=1
epoch=1
pkgdesc="Open software for the Suunto Ambit(2)"
arch=('i686' 'x86_64')
url="https://github.com/openambitproject/openambit"
license=('GPL3+')
#depends=('qt4' 'qjson' 'zlib' 'libusb' 'libpcap')
optdepends=()
makedepends=('cmake' 'gcc' 'glibc' 'qt5-base' 'qjson' 'zlib' 'libusb' 'libpcap')
conflicts=('openambit-git')
options=('!strip' '!emptydirs')

source=("$pkgname::git+https://github.com/openambitproject/${pkgname}.git#tag=${pkgver}")

sha512sums=('SKIP')

prepare() {
  msg2 "Prepare"
}

build() {
  msg2 "Build"
  cd "${srcdir}/${pkgname}"
  BUILD_EXTRAS=0 ./build.sh -DCMAKE_BUILD_TYPE=Release
}

package() {
  msg2 "Package"
  install -Dm0644 "${srcdir}/${pkgname}/libambit-build/libambit.so.0.4.0" "${pkgdir}/usr/lib/${pkgname}/libambit.so.0.4.0"
  ln -s /usr/lib/${pkgname}/libambit.so.0.4.0 $pkgdir/usr/lib/libambit.so.0
  ln -s /usr/lib/${pkgname}/libambit.so.0 $pkgdir/usr/lib/libambit.so

  install -Dm0755 "${srcdir}/${pkgname}/openambit-build/${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
  #install -Dm0644 "${srcdir}/${pkgname}/src/openambit/deployment/99-suunto-ambit.rules" "${pkgdir}/usr/lib/udev/rules.d/99-suunto-ambit.rules"

  install -Dm0644 "${srcdir}/${pkgname}/tools/movescountXmlDiff.pl" "${pkgdir}/usr/share/${pkgname}/movescountXmlDiff.pl"
  install -Dm0644 "${srcdir}/${pkgname}/tools/openambit2gpx.py" "${pkgdir}/usr/share/${pkgname}/openambit2gpx.py"
}

twilk commented on 2019-11-12 17:07 (UTC)

@mr_fred: That's because the symlinks in /usr/lib aren't chained properly.

This patch for the AUR package solves the problem for me:

diff --git a/.SRCINFO b/.SRCINFO
index da820c5..dd02de3 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,5 +1,3 @@
-# Generated by mksrcinfo v8
-# Thu Nov  9 19:33:23 UTC 2017
 pkgbase = openambit
    pkgdesc = Open software for the Suunto Ambit(2)
    pkgver = 0.4
@@ -12,7 +10,7 @@ pkgbase = openambit
    makedepends = cmake
    makedepends = gcc
    makedepends = glibc
-   makedepends = qt4
+   makedepends = qt5-tools
    makedepends = qjson
    makedepends = zlib
    makedepends = libusb
@@ -20,7 +18,7 @@ pkgbase = openambit
    conflicts = openambit-git
    options = !strip
    options = !emptydirs
-   source = openambit::git+https://github.com/openambitproject/openambit.git#tag=0.4
+   source = openambit::git+https://github.com/openambitproject/openambit.git
    sha512sums = SKIP

 pkgname = openambit
diff --git a/PKGBUILD b/PKGBUILD
index 45ed100..be9fcf5 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -10,29 +10,27 @@ url="http://openambit.org/"
 license=('GPL3+')
 #depends=('qt4' 'qjson' 'zlib' 'libusb' 'libpcap')
 optdepends=()
-makedepends=('cmake' 'gcc' 'glibc' 'qt4' 'qjson' 'zlib' 'libusb' 'libpcap')
+makedepends=('cmake' 'gcc' 'glibc' 'qt5-tools' 'qjson' 'zlib' 'libusb' 'libpcap')
 conflicts=('openambit-git')
 options=('!strip' '!emptydirs')

-source=("$pkgname::git+https://github.com/openambitproject/${pkgname}.git#tag=${pkgver}")
+source=("$pkgname::git+https://github.com/openambitproject/${pkgname}.git")

 sha512sums=('SKIP')

-prepare() {
-  msg2 "Prepare"
-}
-
 build() {
-  msg2 "Build"
   cd "${srcdir}/${pkgname}"
-  ./build.sh -DCMAKE_BUILD_TYPE=Debug
+  BUILD_EXTRAS=0 ./build.sh -DCMAKE_BUILD_TYPE=Debug
 }

 package() {
-  msg2 "Package"
   install -Dm0644 "${srcdir}/${pkgname}/libambit-build/libambit.so.0.4.0" "${pkgdir}/usr/lib/${pkgname}/libambit.so.0.4.0"
-  ln -s /usr/lib/${pkgname}/libambit.so.0.4.0 $pkgdir/usr/lib/libambit.so.0
-  ln -s /usr/lib/${pkgname}/libambit.so.0 $pkgdir/usr/lib/libambit.so
+  ln -s "${pkgname}/libambit.so.0.4.0" "$pkgdir/usr/lib/libambit.so.0"
+  ln -s libambit.so.0 "$pkgdir/usr/lib/libambit.so"
+
+  install -Dm0644 "${srcdir}/${pkgname}/movescount-build/libmovescount.so.0.3.0" "${pkgdir}/usr/lib/${pkgname}/libmovescount.so.0.3.0"
+  ln -s "${pkgname}/libmovescount.so.0.3.0" "$pkgdir/usr/lib/libmovescount.so.0"
+  ln -s libmovescount.so.0 "$pkgdir/usr/lib/libmovescount.so"

   install -Dm0755 "${srcdir}/${pkgname}/openambit-build/${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
   #install -Dm0644 "${srcdir}/${pkgname}/src/openambit/deployment/99-suunto-ambit.rules" "${pkgdir}/usr/lib/udev/rules.d/99-suunto-ambit.rules"

(CC @fanningert)

mr_fred commented on 2019-09-02 15:14 (UTC)

The build appears to work correctly but when i attempt to open openambit i recieve the error

> openambit
openambit: error while loading shared libraries: libmovescount.so.0: cannot open shared object file: No such file or directory