Results 1 to 3 of 3

Thread: Elmer installation problem

  1. #1
    Join Date
    Dec 2013
    Beans
    2

    Elmer installation problem

    Hi,

    I would like to install Elmer on Ubuntu 12.04 but I have some problems. First of all I compiled the elmer source packages in the following order:matc, umfpack, mathlibs, elmergrid, meshgen2d, eio, hutiter, fem, using the normal procedure of ./configure, make, make install, as suggested in the Elmer official homepage. Then, I installed all the optional components to compile ElmerGUI. I used the following library: libfreetype6 and libfreetype6-dev (FREETYPE 2.4.1.0), libfreeimage-dev (FREE IMAGE 3.14.1), libftgf2 (FTGL 2.13), libgl2ps-dev (GL2PS 1.3.5), python-qt4 (PYTHON-QT), libtet1.4.2, libtet1.4.2-dev, tetge (TETGEN 1.4.2), libtbb-dev, libtbb-doc (TBB 4.1.2), Qwt-6.1, Qt 4.8, and vtk-5.8 as suggested in the following website.
    http://www.elmerfem.org/elmerwiki/in...nal_components

    When I try to configure ElmerGUI I obtain the following errors:

    tmp/glwidget.o:glwidget.cpp:function GLWidget::changeProjection(): error: undefined reference to 'gluPerspective'
    tmp/glwidget.o:glwidget.cpp:function GLWidget::resizeGL(int, int): error: undefined reference to 'gluPerspective'
    tmp/glwidget.o:glwidget.cpp:function GLWidget::mouseDoubleClickEvent(QMouseEvent*): error: undefined reference to 'gluPickMatrix'
    tmp/glwidget.o:glwidget.cpp:function GLWidget::drawCoordinates(): error: undefined reference to 'gluCylinder'
    tmp/glwidget.o:glwidget.cpp:function GLWidget::drawCoordinates(): error: undefined reference to 'gluCylinder'
    tmp/glwidget.o:glwidget.cpp:function GLWidget::drawCoordinates(): error: undefined reference to 'gluCylinder'
    tmp/glwidget.o:glwidget.cpp:function GLWidget::GLWidget(QWidget*): error: undefined reference to 'gluNewQuadric'
    collect2: ld returned 1 exit status
    make[1]: *** [ElmerGUI] Error 1
    make[1]: Leaving directory `/home/silvia/trunk/ElmerGUI/Application'
    make: *** [sub-Application-make_default] Error 2

    Because of the missing reference to a type I supposed that the error could be a missing inclusion in the source code, so I searched on the web and found out that glu* types (where * stands for "anything" and not for pointer ) are defined in glu.h; so I added this line at the top of glwidget.h file: #include <GL/glu.h>
    I've cleaned the source folder and rebuilt all, but I still have the same errors.
    Any suggestion?

    Thank you in advance.
    Silvia




  2. #2
    Join Date
    Apr 2012
    Beans
    5,386

    Re: Elmer installation problem

    undefined reference errors come from the link phase not the compile phase - so they are related to libraries not header files. So either a required library (or libraries) are missing from the gcc link command line (the line in the makefile that joins object files together into a target), or the libraries are specified in an order that does not allow the indicated symbols to be resolved - I'm not familiar with 'elmer' but is it is an old project it is possible that its makefiles do not respect the link order requirements of newer versions of gcc.

    BTW elmer version 6.1.0 appears to be in the 12.04.3 repository - do you really need to build it from source?

  3. #3
    Join Date
    Dec 2013
    Beans
    2

    Re: Elmer installation problem

    I need to change something in the source code, so I have to build Elmer. I am not so expert, could you help me?
    Here is the MakeFile:



    ################################################## ###########################
    # Makefile for building: ElmerGUI
    # Generated by qmake (2.01a) (Qt 4.8.1) on: Fri Dec 6 10:59:17 2013
    # Project: ElmerGUI.pro
    # Template: subdirs
    # Command: /usr/bin/qmake -o Makefile ElmerGUI.pro
    ################################################## ###########################

    first: make_default
    MAKEFILE = Makefile
    QMAKE = /usr/bin/qmake
    DEL_FILE = rm -f
    CHK_DIR_EXISTS= test -d
    MKDIR = mkdir -p
    COPY = cp -f
    COPY_FILE = $(COPY)
    COPY_DIR = $(COPY) -r
    INSTALL_FILE = install -m 644 -p
    INSTALL_PROGRAM = install -m 755 -p
    INSTALL_DIR = $(COPY_DIR)
    DEL_FILE = rm -f
    SYMLINK = ln -f -s
    DEL_DIR = rmdir
    MOVE = mv -f
    CHK_DIR_EXISTS= test -d
    MKDIR = mkdir -p
    SUBTARGETS = \
    sub-matc \
    sub-netgen \
    sub-Application

    matc//$(MAKEFILE):
    @$(CHK_DIR_EXISTS) matc/ || $(MKDIR) matc/
    cd matc/ && $(QMAKE) /home/silvia/trunk/ElmerGUI/matc/matc.pro -o $(MAKEFILE)
    sub-matc-qmake_all: FORCE
    @$(CHK_DIR_EXISTS) matc/ || $(MKDIR) matc/
    cd matc/ && $(QMAKE) /home/silvia/trunk/ElmerGUI/matc/matc.pro -o $(MAKEFILE)
    sub-matc: matc//$(MAKEFILE) FORCE
    cd matc/ && $(MAKE) -f $(MAKEFILE)
    sub-matc-make_default: matc//$(MAKEFILE) FORCE
    cd matc/ && $(MAKE) -f $(MAKEFILE)
    sub-matc-make_first: matc//$(MAKEFILE) FORCE
    cd matc/ && $(MAKE) -f $(MAKEFILE) first
    sub-matc-all: matc//$(MAKEFILE) FORCE
    cd matc/ && $(MAKE) -f $(MAKEFILE) all
    sub-matc-clean: matc//$(MAKEFILE) FORCE
    cd matc/ && $(MAKE) -f $(MAKEFILE) clean
    sub-matc-distclean: matc//$(MAKEFILE) FORCE
    cd matc/ && $(MAKE) -f $(MAKEFILE) distclean
    sub-matc-install_subtargets: matc//$(MAKEFILE) FORCE
    cd matc/ && $(MAKE) -f $(MAKEFILE) install
    sub-matc-uninstall_subtargets: matc//$(MAKEFILE) FORCE
    cd matc/ && $(MAKE) -f $(MAKEFILE) uninstall
    netgen//$(MAKEFILE):
    @$(CHK_DIR_EXISTS) netgen/ || $(MKDIR) netgen/
    cd netgen/ && $(QMAKE) /home/silvia/trunk/ElmerGUI/netgen/netgen.pro -o $(MAKEFILE)
    sub-netgen-qmake_all: FORCE
    @$(CHK_DIR_EXISTS) netgen/ || $(MKDIR) netgen/
    cd netgen/ && $(QMAKE) /home/silvia/trunk/ElmerGUI/netgen/netgen.pro -o $(MAKEFILE)
    sub-netgen: netgen//$(MAKEFILE) FORCE
    cd netgen/ && $(MAKE) -f $(MAKEFILE)
    sub-netgen-make_default: netgen//$(MAKEFILE) FORCE
    cd netgen/ && $(MAKE) -f $(MAKEFILE)
    sub-netgen-make_first: netgen//$(MAKEFILE) FORCE
    cd netgen/ && $(MAKE) -f $(MAKEFILE) first
    sub-netgen-all: netgen//$(MAKEFILE) FORCE
    cd netgen/ && $(MAKE) -f $(MAKEFILE) all
    sub-netgen-clean: netgen//$(MAKEFILE) FORCE
    cd netgen/ && $(MAKE) -f $(MAKEFILE) clean
    sub-netgen-distclean: netgen//$(MAKEFILE) FORCE
    cd netgen/ && $(MAKE) -f $(MAKEFILE) distclean
    sub-netgen-install_subtargets: netgen//$(MAKEFILE) FORCE
    cd netgen/ && $(MAKE) -f $(MAKEFILE) install
    sub-netgen-uninstall_subtargets: netgen//$(MAKEFILE) FORCE
    cd netgen/ && $(MAKE) -f $(MAKEFILE) uninstall
    Application//$(MAKEFILE):
    @$(CHK_DIR_EXISTS) Application/ || $(MKDIR) Application/
    cd Application/ && $(QMAKE) /home/silvia/trunk/ElmerGUI/Application/Application.pro -o $(MAKEFILE)
    sub-Application-qmake_all: FORCE
    @$(CHK_DIR_EXISTS) Application/ || $(MKDIR) Application/
    cd Application/ && $(QMAKE) /home/silvia/trunk/ElmerGUI/Application/Application.pro -o $(MAKEFILE)
    sub-Application: Application//$(MAKEFILE) FORCE
    cd Application/ && $(MAKE) -f $(MAKEFILE)
    sub-Application-make_default: Application//$(MAKEFILE) FORCE
    cd Application/ && $(MAKE) -f $(MAKEFILE)
    sub-Application-make_first: Application//$(MAKEFILE) FORCE
    cd Application/ && $(MAKE) -f $(MAKEFILE) first
    sub-Application-all: Application//$(MAKEFILE) FORCE
    cd Application/ && $(MAKE) -f $(MAKEFILE) all
    sub-Application-clean: Application//$(MAKEFILE) FORCE
    cd Application/ && $(MAKE) -f $(MAKEFILE) clean
    sub-Application-distclean: Application//$(MAKEFILE) FORCE
    cd Application/ && $(MAKE) -f $(MAKEFILE) distclean
    sub-Application-install_subtargets: Application//$(MAKEFILE) FORCE
    cd Application/ && $(MAKE) -f $(MAKEFILE) install
    sub-Application-uninstall_subtargets: Application//$(MAKEFILE) FORCE
    cd Application/ && $(MAKE) -f $(MAKEFILE) uninstall

    Makefile: ElmerGUI.pro /usr/share/qt4/mkspecs/linux-g++-64/qmake.conf /usr/share/qt4/mkspecs/common/unix.conf \
    /usr/share/qt4/mkspecs/common/linux.conf \
    /usr/share/qt4/mkspecs/common/gcc-base.conf \
    /usr/share/qt4/mkspecs/common/gcc-base-unix.conf \
    /usr/share/qt4/mkspecs/common/g++-base.conf \
    /usr/share/qt4/mkspecs/common/g++-unix.conf \
    /usr/share/qt4/mkspecs/qconfig.pri \
    /usr/share/qt4/mkspecs/modules/qt_webkit_version.pri \
    /usr/share/qt4/mkspecs/features/qt_functions.prf \
    /usr/share/qt4/mkspecs/features/qt_config.prf \
    /usr/share/qt4/mkspecs/features/exclusive_builds.prf \
    /usr/share/qt4/mkspecs/features/default_pre.prf \
    ElmerGUI.pri \
    /usr/share/qt4/mkspecs/features/release.prf \
    /usr/share/qt4/mkspecs/features/default_post.prf \
    /usr/share/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \
    /usr/share/qt4/mkspecs/features/warn_on.prf \
    /usr/share/qt4/mkspecs/features/qt.prf \
    /usr/share/qt4/mkspecs/features/unix/thread.prf \
    /usr/share/qt4/mkspecs/features/moc.prf \
    /usr/share/qt4/mkspecs/features/resources.prf \
    /usr/share/qt4/mkspecs/features/uic.prf \
    /usr/share/qt4/mkspecs/features/yacc.prf \
    /usr/share/qt4/mkspecs/features/lex.prf \
    /usr/share/qt4/mkspecs/features/include_source_dir.prf
    $(QMAKE) -o Makefile ElmerGUI.pro
    /usr/share/qt4/mkspecs/common/unix.conf:
    /usr/share/qt4/mkspecs/common/linux.conf:
    /usr/share/qt4/mkspecs/common/gcc-base.conf:
    /usr/share/qt4/mkspecs/common/gcc-base-unix.conf:
    /usr/share/qt4/mkspecs/common/g++-base.conf:
    /usr/share/qt4/mkspecs/common/g++-unix.conf:
    /usr/share/qt4/mkspecs/qconfig.pri:
    /usr/share/qt4/mkspecs/modules/qt_webkit_version.pri:
    /usr/share/qt4/mkspecs/features/qt_functions.prf:
    /usr/share/qt4/mkspecs/features/qt_config.prf:
    /usr/share/qt4/mkspecs/features/exclusive_builds.prf:
    /usr/share/qt4/mkspecs/features/default_pre.prf:
    ElmerGUI.pri:
    /usr/share/qt4/mkspecs/features/release.prf:
    /usr/share/qt4/mkspecs/features/default_post.prf:
    /usr/share/qt4/mkspecs/features/unix/gdb_dwarf_index.prf:
    /usr/share/qt4/mkspecs/features/warn_on.prf:
    /usr/share/qt4/mkspecs/features/qt.prf:
    /usr/share/qt4/mkspecs/features/unix/thread.prf:
    /usr/share/qt4/mkspecs/features/moc.prf:
    /usr/share/qt4/mkspecs/features/resources.prf:
    /usr/share/qt4/mkspecs/features/uic.prf:
    /usr/share/qt4/mkspecs/features/yacc.prf:
    /usr/share/qt4/mkspecs/features/lex.prf:
    /usr/share/qt4/mkspecs/features/include_source_dir.prf:
    qmake: qmake_all FORCE
    @$(QMAKE) -o Makefile ElmerGUI.pro

    qmake_all: sub-matc-qmake_all sub-netgen-qmake_all sub-Application-qmake_all FORCE

    make_default: sub-matc-make_default sub-netgen-make_default sub-Application-make_default FORCE
    make_first: sub-matc-make_first sub-netgen-make_first sub-Application-make_first FORCE
    all: sub-matc-all sub-netgen-all sub-Application-all FORCE
    clean: sub-matc-clean sub-netgen-clean sub-Application-clean FORCE
    distclean: sub-matc-distclean sub-netgen-distclean sub-Application-distclean FORCE
    -$(DEL_FILE) Makefile
    install_subtargets: sub-matc-install_subtargets sub-netgen-install_subtargets sub-Application-install_subtargets FORCE
    uninstall_subtargets: sub-matc-uninstall_subtargets sub-netgen-uninstall_subtargets sub-Application-uninstall_subtargets FORCE

    sub-matc-check: matc/$(MAKEFILE)
    cd matc/ && $(MAKE) -f $(MAKEFILE) check
    sub-netgen-check: netgen/$(MAKEFILE)
    cd netgen/ && $(MAKE) -f $(MAKEFILE) check
    sub-Application-check: Application/$(MAKEFILE)
    cd Application/ && $(MAKE) -f $(MAKEFILE) check
    check: sub-matc-check sub-netgen-check sub-Application-check

    mocclean: compiler_moc_header_clean compiler_moc_source_clean

    mocables: compiler_moc_header_make_all compiler_moc_source_make_all
    install: install_subtargets FORCE

    uninstall: uninstall_subtargets FORCE
    Last edited by silviadilecce.s; December 10th, 2013 at 04:57 PM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •