You are not logged in.

#1 2009-10-22 00:08:18

drandre
Member
Registered: 2009-04-16
Posts: 35

Looking for help fixing the PKGBUILD for cantor

After a recent blog post I thought I'd checkout cantor.  First stop pacman: not in main repos; second AUR where I found kdeedu-cantor-svn.  Unfortunately its out of date... but a simple fix gets you at least started:

19c19
< _svntrunk=svn://anonsvn.kde.org/home/kde/trunk/KDE/kdeedu/cantor
---
> _svntrunk=svn://anonsvn.kde.org/home/kde/trunk/kdereview/cantor

Unfortunately I then run into a CMake error.  I'm not so familiar with CMake so would appreciate any advice that can be given on the following:

CMake Error at CMakeLists.txt:3 (macro_optional_find_package):                 
  Unknown CMake command "macro_optional_find_package".                         


CMake Warning (dev) in CMakeLists.txt:
  No cmake_minimum_required command is present.  A line of code such as

    cmake_minimum_required(VERSION 2.6)

  should be added at the top of the file.  The version specified may be lower
  if you wish to support older CMake versions for this project.  For more    
  information run "cmake --help-policy CMP0000".                             
This warning is for project developers.  Use -Wno-dev to suppress it.        

-- Configuring incomplete, errors occurred!
make: *** No targets specified and no makefile found.  Stop.
==> ERROR: Build Failed.                                    
    Aborting...

Thanks

Offline

#2 2009-10-22 01:10:23

mathieui
Member
Registered: 2009-07-21
Posts: 38
Website

Re: Looking for help fixing the PKGBUILD for cantor

Well, I did a quick an ugly workaround in the PKGBUILD, but I still fails
The PKGBUILD :

# Contributor: Alexander Minges <alexander.minges@athemis.de>
pkgname=kdeedu-cantor-svn
pkgver=1038803
pkgrel=1
pkgdesc="Graphical frontend to Maxima, R and Sage"
arch=(i686 x86_64)
url="http://edu.kde.org"
license=('GPL')
depends=('kdelibs>=4.3.0' 'kdebase-runtime>=4.3.0' 'r' 'libspectre')
makedepends=(cmake automoc4)
provides=('kdeedu-cantor')
conflicts=('kdeedu-cantor')
replaces=('kdeedu-cantor')

source=(kdeedu-cantor-svn.install)
md5sums=('fccc9d7f7ce5e4fb4fa3a0d23d9c211f')


_svntrunk=svn://anonsvn.kde.org/home/kde/trunk/KDE/kdeedu/cantor
_svnmod=cantor

build() {
  cd $srcdir

  if [ -d $_svnmod/.svn ]; then
    (cd $_svnmod && svn up -r $pkgver)
  else
    svn co $_svntrunk --config-dir ./ $_svnmod
  fi

  msg "SVN checkout done or server timeout"
  msg "Starting make..."

  cp -r $_svnmod $_svnmod-build
  cd $_svnmod-build
  tac CMakeLists.txt > CMakelist.txt
  echo "cmake_minimum_required(VERSION 2.6)" >> CMakelist.txt
  tac CMakelist.txt > CMakeLists.txt
  rm CMakelist.txt

  cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=RELEASE
  make || return 1
  make DESTDIR=$pkgdir install

  rm -rf $srcdir/$_svnmod-build
}

The FAIL :

==> Starting make...
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU   
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done   
CMake Error at CMakeLists.txt:4 (macro_optional_find_package):
  Unknown CMake command "macro_optional_find_package".

(and it stops here)

Offline

#3 2009-10-22 01:46:47

drandre
Member
Registered: 2009-04-16
Posts: 35

Re: Looking for help fixing the PKGBUILD for cantor

wow... that looks exactly like what I posted :-/

I was hoping on some advice on how to fix the cmake build issue.  I've emailed alexanderrieder as building the source manually fails in the same way.  Doesn't seen the be a makepkg issue at all.

Offline

#4 2009-10-25 01:14:46

drandre
Member
Registered: 2009-04-16
Posts: 35

Re: Looking for help fixing the PKGBUILD for cantor

Better (but build still fails due to compile errors that do not seem to be the fault of this PKGBUILD):

# Contributor: Alexander Minges <alexander.minges@athemis.de>       
pkgname=kdeedu-cantor-svn                                           
pkgver=1039925                                                      
pkgrel=1                                                            
pkgdesc="Graphical frontend to Maxima, R and Sage"                  
arch=(i686 x86_64)
url="http://edu.kde.org/cantor/"
license=('GPL2')
groups=('kdeedu')
depends=('kdelibs>=4.3.0' 'kdebase-runtime>=4.3.0' 'r' 'libspectre')
makedepends=(cmake automoc4)
optdepends=('fakeroot: for makepkg usage as normal user')
provides=('kdeedu-cantor')
conflicts=('kdeedu-cantor')
replaces=('kdeedu-cantor')

source=(kdeedu-cantor-svn.install)
md5sums=('fccc9d7f7ce5e4fb4fa3a0d23d9c211f')


_svntrunk=svn://anonsvn.kde.org/home/kde/trunk/KDE/kdeedu
_svnmod=kdeedu

build() {
  cd $srcdir

  if [ -d $_svnmod/.svn ]; then
    (cd $_svnmod && svn up -r $pkgver)
  else
    svn co -N $_svntrunk
    cd kdeedu
    svn up cantor cmake data libkdeedu
  fi

  msg "SVN checkout done or server timeout"
  msg "Starting make..."

  cp -r $_svnmod $_svnmod-build
  cd $_svnmod-build

  cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=RELEASE
  make || return 1
  make DESTDIR=$pkgdir install

  rm -rf $srcdir/$_svnmod-build
}

Offline

#5 2009-10-25 03:55:36

drandre
Member
Registered: 2009-04-16
Posts: 35

Re: Looking for help fixing the PKGBUILD for cantor

Once you have modified /etc/makepkg.conf as follows to remove the --as-needed linker option

#LDFLAGS="-Wl,--hash-style=gnu -Wl,--as-needed"
LDFLAGS="-Wl,--hash-style=gnu"

then the following PKGBUILD works for me

# Contributor: Alexander Minges <alexander.minges@athemis.de>
pkgname=kdeedu-cantor-svn                                    
pkgver=1039957                                               
pkgrel=1                                                     
pkgdesc="Graphical frontend to Maxima, R and Sage"           
arch=(i686 x86_64)                                           
url="http://edu.kde.org/cantor/"                             
license=('GPL2')                                             
groups=('kdeedu')                                            
depends=('kdelibs>=4.3.0' 'kdeedu-common>=4.3.0' 'kdeedu-data>=4.3.0' 'kdebase-runtime>=4.3.0' 'r' 'libspectre')
makedepends=(cmake automoc4)
optdepends=('kdeedu-marble>=4.3.0')
provides=('kdeedu-cantor')
conflicts=('kdeedu-cantor')
replaces=('kdeedu-cantor')

source=(kdeedu-cantor-svn.install)
md5sums=('fccc9d7f7ce5e4fb4fa3a0d23d9c211f')


_svntrunk=svn://anonsvn.kde.org/home/kde/trunk/KDE/kdeedu
_svnmod=kdeedu

build() {
  cd $srcdir

  if [ -d $_svnmod/.svn ]; then
    (cd $_svnmod && svn up -r $pkgver)
  else
    svn co -N $_svntrunk
    cd kdeedu
    svn up cantor cmake data libkdeedu
    cd ..
  fi

  msg "SVN checkout done or server timeout"
  msg "Starting make..."

  rm -rf $_svnmod-build
  mkdir $_svnmod-build
  cd $_svnmod-build
  cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=RELEASE ../$_svnmod
  make || return 1
  cd cantor
  make DESTDIR=$pkgdir install
  cd $srcdir/..
  rm -rf $srcdir/$_svnmod-build
}

Will email alexander.minges to see if he can update the file in the AUR.

NB!  the kdemod-kdeedu-common package currently doesn't provide kdeedu-common (as I think is should).  Until this is fixed you can build by adding the kdemod- prefix to kdeedu-common or just removing this dependency (after making sure you have kdeedu-common installed).

Last edited by drandre (2009-10-25 13:15:31)

Offline

#6 2009-10-25 18:49:34

athemis
Member
From: Düsseldorf, Germany
Registered: 2009-10-25
Posts: 1
Website

Re: Looking for help fixing the PKGBUILD for cantor

Updated the PKGBUILD. Builds and runs fine on my machine (x86_64).
Thanks, drandre!

Offline

#7 2009-10-26 07:45:24

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: Looking for help fixing the PKGBUILD for cantor

It's not necessary to edit your makepkg.conf.  Just add:
unset $LDFLAGS
at the begining of the build fonction.

Offline

Board footer

Powered by FluxBB