Opened 13 years ago

Closed 10 years ago

#32525 closed defect (worksforme)

root5: building with +opengl variant results in undefined FTGL symbols

Reported by: mf2k (Frank Schima) Owned by: cjones051073 (Chris Jones)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: mattiafrancescomoro@…, jsnuverink@…, raramayo (Rodolfo Aramayo)
Port: root5

Description (last modified by mf2k (Frank Schima))

I'm seeing the following build error for ROOT 5.32.00r1 on Mac OS X 10.6.8 and Xcode 3.2.6.

:info:build /opt/local/bin/g++-mp-4.5 -dynamiclib -single_module -Wl,-dead_strip_dylibs -install_name /opt/local/lib/root/libGenetic.5.so -O2 -m64 -mmacosx-version-min=10.6 -o lib/libGenetic.5.32.so math/genetic/src/GeneticMinimizer.o math/genetic/src/G__Genetic.o -ldl -Llib -lRIO -lHist -lMatrix -lTree -lGraf -lGpad -lTreePlayer -lMLP -lMinuit -lMathCore -lXMLIO -lTMVA -Llib -lCore -lCint -compatibility_version 5 -current_version 5.32.00
:info:build ln -fs libGenetic.5.32.so lib/libGenetic.so
:info:build Undefined symbols:
:info:build   "FTGLBitmapFont::FTGLBitmapFont(char const*)", referenced from:
:info:build       TGLFontManager::RegisterFont(int, int, TGLFont::EMode, TGLFont&) in TGLFontManager.o
:info:build   "FTGLTextureFont::FTGLTextureFont(char const*)", referenced from:
:info:build       TGLFontManager::RegisterFont(int, int, TGLFont::EMode, TGLFont&) in TGLFontManager.o
:info:build   "FTGLOutlineFont::FTGLOutlineFont(char const*)", referenced from:
:info:build       TGLFontManager::RegisterFont(int, int, TGLFont::EMode, TGLFont&) in TGLFontManager.o
:info:build   "FTGLPolygonFont::FTGLPolygonFont(char const*)", referenced from:
:info:build       TGLFontManager::RegisterFont(int, int, TGLFont::EMode, TGLFont&) in TGLFontManager.o
:info:build       TGLText::SetGLTextFont(short) in TGLText.o
:info:build   "___GLXEW_ARB_multisample", referenced from:
:info:build       TGLFormat::InitAvailableSamples()      in TGLFormat.o
:info:build   "FTGLPixmapFont::FTGLPixmapFont(char const*)", referenced from:
:info:build       TGLFontManager::RegisterFont(int, int, TGLFont::EMode, TGLFont&) in TGLFontManager.o
:info:build   "FTFont::BBox(char const*, float&, float&, float&, float&, float&, float&)", referenced from:
:info:build       TGLFont::MeasureBaseLineParams(float&, float&, float&, char const*) const in TGLFontManager.o
:info:build       TGLFont::BBox(char const*, float&, float&, float&, float&, float&, float&) const in TGLFontManager.o
:info:build       TGLFont::Render(char const*, double, double, double, double) const in TGLFontManager.o
:info:build       TGLFont::Render(TString const&, float, float, float, TGLFont::ETextAlignH_e, TGLFont::ETextAlignV_e) const in TGLFontManager.o
:info:build       TGLText::PaintGLText(double, double, double, char const*) in TGLText.o
:info:build       TGLText::PaintBBox(char const*) in TGLText.o
:info:build       TGLText::BBox(char const*, float&, float&, float&, float&, float&, float&) in TGLText.o
:info:build   "FTGLExtrdFont::FTGLExtrdFont(char const*)", referenced from:
:info:build       TGLFontManager::RegisterFont(int, int, TGLFont::EMode, TGLFont&) in TGLFontManager.o
:info:build ld: symbol(s) not found
:info:build collect2: ld returned 1 exit status
:info:build make: *** [lib/libRGL.so] Error 1
:info:build make: *** Waiting for unfinished jobs....

Attachments (2)

main.log (2.4 MB) - added by mf2k (Frank Schima) 13 years ago.
build.log (2.9 MB) - added by cjones051073 (Chris Jones) 13 years ago.

Change History (24)

Changed 13 years ago by mf2k (Frank Schima)

Attachment: main.log added

comment:1 Changed 13 years ago by mf2k (Frank Schima)

Description: modified (diff)

comment:2 Changed 13 years ago by mf2k (Frank Schima)

Cc: jonesc@… a2piratesoft@… macsforever2000@… go.iwai@… justin.garofoli@… ryandesign@… removed

comment:3 Changed 13 years ago by cjones051073 (Chris Jones)

I'm afraid I don't have an OS X 10.6 / Xcode 3 machine to test this on, so I cannot directly investigate....

The error you are getting seems to be the one revision 1 was supposed to fix, by using root's built in GLEW instead of MacPorts version, so I don't understand.

Could you try a full clean uninstall then reinstall. If it still fails try disabling the opengl variant.

Chris

comment:4 Changed 13 years ago by cjones051073 (Chris Jones)

another idea. It looks like, from the log, you have glew installed

:info:configure Checking for libGL, or libMesaGL ... /opt/local/lib
:info:configure Checking for libGLU, or libMesaGLU ... /opt/local/lib
:info:configure Checking for GL/glew.h ... /opt/local/include
:info:configure Checking for libGLEW ... /opt/local/lib
:info:configure Checking whether to build included GLEW ... yes

Correctly though, configure is deciding to build the built in GLEW, as instructed.

Could you try removing glew and see if that helps ?

Chris

comment:5 Changed 13 years ago by cjones051073 (Chris Jones)

Attaching my own build log, for OSX 10.7 + Xcode 4. This is with the non X11 version of glew installed.

It looks like for some reason your build is linking libRGL against the MacPorts one, even though it should be using root own version under /opt/local/lib/root. Why this is, I'm afraid I have no idea at this moment... Maybe you can spot something comparing the logs...

Chris

Changed 13 years ago by cjones051073 (Chris Jones)

Attachment: build.log added

comment:6 Changed 13 years ago by cjones051073 (Chris Jones)

Got to dash, but one other observation from your log file.

You have at the top

:debug:main OS darwin/10.8.0 (Mac OS X 10.6) arch i386

Are you building in 32 bit mode ?

Later on, root is configuring itself in 64 bit mode

:info:configure Configuring for macosx64

Maybe you have a 32 / 64 bit mis-match ?

Chris

comment:7 in reply to:  6 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to jonesc@…:

:debug:main OS darwin/10.8.0 (Mac OS X 10.6) arch i386

The "arch" in this line is the value of ${os.arch} and will only ever be "i386" for any Intel Mac or "powerpc" for any PowerPC Mac. It does not indicate the bitness.

comment:8 Changed 13 years ago by mf2k (Frank Schima)

Uninstalling glew allows root to build.

comment:9 Changed 13 years ago by cjones051073 (Chris Jones)

Well, I cannot reproduce that. I'm able to build root fine, with and without glew installed (with or without the X11 variant)....

Given no one else has reported this problem, unless you can prove me otherwise I'm going to just assume something unique in your setup caused this.

cheers Chris

comment:10 Changed 13 years ago by mf2k (Frank Schima)

FYI, i reinstalled glew and tried again and I see the following error:

:info:build /opt/local/bin/g++-mp-4.5 -dynamiclib -single_module -Wl,-dead_strip_dylibs -install_name /opt/local/lib/root/libGenetic.5.so -O2 -m64 -mmacosx-version-min=10.6 -o lib/libGenetic.5.32.so math/genetic/src/GeneticMinimizer.o math/genetic/src/G__Genetic.o -ldl -Llib -lRIO -lHist -lMatrix -lTree -lGraf -lGpad -lTreePlayer -lMLP -lMinuit -lMathCore -lXMLIO -lTMVA -Llib -lCore -lCint -compatibility_version 5 -current_version 5.32.00
:info:build Undefined symbols:
:info:build   "___GLXEW_ARB_multisample", referenced from:
:info:build       TGLFormat::InitAvailableSamples()      in TGLFormat.o
:info:build ld: symbol(s) not found
:info:build collect2: ld returned 1 exit status
:info:build make: *** [lib/libRGL.so] Error 1

I'm using +gcc45 +python27 +fitsio +fftw3

comment:11 Changed 13 years ago by mf2k (Frank Schima)

It's not a big deal because I don't need glew, but I'm going to keep this open until we can figure out the cause.

comment:12 Changed 13 years ago by cjones051073 (Chris Jones)

Fair enough.

One other thing that strikes me as odd is the link command for the library in question is

:info:build /opt/local/bin/g++-mp-4.5 -dynamiclib -single_module -Wl,-dead_strip_dylibs -install_name /opt/local/lib/root/libRGL.5.so -O2 -m64 -mmacosx-version-min=10.6 -o lib/libRGL.5.32.so graf3d/gl/src/CsgOps.o graf3d/gl/src/TArcBall.o graf3d/gl/src/TF2GL.o graf3d/gl/src/TGL5D.o graf3d/gl/src/TGL5DDataSetEditor.o graf3d/gl/src/TGL5DPainter.o graf3d/gl/src/TGLAdapter.o graf3d/gl/src/TGLAnnotation.o graf3d/gl/src/TGLAutoRotator.o graf3d/gl/src/TGLAxis.o graf3d/gl/src/TGLAxisPainter.o graf3d/gl/src/TGLBoundingBox.o graf3d/gl/src/TGLBoxPainter.o graf3d/gl/src/TGLCamera.o graf3d/gl/src/TGLCameraGuide.o graf3d/gl/src/TGLCameraOverlay.o graf3d/gl/src/TGLClip.o graf3d/gl/src/TGLClipSetEditor.o graf3d/gl/src/TGLContext.o graf3d/gl/src/TGLContextPrivate.o graf3d/gl/src/TGLCylinder.o graf3d/gl/src/TGLEmbeddedViewer.o graf3d/gl/src/TGLEventHandler.o graf3d/gl/src/TGLFBO.o graf3d/gl/src/TGLFaceSet.o graf3d/gl/src/TGLFontManager.o graf3d/gl/src/TGLFormat.o graf3d/gl/src/TGLH2PolyPainter.o graf3d/gl/src/TGLHistPainter.o graf3d/gl/src/TGLIsoMesh.o graf3d/gl/src/TGLLegoPainter.o graf3d/gl/src/TGLLightSet.o graf3d/gl/src/TGLLightSetEditor.o graf3d/gl/src/TGLLockable.o graf3d/gl/src/TGLLogicalShape.o graf3d/gl/src/TGLManip.o graf3d/gl/src/TGLManipSet.o graf3d/gl/src/TGLMarchingCubes.o graf3d/gl/src/TGLObject.o graf3d/gl/src/TGLOrthoCamera.o graf3d/gl/src/TGLOutput.o graf3d/gl/src/TGLOverlay.o graf3d/gl/src/TGLOverlayButton.o graf3d/gl/src/TGLPShapeObj.o graf3d/gl/src/TGLPShapeObjEditor.o graf3d/gl/src/TGLPShapeRef.o graf3d/gl/src/TGLPadPainter.o graf3d/gl/src/TGLPadUtils.o graf3d/gl/src/TGLParametric.o graf3d/gl/src/TGLParametricEquationGL.o graf3d/gl/src/TGLPerspectiveCamera.o graf3d/gl/src/TGLPhysicalShape.o graf3d/gl/src/TGLPlot3D.o graf3d/gl/src/TGLPlotBox.o graf3d/gl/src/TGLPlotCamera.o graf3d/gl/src/TGLPlotPainter.o graf3d/gl/src/TGLPolyLine.o graf3d/gl/src/TGLPolyMarker.o graf3d/gl/src/TGLQuadric.o graf3d/gl/src/TGLRnrCtx.o graf3d/gl/src/TGLRotateManip.o graf3d/gl/src/TGLSAFrame.o graf3d/gl/src/TGLSAViewer.o graf3d/gl/src/TGLScaleManip.o graf3d/gl/src/TGLScene.o graf3d/gl/src/TGLSceneBase.o graf3d/gl/src/TGLSceneInfo.o graf3d/gl/src/TGLScenePad.o graf3d/gl/src/TGLSelectBuffer.o graf3d/gl/src/TGLSelectRecord.o graf3d/gl/src/TGLSphere.o graf3d/gl/src/TGLStopwatch.o graf3d/gl/src/TGLSurfacePainter.o graf3d/gl/src/TGLTF3Painter.o graf3d/gl/src/TGLTH3Composition.o graf3d/gl/src/TGLText.o graf3d/gl/src/TGLTransManip.o graf3d/gl/src/TGLUtil.o graf3d/gl/src/TGLViewer.o graf3d/gl/src/TGLViewerBase.o graf3d/gl/src/TGLViewerEditor.o graf3d/gl/src/TGLVoxelPainter.o graf3d/gl/src/TGLWidget.o graf3d/gl/src/TH2GL.o graf3d/gl/src/TH3GL.o graf3d/gl/src/TKDEAdapter.o graf3d/gl/src/TKDEFGT.o graf3d/gl/src/TPointSet3DGL.o graf3d/gl/src/TX11GL.o graf3d/gl/src/gl2ps.o graf3d/gl/src/G__GL.o -ldl -Llib -lGpad -lGraf3d -lGui -lGraf -lHist -lGed -lMathCore -lTree -lTreePlayer -lRIO -Llib -lFTGL -Llib -lGLEW -L/opt/local/lib -lGLU -lGL -L/opt/local/lib -lX11 -lm -Llib -lCore -lCint -compatibility_version 5 -current_version 5.32.00

The part "-lGLEW -L/opt/local/lib" seems slightly odd to me. Its almost like even though root is using its built in GLEW (which is ultimately installed in /opt/local/lib/root) root's configure is still looking for the system one. In my case, these seems not to cause a problem, but for you it does. Perhaps a different in the linker behaviour between our two setups ???

Chris

comment:13 Changed 13 years ago by mf2k (Frank Schima)

Yeah, maybe it's a difference between Xcode 3 and 4.

comment:14 Changed 13 years ago by jsnuverink@…

I report the same error. Installing without option -opengl works.

comment:15 Changed 13 years ago by jsnuverink@…

Cc: jsnuverink@… added

Cc Me!

comment:16 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: raramayo@… added
Summary: root: build error on Snow Leopardroot: building with +opengl variant results in undefined FTGL symbols

Has duplicate #33548.

comment:17 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

FYI, I am still able to reproduce the issue with 5.32.02, on OS X 10.6.8 with Xcode 3.2.6.

comment:18 Changed 13 years ago by cjones051073 (Chris Jones)

Thanks. I'm still unable to reproduce it with OS X10.7 and Xcode 4.3 ...

As this is my only machine, there is nothing more I can do I'm afraid... Debugging this one has to fall to some still running the older OSX 10.6 and Xcode 3 versions I'm afraid.

At least when 10.8 comes out soon, 10.6 will be 2 releases back, so no longer supported ;)

Chris

comment:19 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

You're free to support whatever you want, or nothing at all. Some of us still try to offer best-effort support for Tiger...

comment:20 Changed 12 years ago by cjones051073 (Chris Jones)

Come someone who is able to reproduce the issue here, give the update I just posted in

https://trac.macports.org/ticket/34854

a try ? Along the way whilst preparing that update, I stumbled over an issue with the hew cocoa variant, that seemed similar to the one here. I was able to fix it by removing some configure options, that where causing the problem (also fixed today upstream by the ROOT devs). Its possible it helps here... fingers crossed.

Chris

comment:21 Changed 10 years ago by mojca (Mojca Miklavec)

Port: root5 added; root removed
Summary: root: building with +opengl variant results in undefined FTGL symbolsroot5: building with +opengl variant results in undefined FTGL symbols
Version: 2.0.3

comment:22 Changed 10 years ago by mf2k (Frank Schima)

Resolution: worksforme
Status: newclosed

I cannot reproduce this anymore.

Note: See TracTickets for help on using tickets.