Or am I doing something wrong. Here is what I did:
$ /Applications/CMake.app/Contents/bin/cmake .
~/Downloads/freeglut-3.0.0-rc2
650 iMac: $ /Applications/CMake.app/Contents/bin/cmake .
-- The C compiler identification is AppleClang 6.0.0.6000056
-- The CXX compiler identification is AppleClang 6.0.0.6000056
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found OpenGL: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/System/Library/Frameworks/OpenGL.framework
-- Looking for XOpenDisplay in /usr/X11R6/lib/libX11.dylib;/usr/X11R6/lib/libXext.dylib
-- Looking for XOpenDisplay in /usr/X11R6/lib/libX11.dylib;/usr/X11R6/lib/libXext.dylib - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found X11: /usr/X11R6/lib/libX11.dylib
-- Looking for include file /usr/X11R6/include/X11/extensions/XInput2.h
-- Looking for include file /usr/X11R6/include/X11/extensions/XInput2.h - not found
-- Looking for include file sys/types.h
-- Looking for include file sys/types.h - found
-- Looking for include file unistd.h
-- Looking for include file unistd.h - found
-- Looking for include file sys/time.h
-- Looking for include file sys/time.h - found
-- Looking for include file stdbool.h
-- Looking for include file stdbool.h - found
-- Looking for include file sys/param.h
-- Looking for include file sys/param.h - found
-- Looking for include file sys/ioctl.h
-- Looking for include file sys/ioctl.h - found
-- Looking for include file fcntl.h
-- Looking for include file fcntl.h - found
-- Looking for include file usbhid.h
-- Looking for include file usbhid.h - not found
-- Looking for gettimeofday
-- Looking for gettimeofday - found
-- Looking for XParseGeometry
-- Looking for XParseGeometry - not found
-- Looking for include file stdint.h
-- Looking for include file stdint.h - found
-- Looking for include file inttypes.h
-- Looking for include file inttypes.h - found
-- Configuring done
CMake Warning (dev):
Policy CMP0042 is not set: MACOSX_RPATH is enabled by default. Run "cmake
--help-policy CMP0042" for policy details. Use the cmake_policy command to
set the policy and suppress this warning.
MACOSX_RPATH is not specified for the following targets:
freeglut
This warning is for project developers. Use -Wno-dev to suppress it.
-- Generating done
-- Build files have been written to: /Users/dreed/Downloads/freeglut-3.0.0-rc2
~/Downloads/freeglut-3.0.0-rc2
651 iMac: $ make
Scanning dependencies of target freeglut
[ 1%] Building C object CMakeFiles/freeglut.dir/src/fg_callbacks.c.o
In file included from /Users/dreed/Downloads/freeglut-3.0.0-rc2/src/fg_callbacks.c:29:
In file included from /Users/dreed/Downloads/freeglut-3.0.0-rc2/src/fg_internal.h:192:
/Users/dreed/Downloads/freeglut-3.0.0-rc2/src/x11/fg_internal_x11.h:36:10: fatal error:
'GL/glx.h' file not found
^
1 error generated.
make[2]: *** [CMakeFiles/freeglut.dir/src/fg_callbacks.c.o] Error 1
make[1]: *** [CMakeFiles/freeglut.dir/all] Error 2
make: *** [all] Error 2
The file is on my computer:
$ ls /usr/X11R6/include/GL
freeglut.h glext.h glx_mangle.h glxtokens.h wmesa.h
freeglut_ext.h glu.h glxext.h internal/
freeglut_std.h glu_mangle.h glxint.h osmesa.h
gl.h glut.h glxmd.h vms_x_fix.h
gl_mangle.h glx.h glxproto.h wglext.h
You need the X11 header files to compile freeglut.
Go to http://xquartz.macosforge.org for details about X11 on MacOS X.
Sorry I missed the part about the files being on your computer. So reoppening. However I don't think this is our bug. It probably has something to do with CMake's X11 detection?
Yes, I've installed X11 (and I know it works as I've used it).
I do have some X11 stuff from macports in /opt/local which I think it found the first time so I moved /opt/local to /opt/save-local and then it didn't seem to find them any more. But after doing that I got the errors I listed in the first post to this bug.
Did you try a clean rebuild after moving the /opt/local directory? I mean, deleting all cmake caches etc. and running cmake again? Ideally, just to be sure, I'd try building in a new directory, something like:
freeglut$ mkdir build && cd build
freeglut/build$ cmake ..
Yes after moving /opt/local, I deleted the entire freeglut directory, and untarred the freeglut-3.0.0-rc2.tar.gz again before running cmake and make.
Fixed this problem (svn rev 1744), by using the X11_INCLUDE_DIR variable provided by cmake's FIND_PACKAGE(X11).
I'm leaving the bug report open though, because freeglut still won't build correctly on my mac laptop after this fix. Let me know if by any chance it works for you.
Thanks for working on it.
It looks like sourceforge is down right now. I’ll dust off my svn skills (as it doesn’t look like that commit is in the github repository yet) and make a note in my todo program to try it later today or tomorrow.
I’m trying to get a more modern version of GLSL than the built-in glut on Mac OS X seems to provide (the highest I can get with the built-in glut seems to be GLSL 1.20) so we’ll see if freeglut will help me do that. Apple has deprecated glut so I’m going to need an alternative sometime soon.
Related
Bugs: #218
downloaded this: freeglut-code-1748-trunk
and got this far before the build failed.
[ 37%] Building C object CMakeFiles/freeglut.dir/src/x11/fg_window_x11_glx.c.o
[ 38%] Building C object CMakeFiles/freeglut.dir/src/util/xparsegeometry_repl.c.o
Linking C shared library lib/libglut.dylib
Undefined symbols for architecture x86_64:
"_glXChooseFBConfig", referenced from:
_fgPlatformGlutGetModeValues in fg_state_x11_glx.c.o
_fghChooseConfig in fg_window_x11_glx.c.o
"_glXCreateNewContext", referenced from:
_fghCreateNewContext in fg_window_x11_glx.c.o
"_glXDestroyContext", referenced from:
_fgPlatformDestroyContext in fg_init_x11.c.o
_fgPlatformCloseWindow in fg_window_x11.c.o
"_glXGetCurrentContext", referenced from:
_fgPlatformOpenWindow in fg_window_x11.c.o
"_glXGetFBConfigAttrib", referenced from:
_fgPlatformGetConfig in fg_state_x11_glx.c.o
_fgPlatformGlutGetModeValues in fg_state_x11_glx.c.o
_fghChooseConfig in fg_window_x11_glx.c.o
"_glXGetProcAddressARB", referenced from:
_fgPlatformGetProcAddress in fg_ext_x11.c.o
"_glXGetVisualFromFBConfig", referenced from:
_fgPlatformGlutGet in fg_state_x11.c.o
_fgPlatformOpenWindow in fg_window_x11.c.o
"_glXIsDirect", referenced from:
_fgPlatformOpenWindow in fg_window_x11.c.o
"_glXMakeContextCurrent", referenced from:
_fgPlatformOpenWindow in fg_window_x11.c.o
_fgPlatformSetWindow in fg_window_x11_glx.c.o
"_glXQueryExtension", referenced from:
_fgPlatformInitialize in fg_init_x11.c.o
"_glXQueryExtensionsString", referenced from:
_fgPlatformInitialize in fg_init_x11.c.o
"_glXSwapBuffers", referenced from:
_fgPlatformGlutSwapBuffers in fg_display_x11_glx.c.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [lib/libglut.dylib] Error 1
make[1]: *** [CMakeFiles/freeglut.dir/all] Error 2
make: *** [all] Error 2
Yes, after some more investigation, it looks like you'll have to change the CMakeCache file manually before building, to use GLX instead of the apple OpenGL framework which works with Cococa: http://www.cmake.org/cmake/help/v3.2/module/FindOpenGL.html
I'm not familiar enough with cmake to know if we can do something in CMakeLists.txt to avoid this manual fiddling after configuring. Feel free to send in patches if you find something that works more easily.
Last edit: John Tsiombikas 2015-02-18
We're getting closer.
I did a configure (twice to get rid of all the red complaints), quit CMake, handed edited the CMakeCache.txt file and changed the following settings:
//Include for OpenGL on OSX
OPENGL_INCLUDE_DIR:PATH=/opt/X11/include
//OpenGL lib for OSX
OPENGL_gl_LIBRARY:FILEPATH=/opt/X11/lib/libGL.dylib
//AGL lib for OSX
OPENGL_glu_LIBRARY:FILEPATH=/opt/X11/lib/libGLU.dylib
Next, I relaunched CMake, and it was red so configured again and then generated the make files. Here's where it crashes now:
[ 74%] Building C object CMakeFiles/freeglut_static.dir/src/x11/fg_window_x11_glx.c.o
[ 75%] Building C object CMakeFiles/freeglut_static.dir/src/util/xparsegeometry_repl.c.o
Linking C static library lib/libglut.a
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: lib/libglut.a(fg_xinput_x11.c.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: lib/libglut.a(fg_xinput_x11.c.o) has no symbols
[ 75%] Built target freeglut_static
Scanning dependencies of target CallbackMaker_static
[ 76%] Building C object CMakeFiles/CallbackMaker_static.dir/progs/demos/CallbackMaker/CallbackMaker.c.o
Linking C executable bin/CallbackMaker_static
Undefined symbols for architecture x86_64:
"_glutBitmap8By13", referenced from:
_fghFontByID in libglut.a(fg_font.c.o)
"_glutBitmap9By15", referenced from:
_main in CallbackMaker.c.o
_fghFontByID in libglut.a(fg_font.c.o)
"_glutBitmapHelvetica10", referenced from:
_fghFontByID in libglut.a(fg_font.c.o)
"_glutBitmapHelvetica12", referenced from:
_main in CallbackMaker.c.o
_bitmapPrintf in CallbackMaker.c.o
_fghFontByID in libglut.a(fg_font.c.o)
"_glutBitmapHelvetica18", referenced from:
_fghFontByID in libglut.a(fg_font.c.o)
_fgState in libglut.a(fg_init.c.o)
"_glutBitmapTimesRoman10", referenced from:
_fghFontByID in libglut.a(fg_font.c.o)
"_glutBitmapTimesRoman24", referenced from:
_fghFontByID in libglut.a(fg_font.c.o)
"_glutStrokeMonoRoman", referenced from:
_fghStrokeByID in libglut.a(fg_font.c.o)
"_glutStrokeRoman", referenced from:
_fghStrokeByID in libglut.a(fg_font.c.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [bin/CallbackMaker_static] Error 1
make[1]: *** [CMakeFiles/CallbackMaker_static.dir/all] Error 2
make: *** [all] Error 2
I've tried it both with and without the CMake option to replace glut (not certain I understand the difference) but it gives the error at the same place either way.
It does actually create the dylib (shared libraries) files in the build's lib directory but not the .a (static library). I haven't tried to use the shared library files yet to see if they actually work.
It would have nothing to do with the "replace glut" options. The issue is just that tht libglut.a that gets built really doesn't have those symbols. Looking into it:
$ nm -arch x86_64 lib/libglut.a | grep ' T ' | sort -k3
0000000000000000 T _XParseGeometry
0000000000000400 T _fgAddToWindowDestroyList
0000000000000c10 T _fgCheckActiveMenu
0000000000000320 T _fgCloseWindow
00000000000004b0 T _fgCloseWindows
00000000000002c0 T _fgCreateMenu
0000000000000a10 T _fgCreateStructure
0000000000000000 T _fgCreateWindow
0000000000000ea0 T _fgDeactivateMenu
0000000000000490 T _fgDeinitialize
0000000000000710 T _fgDestroyMenu
0000000000000a90 T _fgDestroyStructure
0000000000000520 T _fgDestroyWindow
0000000000000000 T _fgDisplayMenu
00000000000002a0 T _fgElapsedTime
0000000000000b90 T _fgEnumMenus
0000000000000c30 T _fgEnumSubWindows
0000000000000af0 T _fgEnumWindows
00000000000002c0 T _fgError
0000000000000f50 T _fgGetActiveMenu
0000000000000710 T _fgHandleExtensionEvents
0000000000000040 T _fgHasSpaceball
0000000000000000 T _fgHintPresent
0000000000000090 T _fgInitGL2
0000000000000060 T _fgInitialiseInputDevices
0000000000000000 T _fgInitialiseJoysticks
0000000000000000 T _fgInitialiseSpaceball
0000000000000320 T _fgInputDeviceClose
0000000000000000 T _fgInputDeviceDetect
0000000000000480 T _fgIsSpaceballXEvent
0000000000000130 T _fgJoystickClose
0000000000000450 T _fgJoystickDetect
00000000000001c0 T _fgJoystickPollWindow
0000000000000240 T _fgListAppend
0000000000000210 T _fgListInit
0000000000001040 T _fgListInsert
0000000000000ff0 T _fgListLength
0000000000000670 T _fgListRemove
0000000000000ea0 T _fgMenuByID
00000000000001e0 T _fgOpenWindow
0000000000000900 T _fgPlatformChangeDisplayMode
00000000000005a0 T _fgPlatformCloseDisplay
0000000000000d10 T _fgPlatformCloseWindow
0000000000000000 T _fgPlatformCreateWindow
0000000000000580 T _fgPlatformDeinitialiseInputDevices
00000000000005e0 T _fgPlatformDestroyContext
0000000000000d00 T _fgPlatformEnterGameMode
0000000000001070 T _fgPlatformFullScreenToggle
0000000000000000 T _fgPlatformGetConfig
0000000000000000 T _fgPlatformGetGLUTProcAddress
0000000000000000 T _fgPlatformGetGameModeVMaxExtent
0000000000000190 T _fgPlatformGetModifiers
0000000000000150 T _fgPlatformGetProcAddress
0000000000000000 T _fgPlatformGlutDeviceGet
00000000000000b0 T _fgPlatformGlutGet
00000000000002a0 T _fgPlatformGlutGetModeValues
0000000000000f30 T _fgPlatformGlutSetIconTitle
0000000000000ea0 T _fgPlatformGlutSetWindowTitle
0000000000000000 T _fgPlatformGlutSwapBuffers
0000000000000280 T _fgPlatformHasSpaceball
0000000000000dd0 T _fgPlatformHideWindow
0000000000000e50 T _fgPlatformIconifyWindow
0000000000001460 T _fgPlatformInitWork
0000000000000190 T _fgPlatformInitialize
0000000000000000 T _fgPlatformInitializeSpaceball
00000000000000f0 T _fgPlatformJoystickClose
00000000000000e0 T _fgPlatformJoystickInit
00000000000000d0 T _fgPlatformJoystickOpen
0000000000000000 T _fgPlatformJoystickRawRead
0000000000000f70 T _fgPlatformLeaveGameMode
0000000000001450 T _fgPlatformMainLoopPreliminaryWork
0000000000000000 T _fgPlatformOpenWindow
0000000000001040 T _fgPlatformPopWindow
0000000000001470 T _fgPlatformPosResZordWork
0000000000000fc0 T _fgPlatformPositionWindow
0000000000000200 T _fgPlatformProcessSingleEvent
0000000000001010 T _fgPlatformPushWindow
0000000000000000 T _fgPlatformRegisterDialDevice
0000000000000000 T _fgPlatformRememberState
0000000000000cc0 T _fgPlatformReshapeWindow
00000000000002f0 T _fgPlatformRestoreState
0000000000000000 T _fgPlatformSetCursor
0000000000000c90 T _fgPlatformSetWindow
0000000000000d90 T _fgPlatformShowWindow
0000000000000040 T _fgPlatformSleepForEvents
00000000000001e0 T _fgPlatformSpaceballClose
00000000000002e0 T _fgPlatformSpaceballNumButtons
00000000000002f0 T _fgPlatformSpaceballSetWindow
0000000000000000 T _fgPlatformSystemTime
0000000000001540 T _fgPlatformVisibilityWork
0000000000000300 T _fgPlatformWarpPointer
0000000000000470 T _fgPrintXIDeviceEvent
0000000000000120 T _fgPrintXILeaveEvent
0000000000000800 T _fgProcessWork
0000000000000000 T _fgRegisterDevices
0000000000000000 T _fgSetCursor
00000000000001b0 T _fgSetWindow
0000000000000030 T _fgSpaceballClose
0000000000000630 T _fgSpaceballHandleXEvent
00000000000000a0 T _fgSpaceballNumButtons
0000000000000100 T _fgSpaceballSetWindow
0000000000000290 T _fgSystemTime
0000000000000680 T _fgUpdateMenuHighlight
0000000000000570 T _fgWarning
0000000000000d00 T _fgWindowByHandle
0000000000000dd0 T _fgWindowByID
0000000000001460 T _fghCalculateMenuBoxSize
0000000000000000 T _fghChooseConfig
0000000000000460 T _fghCloseInputDevices
0000000000000170 T _fghContextCreationError
0000000000000880 T _fghCreateNewContext
0000000000001250 T _fghDefaultReshape
00000000000007b0 T _fghDrawGeometrySolid
0000000000000000 T _fghDrawGeometryWire
0000000000000000 T _fghFontByID
00000000000012e0 T _fghGenerateCone
00000000000019e0 T _fghGenerateCylinder
0000000000001f70 T _fghGenerateTorus
0000000000000000 T _fghIsLegacyContextRequested
0000000000000130 T _fghMapBit
0000000000000070 T _fghNumberOfAuxBuffersRequested
0000000000000100 T _fghOnPositionNotify
0000000000000000 T _fghOnReshapeNotify
0000000000000000 T _fghParseCommandLineArguments
0000000000000380 T _fghPlatformGetCursorPos
0000000000000060 T _fghPlatformGlutGetGLX
00000000000001d0 T _fghRedrawWindow
0000000000000230 T _fghRedrawWindowAndChildren
0000000000001770 T _glutAddMenuEntry
0000000000001840 T _glutAddSubMenu
00000000000010f0 T _glutAppStatusFunc
0000000000001d80 T _glutAttachMenu
0000000000000100 T _glutBitmapCharacter
0000000000000610 T _glutBitmapHeight
00000000000004d0 T _glutBitmapLength
0000000000000250 T _glutBitmapString
0000000000000410 T _glutBitmapWidth
0000000000000b50 T _glutButtonBoxFunc
0000000000001a10 T _glutChangeToMenuEntry
0000000000001b70 T _glutChangeToSubMenu
00000000000008d0 T _glutCloseFunc
00000000000004f0 T _glutCopyColormap
0000000000001590 T _glutCreateMenu
0000000000000400 T _glutCreateSubWindow
0000000000000370 T _glutCreateWindow
0000000000001600 T _glutDestroyMenu
00000000000005e0 T _glutDestroyWindow
0000000000001e50 T _glutDetachMenu
00000000000008f0 T _glutDeviceGet
0000000000000bf0 T _glutDialsFunc
0000000000001190 T _glutDisplayFunc
00000000000001c0 T _glutEnterGameMode
0000000000000830 T _glutEntryFunc
0000000000000000 T _glutEstablishOverlay
0000000000000950 T _glutExit
0000000000000000 T _glutExtensionSupported
0000000000000500 T _glutForceJoystickFunc
0000000000000e30 T _glutFullScreen
0000000000000f50 T _glutFullScreenToggle
0000000000000350 T _glutGameModeGet
0000000000000000 T _glutGameModeString
00000000000002d0 T _glutGet
00000000000004b0 T _glutGetColor
0000000000001690 T _glutGetMenu
0000000000001f20 T _glutGetMenuData
0000000000000c60 T _glutGetModeValues
0000000000000b00 T _glutGetModifiers
0000000000000000 T _glutGetProcAddress
0000000000000710 T _glutGetWindow
0000000000000fe0 T _glutGetWindowData
0000000000000060 T _glutHideOverlay
0000000000000870 T _glutHideWindow
0000000000000910 T _glutIconifyWindow
0000000000000000 T _glutIdleFunc
0000000000000320 T _glutIgnoreKeyRepeat
0000000000000770 T _glutInit
0000000000000d60 T _glutInitContextFlags
0000000000001050 T _glutInitContextFunc
0000000000000d80 T _glutInitContextProfile
0000000000000d40 T _glutInitContextVersion
0000000000000a00 T _glutInitDisplayMode
0000000000000a20 T _glutInitDisplayString
0000000000000da0 T _glutInitErrorFunc
0000000000000dc0 T _glutInitWarningFunc
0000000000000960 T _glutInitWindowPosition
00000000000009b0 T _glutInitWindowSize
00000000000014e0 T _glutJoystickFunc
0000000000000a70 T _glutJoystickGetCenter
0000000000000670 T _glutJoystickGetDeadBand
00000000000009f0 T _glutJoystickGetMaxRange
0000000000000970 T _glutJoystickGetMinRange
0000000000000580 T _glutJoystickGetNumAxes
00000000000005d0 T _glutJoystickGetNumButtons
0000000000000730 T _glutJoystickGetSaturation
0000000000000620 T _glutJoystickNotWorking
00000000000008f0 T _glutJoystickSetCenter
00000000000006d0 T _glutJoystickSetDeadBand
0000000000000870 T _glutJoystickSetMaxRange
00000000000007f0 T _glutJoystickSetMinRange
0000000000000790 T _glutJoystickSetSaturation
0000000000000330 T _glutKeyboardFunc
00000000000003d0 T _glutKeyboardUpFunc
0000000000000b80 T _glutLayerGet
0000000000000bb0 T _glutLeaveFullScreen
00000000000002e0 T _glutLeaveGameMode
0000000000000cd0 T _glutLeaveMainLoop
0000000000000ad0 T _glutMainLoop
0000000000000950 T _glutMainLoopEvent
0000000000000230 T _glutMenuDestroyFunc
0000000000000190 T _glutMenuStateFunc
00000000000001e0 T _glutMenuStatusFunc
00000000000006f0 T _glutMotionFunc
00000000000005b0 T _glutMouseFunc
0000000000000650 T _glutMouseWheelFunc
0000000000000e70 T _glutMultiButtonFunc
0000000000000dd0 T _glutMultiEntryFunc
0000000000000f10 T _glutMultiMotionFunc
0000000000000fb0 T _glutMultiPassiveFunc
0000000000000a10 T _glutOverlayDisplayFunc
0000000000000790 T _glutPassiveMotionFunc
0000000000000da0 T _glutPopWindow
0000000000000290 T _glutPositionFunc
0000000000000c50 T _glutPositionWindow
0000000000000030 T _glutPostOverlayRedisplay
0000000000000000 T _glutPostRedisplay
0000000000000040 T _glutPostWindowOverlayRedisplay
0000000000000220 T _glutPostWindowRedisplay
0000000000000d10 T _glutPushWindow
0000000000001c90 T _glutRemoveMenuItem
0000000000000010 T _glutRemoveOverlay
0000000000000170 T _glutReportErrors
0000000000001280 T _glutReshapeFunc
0000000000000af0 T _glutReshapeWindow
0000000000000460 T _glutSetColor
0000000000000030 T _glutSetCursor
0000000000000a50 T _glutSetIconTitle
00000000000003c0 T _glutSetKeyRepeat
0000000000001700 T _glutSetMenu
0000000000001f60 T _glutSetMenuData
0000000000001940 T _glutSetMenuFont
0000000000000000 T _glutSetOption
0000000000000000 T _glutSetVertexAttribCoord3
0000000000000030 T _glutSetVertexAttribNormal
0000000000000060 T _glutSetVertexAttribTexCoord2
0000000000000660 T _glutSetWindow
0000000000001060 T _glutSetWindowData
00000000000009b0 T _glutSetWindowTitle
0000000000000010 T _glutSetupVideoResizing
0000000000000050 T _glutShowOverlay
00000000000007d0 T _glutShowWindow
0000000000002880 T _glutSolidCone
0000000000003a40 T _glutSolidCube
0000000000002dc0 T _glutSolidCylinder
0000000000003ba0 T _glutSolidDodecahedron
0000000000003cf0 T _glutSolidIcosahedron
0000000000003e40 T _glutSolidOctahedron
0000000000003f90 T _glutSolidRhombicDodecahedron
00000000000041f0 T _glutSolidSierpinskiSponge
0000000000002270 T _glutSolidSphere
0000000000001010 T _glutSolidTeacup
0000000000000df0 T _glutSolidTeapot
0000000000001230 T _glutSolidTeaspoon
0000000000004360 T _glutSolidTetrahedron
00000000000037e0 T _glutSolidTorus
0000000000001830 T _glutSpaceballButtonFunc
00000000000016f0 T _glutSpaceballMotionFunc
0000000000001790 T _glutSpaceballRotateFunc
0000000000000470 T _glutSpecialFunc
0000000000000510 T _glutSpecialUpFunc
0000000000000020 T _glutStopVideoResizing
0000000000000690 T _glutStrokeCharacter
0000000000000df0 T _glutStrokeHeight
0000000000000db0 T _glutStrokeLength
0000000000000c20 T _glutStrokeLengthf
00000000000008e0 T _glutStrokeString
0000000000000be0 T _glutStrokeWidth
0000000000000b00 T _glutStrokeWidthf
0000000000000070 T _glutSwapBuffers
0000000000000d30 T _glutTabletButtonFunc
0000000000000c90 T _glutTabletMotionFunc
0000000000000050 T _glutTimerFunc
0000000000000020 T _glutUseLayer
0000000000000050 T _glutVideoPan
0000000000000030 T _glutVideoResize
0000000000000000 T _glutVideoResizeGet
0000000000001340 T _glutVisibilityFunc
0000000000000970 T _glutWMCloseFunc
00000000000000d0 T _glutWarpPointer
0000000000000ab0 T _glutWindowStatusFunc
0000000000002d60 T _glutWireCone
0000000000003840 T _glutWireCube
0000000000003360 T _glutWireCylinder
0000000000003a90 T _glutWireDodecahedron
0000000000003be0 T _glutWireIcosahedron
0000000000003d30 T _glutWireOctahedron
0000000000003e80 T _glutWireRhombicDodecahedron
0000000000003fd0 T _glutWireSierpinskiSponge
0000000000002820 T _glutWireSphere
0000000000000f00 T _glutWireTeacup
0000000000000000 T _glutWireTeapot
0000000000001130 T _glutWireTeaspoon
0000000000004250 T _glutWireTetrahedron
00000000000033c0 T _glutWireTorus
00000000000001d0 T _serial_close
00000000000001a0 T _serial_flush
0000000000000230 T _serial_getchar
0000000000000010 T _serial_open
00000000000002a0 T _serial_putchar
Actually, my search above was wrong. I was assuming those symbols were for functions. I do see them in libglut.a ... odd:
$ nm -arch x86_64 libglut.a | grep ' C ' | sort -k3
00000000000000b8 C _fgDisplay
0000000000000010 C _fgJoystick
0000000000000008 C _fghBindBuffer
0000000000000008 C _fghBindBuffer
0000000000000008 C _fghBindBuffer
0000000000000008 C _fghBufferData
0000000000000008 C _fghBufferData
0000000000000008 C _fghBufferData
0000000000000008 C _fghDeleteBuffers
0000000000000008 C _fghDeleteBuffers
0000000000000008 C _fghDeleteBuffers
0000000000000008 C _fghDisableVertexAttribArray
0000000000000008 C _fghDisableVertexAttribArray
0000000000000008 C _fghDisableVertexAttribArray
0000000000000008 C _fghEnableVertexAttribArray
0000000000000008 C _fghEnableVertexAttribArray
0000000000000008 C _fghEnableVertexAttribArray
0000000000000008 C _fghGenBuffers
0000000000000008 C _fghGenBuffers
0000000000000008 C _fghGenBuffers
0000000000000008 C _fghVertexAttribPointer
0000000000000008 C _fghVertexAttribPointer
0000000000000008 C _fghVertexAttribPointer
0000000000000018 C _glutBitmap8By13
0000000000000018 C _glutBitmap9By15
0000000000000018 C _glutBitmapHelvetica10
0000000000000018 C _glutBitmapHelvetica12
0000000000000018 C _glutBitmapHelvetica18
0000000000000018 C _glutBitmapTimesRoman10
0000000000000018 C _glutBitmapTimesRoman24
0000000000000020 C _glutStrokeMonoRoman
0000000000000020 C _glutStrokeRoman
We're working around this on MacPorts. You can work around it by just disabling the static lib (and maybe you might want to disable the demo programs too):
Turns out the issue is with libglut.a ... you just need to 'ranlib -c libglut.a' to fix it up.
I've found explanation of the missing global symbols at http://public.kitware.com/Bug/view.php?id=10342
Another workaround is initializing these global structs - I've just tested it.
After changing
CMakeCache.txtand manually runranbin -c lib/libglut.a, I ran into the following error:Last edit: super x 2015-10-15
Ah sorry, this is due to a typo in my cache txt. Still having problems though. I will post here if I could not solve them.