ld : alignment lost in tentative merging ...
Dear,
I am working in scientific collaboration and I am trying to build a library, write by collaborators, on my Mac Pro OSX 10.5.7. This library is write in both c++ and fortran, and I had to install the latest version of gfortran in order to be able to build it.
both, c++ and fortran code build fine (without any errors) and when the object file are link together to create the library I got the following warning:
[ld: warning alignment lost in merging tentative definition slate]
Note that despite this warning, the library is created.
Primarily, I thought this warning was armless, as most of the warning message. If I used function or variable defined in this library in my own programs, the library works perfectly in most of the case. However, when I call function which need the [ slate] variable, my program fails (but not caches).
As fare as I understood, [ slate] is a common block variable defined in a fortran code. When the linker ld (the one installed by default in my Mac) is called to create the library, it is not able to find this common variable (I am not sure find is the appropriate word, I am not a specialist for the ld command). Therefore, when my program need the value recorder into the [ slate] variable, it got absurd numbers (most of the time it looks like a memory adress of a pointer than the value of the variable ... but I am not sure the value I got is really related to [ slate]) which yield to wrong calculation and results (usually, infinity or a [NaN]). This problem does not occurs when I am using this library on Linux computer.
After searching on the web, I find peoples with similar problem (but not solutions) and it seems the problem is du to the linker of Apple OS X 10.5. Therefore, I am writing a topics here to get some advice from people which already got similar difficulties. I would like to know if their is any update of the linker to fix this bug.
Any help would be welcome.
I am working in scientific collaboration and I am trying to build a library, write by collaborators, on my Mac Pro OSX 10.5.7. This library is write in both c++ and fortran, and I had to install the latest version of gfortran in order to be able to build it.
both, c++ and fortran code build fine (without any errors) and when the object file are link together to create the library I got the following warning:
[ld: warning alignment lost in merging tentative definition slate]
Note that despite this warning, the library is created.
Primarily, I thought this warning was armless, as most of the warning message. If I used function or variable defined in this library in my own programs, the library works perfectly in most of the case. However, when I call function which need the [ slate] variable, my program fails (but not caches).
As fare as I understood, [ slate] is a common block variable defined in a fortran code. When the linker ld (the one installed by default in my Mac) is called to create the library, it is not able to find this common variable (I am not sure find is the appropriate word, I am not a specialist for the ld command). Therefore, when my program need the value recorder into the [ slate] variable, it got absurd numbers (most of the time it looks like a memory adress of a pointer than the value of the variable ... but I am not sure the value I got is really related to [ slate]) which yield to wrong calculation and results (usually, infinity or a [NaN]). This problem does not occurs when I am using this library on Linux computer.
After searching on the web, I find peoples with similar problem (but not solutions) and it seems the problem is du to the linker of Apple OS X 10.5. Therefore, I am writing a topics here to get some advice from people which already got similar difficulties. I would like to know if their is any update of the linker to fix this bug.
Any help would be welcome.
MacPro Quad Core, Mac OS X (10.5.7), Use latest version of gfortran