我正在尝试在我的Windows 10/Strawberry Perl上安装DBD::P g(3.7.4(模块,但编译失败
为此,我在metacpan上下载了该模块,并在Windows终端中执行了以下命令:
perl Makefile.PL phrtsd_orig
响应:
Configuring DBD::Pg 3.7.4
PostgreSQL version: 90603 (default port: 5432)
POSTGRES_HOME: (not set)
POSTGRES_INCLUDE: C:/STRAWB~1/c/include
POSTGRES_LIB: C:/STRAWB~1/c/lib
OS: MSWin32
Multiple copies of Driver.xst found in: C:/Strawberry/perl/site/lib/auto/DBI/ C:/Strawberry/perl/vendor/lib/auto/DBI/ at Makefile.PL line 182.
Multiple copies of Driver.xst found in: C:/Strawberry/perl/site/lib/auto/DBI/ C:/Strawberry/perl/vendor/lib/auto/DBI/ at Makefile.PL line 285.
Using DBI 1.64 (for perl 5.026001 on MSWin32-x64-multi-thread) installed in C:/Strawberry/perl/site/lib/auto/DBI/
Generating a gmake-style Makefile
Writing Makefile for DBD::Pg
Writing MYMETA.yml and MYMETA.json
但是问题出现在命令gmake
执行之后。响应:
Skip bliblib/Bundle/DBD/Pg.pm (unchanged)
Skip bliblibDBD/Pg.pm (unchanged)
Running Mkbootstrap for Pg ()
"C:Strawberryperlbinperl.exe" -MExtUtils::Command -e chmod -- 644 "Pg.bs"
"C:Strawberryperlbinperl.exe" -MExtUtils::Command::MM -e cp_nonempty -- Pg.bs blibarchautoDBDPgPg.bs 644
gcc -c -I"C:/STRAWB~1/c/include" -IC:StrawberryperlsitelibautoDBI -s -O2 -DWIN32 -DWIN64 -DCONSERVATIVE -D__USE_MINGW_ANSI_STDIO -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -fwrapv -fno-strict-aliasing -mms-bitfields -DPGLIBVERSION=90603 -DPGDEFPORT=5432 -s -O2 -DVERSION="3.7.4" -DXS_VERSION="3.7.4" "-IC:STRAWB~1perllibCORE" Pg.c
gcc -c -I"C:/STRAWB~1/c/include" -IC:StrawberryperlsitelibautoDBI -s -O2 -DWIN32 -DWIN64 -DCONSERVATIVE -D__USE_MINGW_ANSI_STDIO -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -fwrapv -fno-strict-aliasing -mms-bitfields -DPGLIBVERSION=90603 -DPGDEFPORT=5432 -s -O2 -DVERSION="3.7.4" -DXS_VERSION="3.7.4" "-IC:STRAWB~1perllibCORE" dbdimp.c
gcc -c -I"C:/STRAWB~1/c/include" -IC:StrawberryperlsitelibautoDBI -s -O2 -DWIN32 -DWIN64 -DCONSERVATIVE -D__USE_MINGW_ANSI_STDIO -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -fwrapv -fno-strict-aliasing -mms-bitfields -DPGLIBVERSION=90603 -DPGDEFPORT=5432 -s -O2 -DVERSION="3.7.4" -DXS_VERSION="3.7.4" "-IC:STRAWB~1perllibCORE" quote.c
gcc -c -I"C:/STRAWB~1/c/include" -IC:StrawberryperlsitelibautoDBI -s -O2 -DWIN32 -DWIN64 -DCONSERVATIVE -D__USE_MINGW_ANSI_STDIO -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -fwrapv -fno-strict-aliasing -mms-bitfields -DPGLIBVERSION=90603 -DPGDEFPORT=5432 -s -O2 -DVERSION="3.7.4" -DXS_VERSION="3.7.4" "-IC:STRAWB~1perllibCORE" types.c
g++ Pg.def -o blibarchautoDBDPgPg.xs.dll -mdll -s -L"C:STRAWB~1perllibCORE" -L"C:STRAWB~1clib" Pg.o dbdimp.o quote.o types.o "C:STRAWB~1perllibCORElibperl526.a" "C:STRAWB~1cliblibpq.a" "C:STRAWB~1cx86_64-w64-mingw32liblibm.a" "C:STRAWB~1cx86_64-w64-mingw32liblibsecur32.a" "C:STRAWB~1cx86_64-w64-mingw32liblibmoldname.a" "C:STRAWB~1cx86_64-w64-mingw32liblibkernel32.a" "C:STRAWB~1cx86_64-w64-mingw32liblibuser32.a" "C:STRAWB~1cx86_64-w64-mingw32liblibgdi32.a" "C:STRAWB~1cx86_64-w64-mingw32liblibwinspool.a" "C:STRAWB~1cx86_64-w64-mingw32liblibcomdlg32.a" "C:STRAWB~1cx86_64-w64-mingw32liblibadvapi32.a" "C:STRAWB~1cx86_64-w64-mingw32liblibshell32.a" "C:STRAWB~1cx86_64-w64-mingw32liblibole32.a" "C:STRAWB~1cx86_64-w64-mingw32libliboleaut32.a" "C:STRAWB~1cx86_64-w64-mingw32liblibnetapi32.a" "C:STRAWB~1cx86_64-w64-mingw32liblibuuid.a" "C:STRAWB~1cx86_64-w64-mingw32liblibws2_32.a" "C:STRAWB~1cx86_64-w64-mingw32liblibmpr.a" "C:STRAWB~1cx86_64-w64-mingw32liblibwinmm.a" "C:STRAWB~1cx86_64-w64-mingw32liblibversion.a" "C:STRAWB~1cx86_64-w64-mingw32liblibodbc32.a" "C:STRAWB~1cx86_64-w64-mingw32liblibodbccp32.a" "C:STRAWB~1cx86_64-w64-mingw32liblibcomctl32.a" -Wl,--enable-auto-image-base
quote.o:quote.c:(.text+0x63d): undefined reference to `__imp__snprintf.constprop.4'
collect2.exe: error: ld returned 1 exit status
gmake: *** [Makefile:496: blibarchautoDBDPgPg.xs.dll] Error 1
如果此信息可以提供帮助,我安装了另外两个模块:
- 开关 (2.17(
- DBI (1.640(
提前感谢您的帮助!
我可以用DBD-Pg-3.7.4重现这一点。这是一个已知的错误。kmx 的补丁对我有用。