[CMake] 3.1 can't link my MinGW executables any more.
Bill Somerville
bill at classdesign.com
Mon Dec 1 12:12:30 EST 2014
On 01/12/2014 17:04, Bill Somerville wrote:
> On 01/12/2014 16:33, Brad King wrote:
>
> Hi Brad,
>> On 11/29/2014 06:58 AM, Bill Somerville wrote:
>>> -lgfortran -lquadmath -lm -lkernel32 -luser32 -lgdi32 -lwinspool
>>> -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32
>>>
>>> but in 3.1.0-rc2 I get:
>>>
>>> -lquadmath -lm -lkernel32 -luser32 -lgdi32 -lwinspool
>>> -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32
>> The missing -lgfortran may be due to a failure to detect the implicit
>> libraries linked by the gfortran front-end. Compare these files:
>>
>> CMakeFiles/3.0.2/CMakeFortranCompiler.cmake
>> CMakeFiles/3.1.0-rc2/CMakeFortranCompiler.cmake
>>
>> In particular check the values of
>>
>> CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES
>> CMAKE_Fortran_IMPLICIT_LINK_DIRECTORIES
>>
>> recorded in the two files. Check CMakeFiles/CMakeOutput.log and/or
>> CMakeFiles/CMakeError.log for information about how the values were
>> extracted. Something here may have changed in 3.1.
> An initial scan of the CMakeFiles/CMakeOutput.log for the same project
> between 3.0.2 and 3.1.0-rc2 shows huge differences and I can't see any
> obvious single cause of the issue. Here are the two files FWIW:
>
> https://dl.dropboxusercontent.com/u/4192709/CMakeOutput.log.3.0.2
>
> https://dl.dropboxusercontent.com/u/4192709/CMakeOutput.log.3.1.0-rc2
>
> One thing that looks suspicious are the lines mapping words to content
> along the lines of :
>
> arg [-lmingw32] ==> lib [mingw32]
> arg [-lgcc] ==> lib [gcc]
> arg [-lgcc_eh] ==> lib [gcc_eh]
>
> which in 3.1 look like this:
>
> arg [-lmingw32] ==> lib []
> arg [-lgcc] ==> lib []
> arg [-lgcc_eh] ==> lib []
>
> I'm not sure where they are generated.
An extra data point, the configure phase appears to work but I've just
noticed this:
-- Verifying Fortran/CXX Compiler Compatibility - Failed
because the link test there fails for the same reason - missing Fortran
library. That one had slipped under the net since the configure pass
carried on running finders after that message.
>>
>> Thanks,
>> -Brad
>>
> 73
> Bill
> G4WJS.
Regards
Bill Somerville.
More information about the CMake
mailing list