Ticket #1310 (assigned defect)
unable to compile with strawberry perl 5.12.3
| Reported by: | vrobin | Owned by: | szabgab |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | installation | Version: | 0.90 |
| Keywords: | compile cpan mingw windows | Cc: |
Description
After installing a brand new strawberry perl portable (from http://strawberryperl.com/download/5.12.3.0/strawberry-perl-5.12.3.0-portable.zip )
Padre compilation from cpan failed:
cp lib/Padre/Help.pm blib\lib\Padre\Help.pm
cp lib/Padre/Project/Perl/DZ.pm blib\lib\Padre\Project\Perl\DZ.pm
cp lib/Padre/DB.pm blib\lib\Padre\DB.pm
cp lib/Padre/Task/Run.pm blib\lib\Padre\Task\Run.pm
cp lib/Padre/Wx/ActionLibrary.pm blib\lib\Padre\Wx\ActionLibrary.pm
cp lib/Padre/Wx/Dialog/Sync.pm blib\lib\Padre\Wx\Dialog\Sync.pm
cp lib/Padre/Wx/Icon.pm blib\lib\Padre\Wx\Icon.pm
cp lib/Padre/Util/Win32.pm blib\lib\Padre\Util\Win32.pm
cp lib/Padre/Wx/Dialog/FindFast.pm blib\lib\Padre\Wx\Dialog\FindFast.pm
cp lib/Padre/Wx/Dialog/Form.pm blib\lib\Padre\Wx\Dialog\Form.pm
cp lib/Padre/Wx/Dialog/Warning.pm blib\lib\Padre\Wx\Dialog\Warning.pm
C:\strawberry\perl\bin\perl.exe C:\strawberry\perl\site\lib\ExtUtils\xsubpp -typemap C:\strawberry\perl\lib\ExtUtils\typemap Win32.xs > Win32.xsc && C:\strawb
erry\perl\bin\perl.exe -MExtUtils::Command -e "mv" -- Win32.xsc Win32.c
Please specify prototyping behavior for Win32.xs (see perlxs manual)
gcc -c -s -O2 -DWIN32 -DHAVE_DES_FCRYPT -DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fno-strict-aliasing -mms-bitfields -DPERL_MSVC
RT_READFIX -s -O2 -DVERSION=\"0.88\" -DXS_VERSION=\"0.88\" "-IC:\strawberry\perl\lib\CORE" -DPSAPI_VERSION=1 Win32.c
Running Mkbootstrap for Padre::Util::Win32 ()
C:\strawberry\perl\bin\perl.exe -MExtUtils::Command -e "chmod" -- 644 Win32.bs
C:\strawberry\perl\bin\perl.exe -MExtUtils::Mksymlists \
-e "Mksymlists('NAME'=>\"Padre::Util::Win32\", 'DLBASE' => 'Win32', 'DL_FUNCS' => { }, 'FUNCLIST' => [], 'IMPORTS' => { }, 'DL_VARS' => []);"
dlltool --def Win32.def --output-exp dll.exp
g++.exe -o ..\blib\arch\auto\Padre\Util\Win32\Win32.dll -Wl,--base-file -Wl,dll.base -mdll -s -L"C:\strawberry\perl\lib\CORE" -L"C:\strawberry\c\lib" Win32.o
C:\strawberry\perl\lib\CORE\libperl512.a -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid
-lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32 dll.exp
Win32.o:Win32.c:(.text+0x5c6): undefined reference to `GetProcessMemoryInfo@12'
collect2: ld returned 1 exit status
dmake: Error code 129, while making '..\blib\arch\auto\Padre\Util\Win32\Win32.dll'
dmake: Error code 255, while making 'subdirs'
Problem can be solved by adding adding -lpsapi in winxs\Makefile:
LDLOADLIBS = -lpsapi -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32
Version info:
C:\strawberry\cpan\build\Padre-0.88-CdvjYq>perl -v This is perl 5, version 12, subversion 3 (v5.12.3) built for MSWin32-x86-multi-thread Copyright 1987-2010, Larry Wall Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit. Complete documentation for Perl, including FAQ lists, should be found on this system using "man perl" or "perldoc perl". If you have access to the Internet, point your browser at http://www.perl.org/, the Perl Home Page. C:\strawberry\cpan\build\Padre-0.88-CdvjYq>perl -MWx -e"printf(qq(Wx Version=($Wx::VERSION) %s unicode=(%s)\n), Wx::wxVERSION_STRING(), Wx::wxUNICODE())" Wx Version=(0.9901) wxWidgets 2.8.12 unicode=(1)
Attachments
Change History
comment:2 in reply to: ↑ 1 Changed 22 months ago by vrobin
Replying to dolmen:
Can't reproduce on Win 7, 32 bits. But vrobin is on x86_64.
The -lpsapi seems to be already handled in the winxs/Makefile.PL.
Could you provide a patch for Makefile.PL?
I could provide a patchfile for the dirty workaround in winxs\Makefile, but it's dirty. I don't know how Makemaker at all so it would be difficult to me. If you give me some guidance I can try to validate a change in Makefile.PL.
Extract from generated winxs\Makefile with reference to -lpsapi:
# MakeMaker Parameters:
# ABSTRACT => q[Padre Win32 API XS Wrapper]
# BUILD_REQUIRES => { }
# CONFIGURE_REQUIRES => { }
# DEFINE => q[-DPSAPI_VERSION=1]
# LIBS => [q[-lpsapi]]
# NAME => q[Padre::Util::Win32]
# PREREQ_PM => { }
# SKIP => [q[test]]
# VERSION_FROM => q[../lib/Padre/Util/Win32.pm]
# --- MakeMaker post_initialize section:
Changed 22 months ago by vrobin
- Attachment Makefile.2 added
Generated and unmodified (l.273) winxs\Makefile
comment:3 Changed 22 months ago by vrobin
Makefile and Makefile.2 attachments are the same file, both are generated and unmodified winxs\Makefile files.

Can't reproduce on Win 7, 32 bits. But vrobin is on x86_64.
The -lpsapi seems to be already handled in the winxs/Makefile.PL.
Could you provide a patch for Makefile.PL?