Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^11: Need help debugging Wx on Strawberry Perl 5.26.1

by swl (Vicar)
on Aug 26, 2019 at 21:50 UTC ( #11105092=note: print w/replies, xml ) Need Help??


in reply to Re^10: Need help debugging Wx on Strawberry Perl 5.26.1
in thread Need help debugging Wx on Strawberry Perl 5.26.1

That approach looks sound to me.

  • Comment on Re^11: Need help debugging Wx on Strawberry Perl 5.26.1

Replies are listed 'Best First'.
Re^12: Need help debugging Wx on Strawberry Perl 5.26.1
by Anonymous Monk on Aug 27, 2019 at 02:23 UTC

      Thanks for the link, this will certainly help. As this goes into Module::Build territory, and I'm not keen on learning on how to make Module::Build add arbitrary commands to the created Build (well, Build.bat) script, I won't change my patch. Somebody with knowledge of Module::Build is welcome to take my patch and make things work right out of the box.

      The appropriate commands would likely be (ignoring systems where we have command.com):

      set SHELL=cmd.exe

      ... and, after appropriate munging in Perl to remove all offending directories in $ENV{PATH}:

      set PATH=$cleaned_path

      $cleaned_path would likely be something like:

      my $cleaned_path = join ";", grep { ! -f "$_\\sh.exe" && ! -f "$_\\cc1.exe" } split /;/, $ENV{PATH} ;

        This works for me as in it starts building and doesn't die immediately with CreateProcess(NULL, better than renaming sh.exe and make.exe :)

        Alien-wxWidgets-0.69\inc\My\Build\Win32.pm sub build_wxwidgets { my $self = shift; my $old_dir = Cwd::cwd(); my $uni = $self->awx_unicode ? 'UNICODE=1' : 'UNICODE=0'; my $mslu = $self->awx_mslu ? 'MSLU=1' : 'MSLU=0'; my $dbg = $self->awx_debug ? 'BUILD=debug' : 'BUILD=release'; my $opt = join ' ', $uni, $mslu, $dbg, 'SHARED=1', 'SHELL=cmd.exe' +;

        This was a flop , dies with CreateProcess(NULL, probably all that reboot talk ... nonsense :)

        Alien-wxWidgets-0.69\inc\My\Build\Win32.pm sub massage_environment { my( $self ) = shift; if( $self->notes( 'build_wx' ) ) { $ENV{WXWIN} = $ENV{WXDIR} = File::Spec->rel2abs ( $self->notes( 'build_data' )->{data}{directory} ); $ENV{SHELL} = 'cmd.exe' if $Config::Config{sh}=~/cmd/i; my $mingw_gcc = My::Build::Base->awx_path_search( '*-gcc-*.exe +' ); # i686-w64-mingw32-gcc-4.6.3.exe my $basename = File::Basename::basename($mingw_gcc, '.exe' ); $basename = "libexec/gcc/$1/$2" if $basename =~ m{^(.+?)-gcc-( +.+)}is; my $new_path = File::Spec->rel2abs( File::Spec->catfile( File::Basename::dirname($mingw_gcc) , File::Spec->updir, $basename ) ); #~ die "SHELL=$ENV{SHELL}\n$mingw_gcc\n$basename\n$new_path"; $ENV{PATH}.=';'.$new_path; ## didnt work } }
Re^12: Need help debugging Wx on Strawberry Perl 5.26.1
by Anonymous Monk on Aug 27, 2019 at 02:16 UTC

    That approach looks sound to me.

    Its better than nothing, and better late than never,

    But we can do better than a copout from so many years ago

    I imagine this is relevant portion but I havent built a wxWidgets in years

    If you could check your logs please

    Alien-wxWidgets-0.64\inc\My\Build\Any_wx_config.pm sub build_wxwidgets { my $self = shift; my $extra_flags = $self->wxwidgets_configure_extra_flags; my $prefix_dir = $self->_key; my $prefix = awx_install_arch_dir( $self, $prefix_dir ); my $opengl = $self->notes( 'build_wx_opengl' ); my $args = sprintf '--with-%s %s--disable-compat24', $self->awx_build_toolkit, $opengl ? '--with-opengl ' : ''; my $unicode = $self->awx_is_unicode ? 'enable' : 'disable'; my $debug = ''; if( $self->awx_version_type == 2 ) { $debug = ( $self->awx_debug ) ? '--enable-debug' : '--disable- +debug'; } else { $debug = ( $self->awx_debug ) ? '--enable-debug=max' : ''; } my $monolithic = $self->awx_is_monolithic ? 'enable' : 'disable'; my $universal = $self->awx_is_universal ? 'enable' : 'disable'; my $dir = $self->notes( 'build_data' )->{data}{directory}; my $cmd = "echo exit | " . # for OS X 10.3... "sh ../configure --prefix=$prefix $args --$unicode-unico +de" . " $debug --$monolithic-monolithic" . " --$universal-universal_binary $extra_flags";

      It is unclear what it is that you're asking for here. What should I be checking for in the logs?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11105092]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (6)
As of 2023-02-07 11:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I prefer not to run the latest version of Perl because:







    Results (39 votes). Check out past polls.

    Notices?