Package Details: g2o-git r692.0fb5b33-1

Git Clone URL: https://aur.archlinux.org/g2o-git.git (read-only)
Package Base: g2o-git
Description: A General Framework for Graph Optimization
Upstream URL: https://github.com/RainerKuemmerle/g2o
Licenses: BSD
Conflicts: g2o-svn
Provides: g2o
Submitter: kartikmohta
Maintainer: kartikmohta
Last Packager: kartikmohta
Votes: 0
Popularity: 0.000000
First Submitted: 2014-12-09 03:19
Last Updated: 2015-06-09 06:24

Dependencies (6)

Required by (0)

Sources (1)

Latest Comments

skunk commented on 2017-02-23 22:38

Fix: The install line should probably rather be

install -D -m 644 -t $pkgdir/usr/share/cmake/Modules $srcdir/$pkgname/cmake_modules/FindG2O.cmake

skunk commented on 2017-02-23 22:24

I also found that qt4 is no longer supported in g2o; it uses qt5 now, see https://github.com/RainerKuemmerle/g2o/commit/4bcabdfb48d4a0a39663fff3623f005fe253f74b

I thus updated the PKGBUILD to

depends=('suitesparse' 'qt5-base' 'eigen3' 'glu')
optdepends=('libqglviewer: allow to build g2o_viewer app')

mine currently looks like this:

```
# Maintainer: Kartik Mohta <kartikmohta@gmail.com>
pkgname=g2o-git
pkgver=r784.4819fce
pkgrel=1
pkgdesc="A General Framework for Graph Optimization"
arch=('i686' 'x86_64')
url="https://github.com/RainerKuemmerle/g2o"
license=('BSD')
groups=()
depends=('suitesparse' 'qt5-base' 'eigen3' 'glu')
optdepends=('libqglviewer: allow to build g2o_viewer app')
makedepends=('git' 'cmake')
provides=('g2o')
conflicts=('g2o-svn')
options=()
source=($pkgname::git+https://github.com/RainerKuemmerle/g2o.git)
md5sums=('SKIP')

pkgver() {
cd "$pkgname"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
cd "$srcdir/$pkgname"

mkdir -p build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_SKIP_RPATH=ON -DG2O_BUILD_APPS=ON \
-DG2O_BUILD_EXAMPLES=OFF
make
}

package() {
# add a cmake file for g2o to cmake modules
install -D -m 644 -t $pkgdir/usr/share/cmake-3.7/Modules $srcdir/$pkgname/cmake_modules/FindG2O.cmake

cd "$srcdir/$pkgname/build"
make DESTDIR="$pkgdir" install
}
```

and I opened a pull request to use the arch name QGLViewer-qt5 for the library.

skunk commented on 2017-02-22 19:57

Why did you disable the apps (e.g. cli) of g2o? I found it useful, to enable it.

I also found it useful to install the FindG2O.cmake file. My package() function now looks like this.

```
package() {
# add a cmake file for g2o to cmake modules
install -D -m 644 -t $pkgdir/usr/share/cmake-3.7/Modules $srcdir/$pkgname/cmake_modules/FindG2O.cmake

cd "$srcdir/$pkgname/build"
make DESTDIR="$pkgdir" install

# fix: remove the ugly EXTERNAL folder
mv $pkgdir/usr/include/EXTERNAL/freeglut $pkgdir/usr/include/g2o/
rmdir $pkgdir/usr/include/EXTERNAL
}
```

For the part about the EXTERNAL folder I already opened a pull request.

Alf2010 commented on 2015-02-08 13:25

I have problems when compiling this package.
The process is ending at 97% :
aur-g2o-git/src/g2o-git/g2o/solvers/csparse/csparse_helper.cpp: In function ‘csn* g2o::csparse_extension::cs_chol_workspace(const cs*, const css*, int*, double*)’:
aur-g2o-git/src/g2o-git/g2o/solvers/csparse/csparse_helper.cpp:99:8: error: cannot convert ‘ptrdiff_t* const {aka long int* const}’ to ‘int*’ in assignment
cp = S->cp ; pinv = S->pinv ; parent = S->parent ;
There is other lines with the same problem : "cannot convert ‘ptrdiff_t*"
I have the same kind of problem with the "ros-indigo-libg2o" package.
Any solution ?
Thx