You are not logged in.

#1 2014-03-25 11:20:45

lerentis
Member
From: Germany
Registered: 2014-03-25
Posts: 4

Missing Includes with relative Pathes

Hello together,

I'm rather new to Arch and i keep running into errors while including some header files from /usr/include and i don't know how to fix that. I's not like this happens on every header file so i don't know where to search anymore.

Here is what i mean

fatal error: vtkImageReader2.h: No such file or directory
   #include <vtkImageReader2.h>
                               ^
compilation terminated.

and if I search for the file i can find it

lerentis@KL45:~$ ls -al /usr/include/vtk-5.10 | grep vtkImageReader2.h
-rw-r--r--   1 root root   9566 Oct 15  2012 vtkImageReader2.h

Anyone has an idea how to fix that?

Regards

Lerentis

Offline

#2 2014-03-25 12:49:30

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 4,092
Website

Re: Missing Includes with relative Pathes

What are you compiling? What command are you using to compile it?

The compiler is correct, "/usr/include/vtk-5.10/vtkImageReader2.h" is not in the default "include" path.

Offline

#3 2014-03-25 13:10:33

lerentis
Member
From: Germany
Registered: 2014-03-25
Posts: 4

Re: Missing Includes with relative Pathes

I'm trying to build plc from the AUR, but it happened before.
Shouldn't the default include path be recursive everything under /usr/include/ ?

Offline

#4 2014-03-25 13:14:48

progandy
Member
Registered: 2012-05-17
Posts: 5,322

Re: Missing Includes with relative Pathes

lerentis wrote:

I'm trying to build plc from the AUR, but it happened before.
Shouldn't the default include path be recursive everything under /usr/include/ ?

No, it shouldn't. Many libraries rely on pkg-config to simplify the generation of the necessary compiler flags, but in this case you'll have to do it manually.
Edit: plc does not depend on vtk, do you really try to install that?

Last edited by progandy (2014-03-25 13:20:07)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |

Offline

#5 2014-03-25 13:22:17

lerentis
Member
From: Germany
Registered: 2014-03-25
Posts: 4

Re: Missing Includes with relative Pathes

progandy wrote:
lerentis wrote:

I'm trying to build plc from the AUR, but it happened before.
Shouldn't the default include path be recursive everything under /usr/include/ ?

No, it shouldn't. Many libraries rely on pkg-config to simplify the generation of the necessary compiler flags, but in this case you'll have to do it manually. Add the following to INCPATH in the makefile:

 -I/usr/include/vtk-5.10 
# e.g.
 INCPATH       = -I/usr/share/qt/mkspecs/linux-g++ -I. -I/usr/include/QtCore -I/usr/include/QtNetwork -I/usr/include/QtGui -I/usr/include -I/usr/include/vtk-5.10 -I. -I.

If i edit the PKGBUILD and try it again i get the error

/tmp/yaourt-tmp-lerentis/aur-pcl/./PKGBUILD: line 50: INCPATH: command not found

is this in another package?

here is the full file

# Maintainer : Yuxin Wu <ppwwyyxxc@gmail.com>
# Contributor: Sven-Hendrik Haase <sh@lutzhaase.com>
# Contributor: hauptmech
# Contributor: figo.zhang
# Contributor: lubosz

pkgname=pcl
pkgver=1.7.1
pkgrel=1
pkgdesc="A comprehensive open source library for n-D Point Clouds and 3D geometry processing"
arch=('x86_64' 'i686')
url='http://www.pointclouds.org'
license=('BSD')
depends=('flann' 'vtk' 'qhull' 'qt4')
makedepends=('cmake' 'eigen3' 'boost' 'openni2')
optdepends=('openmpi' 'cuda' 'openni2')
source=("https://github.com/PointCloudLibrary/pcl/archive/pcl-${pkgver}.tar.gz")
md5sums=('ce8fa17662544eb4bb7b084191a61ad5')

build() {
	cd $srcdir/pcl-pcl-$pkgver

	# From pcl 1.7.1-1, Use Qt4, since vtk doesn't compile under Qt5
	sed -i 's/include.*pcl_find_qt5\.cmake.*//g' CMakeLists.txt

	[[ -d build ]] && rm -r build
	mkdir -p build && cd build

    # -DBUILD_gpu_people=OFF \ Disable until CUDA npp detection is fixed in cmake
    cmake .. \
        -DCMAKE_BUILD_TYPE=Release \
        -DCMAKE_INSTALL_PREFIX=/usr \
        -DBUILD_CUDA=ON \
        -DBUILD_cuda_io=ON \
        -DBUILD_cuda_apps=ON \
        -DBUILD_GPU=ON \
        -DBUILD_gpu_surface=ON \
        -DBUILD_gpu_tracking=ON \
        -DBUILD_apps=ON \
        -DBUILD_app_3d_rec_framework=ON \
        -DBUILD_app_cloud_composer=ON \
        -DBUILD_app_in_hand_scanner=ON \
        -DBUILD_app_modeler=ON \
        -DBUILD_app_point_cloud_editor=ON \
        -DBUILD_examples=OFF \
        -DBUILD_global_tests=OFF \
        -DBUILD_simulation=ON \
        -DBUILD_surface_on_nurbs=ON

        INCPATH       = -I/usr/include/vtk-5.10

	make
}

package() {
  cd $srcdir/pcl-pcl-$pkgver/build

  make DESTDIR=$pkgdir install

  install -Dm644 ../LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

Last edited by lerentis (2014-03-25 13:24:20)

Offline

#6 2014-03-25 13:24:05

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: Missing Includes with relative Pathes

Read progandy's post again.

You need to add the INCPATH to the makefile, not the PKGBUILD.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#7 2014-03-25 13:27:02

lerentis
Member
From: Germany
Registered: 2014-03-25
Posts: 4

Re: Missing Includes with relative Pathes

slithery wrote:

Read progandy's post again.

You need to add the INCPATH to the makefile, not the PKGBUILD.

oh sorry thought he ment where the build comman is set in the PKGBUILD. How can i access the makefile from yaourt?

Offline

#8 2014-03-25 13:36:29

progandy
Member
Registered: 2012-05-17
Posts: 5,322

Re: Missing Includes with relative Pathes

lerentis wrote:
slithery wrote:

Read progandy's post again.

You need to add the INCPATH to the makefile, not the PKGBUILD.

oh sorry thought he ment where the build comman is set in the PKGBUILD. How can i access the makefile from yaourt?

You have a typo in your forum post, this INCPATH line is from the "plc" package which does not require vtk at all, sorry. I had already corrected my post.
pcl uses cmake and should be configured to find VTK automatically.

Please try to build with makepkg directly. If you get errors, you can modify the source and contine with your modifications using "makepkg -e"


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |

Offline

Board footer

Powered by FluxBB