You are not logged in.

#1 2012-07-22 10:53:52

cdwijs
Member
Registered: 2010-04-24
Posts: 289

qantenna: undefined reference to `gluNewQuadric'

Hi All,

I'm trying to compile qantenna:
https://aur.archlinux.org/packages.php?ID=51366

The compile errors out:

g++ -m64 -Wl,-O1,--sort-common,--as-needed,-z,relro -o ../bin/qantenna ../qt/obj/gl.o ../qt/obj/camera.o ../qt/obj/datamanager.o ../qt/obj/glwidget.o ../qt/obj/line.o ../qt/obj/main.o ../qt/obj/mainwindow.o ../qt/obj/about.o ../qt/obj/neccontainer.o ../qt/obj/necinput.o ../qt/obj/necinputparser.o ../qt/obj/necoutput.o ../qt/obj/necoutputparser.o ../qt/obj/patch.o ../qt/obj/radiationpattern.o ../qt/obj/loadthread.o ../qt/obj/antennadelegate.o ../qt/obj/mmath.o ../qt/obj/vec3.o ../qt/obj/point4f.o ../qt/obj/vertexmatrix.o ../qt/obj/moc_datamanager.o ../qt/obj/moc_glwidget.o ../qt/obj/moc_mainwindow.o ../qt/obj/moc_about.o ../qt/obj/moc_neccontainer.o ../qt/obj/moc_necinput.o ../qt/obj/moc_necoutput.o ../qt/obj/moc_loadthread.o ../qt/obj/moc_antennadelegate.o ../qt/obj/qrc_resource.o    -L/usr/X11R6/lib64 -L/usr/lib ../qt/lib/libQAntennaCards.a -lpthread -lGL -lQtOpenGL -lQtGui -lQtCore 
../qt/obj/gl.o: In function `GL::checkError(QString const&, int const&)':
/home/ingeborg/Downloads/qantenna/src/qantenna-0.2.3/src/gl.cpp:51: undefined reference to `gluErrorString'
../qt/obj/camera.o: In function `Camera::perspective(float, float, float, float)':
/home/ingeborg/Downloads/qantenna/src/qantenna-0.2.3/src/camera.cpp:118: undefined reference to `gluPerspective'
../qt/obj/necinput.o: In function `NECInput::createOpenGLList()':
/home/ingeborg/Downloads/qantenna/src/qantenna-0.2.3/src/necinput.cpp:1054: undefined reference to `gluNewQuadric'
/home/ingeborg/Downloads/qantenna/src/qantenna-0.2.3/src/necinput.cpp:1059: undefined reference to `gluDisk'
../qt/obj/necoutput.o: In function `NECOutput::processData()':
/home/ingeborg/Downloads/qantenna/src/qantenna-0.2.3/src/necoutput.cpp:114: undefined reference to `gluNewQuadric'
/home/ingeborg/Downloads/qantenna/src/qantenna-0.2.3/src/necoutput.cpp:115: undefined reference to `gluQuadricNormals'
../qt/obj/necoutput.o: In function `NECOutput::render()':
/home/ingeborg/Downloads/qantenna/src/qantenna-0.2.3/src/necoutput.cpp:179: undefined reference to `gluSphere'
collect2: error: ld returned 1 exit status
make[1]: *** [../bin/qantenna] Error 1
make[1]: Leaving directory `/storage/home/ingeborg/Downloads/qantenna/src/qantenna-0.2.3/src'
make: *** [sub-src-make_default] Error 2
==> ERROR: A failure occurred in build().
    Aborting...

The install file states I need Qt(*, the GL(** and the GLUT(** development files. I think I have the correct files installed:

# pacman -S glut
warning: freeglut-2.8.0-1 is up to date -- reinstalling
...
# pacman -S freeglut
warning: freeglut-2.8.0-1 is up to date -- reinstalling

I found somebody who had the same error. He suggested to add -lGLU to LDADD in the Makefile. I have looked in  the Makefile, but I could not find LDADD
http://bioinformatics.essex.ac.uk/users … linux.html

How can I make this program to compile?

Best regards,
Cedric

Offline

#2 2012-07-22 12:08:25

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,525
Website

Re: qantenna: undefined reference to `gluNewQuadric'

Add the following `sed` line to the PKGBUILD.  It must be right between qmake and make:

build() {
  cd "$srcdir/$pkgname-$pkgver"
  qmake PREFIX=/usr qantenna.pro
  sed -i 's/\(^LIBS.*$\)/\1 -lGLU/' ./src/Makefile
  make
}

edit: then, if/when this works, please contact the maintainer of the AUR package to report the problem and link to this thread as a proposed solution.

Last edited by Trilby (2012-07-22 12:09:24)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

Board footer

Powered by FluxBB