From owner-freebsd-questions@FreeBSD.ORG Tue Dec 22 15:36:47 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 319751065696 for ; Tue, 22 Dec 2009 15:36:47 +0000 (UTC) (envelope-from macerl@telkomsa.net) Received: from rrba-ip-smtp-2-3.saix.net (rrba-ip-smtp-2-3.saix.net [196.25.240.236]) by mx1.freebsd.org (Postfix) with ESMTP id A84F58FC36 for ; Tue, 22 Dec 2009 15:36:45 +0000 (UTC) Received: from toutatis.localnet (dsl-242-93-13.telkomadsl.co.za [41.242.93.13]) by rrba-ip-smtp-2-3.saix.net (Postfix) with ESMTP id 3D3831CC9 for ; Tue, 22 Dec 2009 17:36:42 +0200 (SAST) From: Richard Mace To: freebsd-questions@freebsd.org Date: Tue, 22 Dec 2009 17:36:19 +0200 User-Agent: KMail/1.12.4 (FreeBSD/8.0-RELEASE; KDE/4.3.4; i386; ; ) MIME-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <200912221736.20023.macerl@telkomsa.net> Subject: Help building/running SDL/OpenGL code X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Dec 2009 15:36:47 -0000 I developed a small molecular dynamics simulation under Linux some time ago. Since recently moving to FreeBSD I thought that I'd try to get it running here, too. However, although I am able to get the code to build, it dumps core -- apparently before getting to any user code! During the build (linking phase) I get one error which seems to be a pointer to the source of the problem: ============================================= gcc -Wall -L/usr/local/lib -o lennardjones main.o anim-thread.o ode.o gasdynamics.o eyedynamics.o -lSDL -lSDL_gfx -lm -lGLU /usr/bin/ld: warning: libm.so.3, needed by /usr/local/lib/libGL.so.1, may conflict with libm.so.5 ============================================= Note the last two lines. (I have included the two previous lines to show the dependent libraries, if that helps.) Important information: 1) I am running the code on an i386 machine with the NVIDIA driver (nvidia- driver-173 for an old FX 5200). 2) I installed the Mesa Libs after installing the NVIDIA driver. I then thought this might produce a conflict with the Nvidia-supplied GL libs, so un- installed the NVIDIA driver. Then re-installed after installing mesa-demos. 3) "glxinfo | grep -i render" reports: direct rendering: Yes OpenGL renderer string: GeForce FX 5200/PCI/SSE2 4) glxgears runs without problems When I uninstall the NVIDIA driver and build the code, the linker error above disappears and the code runs to the point where I can select the graphics mode, i.e., it executes user code without dumping core. However, selecting any mode now gives (somewhat expectedly): =========================================== selected video mode is: 1280 x 1024 (32 bpp) Could not set video mode: Couldn't find matching GLX visual =========================================== So, it appears that there is some conflict between the mesa libraries (which I need to #include to build the code) and the NVIDIA-supplied libraries, or am I on the wrong track? Can anyone shed some light on this? I've spent quite some time on what first appeared to be a fairly trivial task and I am eager to see how this runs under FreeBSD. Thanks in advance... -Richard