zuze11
June 23, 2011, 12:14am
#1
Hello all,
Trying to compile vapor-2.0.2 on OS 11.4, x86_64. The dependencies are the following:
Expat 2.0.1,
Qt 4.6.1,
netCDF 4.0.1,
PROJ.4 4.7.0,
TIFF 3.8.2,
GeoTIFF 1.2.5,
Python 2.6.5,
NumPy 1.5.0,
Glew 1.5.1,
HDF5 1.8.3
They are all met or exceeded. The make process uses an options.mk file to set the different locations of include files and libraries. It all goes smoothly up to the following error:
make[2]: Entering directory `/home/ziad/vapor-2.0.2/lib/params'
-------------------------------------------------------------------------------
Building libparams.so for Linux_x86_64 (DEBUG)
-------------------------------------------------------------------------------
make -f Makefile recurse INCLUDEDEPS=1
make[3]: Entering directory `/home/ziad/vapor-2.0.2/lib/params'
Compiling flowparams.cpp
g++ -o ../../targets/Linux_x86_64/built/params/flowparams.o -c -DLINUX -Wall -Wno-sign-compare -D__USE_LARGEFILE64 -fPIC -m64 -g -DLinux -DQT_OPENGL_LIB -DQT_GUI_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I../../include -I. -I../../include/vaporinternal -I/usr/include -I/usr/include/Qt -I/usr/include/python2.7 -I/include -I/include/QtCore -I/include/QtGui -I/include/QtOpenGL -Iui -DBINDIR=\"../../targets/Linux_x86_64/bin\" -DDSO_DIR=\"/home/ziad/vapor-2.0.2/targets/Linux_x86_64/bin\" -DABS_TOP=\"/home/ziad/vapor-2.0.2\" -DQTDIR=\"\" flowparams.cpp
In file included from flowparams.h:27:0,
from flowparams.cpp:29:
glutil.h:48:21: fatal error: QGLWidget: No such file or directory
compilation terminated.
make[3]: *** ../../targets/Linux_x86_64/built/params/flowparams.o] Error 1
make[3]: Leaving directory `/home/ziad/vapor-2.0.2/lib/params'
make[2]: *** [dep] Error 2
make[2]: Leaving directory `/home/ziad/vapor-2.0.2/lib/params'
make[1]: *** [params.subdir] Error 2
make[1]: Leaving directory `/home/ziad/vapor-2.0.2/lib'
gmake: *** [lib.subdir] Error 2
Checking with Yast, QGLWidget is supposed to be included with libqt4-devel which is installed. However trying to locate the file with “find” returns nothing from the root directory. I googled it and some suggest installing meego which is not even available for 11.4 at this point.
Any ideas anyone?
Thanks,
Z.
Hi
What’s the list of headers it’s looking for in glutil.h?
zuze11
June 23, 2011, 3:52am
#3
It fails at the very start of glutil.h. Here’s the list of headers there:
#ifndef _glutil_h_
#define _glutil_h_
//#include <GL/gl.h>
#include <QGLWidget>
#include <math.h>
#include <vapor/common.h>
Hi
OK in options.mk
QTDIR=/usr
PYTHONVERSION=2.7
PYTHONDIR=/usr/lib64
INC_SEARCH_DIRS=/usr/include /usr/include/libgeotiff
then run
export BUILD_PYTHON=1
make
I don’t have hdf5-devel in my rpm build environment, but it get’s through to be able to install
zuze11
June 23, 2011, 6:21am
#5
Didn’t work. Here’s the error message:
Building libparams.so for Linux_x86_64 (DEBUG)
-------------------------------------------------------------------------------
make -f Makefile recurse INCLUDEDEPS=1
make[3]: Entering directory `/home/ziad/vapor-2.0.2/lib/params'
Compiling datastatus.cpp
g++ -o ../../targets/Linux_x86_64/built/params/datastatus.o -c -DLINUX -Wall -Wno-sign-compare -D__USE_LARGEFILE64 -fPIC -m64 -g -DLinux -DQT_OPENGL_LIB -DQT_GUI_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I../../include -I. -I../../include/vaporinternal -I/usr/include -I/usr/include/libgeotiff -I/usr/include -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include/QtOpenGL -Iui -I/usr/lib64/include/python2.7 -I/usr/lib64/lib/python2.7/site-packages/numpy/core/include -DBINDIR=\"../../targets/Linux_x86_64/bin\" -DDSO_DIR=\"/home/ziad/vapor-2.0.2/targets/Linux_x86_64/bin\" -DABS_TOP=\"/home/ziad/vapor-2.0.2\" -DQTDIR=\"/usr\" datastatus.cpp
In file included from datastatus.cpp:25:0:
pythonpipeline.h:9:20: fatal error: Python.h: No such file or directory
compilation terminated.
make[3]: *** ../../targets/Linux_x86_64/built/params/datastatus.o] Error 1
make[3]: Leaving directory `/home/ziad/vapor-2.0.2/lib/params'
make[2]: *** [dep] Error 2
make[2]: Leaving directory `/home/ziad/vapor-2.0.2/lib/params'
make[1]: *** [params.subdir] Error 2
make[1]: Leaving directory `/home/ziad/vapor-2.0.2/lib'
make: *** [lib.subdir] Error 2
Do you have any other variables set or any additional packages?
Hi
Looks like it’s the make/config/base.mk file that needs tweaking since your building on x86_64 they have hardcoded $QTDIR/lib instead of /usr/lib64, moc and uic are in /usr/bin and probably others.
Needs to be patched out and it’s late here, will look at it tomorrow for you.
I think it would build fine on a 32bit system…
zuze11
June 23, 2011, 4:10pm
#7
Right. Their website did mention that the build could be tricky and they promote their binaries heavily. Problem is their netcdf binary conflicts with the system netcdf for other apps so a custom build is required.
Thanks for all the help btw. Really appreciate it. There is no way I could have fixed this on my own.
zuze11
June 23, 2011, 9:20pm
#8
So I added /usr/include/python2.7 to INC_SEARCH_DIRS gets rid of that last error.
The error I am getting now is this
make[2]: Entering directory `/home/ziad/vapor-2.0.2/lib/params'
-------------------------------------------------------------------------------
Building libparams.so for Linux_x86_64 (DEBUG)
-------------------------------------------------------------------------------
make -f Makefile recurse INCLUDEDEPS=1
make[3]: Entering directory `/home/ziad/vapor-2.0.2/lib/params'
Compiling pythonpipeline.cpp
g++ -o ../../targets/Linux_x86_64/built/params/pythonpipeline.o -c -DLINUX -Wall -Wno-sign-compare -D__USE_LARGEFILE64 -fPIC -m64 -g -DLinux -DQT_OPENGL_LIB -DQT_GUI_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I../../include -I. -I../../include/vaporinternal -I/usr/include -I/usr/include/libgeotiff -I/usr/include/python2.7 -I/usr/lib64/python2.7 -I/usr/include -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include/QtOpenGL -Iui -DBINDIR=\"../../targets/Linux_x86_64/bin\" -DDSO_DIR=\"/home/ziad/vapor-2.0.2/targets/Linux_x86_64/bin\" -DABS_TOP=\"/home/ziad/vapor-2.0.2\" -DQTDIR=\"/usr\" pythonpipeline.cpp
pythonpipeline.cpp:3:31: fatal error: numpy/arrayobject.h: No such file or directory
compilation terminated.
make[3]: *** ../../targets/Linux_x86_64/built/params/pythonpipeline.o] Error 1
make[3]: Leaving directory `/home/ziad/vapor-2.0.2/lib/params'
make[2]: *** [dep] Error 2
make[2]: Leaving directory `/home/ziad/vapor-2.0.2/lib/params'
make[1]: *** [params.subdir] Error 2
make[1]: Leaving directory `/home/ziad/vapor-2.0.2/lib'
gmake: *** [lib.subdir] Error 2
That file is located under
/usr/lib64/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h
and adding the above folder(s) to INC_SEARCH_DIRS doesn’t help.
zuze11:
-I/usr/include/python2.7 -I/usr/lib64/python2.7
That file is located under
/usr/lib64/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h
and adding the above folder(s) to INC_SEARCH_DIRS doesn’t help.
Hi
See the include calls, not showing the full path… They are doing some maintenance on the Open Build Service so haven’t been able to get back to it. Look in the base.mk for clues as to the linking.
I found creating a file called site.mk made things easier with for example
INSTALL_PREFIX_DIR=/usr
RELEASE=1
LIB_SEARCH_DIRS=/usr/lib64
INC_SEARCH_DIRS=/usr/include /usr/include/libgeotiff
QTDIR=/usr
BUILD_PYTHON=1
PYTHONVERSION=2.7
BINDIR=/usr/bin
MOC=/usr/bin/moc
UIC=/usr/bin/uic
zuze11:
So I added /usr/include/python2.7 to INC_SEARCH_DIRS gets rid of that
last error.
The error I am getting now is this
Code:
make[2]: Entering directory `/home/ziad/vapor-2.0.2/lib/params’
Building libparams.so for Linux_x86_64 (DEBUG)
make -f Makefile recurse INCLUDEDEPS=1
make[3]: Entering directory /home/ziad/vapor-2.0.2/lib/params' Compiling pythonpipeline.cpp g++ -o ../../targets/Linux_x86_64/built/params/pythonpipeline.o -c -DLINUX -Wall -Wno-sign-compare -D__USE_LARGEFILE64 -fPIC -m64 -g -DLinux -DQT_OPENGL_LIB -DQT_GUI_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I../../include -I. -I../../include/vaporinternal -I/usr/include -I/usr/include/libgeotiff -I/usr/include/python2.7 -I/usr/lib64/python2.7 -I/usr/include -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include/QtOpenGL -Iui -DBINDIR=\"../../targets/Linux_x86_64/bin\" -DDSO_DIR=\"/home/ziad/vapor-2.0.2/targets/Linux_x86_64/bin\" -DABS_TOP=\"/home/ziad/vapor-2.0.2\" -DQTDIR=\"/usr\" pythonpipeline.cpp pythonpipeline.cpp:3:31: fatal error: numpy/arrayobject.h: No such file or directory compilation terminated. make[3]: *** ../../targets/Linux_x86_64/built/params/pythonpipeline.o] Error 1 make[3]: Leaving directory
/home/ziad/vapor-2.0.2/lib/params’
make[2]: *** [dep] Error 2 make[2]: Leaving directory
/home/ziad/vapor-2.0.2/lib/params' make[1]: *** [params.subdir] Error 2 make[1]: Leaving directory
/home/ziad/vapor-2.0.2/lib’ gmake: ***
[lib.subdir] Error 2 --------------------
That file is located under
/usr/lib64/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h
and adding the above folder(s) to INC_SEARCH_DIRS doesn’t help.
Hi
Can you try the following for your site.mk file;
INSTALL_PREFIX_DIR=/usr
RELEASE=1
INC_SEARCH_DIRS=/usr/include /usr/include/libgeotiff
QTDIR=/usr
BUILD_PYTHON=1
PYTHONVERSION=2.7
PYTHONDIR=/usr
BINDIR=/usr/bin
MOC=/usr/bin/moc
UIC=/usr/bin/uic
and apply this patch;
http://paste.opensuse.org/90055570
Save it to your vapor-2.0.2 directory as vapor-fix-paths-base-mk.patch, then;
patch -p0 < vapor-fix-paths-base-mk.patch
Then run make and see how it goes.
–
Cheers Malcolm °¿° (Linux Counter #276890 )
openSUSE 11.4 (x86_64) Kernel 2.6.37.6-0.5-desktop
up 3 days 14:47, 6 users, load average: 0.05, 0.29, 0.39
GPU GeForce 8600 GTS Silent - Driver Version: 270.41.06
Hi
OK, it’s now building…
Here is the site.mk file;
INSTALL_PREFIX_DIR=/usr
RELEASE=1
INC_SEARCH_DIRS=/usr/include /usr/include/libgeotiff
QTDIR=/usr
BUILD_PYTHON=1
PYTHONVERSION=2.7
PYTHONDIR=/usr
and apply this NEW patch;
http://paste.opensuse.org/52563186
wget http://paste.opensuse.org/view/download/52563186 -O vapor-fix-build.patch
patch -p0 < vapor-fix-build.patch
export SUSE_ASNEEDED=0
make
In my rpm build environment the export command helps sort out
library linker issues. If you get those in your build environment then I
may need to do some more work, but won’t be able to look at this until
next week…
–
Cheers Malcolm °¿° (Linux Counter #276890 )
openSUSE 11.4 (x86_64) Kernel 2.6.37.6-0.5-desktop
up 4 days 0:01, 6 users, load average: 0.46, 0.34, 0.60
GPU GeForce 8600 GTS Silent - Driver Version: 270.41.06
zuze11
June 24, 2011, 7:55pm
#12
Hi,
Sorry to have taken so long. I was away from my station for some time.
Just followed your instructions and it’s still building, but I can already tell it’s way past where it used to fail. I’ll keep you posted how it goes.
Many thanks…
Z.
zuze11
June 24, 2011, 8:27pm
#13
Failed again
Linking vaporgui for Linux_x86_64
...
...
...
/usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../x86_64-suse-linux/bin/ld: cannot find -lpython2.6
collect2: ld returned 1 exit status
make[3]: *** ../../targets/Linux_x86_64/bin/vaporgui] Error 1
make[3]: Leaving directory `/home/ziad/vapor-2.0.2/apps/vaporgui'
make[2]: *** [dep] Error 2
make[2]: Leaving directory `/home/ziad/vapor-2.0.2/apps/vaporgui'
make[1]: *** [vaporgui.subdir] Error 2
make[1]: Leaving directory `/home/ziad/vapor-2.0.2/apps'
gmake: *** [apps.subdir] Error 2
Hi
The new patch fixed that… can you check the Makefile in;
vapor-2.0.2/apps/vaporgui
On line 22 it should be;
LIBRARIES = pthread dl util m render params flow vjpeg vdf common $(NETCDF_LIBS) expat $(QT_LIB) GLEW tiff geotiff proj python$(PYTHONVERSION)
zuze11
June 24, 2011, 10:46pm
#15
For some reason it was:
LIBRARIES = pthread dl util m render params flow vjpeg vdf common $(NETCDF_LIBS) expat $(QT_LIB) GLEW tiff geotiff proj python2.6
I corrected it and it’s building past this point now.
zuze11
June 24, 2011, 11:32pm
#16
Okay it worked now. There was one more instance of the above error in vapor-2.0.2/apps/asciitf2vtf/Makefile but it’s fixed now.
Got the executables in /vapor-2.0.2/targets/Linux_x86_64/bin. I’ll be testing it over the weekend.
Thanks Malcolm!
Hi
It may have been the secondary patch, there were 3 like that. I’ve also changed how it selects the arch as well. I won’t be back home until later tomorrow, so have been working on the install routine based on the install scrips in that bin directory.
I will probably push my changes back to the developers as well.
Hi
I’ve done some further patches to optimize the build and also remove the rpath reference, it’s now building as a rpm and have put on OBS;
It should be available here soon;
software.opensuse.org: Search Results
You can see the patches, spec file etc here;
https://build.opensuse.org/package/files?package=vapor&project=home%3Amalcolmlewis%3ATesting
zuze11
June 26, 2011, 9:16pm
#19
Honestly this a lot more than what I was hoping for. Hopefully it encourages the vapor authors to put a bit more effort into porting their code to various platforms.
Is this package going to be maintained now and installable from repositories?
Hi
OK, need to add the library location in /etc/ld.so.conf.d/ and found an icon, so will create a desktop entry for vaporgui in the menu system. Just working on an update now (I had to build a vmware KDE4 install to test )
Need to contact the developers first, the license says it’s ok to distribute etc but will push my patches to them and see what they say about an rpm being available.
I will probably need to add a script to show the license (mainly the attachment I think), then hopefully push into science or geo repositoriy… (probably have to go through the legal folks as well).