安装系统失败。Win32.Com
Failed to install System.Win32.Com
我 运行 虚拟化 Windows 7 x64。 System.Win32.Com 软件包安装失败。如何解决问题?
> cabal install com
Resolving dependencies...
Configuring com-1.2.3.1...
cabal: Bad header file: include/comPrim.h
The header file contains a compile error. You can re-run configure with the
verbosity flag -v3 to see the error messages from the C compiler.
Failed to install com-1.2.3.1
cabal: Error: some packages failed to install:
com-1.2.3.1 failed during the configure step. The exception was:
ExitFailure 1
运行 -v3
选项给出如下错误:
In file included from C:\Users\Leo\AppData\Local\Temp2536868.c:3:0:
./include/comPrim.h:123:1: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'OleInitialize'
OleInitialize ( void* pvReserved );
^
./include/comPrim.h:128:1: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'OleUninitialize'
OleUninitialize ();
^
...
此外 -v3
选项表示找不到某些包。会不会是这个原因?我只列出其中的几个。
Searching for ghcjs-pkg in path.
Cannot find ghcjs-pkg on the path
Searching for greencard in path.
Cannot find greencard on the path
cabal
甚至不知道其中的一些(例如hmake
)。
编译器更新
GCC 版本输出:
> gcc -v
Using built-in specs.
COLLECT_GCC=C:\Program Files\Haskell Platform.10.3\mingw\bin/realgcc.exe
COLLECT_LTO_WRAPPER=C:/Program\ Files/Haskell\ Platform/7.10.3/mingw/bin/../lib/gcc/x86_64-w64-mingw32/5.2.0/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: ../gcc-5.2.0/configure --prefix=/mingw64 --with-local-prefix=/mingw64/local --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --with-native-system-header-dir=/mingw64/x86_64-w64-mingw32/include --libexecdir=/mingw64/lib --with-gxx-include-dir=/mingw64/include/c++/5.2.0 --enable-bootstrap --with-arch=x86-64 --with-tune=generic --enable-languages=c,lto,c++,objc,obj-c++,fortran,ada --enable-shared --enable-static --enable-libatomic --enable-threads=posix --enable-graphite --enable-fully-dynamic-string --enable-libstdcxx-time=yes --disable-libstdcxx-pch --disable-libstdcxx-debug --enable-version-specific-runtime-libs --disable-isl-version-check --enable-lto --enable-libgomp --disable-multilib --enable-checking=release --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-libiconv --with-system-zlib --with-gmp=/mingw64 --with-mpfr=/mingw64 --with-mpc=/mingw64 --with-isl=/mingw64 --with-pkgversion='Rev3, Built by MSYS2 project' --with-bugurl=http://sourceforge.net/projects/msys2 --with-gnu-as --with-gnu-ld
Thread model: posix
gcc version 5.2.0 (Rev3, Built by MSYS2 project)
您正在使用不兼容的 C 编译器构建,例如 x86_64-w64-mingw32
工具链
与 MinGHC installer for GHC 7.10.2 (64-bit) 一起安装。
它将产生您所看到的错误。与MinGHC installer for GHC 7.10.2 (32-bit)一起安装的mingw32
不会生产它们。
使用 32 位 GCC 构建包意味着您可以在 64 位或 32 位上构建它 Windows 并且
它将在 64 位或 32 位 Windows 上执行,但你不能 link 32 位与 64 位包库一起使用。
这可能是学术性的,但是,因为使用 32 位构建此程序包 (cabal install com
)
编译器只是让你到后来的 ghc 编译错误:
[ 2 of 21] Compiling System.Win32.Com.HDirect.Pointer ( System\Win32\Com\HDirect\Pointer.hs, dist\build\System\Win32\Com\HDirect\Pointer.o )
*** Parser:
*** Renamer/typechecker:
System\Win32\Com\HDirect\Pointer.hs:102:20: Not in scope: `catch'
这是在对已弃用的命令行选项发出各种警告之后,例如
on the commandline: Warning:
-fglasgow-exts is deprecated: Use individual extensions instead
on the commandline: Warning:
The -fvia-C flag does nothing; it will be removed in a future GHC release
和预处理器指令,例如
System\Win32\Com.hs:1:12: Warning:
-#include and INCLUDE pragmas are deprecated: They no longer have any effect
这个包似乎维护不善。
我 运行 虚拟化 Windows 7 x64。 System.Win32.Com 软件包安装失败。如何解决问题?
> cabal install com
Resolving dependencies...
Configuring com-1.2.3.1...
cabal: Bad header file: include/comPrim.h
The header file contains a compile error. You can re-run configure with the
verbosity flag -v3 to see the error messages from the C compiler.
Failed to install com-1.2.3.1
cabal: Error: some packages failed to install:
com-1.2.3.1 failed during the configure step. The exception was:
ExitFailure 1
运行 -v3
选项给出如下错误:
In file included from C:\Users\Leo\AppData\Local\Temp2536868.c:3:0:
./include/comPrim.h:123:1: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'OleInitialize'
OleInitialize ( void* pvReserved );
^
./include/comPrim.h:128:1: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'OleUninitialize'
OleUninitialize ();
^
...
此外 -v3
选项表示找不到某些包。会不会是这个原因?我只列出其中的几个。
Searching for ghcjs-pkg in path.
Cannot find ghcjs-pkg on the path
Searching for greencard in path.
Cannot find greencard on the path
cabal
甚至不知道其中的一些(例如hmake
)。
编译器更新 GCC 版本输出:
> gcc -v
Using built-in specs.
COLLECT_GCC=C:\Program Files\Haskell Platform.10.3\mingw\bin/realgcc.exe
COLLECT_LTO_WRAPPER=C:/Program\ Files/Haskell\ Platform/7.10.3/mingw/bin/../lib/gcc/x86_64-w64-mingw32/5.2.0/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: ../gcc-5.2.0/configure --prefix=/mingw64 --with-local-prefix=/mingw64/local --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --with-native-system-header-dir=/mingw64/x86_64-w64-mingw32/include --libexecdir=/mingw64/lib --with-gxx-include-dir=/mingw64/include/c++/5.2.0 --enable-bootstrap --with-arch=x86-64 --with-tune=generic --enable-languages=c,lto,c++,objc,obj-c++,fortran,ada --enable-shared --enable-static --enable-libatomic --enable-threads=posix --enable-graphite --enable-fully-dynamic-string --enable-libstdcxx-time=yes --disable-libstdcxx-pch --disable-libstdcxx-debug --enable-version-specific-runtime-libs --disable-isl-version-check --enable-lto --enable-libgomp --disable-multilib --enable-checking=release --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-libiconv --with-system-zlib --with-gmp=/mingw64 --with-mpfr=/mingw64 --with-mpc=/mingw64 --with-isl=/mingw64 --with-pkgversion='Rev3, Built by MSYS2 project' --with-bugurl=http://sourceforge.net/projects/msys2 --with-gnu-as --with-gnu-ld
Thread model: posix
gcc version 5.2.0 (Rev3, Built by MSYS2 project)
您正在使用不兼容的 C 编译器构建,例如 x86_64-w64-mingw32
工具链
与 MinGHC installer for GHC 7.10.2 (64-bit) 一起安装。
它将产生您所看到的错误。与MinGHC installer for GHC 7.10.2 (32-bit)一起安装的mingw32
不会生产它们。
使用 32 位 GCC 构建包意味着您可以在 64 位或 32 位上构建它 Windows 并且 它将在 64 位或 32 位 Windows 上执行,但你不能 link 32 位与 64 位包库一起使用。
这可能是学术性的,但是,因为使用 32 位构建此程序包 (cabal install com
)
编译器只是让你到后来的 ghc 编译错误:
[ 2 of 21] Compiling System.Win32.Com.HDirect.Pointer ( System\Win32\Com\HDirect\Pointer.hs, dist\build\System\Win32\Com\HDirect\Pointer.o )
*** Parser:
*** Renamer/typechecker:
System\Win32\Com\HDirect\Pointer.hs:102:20: Not in scope: `catch'
这是在对已弃用的命令行选项发出各种警告之后,例如
on the commandline: Warning:
-fglasgow-exts is deprecated: Use individual extensions instead
on the commandline: Warning:
The -fvia-C flag does nothing; it will be removed in a future GHC release
和预处理器指令,例如
System\Win32\Com.hs:1:12: Warning:
-#include and INCLUDE pragmas are deprecated: They no longer have any effect
这个包似乎维护不善。