Mac OS X build problem - libRGL.so ftgl lib path, with fix

Hi,

building the trunk from today on my machine I got this problem

==> lib/libCore.so done
g++ -dynamiclib -single_module -Wl,-dead_strip_dylibs -install_name @rpath/libRGL.so -O2 -m64 -mmacosx-version-min=10.6 -o lib/libRGL.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 /opt/local/lib -lftgl -Llib -lGLEW -L/opt/local/lib/ -lGLU -lGL -L/opt/local/lib/ -lX11 -lm -Llib -lCore -lCint
ld: in /opt/local/lib, can’t map file, errno=22

the problem is a missing “-L”, see above, before -ftgl. Adding a “-L” in Makefile.config line 143 fixed it

cheers

Joa

ps

uname -a
Darwin ---------- 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun 7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386
g++ --version
i686-apple-darwin10-g+±4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3)
Copyright © 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
root-config --config
–with-x11-libdir=/opt/local/lib/ --with-xpm-libdir=/opt/local/lib/ --with-xft-libdir=/opt/local/lib/ --with-xext-libdir=/opt/local/lib/ --with-opengl-libdir=/opt/local/lib/ --enable-builtin-glew --enable-minuit2

Joa

Hi Joa,

could you try the 5.30.02 or the ROOT svn trunk. I believe this issue has already been fixed.

Cheers, Fons.

Hi,

doing a svn update today and after a make
gave me the same problem, with the same solution.

Some extra info

root-config --svn-version

41764

wheras

svn info
Path: .
Working Copy Root Path: /Users/joa/root-opt
URL: root.cern.ch/svn/root/trunk
Repository Root: root.cern.ch/svn/root
Repository UUID: 27541ba8-7e3a-0410-8455-c3a389f83636
Revision: 41833
Node Kind: directory
Schedule: normal
Last Changed Author: rdm
Last Changed Rev: 41833
Last Changed Date: 2011-11-09 12:34:21 +0100 (Wed, 09 Nov 2011)

a bit strange, or?

cheers

Joa

Hi Joa,

Can you confirm that the problem no longer appear in ROOT v5.32 and up?

Thanks,
Philippe.

Hi again

did
svn update
make

I still get the same error

root-config --svn-revision
43245
root-config --version
5.33/03

cheers

Joa

Hi,

I assume you are running on osx and are using macports (and also ftgl from macports).

It’s a bit strange that you get “… -lRIO /opt/local/lib -lftgl …” given the configuration line you show in your first post (that is, you don’t use --disable-builtin-ftgl). Are this really the configure arguments you used? Normally, root would build its own/builtin ftgl (slightly modified 2.1.2).

The problem with ftgl is that they did major redesign between 2.1.2 and 2.1.3 and things behave completely differenty (GL state management and turning on/off of GL capabilities).

So, if you want to use ROOT-GL it would make sense to use the builtin one. If you don’t intend to use ROOT-GL, it really doesn’t matter and you should also use the builtin one. :slight_smile:

In any case, a proper fix for this would be in top-level configure where pkg-config is used do determine linker / preprocessor flags for external ftgl. Maybe pkg-config in macports returns linker paths without -L and the linux one returns them with -L.

Cheers,
Matevz

Hi,

I also get this problem (root_v5.32.01, mac 10.5 and macports ftgl). I initially fixed it by editing config/Makefile.config and adding the ‘-L’. Is it better to change BUILDFTGL to ‘yes’? I used no --disable options in the configure step, so maybe the default needs to be changed if a system wide ftgl is found?

I reported it here before I found this thread

Cheers,
Liam