Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Sep 2001 12:37:23 -0700 (PDT)
From:      Jonathan Belson <jon@witchspace.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/30511: Problem getting opengl/mesa to work with latest port of qt
Message-ID:  <200109111937.f8BJbNF25070@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         30511
>Category:       ports
>Synopsis:       Problem getting opengl/mesa to work with latest port of qt
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Sep 11 12:40:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Jonathan Belson
>Release:        freebsd-stable
>Organization:
>Environment:
FreeBSD lexx.local 4.3-STABLE FreeBSD 4.3-STABLE #0: Mon Aug 27 18:27:48 BST 2001     jon@lexx.local:/usr/src/sys/compile/LEXX  i386
>Description:

I'm having problems trying to get opengl to work with the latest
version of qt.  It's my understanding that I have to link against
libqtgl for qt with opengl support:


#include <qapplication.h>
#include <qgl.h>
 
int main(int argc, char** argv)
{
        QApplication app(argc, argv);
        QGLWidget* w = new QGLWidget(0, "a widget");
 
        delete w;
 
        return 0;
}


I compile it with :

gcc -o prog prog.cc -I/usr/X11R6/include/qt2/ -I/usr/X11R6/include/
-L/usr/X11R6/lib/ -L/usr/local/lib -lqtgl -lpthread


It links fine, but when I try to run it I get the error:

/usr/libexec/ld-elf.so.1: ./prog: Undefined symbol
"__9QGLWidgetP7QWidgetPCcPC9QGLWidgetUi" 


ldd ./prog gives:

        libqt2.so.4 => /usr/X11R6/lib/libqt2.so.4 (0x1806d000)
        libpthread.so.14 => /usr/local/lib/libpthread.so.14 (0x18512000)
        libc.so.4 => /usr/lib/libc.so.4 (0x1852a000)
        libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x185c2000)
        libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x185d0000)
        libSM.so.6 => /usr/X11R6/lib/libSM.so.6 (0x186ab000)
        libICE.so.6 => /usr/X11R6/lib/libICE.so.6 (0x186b4000)
        libXft.so.1 => /usr/X11R6/lib/libXft.so.1 (0x186ca000)
        libpng.so.4 => /usr/local/lib/libpng.so.4 (0x186f4000)
        libz.so.2 => /usr/lib/libz.so.2 (0x18713000)
        libjpeg.so.9 => /usr/local/lib/libjpeg.so.9 (0x18720000)
        libmng.so.1 => /usr/local/lib/libmng.so.1 (0x1873e000)
        libstdc++.so.3 => /usr/lib/libstdc++.so.3 (0x18770000)
        libm.so.2 => /usr/lib/libm.so.2 (0x187b5000)
        libXThrStub.so.6 => /usr/X11R6/lib/libXThrStub.so.6 (0x187d0000)
        libXrender.so.1 => /usr/X11R6/lib/libXrender.so.1 (0x187d2000)
        libfreetype.so.7 => /usr/local/lib/libfreetype.so.7 (0x187d7000)
        liblcms.so.1 => /usr/local/lib/liblcms.so.1 (0x1880e000)


I was slightly concerned that the first line shows libqt2 rather than
libqtgl;  should this be the case?

/usr/X11R6/lib# ll | grep qt
lrwxr-xr-x   1 root  wheel       29 Sep  6 18:50 libqt2-mt.so ->
/usr/X11R6/lib/libqt2-mt.so.4
-r-xr-xr-x   1 root  wheel  4884936 Sep  6 18:50 libqt2-mt.so.4
lrwxr-xr-x   1 root  wheel       26 Sep  6 18:50 libqt2.so ->
/usr/X11R6/lib/libqt2.so.4
-r-xr-xr-x   1 root  wheel  4869448 Sep  6 18:50 libqt2.so.4
lrwxr-xr-x   1 root  wheel       27 Sep  6 18:50 libqtgl.so ->
/usr/X11R6/lib/libqtgl.so.4
-r-xr-xr-x   1 root  wheel  4899888 Sep  6 18:50 libqtgl.so.4


When I reinstall the previous version (qt-2.3.0) the code links and runs
as expected.

I'm running FreeBSD stable, with qt-2.3.1 built from the port.


Thanks!
>How-To-Repeat:
See 'full description' for code example.
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200109111937.f8BJbNF25070>