Opened 5 years ago

Closed 5 years ago

Last modified 4 years ago

#420 closed defect (fixed)

qgis-common.bat fails during postinstall

Reported by: jphespanha Owned by: osgeo4w-dev@…
Priority: major Component: Installer
Version: Keywords:
Cc:

Description

I am trying to install OSGeo4W on a Windows Server 2008 R2 (64-bit). I have chosen the Express Install option (QGIS, GDAL and GRASS). The installation runs well, but the post installation fails for qgis-common.bat, with the following message: "Package: Unknown package qgis-common.bat exit code -1072365566"

The log file "setup.full.log" follows in attachment. Perhaps has something to do with the last path issued before the crash, which looks strange for a windows installation...

Attachments (5)

setup.full.zip (130.6 KB) - added by jphespanha 5 years ago.
Full setup log after post install
setup.log.full (4.8 KB) - added by jphespanha 5 years ago.
Second version (after new Visual C++ redistributable)
log_qgis_common_bat_manually.txt (2.4 KB) - added by hellik 5 years ago.
qgis_common_bat_manually_run_log
dependency_walker_crssync.zip (19.5 KB) - added by hellik 5 years ago.
dependency walker log
depends_log.zip (20.5 KB) - added by hellik 5 years ago.
prepend depends log

Download all attachments as: .zip

Change History (30)

Changed 5 years ago by jphespanha

Attachment: setup.full.zip added

Full setup log after post install

comment:1 Changed 5 years ago by jef

It has to do with the crssync that fails in line 21575. Does %OSGEO4W_ROOT%\etc\postinstall\qgis-common.bat still exists (it would have been renamed to qgis-common.bat.done after it's execution. Does it produce errors if you run it from the OSGeo4W shell?

comment:2 Changed 5 years ago by jphespanha

The batch file still exists, but it was not renamed to "done" (because crashes before that, I suppose). All the other are done. I forget to tell that I can not run the OSGeo4W Shell either... gdalinfo reports the application was unable to start correctly (0xc0150002).

comment:3 Changed 5 years ago by jef

Does installing Microsoft Visual C++ 2010 Redistributable Package help? Apparently that already included in Windows 7, but maybe not in Windows 2008 R2.

Changed 5 years ago by jphespanha

Attachment: setup.log.full added

Second version (after new Visual C++ redistributable)

comment:4 Changed 5 years ago by jphespanha

This redistributable was not installed on the server. But even with it, the results are the same. During setup, the crssync crashes with the "application was unable to start correctly..." error.

Anyway, I am attaching the new version of the log file (just in case it might be helpfull).

Sure that this path is OK? set QGIS_PREFIX_PATH=C:/OSGEO4~1/apps/qgis

comment:5 in reply to:  4 ; Changed 5 years ago by jef

Replying to jphespanha:

Sure that this path is OK? set QGIS_PREFIX_PATH=C:/OSGEO4~1/apps/qgis

You tell me. Doesn't "C:/OSGEO4~1/apps/qgis" take you to the qgis directory?

I suspect there is a side by side configuration error. Please check eventlog is you can spot any, use dependency walker find details about it. I still think the server is just missing some Microsoft Visual C++ Redistributable Package. It would be nice if you could identify which particular one it is.

comment:6 in reply to:  5 Changed 5 years ago by jphespanha

Replying to jef:

Replying to jphespanha:

Sure that this path is OK? set QGIS_PREFIX_PATH=C:/OSGEO4~1/apps/qgis

You tell me. Doesn't "C:/OSGEO4~1/apps/qgis" take you to the qgis directory?

I suspect there is a side by side configuration error. Please check eventlog is you can spot any, use dependency walker find details about it. I still think the server is just missing some Microsoft Visual C++ Redistributable Package. It would be nice if you could identify which particular one it is.

There is no problem with the path. I just find it confusing; in windows should be "C:\OSGEO4~1\apps\qgis", but it works nevertheless.

And you are right with the "SidebySide?" error. I checked the application event log at the server, and spotted this message: "Activation context generation failed for "C:\OSGEO4~1\bin\SSLEAY32.dll". Dependent Assembly Microsoft.VC90.CRT,processorArchitecture="amd64",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8" could not be found. Please use sxstrace.exe for detailed diagnosis." I will try the "dependency walker", but maybe there is already sufficient info to solve the situation.

comment:7 Changed 5 years ago by jef

So it's not the 2010 but even the 2008 redistributable. Please try http://download.microsoft.com/download/2/d/6/2d61c766-107b-409d-8fba-c39e61ca08e8/vcredist_x64.exe

comment:8 Changed 5 years ago by jphespanha

YES!

That was the Visual C++ Redistributable that was missing. I had the 32-bit version installed, but not the 64-bit. Both OSGeo4W Shell and QGIS Desktop are now running.

I think this has to be marked as solved. But this is my first time with Trac and Tickets. How to proceed?

comment:9 Changed 5 years ago by jef

Resolution: fixed
Status: newclosed

msvcrt-1.0.1-6 now includes and installs both runtimes.

comment:10 in reply to:  9 ; Changed 5 years ago by hellik

Replying to jef:

msvcrt-1.0.1-6 now includes and installs both runtimes.

see also #427:

Package: qgis-common
    qgis-common.bat exit code -1073741515
Package: qgis-dev
	qgis-dev.bat exit code -1073741515

I've checked, both ms 64bit runtimes (2008, 2010) are installed on my box.

comment:11 in reply to:  10 ; Changed 5 years ago by jef

Replying to hellik:

I've checked, both ms 64bit runtimes (2008, 2010) are installed on my box.

Any more info if you run qgis-common.bat manually? Did you check with depends and in the eventlog?

comment:12 in reply to:  11 Changed 5 years ago by hellik

Replying to jef:

Replying to hellik:

I've checked, both ms 64bit runtimes (2008, 2010) are installed on my box.

Any more info if you run qgis-common.bat manually?

attached a log of qgis-common.bat manually run, nothing obvious.

Changed 5 years ago by hellik

qgis_common_bat_manually_run_log

comment:13 in reply to:  11 ; Changed 5 years ago by hellik

Replying to jef:

Replying to hellik:

I've checked, both ms 64bit runtimes (2008, 2010) are installed on my box.

Did you check with depends

opening crssync in dependency walker:

Error: At least one required implicit or forwarded dependency was not found.

QGIS_CORE.DLL, GDAL111.DLL, QTCORE4.DLL

but maybe it's because to be outside of a OSGeo4W session (?)

comment:14 in reply to:  13 ; Changed 5 years ago by jef

Replying to hellik:

opening crssync in dependency walker:

Error: At least one required implicit or forwarded dependency was not found.

QGIS_CORE.DLL, GDAL111.DLL, QTCORE4.DLL

but maybe it's because to be outside of a OSGeo4W session (?)

prepend depends to the call of crssync in qgis-common.bat and run it again from the osgeo4w shell - that should start depends in the same context.

Changed 5 years ago by hellik

dependency walker log

comment:15 in reply to:  13 Changed 5 years ago by hellik

Replying to hellik:

Replying to jef:

Replying to hellik:

I've checked, both ms 64bit runtimes (2008, 2010) are installed on my box.

Did you check with depends

opening crssync in dependency walker:

Error: At least one required implicit or forwarded dependency was not found.

QGIS_CORE.DLL, GDAL111.DLL, QTCORE4.DLL

but maybe it's because to be outside of a OSGeo4W session (?)

ok manually added search path of the 3 dll's to the dependency walker test (C:\OSGeo4W64\bin and C:\OSGeo4W64\apps\qgis\bin), attached the log of this test.

if I read the dependency walker correctly, there maybe some issues with:

  • ZLIB1.DLL (in OGDI.DLL and QTCORE4.DLL)
  • XERCES-C_3_1.DLL (in GDAL111.DLL; msvcr90.dll)
  • ICONV.DLL (msvcr80.dll)
  • SQLITE3.DLL (in QGIS_CORE.DLL, GDAL111.DLL, )
  • LIBCURL.DLL (in GDAL111.DLL)

Changed 5 years ago by hellik

Attachment: depends_log.zip added

prepend depends log

comment:16 in reply to:  14 ; Changed 5 years ago by hellik

Replying to jef:

Replying to hellik:

opening crssync in dependency walker:

Error: At least one required implicit or forwarded dependency was not found.

QGIS_CORE.DLL, GDAL111.DLL, QTCORE4.DLL

but maybe it's because to be outside of a OSGeo4W session (?)

prepend depends to the call of crssync in qgis-common.bat and run it again from the osgeo4w shell - that should start depends in the same context.

prepending depends done (log attached).

issues are in:

MSVCR80.DLL (missing), API-MS-WIN-APPMODEL-RUNTIME-L1-1-0.DLL, API-MS-WIN-CORE-WINRT-ERROR-L1-1-0.DLL, API-MS-WIN-CORE-WINRT-L1-1-0.DLL, API-MS-WIN-CORE-WINRT-ROBUFFER-L1-1-0.DLL, API-MS-WIN-CORE-WINRT-STRING-L1-1-0.DLL, API-MS-WIN-SHCORE-SCALING-L1-1-1.DLL, DCOMP.DLL, IESHIMS.DLL

comment:17 in reply to:  16 ; Changed 5 years ago by jef

Replying to hellik:

MSVCR80.DLL (missing),

I can't find references to MSVCR80.DLL here. Which of your DLLs uses it? %OSGEO4W_ROOT%\bin\iconv.dll only references kernel32.dll here.

comment:18 in reply to:  17 ; Changed 5 years ago by hellik

Replying to jef:

Replying to hellik:

MSVCR80.DLL (missing),

I can't find references to MSVCR80.DLL here. Which of your DLLs uses it? %OSGEO4W_ROOT%\bin\iconv.dll only references kernel32.dll here.

depends on crssync in OSGeo4W64 shell: iconv.dll references to kernel32.dll AND msvcr80.dll

dependency walker directly on %OSGEO4W_ROOT%\bin\iconv.dll, it references only to kernel32.dll

depends on iconv.dll in OSGeo4W64 shell: iconv.dll references only to kernel32.dll

comment:19 in reply to:  17 Changed 5 years ago by hellik

Replying to jef:

Replying to hellik:

MSVCR80.DLL (missing),

I can't find references to MSVCR80.DLL here. Which of your DLLs uses it? %OSGEO4W_ROOT%\bin\iconv.dll only references kernel32.dll here.

it's strange:

when depends on crssync in OSGeo4W64 shell: iconv.dll (referenced by GDAL111.DLL) references to kernel32.dll AND msvcr80.dll.

when depends on GDAL111.DLL in OSGeo4W64 shell: iconv.dll references only to kernel32.dll

comment:20 in reply to:  18 ; Changed 5 years ago by jef

Replying to hellik:

depends on crssync in OSGeo4W64 shell: iconv.dll references to kernel32.dll AND msvcr80.dll

Where is that iconv.dll? In system32? Where did it come from? You'll be probably fine if you move that DLL to somewhere where only the software that installed it can find it.

comment:21 in reply to:  20 Changed 5 years ago by jef

Replying to jef:

Where is that iconv.dll? In system32? Where did it come from? You'll be probably fine if you move that DLL to somewhere where only the software that installed it can find it.

eg. where it has it's copy of msvcr80.dll

comment:22 in reply to:  20 Changed 5 years ago by hellik

Replying to jef:

Replying to hellik:

depends on crssync in OSGeo4W64 shell: iconv.dll references to kernel32.dll AND msvcr80.dll

Where is that iconv.dll? In system32? Where did it come from? You'll be probably fine if you move that DLL to somewhere where only the software that installed it can find it.

yep, that was it: a copy of iconv.dll in system32. no idea which software copied it to this site.

just renamed it and OSGeo4W-64bit qgis and grass works.

thanks for helping!

Helmut

comment:23 Changed 5 years ago by dncpax

I am experiencing the same problem.

Win7 x64.

crssync.exe fails because windows\system32 has some other dll's. I have to copy these libs from osgeo4w\bin to apps\qgis (whre crssync.exe is): iconv.dll libeay32.dll ssleay32.dll

Then I can run qgis-common.bat.

It seems to be very common to have these libs under windows\system32. To avoid loading these you have to have the correct version in the same dir as the executable, in this case crssync. Don't know if you want to reopen. But this will happen to a lot of folks...

comment:24 in reply to:  23 ; Changed 4 years ago by fhazubski

Replying to dncpax:

Don't know if you want to reopen. But this will happen to a lot of folks...

I have this error qgis-common.bat exit code -1073741701.

I really do not know how to get past it. I tried to copy DLL files that was mentioned above but still I get 0xc00007b error.

comment:25 in reply to:  24 Changed 4 years ago by fhazubski

Replying to fhazubski:

Replying to dncpax:

Don't know if you want to reopen. But this will happen to a lot of folks...

I have this error qgis-common.bat exit code -1073741701.

I really do not know how to get past it. I tried to copy DLL files that was mentioned above but still I get 0xc00007b error.

What worked for me was reinstalling Python, this time checking to add it to system variables. To check if it works try to call 'pip' command in command line.

Note: See TracTickets for help on using tickets.