Linking error with gcc on OSX |
- Date: 2007/07/15 00:28
- Name: David Benoit
- Dear OpenMX gurus,
I have been trying unsucessfully to install openmx 3.2 on our Xserve clusters (OSX 10.4.10) for a few days now and am encountering the linking problem described below.
It looks like a multiple definition/prototype problem... Anyone has any idea how to fix this??
I compile using: CC = mpicc -O3 -I/sw/include -Wstrict-prototypes LIB = -L/sw/lib -lfftw3 -lg2c -framework Accelerate
The compilation stage is fine (apart from a few pointer re-castings needed for FFTW3), but at the linking stage I obtain: /usr/bin/ld: multiple definitions of symbol _ACnt_switch openmx.o definition of _ACnt_switch in section (__DATA,__common) openmx_common.o definition of _ACnt_switch in section (__DATA,__common) /usr/bin/ld: multiple definitions of symbol _ADensity_Grid openmx.o definition of _ADensity_Grid in section (__DATA,__common) openmx_common.o definition of _ADensity_Grid in section (__DATA,__common) /usr/bin/ld: multiple definitions of symbol _Angle0_Orbital openmx.o definition of _Angle0_Orbital in section (__DATA,__common) openmx_common.o definition of _Angle0_Orbital in section (__DATA,__common) /usr/bin/ld: multiple definitions of symbol _Angle0_Spin openmx.o definition of _Angle0_Spin in section (__DATA,__common) openmx_common.o definition of _Angle0_Spin in section (__DATA,__common) /usr/bin/ld: multiple definitions of symbol _Angle1_Orbital openmx.o definition of _Angle1_Orbital in section (__DATA,__common) openmx_common.o definition of _Angle1_Orbital in section (__DATA,__common) /usr/bin/ld: multiple definitions of symbol _Angle1_Spin openmx.o definition of _Angle1_Spin in section (__DATA,__common) openmx_common.o definition of _Angle1_Spin in section (__DATA,__common) /usr/bin/ld: multiple definitions of symbol _Arho_EH0 openmx.o definition of _Arho_EH0 in section (__DATA,__common) openmx_common.o definition of _Arho_EH0 in section (__DATA,__common) /usr/bin/ld: multiple definitions of symbol _Atom_Symbol openmx.o definition of _Atom_Symbol in section (__DATA,__common) openmx_common.o definition of _Atom_Symbol in section (__DATA,__common) /usr/bin/ld: multiple definitions of symbol _Atom_Weight openmx.o definition of _Atom_Weight in section (__DATA,__common) openmx_common.o definition of _Atom_Weight in section (__DATA,__common) /usr/bin/ld: multiple definitions of symbol _Av_num openmx.o definition of _Av_num in section (__DATA,__common) openmx_common.o definition of _Av_num in section (__DATA,__common) /usr/bin/ld: multiple definitions of symbol _BCR openmx.o definition of _BCR in section (__DATA,__common) openmx_common.o definition of _BCR in section (__DATA,__common) /usr/bin/ld: multiple definitions of symbol _Band_N_perpath openmx.o definition of _Band_N_perpath in section (__DATA,__common) openmx_common.o definition of _Band_N_perpath in section (__DATA,__common) /usr/bin/ld: multiple definitions of symbol _Band_Nkpath openmx.o definition of _Band_Nkpath in section (__DATA,__common) openmx_common.o definition of _Band_Nkpath in section (__DATA,__common) /usr/bin/ld: multiple definitions of symbol _Band_UnitCell openmx.o definition of _Band_UnitCell in section (__DATA,__common) openmx_common.o definition of _Band_UnitCell in section (__DATA,__common) /usr/bin/ld: multiple definitions of symbol _Band_disp_switch openmx.o definition of _Band_disp_switch in section (__DATA,__common) openmx_common.o definition of _Band_disp_switch in section (__DATA,__common) /usr/bin/ld: multiple definitions of symbol _Band_kPathUnit openmx.o definition of _Band_kPathUnit in section (__DATA,__common) openmx_common.o definition of _Band_kPathUnit in section (__DATA,__common) /usr/bin/ld: multiple definitions of symbol _Band_kname openmx.o definition of _Band_kname in section (__DATA,__common) openmx_common.o definition of _Band_kname in section (__DATA,__common) /usr/bin/ld: multiple definitions of symbol _Band_kpath openmx.o definition of _Band_kpath in section (__DATA,__common) openmx_common.o definition of _Band_kpath in section (__DATA,__common)
etc...
Any help gratefully received!
Cheers, David
| |