Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Apply for Membership

Unable to build/install on Ubuntu Heron 64, with fresh VTK i
  • admin March 2009
    Hi everyone.

    I've been trying to install Engrid for a few days now, on Ubuntu Heron,
    64 bit. I installed VTK with QVTK gui support, but so far, have left
    the default Qt installation. I used 'desired QT version' 4. I
    performed

    $ sudo make install

    to install the build to /usr/local. All seemed well.

    Back in the engrid directory, I did:

    $ qmake

    then edited 'Makefile' so INCPATH pointed at

    -I$(VTKDIR)/include/vtk-$(VTKVERSION)

    and set

    VTKDIR = /usr/local
    VTKVERSION = 5.2

    above the lines referencing them. Then, I performed:

    $ make clean
    $ make

    Some time was spent building, then the build failed at:

    g++ -Wl,--no-undefined -o engrid main.o boundarycondition.o
    celllayeriterator.o cellneighbouriterator.o correctsurfaceorientation.o
    createvolumemesh.o deletecells.o deletepickedcell.o deletetetras.o
    deletevolumegrid.o egvtkobject.o elements.o error.o fixstl.o
    foamreader.o foamwriter.o geometrytools.o gmshiooperation.o gmshreader.o
    gmshwriter.o gridsmoother.o iooperation.o iterator.o layeriterator.o
    neutralwriter.o nodelayeriterator.o operation.o optimisation.o
    polydatareader.o polymesh.o seedsimpleprismaticlayer.o setboundarycode.o
    simplefoamwriter.o stlreader.o stlwriter.o swaptriangles.o vtkreader.o
    vtkEgBoundaryCodesFilter.o vtkEgEliminateShortEdges.o
    vtkEgExtractVolumeCells.o vtkEgGridFilter.o vtkEgNormalExtrusion.o
    vtkEgPolyDataToUnstructuredGridFilter.o guicreateboundarylayer.o
    guideletebadaspecttris.o guidivideboundarylayer.o
    guieditboundaryconditions.o guiimproveaspectratio.o guimainwindow.o
    guinormalextrusion.o guiselectboundarycodes.o guisetboundarycode.o
    guismoothsurface.o guisettingstab.o guisettingsviewer.o
    moc_guicreateboundarylayer.o moc_guideletebadaspecttris.o
    moc_guieditboundaryconditions.o moc_guiimproveaspectratio.o
    moc_guimainwindow.o moc_guinormalextrusion.o
    moc_guiselectboundarycodes.o moc_guisetboundarycode.o
    moc_guismoothsurface.o moc_guisettingstab.o moc_guisettingsviewer.o
    qrc_engrid.o -L/usr/lib -L/usr/X11R6/lib -lvtkCommon -lvtkGraphics
    -lvtkImaging -lvtkHybrid -lQVTK -lng -L./netgen_svn -L/usr/local/lib/5.2
    -L/usr/local/lib/vtk-5.2 -Wl,-rpath -lpthread -lQtXml -lQtOpenGL -lQtGui
    -lQtNetwork -lQtCore -lGLU -lGL

    reporting:

    createvolumemesh.o: In function `CreateVolumeMesh::prepare()':
    createvolumemesh.cpp:(.text+0x463d): undefined reference to
    `vtkUnstructuredGrid::InsertNextCell(int, long long, long long*)'

    and many more, similar errors.

    ---------------------

    I then attempted to use the link,
    http://engits.com/ogloth/enGrid_linux64bit_1.0.tar.gz

    from the discussion at

    http://sourceforge.net/mailarchive/foru ... grid-users

    I attempted the following:

    $ sudo ./setup
    $ start_engrid

    with the result:

    /opt/enGrid/engrid: error while loading shared libraries: `=
    : invalid
    mode for dlopen(): Invalid argument

    Then I attempted to build with the files included with the download:

    $ make clean
    $ make

    resulted in some building, then a failure at the line:

    g++ -Wl,--no-undefined -o engrid main.o boundarycondition.o
    celllayeriterator.o cellneighbouriterator.o correctsurfaceorientation.o
    createvolumemesh.o deletecells.o deletepickedcell.o deletetetras.o
    deletevolumegrid.o egvtkobject.o elements.o error.o fixstl.o
    foamreader.o foamwriter.o geometrytools.o gmshiooperation.o gmshreader.o
    gmshwriter.o gridsmoother.o iooperation.o iterator.o layeriterator.o
    neutralwriter.o nodelayeriterator.o operation.o optimisation.o
    polydatareader.o polymesh.o seedsimpleprismaticlayer.o setboundarycode.o
    simplefoamwriter.o stlreader.o stlwriter.o swaptriangles.o vtkreader.o
    vtkEgBoundaryCodesFilter.o vtkEgEliminateShortEdges.o
    vtkEgExtractVolumeCells.o vtkEgGridFilter.o vtkEgNormalExtrusion.o
    vtkEgPolyDataToUnstructuredGridFilter.o guicreateboundarylayer.o
    guideletebadaspecttris.o guidivideboundarylayer.o
    guieditboundaryconditions.o guiimproveaspectratio.o guimainwindow.o
    guinormalextrusion.o guiselectboundarycodes.o guisetboundarycode.o
    guismoothsurface.o guisettingstab.o guisettingsviewer.o
    moc_guicreateboundarylayer.o moc_guideletebadaspecttris.o
    moc_guieditboundaryconditions.o moc_guiimproveaspectratio.o
    moc_guimainwindow.o moc_guinormalextrusion.o
    moc_guiselectboundarycodes.o moc_guisetboundarycode.o
    moc_guismoothsurface.o moc_guisettingstab.o moc_guisettingsviewer.o
    qrc_engrid.o -L/usr/lib -L/usr/X11R6/lib -lvtkCommon -lvtkGraphics
    -lvtkImaging -lvtkHybrid -lQVTK -lng -L./netgen_svn
    -L/usr/local/lib/vtk-5.2 -Wl,-rpath -lpthread -lQtXml -lQtOpenGL -lQtGui
    -lQtNetwork -lQtCore -lGLU -lGL

    the failure being:

    /usr/bin/ld: cannot find -lng

    That seemed a bit odd to me, but I'm not a C / Fortran programmer and am
    relatively new to linux, so am stumped! Engrid looks to be just what I
    want (enabling me to move away from an unmentioned commercial mesher /
    CFD solver), but this is preventing me from even trying it.

    I read elsewhere, that it might be possible to release a linux version,
    with all the linked libraries included (though the file would be large).
    If that were available, I could crack on with work and maybe optimise an
    installation for my linux, later. As it is, I can't use the program at
    all.

    So - a help request! If someone could help me with the problems above,
    great! Alternatively, if a bundled package could be generated, great
    too!

    Best regards,

    Mark.
  • admin March 2009
    You should be able to compile engrid using the ubuntu packages for vtk
    and qt4.
    At least it worked for me on Ubuntu Intrepid 8.10.

    I can't use my Ubuntu laptop for the moment unfortunately (forgot power
    cord somewhere), but I'll try to give information as precise as possible
    based on downloaded packages.

    First, make sure you have the build dependencies:
    /================
    sudo apt-get install libvtk5 libvtk5-dev libvtk5-qt4 libvtk5-qt4-dev
    libqt4-dev
    ================
    /
    Second, if you have qt3 dev files installed too, there might be a
    conflict with qmake-qt3. So just run one of the following commands:
    (I used the second command on my laptop. I'm not sure if the first one
    works, but it should based on what I've read.)
    /================
    update-alternatives --install /usr/bin/qmake qmake "/usr/bin/qmake-qt4"
    "50" --slave /usr/share/man/man1/qmake.1.gz qmake.1.gz
    "/usr/share/man/man1/qmake-qt4.1.gz"
    ================
    /or
    /================
    ln -sf /usr/bin/qmake-qt4 /usr/bin/qmake
    ================
    /
    To make sure the rest will work, check that /usr/bin/qmake is a link to
    /usr/bin/qmake-qt4:
    /================
    [29][~]$ ls -l /usr/bin/qmake
    lrwxrwxrwx 1 root root 18 Mar 3 12:04 /usr/bin/qmake -> /usr/bin/qmake-qt4
    ================
    /
    Check out the CVS:
    /================
    cvs -d:pserver:anonymous@en...:/cvsroot/engrid login
    cvs -d:pserver:anonymous@en...:/cvsroot/engrid co src
    cd src
    ================
    /
    Then you'll need to set up the environment before running qmake:
    /================
    export VTKLIBDIR=/usr/lib/
    export VTKINCDIR=/usr/include/vtk-5.0/
    export LD_LIBRARY_PATH=$VTKLIBDIR:$LD_LIBRARY_PATH
    ================
    /I wrote a convenience script for this, which you can use instead if you
    wish:
    /================
    source ./setup_paths.sh ubuntu
    ================
    /
    And finally, build netgen and engrid:
    /================
    ./build-nglib.sh
    qmake
    make
    ================
    /
    I hope it will work on Ubuntu 8.04 too.
    I already started working on creating a Debian package for enGrid a
    while ago. The only problem that blocked me was the netgen package which
    needs to be updated (and uses a weird "quilt" system I haven't
    completely figured out yet).
    But until this is done, a simple .deb might be ready for download this
    week (as soon as I have access to some Debian/Ubuntu PC).

    Mike