← Back to team overview

kicad-developers team mailing list archive

Re: Again with the glew on 10.10

 

> On Dec 11, 2014, at 9:50 AM, Wayne Stambaugh <stambaughw@xxxxxxxxx> wrote:
> 
> On 12/11/2014 11:31 AM, Andy Peters wrote:
>> 
>>> On Dec 10, 2014, at 6:05 PM, Adam Wolf <adamwolf@xxxxxxxxxxxxxxxxxxxx> wrote:
>>> 
>>> I have not seen this issue, but I am using brew for glew.
>>> 
>>> Adam Wolf
>>> Cofounder and Engineer
>>> W&L
>> 
>> I see that the header in question is in /usr/include/GL (this is where glew's make install put it), which means that the make system assumes that glew is installed someplace else. Where is that include directory specified? I can install the glew stuff to wherever, just as long as I know where it is supposed to go!
>> 
>> -a
> 
> A large part of the problem is neither KiCad's custom FindGLEW.cmake or
> the stock one shipped with CMake is very well thought out.  They both
> use the typical check for platform tests which inevitably break instead
> of feature tests.  Glew (at least the recent versions) will use
> pkg-config if it is available to create the correct configuration
> information which is how FindGLEW.cmake should work instead of using the
> platform specific paths.  Pkg-config is available on all platforms
> including windows so this should be the default search mechanism.  The
> platform specific stuff should be the fall back and there should be the
> catch all root path variable for custom builds which should always take
> precedence.  There is also the option of setting
> -DCMAKE_PREFIX_PATH=/usr on the command line.
> 
pkg-config is on my systems, and it should work, I agree, but something is borked.

I looked at FindGLEW.cmake and added the correct path to the headers:

IF (APPLE)
# These values for Apple could probably do with improvement.
   FIND_PATH( GLEW_INCLUDE_DIR GL/glew.h
     /System/Library/Frameworks/GLEW.framework/Versions/A/Headers
     /opt/local/include
     /usr/include                <- I added this!
     ${OPENGL_LIBRARY_DIR}
   )

   FIND_LIBRARY( GLEW_GLEW_LIBRARY GLEW
     /opt/local/lib
     /usr/lib
   )

and re-ran cmake, and it didn't seem to care. I even did a make clean. I don't know if there's a "cmake clean" command which forces cmake to rebuild everything.

Thumbing through all of the cmake modules, I see that the kicad build process can download all of the pre-requisites if they don't already exist. Is there a way to force them to download and be used every time, instead of being dependent on system files? That might work.

-a



>> 
>> 
>>> 
>>> On Dec 10, 2014 6:52 PM, "Andy Peters" <devel@xxxxxxxxx> wrote:
>>> I must've done something evil to my build system, because I now get the following error when building the latest BZR:
>>> 
>>> [ 46%] Building CXX object common/CMakeFiles/gal.dir/draw_panel_gal.cpp.o
>>> In file included from /Users/andy/Projects/kicad-build/kicad/common/draw_panel_gal.cpp:38:
>>> In file included from /Users/andy/Projects/kicad-build/kicad/include/gal/opengl/opengl_gal.h:34:
>>> /Users/andy/Projects/kicad-build/kicad/include/gal/opengl/shader.h:32:10: fatal error: 'GL/glew.h' file not found
>>> #include <GL/glew.h>
>>> 
>>> This is on OS X 10.10.1 with the latest Xcode 6.1.1 and command-line tools.
>>> 
>>> cmake -DUSE_WX_GRAPHICS_CONTEXT=OFF
>>>     -DUSE_WX_OVERLAY=ON
>>>     -DKICAD_SCRIPTING=OFF
>>>     -DKICAD_SCRIPTING_MODULES=OFF
>>>     -DKICAD_SCRIPTING_WXPYTHON=OFF
>>>     -DUSE_FP_LIB_TABLE=HARD_CODED_ON
>>>     -DBUILD_GITHUB_PLUGIN=OFF
>>>     -DCMAKE_INSTALL_PREFIX=../bin
>>>     -DCMAKE_OSX_DEPLOYMENT_TARGET=10.10
>>>     -DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk
>>> 
>>> glew itself was built from git source and installed per their instructions.
>>> 
>>> Any ideas?
>>> 
>>> -a
>>> 
>>> 
>>> _______________________________________________
>>> Mailing list: https://launchpad.net/~kicad-developers
>>> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>> More help   : https://help.launchpad.net/ListHelp
>> 
>> Andy Peters
>> 5511 E Rosewood St
>> Tucson, AZ 85711
>> 520-907-2262
>> devel@xxxxxxxxx
>> 
>> 
>> 
>> 
>> _______________________________________________
>> Mailing list: https://launchpad.net/~kicad-developers
>> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~kicad-developers
>> More help   : https://help.launchpad.net/ListHelp
>> 
> 
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp

Andy Peters
5511 E Rosewood St
Tucson, AZ 85711
520-907-2262
devel@xxxxxxxxx





Follow ups

References