Problem 816 - multiple definitions of symbols during Linking Stage on PB G4 - Tiger
Summary: multiple definitions of symbols during Linking Stage on PB G4 - Tiger
Status: RESOLVED WORKSFORME
Alias: None
Product: Examples/Basic and Novice
Classification: Unclassified
Component: N02 (show other problems)
Version: 7.1
Hardware: Other Other
: P2 normal
Assignee: Gabriele Cosmo
URL:
Depends on:
Blocks:
 
Reported: 2005-11-30 08:57 CET by chiarusi
Modified: 2007-04-08 18:45 CEST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this problem.
Description chiarusi 2005-11-30 08:57:20 CET
Dear Geant4 users

These are the characteristics of my machine:
Mac PowerBook G4 - Tiger V. 1.4.3

I got the following warning messages indipendently to the version of gcc
(I tested it with gcc 3.3 and 4.0)

The warning messages:
/usr/bin/ld: warning multiple definitions of symbol _glPointParametri
/System/Library/Frameworks/OpenGL.framework.Versions/A/Libraries/libGL.dylib(gll_api.o)
definition of _glPointParametri
/usr/X11R6//lib/libGL.dylib(dri_dispatch.o) definition of _glPointParametri

Why Mac OSX needs the samy library in two different places?

Such problems did not occur with Mac OS X 1.3.X (Panther) with gcc 3.3

Have you experienced a GEANT4 v.7.1 working with mac OSX 1.4.X ?

Thank you very much!
Tommaso
Comment 1 John Apostolakis 2005-11-30 09:24:59 CET
Dear Tommasso,
Could you please explain whether you are using exampleN02 changed or unchanged.
 Also how are you compiling/linking, could you confirm that you are doing it
with the 'standard' Geant4 makefiles ?
It appears that your problem is with system libraries - have you customised your
OpenGL on your machine ?
If you can provide further information, then the new person that I am assigning
can have a chance to provide a fuller response.
Best regards, John Apostolakis
Comment 2 Gabriele Cosmo 2005-12-02 07:44:59 CET
Tommaso Chiarusi wrote:
>
> + Could you please explain whether you are using exampleN02 changed
>   or unchanged.
>
No: I did not any changes
I got the "multiple definition" messages after compiling the exampleN02 code
as it is released in the geant4.7.1.p01.gtar.gz  distribution.

To be more exhaustive, I should add that I get as the same messages as running
my own program which was written by merging  existing  examples and personal
customizations.
My own program did work good on Mac G5 with OS X 1.3 (Panther), gcc 3.3 and
geant4.7.0 and I was happy.

I recently purchased a Mac PowerBook G4, with OS X 1.4 (Tiger) and  gcc 4.0.
I installed geant4.7.1.p01 and CLHEP libs opportunely compiled for Tiger.
The compiling of geant4 and the hadronic physics_list was  straightforward and
successful.
I installed also the Tiger-dedicated openmotif.2.2.3 lib.
Finally I copied my own program from the Mac G5 to the PowerBook G4  and
I tried to compile it.

And I got such errors (the same got with exampleN02):

/usr/bin/ld: warning multiple definitions of symbol _glPointParameteri
/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/
libGL.dylib(gll_api.o) definition of _glPointParameteri
/usr/X11R6//lib/libGL.dylib(dri_dispatch.o) definition of  _glPointParameteri
/usr/bin/ld: warning multiple definitions of symbol _glPointParameteriv
/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/
libGL.dylib(gll_api.o) definition of _glPointParameteriv
/usr/X11R6//lib/libGL.dylib(dri_dispatch.o) definition of  _glPointParameteriv
/usr/bin/ld: warning suggest use of -bind_at_load, as lazy binding  may result
in errors or different symbols being used
symbol _glPointParameteri used from dynamic library /System/Library/
Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib (gll_api.o) not
from earlier dynamic library /usr/X11R6/lib/libGL. 1.dylib(dri_dispatch.o)
symbol _glPointParameteriv used from dynamic library /System/Library/
Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib (gll_api.o) not
from earlier dynamic library /usr/X11R6/lib/libGL. 1.dylib(dri_dispatch.o)

As I've already said, I get again such warnings when compiling the  exampleN02.
Actually I tried to compile the exampleN02 just for trying a standard approved
code and see what  did happen...

> +  Also how are you compiling/linking, could you confirm that you  are doing
>    it with the 'standard' Geant4 makefiles ?

I absolutely confirm it!

> + It appears that your problem is with system libraries - have you
>   customised your OpenGL on your machine ?

Nop!

> + If you can provide further information, then the new person that
>   I am assigning

I forgot to mention (and I'm sorry about that) that the executable  does run,
whereas the one compiled from my own program aborts and I don't know if those
multiple definitions are determinant causes for my problem...
Comment 3 Gabriele Cosmo 2005-12-02 07:50:59 CET
I verified installation of Geant4.7.1.p01 and exampleN02 with OpenGL graphics
on MacOS/Tiger. I could not reproduce the problem and for me exampleN02 links
just fine.
I believe the problem is in the user's system, maybe in the ad-hoc installation
of GL/Motif made afterwards. Indeed there seems to appear two GL libs in the
path:
/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib
and:
/usr/X11R6//lib/libGL.dylib
The user should eventually try to solve that ambiguity.