Date: Tue, 22 Dec 2009 17:36:19 +0200 From: Richard Mace <macerl@telkomsa.net> To: freebsd-questions@freebsd.org Subject: Help building/running SDL/OpenGL code Message-ID: <200912221736.20023.macerl@telkomsa.net>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200912221736.20023.macerl>