Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Compiler error

JohnNichols
Valued Contributor III
2,571 Views

I have an old program that builds on X32, but as soon as I go to X64, I get the following error

Screenshot 2023-10-27 102455.png

blown up

Screenshot 2023-10-27 102455.png

 

0 Kudos
16 Replies
JohnNichols
Valued Contributor III
2,570 Views

I could have sworn I saw this error before, but I could not find it on a hunt of the board.  

 

0 Kudos
Steve_Lionel
Honored Contributor III
2,550 Views

A link map will tell you where each definition is coming from and will be instrumental in figuring out what's wrong. A code screenshot doesn't help.

0 Kudos
JohnNichols
Valued Contributor III
2,532 Views

Map works in IFORT on this code, but not on IFX,

Screenshot 2023-10-27 123119.png

 

I have no idea how to take the code and make a reproducer so herewith is the code.  Sorry about length.  

If you get it running selection is 6  followed by CBRUG

0 Kudos
andrew_4619
Honored Contributor III
2,522 Views

andrew_4619_0-1698442632161.png

Download opened the solution switched to the x64 config and did a clean build with no errors.

 

0 Kudos
andrew_4619
Honored Contributor III
2,510 Views

I think inferring from your post in another thread that when you said "I have an old program that builds on X32, but as soon as I go to X64, I get the following error" you actually should have said "I have an old program that builds on X32, but as soon as I go to X64 in an unsupported VS level on an unsupported Operating system, I get the following error....." It appears that this is the key to the problem.

0 Kudos
JohnNichols
Valued Contributor III
2,449 Views

I quite agree that is a perfect summary. 

Of course, one has to ask why Intel has this forum, and why is it so very good, when we get to this level of enquiry, one asks the economic question, what is the benefit to Intel.  

I would say that Intel gets a group of very dedicated people who answer a lot of interestingly dumb question, such as I am using the version of the Intel Fortran from 1813, should I update to 1920 version or bite the bullet and go for MS 3.31 Fortran. 

People find errors and report them, you imagine the poor bastards at NASA who only have a small group of people to test their software, no wonder their QA is so good. 

People try out combinations of devices that they do not have the people to try themselves.  And they have some very nice people who interact with the forum and allow the true developers to get on without wasting their valuable time.  

So you are a pathfinder, and a good one.  So then you have a squad of pathfinders, who are free for their time.  Steve is worth at least 100 Euros per hour, so getting him for free is perfect.  

Finally, it is good for the pathfinders to have some social interaction with fellow humans who think like them and offer comments that are deliberately  polite, but some are quite good at getting a point across.   For mental health the interactions are important, it keeps your mind active. 

So thank you for being a pathfinder, you are a good one.  Each one has their quirks, but that is much of the fun.  

0 Kudos
jimdempseyatthecove
Honored Contributor III
2,388 Views

As @andrew_4619 can compile and link x64, are you still having issues with linking x64?

 

If yes, then there may be a case of linking in an old library (from way back) together with a new library where ldexp has been relocated.

Using @Steve_Lionel suggestion to find which libraries are containing ldexp may point to the offending library. This is often the case where the old library is still in LIB=... environment variable. Lacking a map, maybe the build log will be helpful.

 

Note, if you need to keep it there for old IDE builds, you may be able to change the link order (or flag the old library to not be included) in the link properties of your newer IDE.

 

Jim

0 Kudos
JohnNichols
Valued Contributor III
2,374 Views

The program is stock standard Fortran - it just creates a text file from some simple input data.  There are no major numerical routines.  

It compiles on my other computers running latest IFX, just not on the DELL that has the new preview.  If I had a spare few hours I could track it down. Unfortunately I do not.  

Thanks for the ideas.  

I assume that INTEL has to have someone addressing the new previews, after all it then gives them time to fix the mismatches.  The fact that there are so few is amazing.  

 

0 Kudos
AONym
New Contributor II
2,289 Views

I suggest you try your build with the Linker switch /verbose:lib turned on. This will list all the libraries it searches; from the error msg, there are two that define ldexp. You may find it is searching a 32-bit library (libmmt?) for your 64-bit build.

0 Kudos
JohnNichols
Valued Contributor III
2,254 Views
Searching libraries
    Searching C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.38.33128\lib\x64\libcmt.lib:
    Searching C:\Program Files (x86)\Intel\oneAPI\compiler\2023.2.0\windows\compiler\lib\Intel64_win\ifconsol.lib:
    Searching C:\Program Files (x86)\Intel\oneAPI\compiler\2023.2.0\windows\compiler\lib\Intel64_win\libifcoremt.lib:
    Searching C:\Program Files (x86)\Intel\oneAPI\compiler\2023.2.0\windows\compiler\lib\Intel64_win\libifport.lib:
    Searching C:\Program Files (x86)\Intel\oneAPI\compiler\2023.2.0\windows\compiler\lib\Intel64_win\libircmt.lib:
    Searching C:\Program Files (x86)\Intel\oneAPI\compiler\2023.2.0\windows\compiler\lib\Intel64_win\libmmt.lib:
    Searching C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.38.33128\lib\x64\oldnames.lib:
    Searching C:\Program Files (x86)\Intel\oneAPI\compiler\2023.2.0\windows\compiler\lib\Intel64_win\svml_dispmt.lib:
    Searching C:\Program Files (x86)\Windows Kits\10\Lib\10.0.25982.0\um\x64\kernel32.lib:
    Searching C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.38.33128\lib\x64\libvcruntime.lib:
    Searching C:\Program Files (x86)\Windows Kits\10\Lib\10.0.25982.0\ucrt\x64\libucrt.lib:
libucrt.lib(ldexp.obj) : error LNK2005: ldexp already defined in libmmt.lib(ldexp_iface_c99.obj)
    Searching C:\Program Files (x86)\Windows Kits\10\Lib\10.0.25982.0\um\x64\uuid.lib:

The two libraries that interfere are listed above.  

 

 

0 Kudos
jimdempseyatthecove
Honored Contributor III
2,252 Views

The Link properties page has a property named "Ignore specific library"

One of libucrt.lib or libmmt.lib should be place there.

I do not know which one, or if either will resolve your problem.

It is easy enough to experiment (less than one minute of your time).

 

Jim Dempsey

0 Kudos
jimdempseyatthecove
Honored Contributor III
2,249 Views

If you find that both libraries are needed (other things are required).

You can use the Librarian to create a new library from libucrt.lib by extracting ldexp.obj from it.

Then link that library in place of libucrt.lib

I suspect that in libmmt.lib that ldexp_iface_c99.obj is tied to the ldexp held within it.

 

Jim Dempsey

0 Kudos
andrew_4619
Honored Contributor III
2,199 Views

for what it is worth the /verbose:lib in a supported environment is. Note the difference in the first line... the preview has its of set of (presumably modified) libs

1>------ Build started: Project: Beowulf (IFX), Configuration: Debug x64 ------
Linking...
Searching libraries
    Searching C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\lib\x64\libcmtd.lib:
    Searching C:\Program Files (x86)\Intel\oneAPI\compiler\2023.2.0\windows\compiler\lib\Intel64_win\ifconsol.lib:
    Searching C:\Program Files (x86)\Intel\oneAPI\compiler\2023.2.0\windows\compiler\lib\Intel64_win\libifcoremt.lib:
    Searching C:\Program Files (x86)\Intel\oneAPI\compiler\2023.2.0\windows\compiler\lib\Intel64_win\libifport.lib:
    Searching C:\Program Files (x86)\Intel\oneAPI\compiler\2023.2.0\windows\compiler\lib\Intel64_win\libircmt.lib:
    Searching C:\Program Files (x86)\Intel\oneAPI\compiler\2023.2.0\windows\compiler\lib\Intel64_win\libmmt.lib:
    Searching C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\lib\x64\oldnames.lib:
    Searching C:\Program Files (x86)\Intel\oneAPI\compiler\2023.2.0\windows\compiler\lib\Intel64_win\svml_dispmt.lib:
    Searching C:\Program Files (x86)\Windows Kits\10\Lib\10.0.19041.0\um\x64\kernel32.lib:
    Searching C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\lib\x64\libvcruntimed.lib:
    Searching C:\Program Files (x86)\Windows Kits\10\Lib\10.0.19041.0\ucrt\x64\libucrtd.lib:
    Searching C:\Program Files (x86)\Windows Kits\10\Lib\10.0.19041.0\um\x64\uuid.lib:
    Searching C:\Program Files (x86)\Windows Kits\10\Lib\10.0.19041.0\um\x64\ImageHlp.lib:
    Searching C:\Program Files (x86)\Intel\oneAPI\compiler\2023.2.0\windows\compiler\lib\Intel64_win\libirc.lib:
    Searching C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\lib\x64\libcmtd.lib:
    Searching C:\Program Files (x86)\Intel\oneAPI\compiler\2023.2.0\windows\compiler\lib\Intel64_win\ifconsol.lib:
    Searching C:\Program Files (x86)\Intel\oneAPI\compiler\2023.2.0\windows\compiler\lib\Intel64_win\libifcoremt.lib:
    Searching C:\Program Files (x86)\Intel\oneAPI\compiler\2023.2.0\windows\compiler\lib\Intel64_win\libifport.lib:
    Searching C:\Program Files (x86)\Intel\oneAPI\compiler\2023.2.0\windows\compiler\lib\Intel64_win\libircmt.lib:
    Searching C:\Program Files (x86)\Intel\oneAPI\compiler\2023.2.0\windows\compiler\lib\Intel64_win\libmmt.lib:
    Searching C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\lib\x64\oldnames.lib:
    Searching C:\Program Files (x86)\Intel\oneAPI\compiler\2023.2.0\windows\compiler\lib\Intel64_win\svml_dispmt.lib:
    Searching C:\Program Files (x86)\Windows Kits\10\Lib\10.0.19041.0\um\x64\kernel32.lib:
    Searching C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\lib\x64\libvcruntimed.lib:
    Searching C:\Program Files (x86)\Windows Kits\10\Lib\10.0.19041.0\ucrt\x64\libucrtd.lib:
    Searching C:\Program Files (x86)\Windows Kits\10\Lib\10.0.19041.0\um\x64\uuid.lib:
    Searching C:\Program Files (x86)\Windows Kits\10\Lib\10.0.19041.0\um\x64\ImageHlp.lib:
    Searching C:\Program Files (x86)\Intel\oneAPI\compiler\2023.2.0\windows\compiler\lib\Intel64_win\libirc.lib:
    Searching C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\lib\x64\libcmtd.lib:
    Searching C:\Program Files (x86)\Intel\oneAPI\compiler\2023.2.0\windows\compiler\lib\Intel64_win\ifconsol.lib:
    Searching C:\Program Files (x86)\Intel\oneAPI\compiler\2023.2.0\windows\compiler\lib\Intel64_win\libifcoremt.lib:
    Searching C:\Program Files (x86)\Intel\oneAPI\compiler\2023.2.0\windows\compiler\lib\Intel64_win\libifport.lib:
    Searching C:\Program Files (x86)\Intel\oneAPI\compiler\2023.2.0\windows\compiler\lib\Intel64_win\libircmt.lib:
    Searching C:\Program Files (x86)\Intel\oneAPI\compiler\2023.2.0\windows\compiler\lib\Intel64_win\libmmt.lib:
    Searching C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\lib\x64\oldnames.lib:
    Searching C:\Program Files (x86)\Intel\oneAPI\compiler\2023.2.0\windows\compiler\lib\Intel64_win\svml_dispmt.lib:
    Searching C:\Program Files (x86)\Windows Kits\10\Lib\10.0.19041.0\um\x64\kernel32.lib:
    Searching C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\lib\x64\libvcruntimed.lib:
    Searching C:\Program Files (x86)\Windows Kits\10\Lib\10.0.19041.0\ucrt\x64\libucrtd.lib:
    Searching C:\Program Files (x86)\Windows Kits\10\Lib\10.0.19041.0\um\x64\uuid.lib:
    Searching C:\Program Files (x86)\Windows Kits\10\Lib\10.0.19041.0\um\x64\ImageHlp.lib:
    Searching C:\Program Files (x86)\Intel\oneAPI\compiler\2023.2.0\windows\compiler\lib\Intel64_win\libirc.lib:
    Searching C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\lib\x64\libcmtd.lib:
    Searching C:\Program Files (x86)\Intel\oneAPI\compiler\2023.2.0\windows\compiler\lib\Intel64_win\ifconsol.lib:
    Searching C:\Program Files (x86)\Intel\oneAPI\compiler\2023.2.0\windows\compiler\lib\Intel64_win\libifcoremt.lib:
    Searching C:\Program Files (x86)\Intel\oneAPI\compiler\2023.2.0\windows\compiler\lib\Intel64_win\libifport.lib:
    Searching C:\Program Files (x86)\Intel\oneAPI\compiler\2023.2.0\windows\compiler\lib\Intel64_win\libircmt.lib:
    Searching C:\Program Files (x86)\Intel\oneAPI\compiler\2023.2.0\windows\compiler\lib\Intel64_win\libmmt.lib:
    Searching C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\lib\x64\oldnames.lib:
    Searching C:\Program Files (x86)\Intel\oneAPI\compiler\2023.2.0\windows\compiler\lib\Intel64_win\svml_dispmt.lib:
Finished searching libraries
Searching libraries
    Searching C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\lib\x64\libcmtd.lib:
    Searching C:\Program Files (x86)\Intel\oneAPI\compiler\2023.2.0\windows\compiler\lib\Intel64_win\ifconsol.lib:
    Searching C:\Program Files (x86)\Intel\oneAPI\compiler\2023.2.0\windows\compiler\lib\Intel64_win\libifcoremt.lib:
    Searching C:\Program Files (x86)\Intel\oneAPI\compiler\2023.2.0\windows\compiler\lib\Intel64_win\libifport.lib:
    Searching C:\Program Files (x86)\Intel\oneAPI\compiler\2023.2.0\windows\compiler\lib\Intel64_win\libircmt.lib:
    Searching C:\Program Files (x86)\Intel\oneAPI\compiler\2023.2.0\windows\compiler\lib\Intel64_win\libmmt.lib:
    Searching C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\lib\x64\oldnames.lib:
    Searching C:\Program Files (x86)\Intel\oneAPI\compiler\2023.2.0\windows\compiler\lib\Intel64_win\svml_dispmt.lib:
    Searching C:\Program Files (x86)\Windows Kits\10\Lib\10.0.19041.0\um\x64\kernel32.lib:
    Searching C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\lib\x64\libvcruntimed.lib:
    Searching C:\Program Files (x86)\Windows Kits\10\Lib\10.0.19041.0\ucrt\x64\libucrtd.lib:
    Searching C:\Program Files (x86)\Windows Kits\10\Lib\10.0.19041.0\um\x64\uuid.lib:
    Searching C:\Program Files (x86)\Windows Kits\10\Lib\10.0.19041.0\um\x64\ImageHlp.lib:
    Searching C:\Program Files (x86)\Intel\oneAPI\compiler\2023.2.0\windows\compiler\lib\Intel64_win\libirc.lib:
Finished searching libraries
Searching libraries
    Searching C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\lib\x64\libcmtd.lib:
    Searching C:\Program Files (x86)\Intel\oneAPI\compiler\2023.2.0\windows\compiler\lib\Intel64_win\ifconsol.lib:
    Searching C:\Program Files (x86)\Intel\oneAPI\compiler\2023.2.0\windows\compiler\lib\Intel64_win\libifcoremt.lib:
    Searching C:\Program Files (x86)\Intel\oneAPI\compiler\2023.2.0\windows\compiler\lib\Intel64_win\libifport.lib:
    Searching C:\Program Files (x86)\Intel\oneAPI\compiler\2023.2.0\windows\compiler\lib\Intel64_win\libircmt.lib:
    Searching C:\Program Files (x86)\Intel\oneAPI\compiler\2023.2.0\windows\compiler\lib\Intel64_win\libmmt.lib:
    Searching C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\lib\x64\oldnames.lib:
    Searching C:\Program Files (x86)\Intel\oneAPI\compiler\2023.2.0\windows\compiler\lib\Intel64_win\svml_dispmt.lib:
    Searching C:\Program Files (x86)\Windows Kits\10\Lib\10.0.19041.0\um\x64\kernel32.lib:
    Searching C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\lib\x64\libvcruntimed.lib:
    Searching C:\Program Files (x86)\Windows Kits\10\Lib\10.0.19041.0\ucrt\x64\libucrtd.lib:
    Searching C:\Program Files (x86)\Windows Kits\10\Lib\10.0.19041.0\um\x64\uuid.lib:
    Searching C:\Program Files (x86)\Windows Kits\10\Lib\10.0.19041.0\um\x64\ImageHlp.lib:
    Searching C:\Program Files (x86)\Intel\oneAPI\compiler\2023.2.0\windows\compiler\lib\Intel64_win\libirc.lib:
Finished searching libraries
Searching libraries
    Searching C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\lib\x64\libcmtd.lib:
Finished searching libraries

 

0 Kudos
JohnNichols
Valued Contributor III
2,188 Views

The problem arose with the installation of the latest preview WDK.  

Remove the WDK, but leave behind the original ones and the problem is solved. 

Some elements of the preview are what you will all see in the semiannual updates.  

 

0 Kudos
JohnNichols
Valued Contributor III
2,139 Views

I got rid of the problem for a day and then a windows update brought it back.

These are the two libraries that interfere in the 64 bit versions both on VS 2019 and latest preview. 

On the preview you get one error, on the 19 you get about 30 all related to these libraries.  

I supplied the offending code.  

 

0 Kudos
JohnNichols
Valued Contributor III
2,118 Views

Dear Intel Human:

The Intel SDK 25987 on the canary channel is the cause of the error with the conflict in the X64 set of libraries.  I can get rid of the problem but I means I have to roll back the SDK at least two levels.  

Clearly this change occurred after you released ONEAPI. 

I have provided a program that is longish to show the error, sorry I do not have time to cut it down.  

If I try compiling on VS 2019 I get 30 errors from the same SDK. 

John

 

0 Kudos
Reply