Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong version of CONCRT140.dll in Windows installer #302

Closed
macumber opened this issue Jan 30, 2021 · 12 comments · Fixed by #309
Closed

Wrong version of CONCRT140.dll in Windows installer #302

macumber opened this issue Jan 30, 2021 · 12 comments · Fixed by #309

Comments

@macumber
Copy link
Collaborator

Issue overview

Version of CONCRT140.dll included in installer is built for:
I386, DLL, Handles addresses larger than 2 GB, Handles 32 bit words, Executable
Microsoft® Visual Studio® 2015, 14.00.23506.0

Other MSVC runtime dlls (e.g. msvcp140.dll) are:
AMD64, DLL, Handles addresses larger than 2 GB, Executable
Microsoft® Visual Studio®,14.28.29325.2

Current Behavior

Installing incorrect version of this dll causes crashes for users without MSVC runtime

https://unmethours.com/question/50813/cant-open-openstudioexe-or-openstudioappexe-application-error/?comment=50829#post-id-50829

Expected Behavior

Version of CONCRT140.dll should match other Visual Studio runtime dlls

@macumber
Copy link
Collaborator Author

jmarrec added a commit that referenced this issue Feb 3, 2021
jmarrec added a commit that referenced this issue Feb 3, 2021
@jmarrec
Copy link
Collaborator

jmarrec commented Feb 3, 2021

@macumber https://github.com/openstudiocoalition/OpenStudioApplication/actions/runs/534415348

I downloaded the produced zip.

C:\Users\julien\Downloads\OpenStudioApplication-1.1.0+73a9c3b585\OpenStudioApplication-1.1.0+73a9c3b585-Windows\bin>dumpbin /HEADERS concrt140.dll
Microsoft (R) COFF/PE Dumper Version 14.28.29336.0
Copyright (C) Microsoft Corporation.  All rights reserved.


Dump of file concrt140.dll

PE signature found

File Type: DLL

FILE HEADER VALUES
            8664 machine (x64)
               6 number of sections
        5FA9A822 time date stamp Mon Nov  9 21:35:46 2020
               0 file pointer to symbol table
               0 number of symbols
              F0 size of optional header
            2022 characteristics
                   Executable
                   Application can handle large (>2GB) addresses
                   DLL

Right click in DLL in file explorer:

image

@macumber
Copy link
Collaborator Author

macumber commented Feb 4, 2021

Thanks @jmarrec, I don't know what is happening here but this is interesting. I downloaded the ZIP package and it does have the right x64 architecture for concrt140.dll. However, if you download the exe installer and install it, you can see that it has a 32 bit x86 architecture CONCRT140.dll (different case). I don't know what this is but it is likely happening in the Qt IFW installer, possibly due to Windows case insensitivity?

@macumber
Copy link
Collaborator Author

macumber commented Feb 4, 2021

Possibly running actions with CPACK_IFW_VERBOSE would tell us something? Or search the entire drive for instances of concrt140.dll?

@jmarrec
Copy link
Collaborator

jmarrec commented Feb 4, 2021

That's weird... It's the https://gitlab.kitware.com/cmake/cmake/-/blob/master/Modules/InstallRequiredSystemLibraries.cmake module that's responsible for locating the CRT and other DLLs. I'm having trouble seeing why in the context of CPack it would produce different result.

I tested the exe installer. It does at least have the right MSVC version now, but it's 32 bit indeed...

@jmarrec
Copy link
Collaborator

jmarrec commented Feb 4, 2021

I did some changes and am trying to debug cpack in #309

@jmarrec
Copy link
Collaborator

jmarrec commented Feb 4, 2021

https://github.com/openstudiocoalition/OpenStudioApplication/pull/309/checks?check_run_id=1829790427

2021-02-04T10:14:14.7228658Z CMAKE_INSTALL_SYSTEM_RUNTIME_LIBs:
C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Redist/MSVC/14.28.29325/x64/Microsoft.VC142.CRT/msvcp140.dll
C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Redist/MSVC/14.28.29325/x64/Microsoft.VC142.CRT/msvcp140_1.dll
C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Redist/MSVC/14.28.29325/x64/Microsoft.VC142.CRT/msvcp140_2.dll
C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Redist/MSVC/14.28.29325/x64/Microsoft.VC142.CRT/msvcp140_atomic_wait.dll
C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Redist/MSVC/14.28.29325/x64/Microsoft.VC142.CRT/msvcp140_codecvt_ids.dll
C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Redist/MSVC/14.28.29325/x64/Microsoft.VC142.CRT/vcruntime140_1.dll
C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Redist/MSVC/14.28.29325/x64/Microsoft.VC142.CRT/vcruntime140.dll
C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Redist/MSVC/14.28.29325/x64/Microsoft.VC142.CRT/concrt140.dll

@jmarrec
Copy link
Collaborator

jmarrec commented Feb 4, 2021

IFW

2021-02-04T11:09:50.5909522Z CPack Verbose: C:\cmake\src\cmake\Source\CPack\cmCPackGenerator.cxx:55 Installing: D:/a/OpenStudioApplication/OpenStudioApplication/build/_CPack_Packages/win64/IFW/OpenStudioApplication-1.1.0+2e640fef6c-Windows/packages/Libraries/data/bin/concrt140.dll


2021-02-04T11:09:51.7015409Z CPack Verbose: C:\cmake\src\cmake\Source\CPack\cmCPackGenerator.cxx:55 Installing: D:/a/OpenStudioApplication/OpenStudioApplication/build/_CPack_Packages/win64/IFW/OpenStudioApplication-1.1.0+2e640fef6c-Windows/packages/OpenStudioApp/data/./Ruby/concrt140.dll

2021-02-04T11:09:50.5951489Z C:\cmake\src\cmake\Source\CPack\cmCPackGenerator.cxx:939 Adding file <bin/concrt140.dll> to component <Libraries>

2021-02-04T11:10:03.5720533Z C:\cmake\src\cmake\Source\CPack\cmCPackGenerator.cxx:939 Adding file <Ruby/concrt140.dll> to component <OpenStudioApp>


ZIP

2021-02-04T11:14:45.8040299Z CPack Verbose: C:\cmake\src\cmake\Source\CPack\cmCPackGenerator.cxx:55 Installing: D:/a/OpenStudioApplication/OpenStudioApplication/build/_CPack_Packages/win64/ZIP/OpenStudioApplication-1.1.0+2e640fef6c-Windows/bin/concrt140.dll

2021-02-04T11:14:46.1781656Z CPack Verbose: C:\cmake\src\cmake\Source\CPack\cmCPackGenerator.cxx:55 Installing: D:/a/OpenStudioApplication/OpenStudioApplication/build/_CPack_Packages/win64/ZIP/OpenStudioApplication-1.1.0+2e640fef6c-Windows/./Ruby/concrt140.dll


2021-02-04T11:14:58.2965876Z CPack Verbose: C:\cmake\src\cmake\Source\CPack\cmCPackGenerator.cxx:55 23/42: fix-up not required on this platform 'D:/a/OpenStudioApplication/OpenStudioApplication/build/_CPack_Packages/win64/ZIP/OpenStudioApplication-1.1.0+2e640fef6c-Windows/bin/concrt140.dll'



@jmarrec
Copy link
Collaborator

jmarrec commented Feb 4, 2021

AHH Geeeezzzzzzzz

2021-02-04T11:09:57.1455314Z CPack Verbose: C:\cmake\src\cmake\Source\CPack\cmCPackGenerator.cxx:55 Installing: D:/a/OpenStudioApplication/OpenStudioApplication/build/_CPack_Packages/win64/IFW/OpenStudioApplication-1.1.0+2e640fef6c-Windows/packages/OpenStudioApp/data/bin/platforms/qwindows.dll
2021-02-04T11:09:57.1506652Z CPack Verbose: C:\cmake\src\cmake\Source\CPack\cmCPackGenerator.cxx:55 Installing: D:/a/OpenStudioApplication/OpenStudioApplication/build/_CPack_Packages/win64/IFW/OpenStudioApplication-1.1.0+2e640fef6c-Windows/packages/OpenStudioApp/data/bin/styles/qwindowsvistastyle.dll
2021-02-04T11:09:57.1560790Z CPack Verbose: C:\cmake\src\cmake\Source\CPack\cmCPackGenerator.cxx:55 fixup_bundle
2021-02-04T11:09:57.1568158Z CPack Verbose: C:\cmake\src\cmake\Source\CPack\cmCPackGenerator.cxx:55   app='D:/a/OpenStudioApplication/OpenStudioApplication/build/_CPack_Packages/win64/IFW/OpenStudioApplication-1.1.0+2e640fef6c-Windows/packages/OpenStudioApp/data/bin/OpenStudioApp.exe'
2021-02-04T11:09:57.1570846Z CPack Verbose: C:\cmake\src\cmake\Source\CPack\cmCPackGenerator.cxx:55   libs=''
2021-02-04T11:09:57.1575372Z CPack Verbose: C:\cmake\src\cmake\Source\CPack\cmCPackGenerator.cxx:55   dirs='D:/a/OpenStudioApplication/OpenStudioApplication/build/Qt-install/5.15.0/msvc2019_64/bin;D:/a/OpenStudioApplication/OpenStudioApplication/build/Qt-install/5.15.0/msvc2019_64/lib;D:/a/OpenStudioApplication/OpenStudioApplication/build/OpenStudio-3.1.1/OpenStudio-3.1.1-alpha+3d83fc2b65-Windows/lib'
2021-02-04T11:09:57.1578591Z CPack Verbose: C:\cmake\src\cmake\Source\CPack\cmCPackGenerator.cxx:55   ignoreItems=''
2021-02-04T11:09:57.1579872Z CPack Verbose: C:\cmake\src\cmake\Source\CPack\cmCPackGenerator.cxx:55 fixup_bundle: preparing...
2021-02-04T11:09:59.3749273Z CPack Verbose: C:\cmake\src\cmake\Source\CPack\cmCPackGenerator.cxx:55 fixup_bundle: copying...
2021-02-04T11:09:59.3751788Z CPack Verbose: C:\cmake\src\cmake\Source\CPack\cmCPackGenerator.cxx:55 1/38: *NOT* copying 'D:/a/OpenStudioApplication/OpenStudioApplication/build/_CPack_Packages/win64/IFW/OpenStudioApplication-1.1.0+2e640fef6c-Windows/packages/OpenStudioApp/data/bin/OpenStudioApp.exe'
+ 2021-02-04T11:09:59.3755160Z CPack Verbose: C:\cmake\src\cmake\Source\CPack\cmCPackGenerator.cxx:55 2/38: copying 'C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/VC/vcpackages/CONCRT140.dll'
2021-02-04T11:09:59.7958918Z CPack Verbose: C:\cmake\src\cmake\Source\CPack\cmCPackGenerator.cxx:55 3/38: copying 'D:/a/OpenStudioApplication/OpenStudioApplication/build/Qt-install/5.15.0/msvc2019_64/bin/Qt5Core.dll'
2021-02-04T11:09:59.7961026Z CPack Verbose: C:\cmake\src\cmake\Source\CPack\cmCPackGenerator.cxx:55 4/38: copying 'D:/a/OpenStudioApplication/OpenStudioApplication/build/Qt-install/5.15.0/msvc2019_64/bin/Qt5Gui.dll'

2021-02-04T11:10:00.1571528Z CPack Verbose: C:\cmake\src\cmake\Source\CPack\cmCPackGenerator.cxx:55 18/38: copying 'D:/a/OpenStudioApplication/OpenStudioApplication/build/OpenStudio-3.1.1/OpenStudio-3.1.1-alpha+3d83fc2b65-Windows/lib/openstudiolib.dll'
2021-02-04T11:10:00.3123117Z CPack Verbose: C:\cmake\src\cmake\Source\CPack\cmCPackGenerator.cxx:55 19/38: *NOT* copying 'D:/a/OpenStudioApplication/OpenStudioApplication/build/_CPack_Packages/win64/IFW/OpenStudioApplication-1.1.0+2e640fef6c-Windows/packages/OpenStudioApp/data/bin/QtWebEngineProcess.exe'
2021-02-04T11:10:00.3153869Z CPack Verbose: C:\cmake\src\cmake\Source\CPack\cmCPackGenerator.cxx:55 fixup_bundle: fixing...
2021-02-04T11:10:00.3157283Z CPack Verbose: C:\cmake\src\cmake\Source\CPack\cmCPackGenerator.cxx:55 20/38: fix-up not required on this platform 'D:/a/OpenStudioApplication/OpenStudioApplication/build/_CPack_Packages/win64/IFW/OpenStudioApplication-1.1.0+2e640fef6c-Windows/packages/OpenStudioApp/data/bin/OpenStudioApp.exe'
2021-02-04T11:10:00.3162677Z CPack Verbose: C:\cmake\src\cmake\Source\CPack\cmCPackGenerator.cxx:55 21/38: fix-up not required on this platform 'D:/a/OpenStudioApplication/OpenStudioApplication/build/_CPack_Packages/win64/IFW/OpenStudioApplication-1.1.0+2e640fef6c-Windows/packages/OpenStudioApp/data/bin/CONCRT140.dll'

@jmarrec
Copy link
Collaborator

jmarrec commented Feb 4, 2021

Something is plain overriding the dll, with an upcase name too

julien@DESKTOP-AFHNVM1 MINGW64 /c/src/OpenStudioApplication/build (302_Install_DLL_Problem)
$ find . -iname "CONCRT*.DLL"
./OpenStudio-3.1.1/OpenStudio-3.1.1-alpha+3d83fc2b65-Windows/bin/concrt140.dll
./OpenStudio-3.1.1/OpenStudio-3.1.1-alpha+3d83fc2b65-Windows/CSharp/openstudio/concrt140.dll
./OpenStudio-3.1.1/OpenStudio-3.1.1-alpha+3d83fc2b65-Windows/Ruby/concrt140.dll
./_CPack_Packages/win64/IFW/OpenStudioApplication-1.1.0+370654f39d-Windows/packages/Libraries/data/bin/concrt140.dll
./_CPack_Packages/win64/IFW/OpenStudioApplication-1.1.0+370654f39d-Windows/packages/OpenStudioApp/data/bin/CONCRT140.dll
./_CPack_Packages/win64/IFW/OpenStudioApplication-1.1.0+370654f39d-Windows/packages/OpenStudioApp/data/Ruby/concrt140.dll

@jmarrec
Copy link
Collaborator

jmarrec commented Feb 4, 2021

it happens in fixup_bundle

2021-02-04T11:09:57.1579872Z CPack Verbose: C:\cmake\src\cmake\Source\CPack\cmCPackGenerator.cxx:55 fixup_bundle: preparing...
2021-02-04T11:09:59.3749273Z CPack Verbose: C:\cmake\src\cmake\Source\CPack\cmCPackGenerator.cxx:55 fixup_bundle: copying...
2021-02-04T11:09:59.3751788Z CPack Verbose: C:\cmake\src\cmake\Source\CPack\cmCPackGenerator.cxx:55 1/38: *NOT* copying 'D:/a/OpenStudioApplication/OpenStudioApplication/build/_CPack_Packages/win64/IFW/OpenStudioApplication-1.1.0+2e640fef6c-Windows/packages/OpenStudioApp/data/bin/OpenStudioApp.exe'
2021-02-04T11:09:59.3755160Z CPack Verbose: C:\cmake\src\cmake\Source\CPack\cmCPackGenerator.cxx:55 2/38: copying 'C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/VC/vcpackages/CONCRT140.dll'

That's where this is coming from:

install(CODE "
# APPS might be a symbolic link which does not work with fixup_bundle
# expand APPS to a real path
get_filename_component(APPS_EXPANDED ${APPS} REALPATH)
include(BundleUtilities)
include(\"${CMAKE_SOURCE_DIR}/CMake/FixupBundleOverrides.cmake\")
fixup_bundle(\"\${APPS_EXPANDED}\" \"${QTPLUGINS}\" \"${DIRS}\")
" COMPONENT "OpenStudioApp"
)

Is this really needed outside of MAC?

@jmarrec
Copy link
Collaborator

jmarrec commented Feb 4, 2021

Ok this should be fixed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment