From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Oct 5 01:20:27 2006 Return-Path: X-Original-To: freebsd-ports-bugs@freebsd.org Delivered-To: freebsd-ports-bugs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EB16E16A40F for ; Thu, 5 Oct 2006 01:20:26 +0000 (UTC) (envelope-from rossiya@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.188]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4AB8643D45 for ; Thu, 5 Oct 2006 01:20:26 +0000 (GMT) (envelope-from rossiya@gmail.com) Received: by nf-out-0910.google.com with SMTP id n15so687970nfc for ; Wed, 04 Oct 2006 18:20:25 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=o2ZTW2i0+HKH/y50roeWBPNkDG2LJPLZPqonH4evdCtD62PQQCs3z+vK9ucTZBHxnxpJtzPzSGnAR088mR19ipArELLusWAeRQGeZT7Kd6eq8Ybim2f94pn/l5rFhWEku3J22/6OSAidw2kvZVGnTLbmeFz56RjtBx78Rlohhnw= Received: by 10.49.20.5 with SMTP id x5mr3206804nfi; Wed, 04 Oct 2006 18:20:24 -0700 (PDT) Received: by 10.49.34.18 with HTTP; Wed, 4 Oct 2006 18:20:24 -0700 (PDT) Message-ID: <28a99ba50610041820q5a3e817y65d22415378e1c08@mail.gmail.com> Date: Wed, 4 Oct 2006 18:20:24 -0700 From: MC To: freebsd-ports-bugs@freebsd.org In-Reply-To: <28a99ba50610022232w54c72118k72da417a18edc51a@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <28a99ba50610022232w54c72118k72da417a18edc51a@mail.gmail.com> Subject: Nvidia and libglut header files mutually broken X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Oct 2006 01:20:27 -0000 Hello To use GL in builds I changed my CL directory to nvidia's. I seems to be constructed with that intention. But I noticed that libglut programs don't compile, unless glut.h in the nvidia directory /usr/X11R6/share/doc/NVIDIA_GLX-1.0 is prefixed with: #if !defined(OPENSTEP) && (defined(__WIN32__) && !defined(__CYGWIN__)) # if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GL32) /* tag specify we're building mesa as a DLL */ # define GLAPI __declspec(dllexport) # elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL) /* tag specifying we're building for DLL runtime support */ # define GLAPI __declspec(dllimport) # else /* for use with static link lib build of Win32 edition only */ # define GLAPI extern # endif /* _STATIC_MESA support */ # define GLAPIENTRY __stdcall #elif defined(__CYGWIN__) && defined(USE_OPENGL32) /* use native windows opengl32 */ # define GLAPI extern # define GLAPIENTRY __stdcall #elif defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303 # define GLAPI __attribute__((visibility("default"))) # define GLAPIENTRY #endif /* WIN32 && !CYGWIN */ Also when building libglut the glut.h file there in work/ needs that prefix as well. This even applies to the latest libglut 6.4.2 as well. Here are trees of my GL header files linked so as to invoke the nvidia headers. Basically I just replaced standard filepaths with nvidia equivalents. I renamed the standard GL directory to _GL, and made GL a symlink to /usr/X11R6/share/doc/NVIDIA_GLX- 1.0/GL: Obviously in retrospect the GL/ in NVIDIA can be bypassed. Anyway it works I'm just including it for completion: pocket:/usr/ports/graphics/libglut # tree -f /usr/X11R6/include/GL/ /usr/X11R6/include/GL |-- /usr/X11R6/include/GL/gl.h -> /usr/X11R6/share/doc/NVIDIA_GLX-1.0/gl.h |-- /usr/X11R6/include/GL/glext.h -> /usr/X11R6/share/doc/NVIDIA_GLX-1.0/glext.h |-- /usr/X11R6/include/GL/glu.h -> /usr/X11R6/include/_GL/glu.h |-- /usr/X11R6/include/GL/glut.h -> /usr/X11R6/include/_GL/glut.h |-- /usr/X11R6/include/GL/glut.h,v |-- /usr/X11R6/include/GL/glx.h -> /usr/X11R6/share/doc/NVIDIA_GLX-1.0/glx.h `-- /usr/X11R6/include/GL/glxtokens.h -> /usr/X11R6/share/doc/NVIDIA_GLX- 1.0/glxtokens.h pocket:/usr/ports/graphics/libglut # tree -f /usr/X11R6/share/doc/NVIDIA_GLX-1.0 | grep -v html /usr/X11R6/share/doc/NVIDIA_GLX-1.0 |-- /usr/X11R6/share/doc/NVIDIA_GLX-1.0/GL | |-- /usr/X11R6/share/doc/NVIDIA_GLX- 1.0/GL/gl.h -> /usr/X11R6/share/doc/NVIDIA_GLX-1.0/gl.h | |-- /usr/X11R6/share/doc/NVIDIA_GLX-1.0/GL/glext.h -> /usr/X11R6/share/doc/NVIDIA_GLX-1.0/glext.h | |-- /usr/X11R6/share/doc/NVIDIA_GLX-1.0/GL/glu.h -> /usr/X11R6/include/_GL/glu.h | |-- /usr/X11R6/share/doc/NVIDIA_GLX-1.0/GL/glut.h -> /usr/X11R6/include/_GL/glut.h | |-- /usr/X11R6/share/doc/NVIDIA_GLX-1.0/GL/glut.h,v | |-- /usr/X11R6/share/doc/NVIDIA_GLX-1.0/GL/glx.h -> /usr/X11R6/share/doc/NVIDIA_GLX- 1.0/glx.h | `-- /usr/X11R6/share/doc/NVIDIA_GLX-1.0/GL/glxtokens.h -> /usr/X11R6/share/doc/NVIDIA_GLX-1.0/glxtokens.h |-- /usr/X11R6/share/doc/NVIDIA_GLX-1.0/README |-- /usr/X11R6/share/doc/NVIDIA_GLX-1.0/XF86Config.sample |-- /usr/X11R6/share/doc/NVIDIA_GLX-1.0/gl.h |-- /usr/X11R6/share/doc/NVIDIA_GLX-1.0/glext.h |-- /usr/X11R6/share/doc/NVIDIA_GLX-1.0/glx.h |-- /usr/X11R6/share/doc/NVIDIA_GLX-1.0/glxtokens.h |-- /usr/X11R6/share/doc/NVIDIA_GLX- 1.0/license.txt