From: Andrew <sob...@gm...> - 2007-01-31 11:04:23
|
Hi, I am having a few problems compiling wxPerl, and I was wondering if someone on this list could provide any help, perhaps by spotting something very simple that I am doing wrong. I am using the following software: ActivePerl 5.8.6 (build 811) MinGW 5.0.3 MSYS 1.0.10 nmake 1.50 dmake 2006-06-16 (you can never have enough make programs, apparently) ExtUtils::FakeConfig 0.05 wxPerl 0.67 (sources) wxWidgets-2.8.0 (sources) Alien::wxWidgets 0.27 (sources) I have included some attachments: wxwidgets_make.txt make output trying to build wxwidgets wxwidgets_libraries.txt The libraries I built under wxwidgets-2.8.0/lib msw_2_8_0_gcc_3_4.pm generated by Alien-wxWidgets-0.27.hax0red wx-0.67_make.txt make output trying to build Wx-0.67 Win32_hack.patch patch for Alien-wxWidgets-0.27/inc/My/Build/Win32.pm ###################################################################### # wxwidgets in docs/msw/install.txt under the MinGW section, it says: # NOTE: The makefile.gcc makefiles are for compilation under MinGW using # Windows command interpreter (command.com/cmd.exe), they won't work in # other environments (such as UNIX or Unix-like, e.g. MSYS where you have # to use configure instead, see the section below) # # > cd c:\wx\build\msw # > make -f makefile.gcc BUILD=debug The problem with this is I don't have a 'make' under windows. I have 'dmake' and 'nmake', and a C:\msys\1.0\bin\make.exe (but that is part of MSYS). none of those seemed to work. See attachment "wxwidgets_make.txt". So then I tried the configure script approach under MinGW: > export WXDIR=/d/build/wxWidgets-2.8.0 > cd $WXDIR > ./configure --with-msw --enable-shared --enable-optimise --prefix=/d/opt/wxWidgets-2.8.0 > make > make install > cd contrib/src/stc > make > make install This worked. See attachment "wxwidgets_libraries.txt" for the files that were build under $WXDIR/lib/. ###################################################################### # Alien::wxWidgets: (in a dos shell) > set WXDIR=D:\build\wxWidgets-2.8.0 > set PERL5OPT=-MConfig_m > set PATH=D:\opt\wxWidgets-2.8.0\bin;%PATH% > perl Build.PL --with-msw --enable-shared --enable-optimise Do you want to build wxWidgets? [no] no > perl Build Configuration error: could not find libraries for configuration: '' '28' at inc/My/Build/Win32.pm line 73. It seems the wxwidgets supplied makefiles (makefile.gcc etc) build libraries in different places (lib/gcc_dll) than the makefiles generated by configure (lib). Also the files must be named slightly differently, as the logic in Win32.pm didn't find them even when i copied them to the place it was expecting (lib/gcc_dll). (copying wxwidgets files to the places they are expected, under MinGW) > cd $WXDIR > mkdir lib/gcc_dll > cp lib/*.dll lib/*.a lib/gcc_dll > mkdir -p lib/gcc_dll/msw/wx > cp lib/wx/include/msw-ansi-release-2.8/wx/setup.h lib/gcc_dll/msw/wx/ I then made nasty hacks to Win32.pm (see attachment "Win32_hack.patch") and then ended up with Alien-wxWidgets-0.27.hax0red. The config generated by this is also attached - but I suspect there's something wrong with it. see attachment "msw_2_8_0_gcc_3_4.pm". ###################################################################### # wxPerl (in a dos shell) > cd D:\build\Wx-0.67 > set PERL5OPT=-MConfig_m > set WXDIR=D:\build\wxWidgets-2.8.0 > perl Makefile.PL PREFIX=Y:\Wx-2.8.0-0.67 here I get many "Note (probably harmless): No library found for -l*" warnings > dmake here I get a fatal error: C:/Perl/lib/CORE/win32.h:219: error: redeclaration of C++ built-in type `int' C:/Perl/lib/CORE/win32.h:220: error: redeclaration of C++ built-in type `int' Those lines are: typedef long uid_t; typedef long gid_t; so I commented those lines out and tried again. > dmake see attachment "wx-0.67_make.txt" for the output. It looks like the relevant wxwidgets dll or .a is not being passed to g++, so there are undefined references. I suspect this is because my hacked version of Alien::wxWidgets has generated an erroneous config file? I have tried disabling components, eg perl Makefile.PL --disable-richtext but I run into similar errors (undefined references) with everything. Any suggestions or help you can provide would be much appreciated (about any stage of the process). cheers, Andrew |