- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
So I am trying to update an F90 program from Intel Parallel Studio XE 2011 to VS 2022 with Intel oneAPI. The solution is made up of 6 projects.
Right off the bat the compilation works which is great.
Build started...
1>------ Build started: Project: ZZZ(IFORT), Configuration: Release Win32 ------
1>Compiling with Intel® Fortran Compiler Classic 2021.5.0 [IA-32]...
1>Linking...
1>ZZZ- 0 error(s), 1 warning(s)
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
Now I close the solution, go get a beer and come back to work on it again. So I open the solution and for every open tab I get this message
I close all the open tabs in VS and compile again. Now I get this error:
libmmt.lib(log10_iface_c99.obj) : error LNK2005: __CIlog10 already defined in libucrt.lib(log10_impl.obj)
Creating library C:\ZZZ.lib and object C:\ZZZ.exp
C:\ZZZ.EXE : fatal error LNK1169: one or more multiply defined symbols found
ZZZ- 2 error(s), 1 warning(s)
No code changes. Nope. Nada. Zero. Nil.
No config changes. Nope. Nada. Zero. Nil.
Just a successful compile, close solution, re-open solution unsuccessful compile.
What am I not doing right???
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You will likely have to wait until the morning until the real experts wake up.
It is likely past their bed time.
As an Australian I would say - have another beer, it is Saturday so just knock off.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Two things. The error re-opening files you left open is a really annoying bug but I an many other get that and that will not have any connection to the other problem. The fact that you changed nothing but VS wants to build rather than just saying the projects are up to data is indicative of a circular dependency in your projects.
A good test is do a "clean" and the rebuild all. If the build is OK do then a build without clean. The second one should do nothing. The reason it might try to build is that VS things one of the projects is dependant on something that was build after it was so is 'out of data'. The actual error looks like standard runtime libraries so I would look at the dll/static/libs options of the things in your build.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok so I got another beer, maybe too many. This morning I tried again.
I opened the solution, closed all open tabs, cleaned the solution, rebuild solution. That compiles fine. Open up some tabs. The code displays fine. Close solution.
Wait. Reopen solution. Every tab now shows the error VSFM_mdiChild. Leave them open as-is. Do not clean solution. Rebuild solution. Get the ZZZ- 2 error(s), 1 warning(s) as above.
It almost seems like I cant leave any tab opens when I close the solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have no doubt there is a bug in the VSIX build for oneapi - the workaround is to move back to vs 2019 or just close all the tabs it appears.
VSIX builds are really complex and one thinks that Intel will know about it, but they only update 4 or 5 times a year. Playing with VSIX is a complete pain, I only did it because I wanted the red background on VS 2022 and some programmer decided to make it better - why fix the unbroken because you are an engineer. == I dislike that person intensely.
It drives you crazy but one lives in a real world of real programmers some who even consider that maybe 2 McDonalds cheeseburgers is a good breakfast. Personally I think one is enough save the other one for brunch
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tried again. This time I opened all code files in the one project that is failing. Closed the solution. Waited. Opened solution. Left tabs as-is with the error message. Cleaned solution. Recompiled solution. It compiles fine now. I don't get it. I cant put my finger on why it works sometimes and other times it fails.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I did a rebuild with a clean and without. Sometimes it works, other times no. So the second part "look at the dll/static/libs options of the things in your build." I have 12 LIB files as resources although that is required to make the program run its process. What should I be looking for?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I also checked the Project Dependencies and each project has zero dependencies on other projects. I'm at a loss of where to look.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Btw we have been using this codebase for at least a decade with no compile issues. We have been using Intel Parallel Studio XE 2011 and all I'm doing is trying to see if I can upgrade it to VS 2022 with Intel oneAPI.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The fragment of the linker error message that you show suggests you are building in the root directory of your system drive. Are you really doing that? If so ... please don't.
Andrew has already explained the Visual Studio editor pane issue (and has also given some good suggestions of things to look at for the build issue). Build logs and linker progress messages (use the /VERBOSE linker command line option) for both the successful and failing builds may help us further diagnose the other issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Not at all. The path was just for informational purposes. The code is actually at C:\Users\Dude\Documents\MyApp\.
So I also checked dependencies in VS by right-click solution then "Project Dependencies". The 6 projects do not depend on each other. One project has 12 LIB files as resources. Those are required for the process interfacing.
I will do the verbose linker switch to see if anything else is logged.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@sindizzy wrote:
Not at all. The path was just for informational purposes. The code is actually at C:\Users\Dude\Documents\MyApp\.
So I also checked dependencies in VS by right-click solution then "Project Dependencies". The 6 projects do not depend on each other. One project has 12 LIB files as resources. Those are required for the process interfacing.
I will do the verbose linker switch to see if anything else is logged.
Where do the 12 lib files come from? Have they been compiled in a way that is consistent with whatever you've selected for VS2022 C++ libraries, and perhaps latest ifort?
I was thinking circular dependencies at a lower level (source or build outputs), than the explicit project dependencies.
Bear in mind that we can only respond (guess really) based on information you provide... hence the request for build logs (in addition to the verbose linker output, for all relevant projects, for successful and unsuccessful builds), rather than previous obfuscated snippets.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I added the log in the post below and it shows where it fails.
1> Searching C:\Program Files (x86)\Intel\oneAPI\compiler\2022.0.0\windows\compiler\lib\ia32_win\libmmt.lib:
1> Found _log10
1> Referenced in libbsm_bcslib.lib(hdpitg.obj)
1> Referenced in libbsm_bcslib.lib(hdgedi.obj)
1> Loaded libmmt.lib(log10_iface_c99.obj)
1>libmmt.lib(log10_iface_c99.obj) : error LNK2005: __CIlog10 already defined in libucrt.lib(log10_impl.obj)
The LIB files are provided by a manufacturer. From what I know all code is based on F77. Various products are complied in various environments so its hard to determine how these specific ones were compiled.. They use:
- GFortran 4.4.7 on Linux 6 hosts
- Intel® Parallel Studio XE 2016 for Fortran Windows, Microsoft Visual Studio 2013
- INTEL 9.1
They provide these files to many companies so they tend not to upgrade their process very often.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok folks I compiled with linker verbose logging. This is way out of my realm but I assume this is referencing some standard math libraries. Perhaps VC++ ???
1> Searching C:\Program Files (x86)\Windows Kits\10\Lib\10.0.19041.0\um\x86\gdi32.lib:
1> Searching C:\Program Files (x86)\Windows Kits\10\Lib\10.0.19041.0\um\x86\comdlg32.lib:
1> Searching C:\Program Files (x86)\Intel\oneAPI\compiler\2022.0.0\windows\compiler\lib\ia32_win\libmmt.lib:
1> Found _log10
1> Referenced in libbsm_bcslib.lib(hdpitg.obj)
1> Referenced in libbsm_bcslib.lib(hdgedi.obj)
1> Loaded libmmt.lib(log10_iface_c99.obj)
1>libmmt.lib(log10_iface_c99.obj) : error LNK2005: __CIlog10 already defined in libucrt.lib(log10_impl.obj)
1> Found ___powr8i4
<edited for brevity>
1>Unused libraries:
1> C:\Users\Dude\Documents\MyApp\lib7.lib
1> C:\Program Files (x86)\Windows Kits\10\Lib\10.0.19041.0\um\x86\comctl32.lib
1> C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.30.30705\lib\x86\OLDNAMES.lib
1> C:\Program Files (x86)\Intel\oneAPI\compiler\2022.0.0\windows\compiler\lib\ia32_win\ifmodintr.lib
1> C:\Program Files (x86)\Intel\oneAPI\compiler\2022.0.0\windows\compiler\lib\ia32_win\IFWIN.LIB
1> C:\Program Files (x86)\Intel\oneAPI\compiler\2022.0.0\windows\compiler\lib\ia32_win\ifconsol.lib
1> C:\Program Files (x86)\Windows Kits\10\Lib\10.0.19041.0\um\x86\uuid.lib
1>C:\OUTPUT\EXE\MyAPP.EXE : fatal error LNK1169: one or more multiply defined symbols found
1>
1>Build log written to "file://C:\Users\Dude\Documents\MyApp\Release\BuildLog.htm"
1>MyApp - 2 error(s), 1 warning(s)
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
So ran the linker with verbose logging. This is way out of my realm so not sure I understand. Is it a multiple reference across math libraries?
1> Searching C:\Program Files (x86)\Windows Kits\10\Lib\10.0.19041.0\um\x86\gdi32.lib:
1> Searching C:\Program Files (x86)\Windows Kits\10\Lib\10.0.19041.0\um\x86\comdlg32.lib:
1> Searching C:\Program Files (x86)\Intel\oneAPI\compiler\2022.0.0\windows\compiler\lib\ia32_win\libmmt.lib:
1> Found _log10
1> Referenced in libbsm_bcslib.lib(hdpitg.obj)
1> Referenced in libbsm_bcslib.lib(hdgedi.obj)
1> Loaded libmmt.lib(log10_iface_c99.obj)
1>libmmt.lib(log10_iface_c99.obj) : error LNK2005: __CIlog10 already defined in libucrt.lib(log10_impl.obj)
1> Found ___powr8i4
<edited for brevity>
1>Unused libraries:
1> C:\Users\Dude\Documents\MyApp\lib7.lib
1> C:\Program Files (x86)\Windows Kits\10\Lib\10.0.19041.0\um\x86\comctl32.lib
1> C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.30.30705\lib\x86\OLDNAMES.lib
1> C:\Program Files (x86)\Intel\oneAPI\compiler\2022.0.0\windows\compiler\lib\ia32_win\ifmodintr.lib
1> C:\Program Files (x86)\Intel\oneAPI\compiler\2022.0.0\windows\compiler\lib\ia32_win\IFWIN.LIB
1> C:\Program Files (x86)\Intel\oneAPI\compiler\2022.0.0\windows\compiler\lib\ia32_win\ifconsol.lib
1> C:\Program Files (x86)\Windows Kits\10\Lib\10.0.19041.0\um\x86\uuid.lib
1>C:\OUTPUT\MYAPP.EXE : fatal error LNK1169: one or more multiply defined symbols found
1>
1>Build log written to "file://C:\Users\Dude\Documents\MyApp\Release\BuildLog.htm"
1>MYAPP- 2 error(s), 1 warning(s)
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Not sure what happened. I posted the log but it doesn't show up.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
1> Searching C:\Program Files (x86)\Windows Kits\10\Lib\10.0.19041.0\um\x86\user32.lib:
1> Searching C:\Program Files (x86)\Windows Kits\10\Lib\10.0.19041.0\um\x86\comctl32.lib:
1> Searching C:\Program Files (x86)\Windows Kits\10\Lib\10.0.19041.0\um\x86\gdi32.lib:
1> Searching C:\Program Files (x86)\Windows Kits\10\Lib\10.0.19041.0\um\x86\comdlg32.lib:
1> Searching C:\Program Files (x86)\Intel\oneAPI\compiler\2022.0.0\windows\compiler\lib\ia32_win\libmmt.lib:
1> Found _log10
1> Referenced in libbsm_bcslib.lib(hdpitg.obj)
1> Referenced in libbsm_bcslib.lib(hdgedi.obj)
1> Loaded libmmt.lib(log10_iface_c99.obj)
1>libmmt.lib(log10_iface_c99.obj) : error LNK2005: __CIlog10 already defined in libucrt.lib(log10_impl.obj)
1> Found ___powr8i4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The cyclic dependency might not be 'real' or or might not be obvious. Some file may be shared between projects that is not obvious.
I have also seen problems with vfproj files that have been "upgraded" from an old VS to a newer one and got a bit foo bahed. After wasting a lots of time getting nowhere recreating the solution and projects from scratch magically fixes the problem. That can be quite a time consuming pain.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
But it is often the best way in the long run -- I have had to do that a few times recently often with MKL based programs.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Each of the 6 projects creates an individual EXE. But they all share two common F90 files with utilities and calling routines. I would hesitate to say that is it, but at this point anything is possible. I just don't get why between open/close it compiles and then not.
I think the next thing for me to do is, as suggested, create the solution from absolute scratch. I can create the one project that is problematic also from scratch and see if that gives me the same issues. I don't believe the prior engineer that worked on this had any special switches or configs. He was a fairly vanilla guy when it came to programming.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page