Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: RFC: Setting up a minGW compiling envronment for Perl 5.10

by Bloodrage (Monk)
on Mar 06, 2008 at 21:22 UTC ( [id://672596]=note: print w/replies, xml ) Need Help??


in reply to RFC: Setting up a minGW compiling envronment for Perl 5.10

syphilis has compiled Gtk2, and I have too using the advice he's given, and the methods I have used earlier.

Unfortunatly my version fails all the tests! Throwing a Windows warning dialog This application has failed to start because (null).dll was not found. Re-installing the application may fix this problem. All the tests throw this error, and fail. Once the warning is cleared the output from the test program is usually in the form of:

I:\strawberry\perl\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_h +arness(0, 'blib\lib', 'blib\arch')" t/*.t t/00.Gtk2............................1/35 # Failed test 'use Gtk2;' # at t/00.Gtk2.t line 18. # Tried to use 'Gtk2'. # Error: Can't load 'I:\strawberry\cpan\build\Gtk2-1.164-jWrGfH\b +lib\arch/a uto/Gtk2/Gtk2.dll' for module Gtk2: load_file:The specified module cou +ld not be found at I:/STRAWB~1/perl/lib/DynaLoader.pm line 203. # at (eval 3) line 2 # Compilation failed in require at (eval 3) line 2. # BEGIN failed--compilation aborted at (eval 3) line 2. Bareword "Gtk2::major_version" not allowed while "strict subs" in use +at t/00.Gt k2.t line 28. Bareword "Gtk2::minor_version" not allowed while "strict subs" in use +at t/00.Gt k2.t line 29. Bareword "Gtk2::micro_version" not allowed while "strict subs" in use +at t/00.Gt k2.t line 30. Bareword "Gtk2::MAJOR_VERSION" not allowed while "strict subs" in use +at t/00.Gt k2.t line 36. Bareword "Gtk2::MINOR_VERSION" not allowed while "strict subs" in use +at t/00.Gt k2.t line 37. Bareword "Gtk2::MICRO_VERSION" not allowed while "strict subs" in use +at t/00.Gt k2.t line 38. Execution of t/00.Gtk2.t aborted due to compilation errors. t/00.Gtk2............................ Dubious, test returned 255 (wsta +t 65280, 0 xff00) Failed 35/35 subtests

I think I'm very close now...

Replies are listed 'Best First'.
Re^2: RFC: Setting up a minGW compiling envronment for Perl 5.10
by syphilis (Archbishop) on Mar 06, 2008 at 22:40 UTC
    Try creating copies of I:/strawberry/perl/site/lib/auto/Gtk2/Gtk2.dll named I:/strawberry/perl/site/lib/auto/Gtk2/(null).dll and I:/strawberry/perl/site/lib/auto/Gtk2/.dll. (I don't know if that will have the desired effect. I'm surprised that, having got it compiled, 'dmake test' doesn't run for you pretty much the same as it ran for me. Did you build it by altering the generated Makefile as I had done ? ... or did you do something slightly different ?)

    This just gets more and more ridiculous, doesn't it :-)
    Is Gtk2 really worth the effort ?

    Cheers,
    Rob

      I'll give that a go. Yes I followed your instructions and they worked nicely. I've also revised that library renaming script, but I still had to append the other external libraries and include directories.

      Gtk2 is probably not worth all this effort, but I'm a stubborn and persistant son of a bitch. This meditation is as much about putting the solutions to these compiler problems up front on Perl Monks as it is about getting it done. Soon I think I'll be supressing my rage and writing up another article on the robustness, or lack therof, of makefiles. :)

      Well the dll isn't there yet, it's not been installed. It's still in the blib/arch/auto/Gtk2 directory in the build directory. Renaming it as per directed didn't help... wait no it set of a dmake clean and deleted everything. Grr. Trying again.

      Righty the error is now The procedure entry point cairo_object_from_sv could not be located in the dynamic link library  (null). :(

      ...I am also beginning to suspect that there is another Config.pm file that I need modification as per the config script I use to set up Strawberry Perl.

        Righty the error is now The procedure entry point cairo_object_from_sv could not be located in the dynamic link library (null).

        Looks like you instead need to copy I:/strawberry/perl/site/lib/auto/Cairo/Cairo.dll to I:/strawberry/perl/site/lib/auto/Cairo/(null).dll and then delete any other instances of a file named (null).dll.

        Try that and re-run dmake test. (There's no need to first recompile Gtk2.) I suspect you'll get more errors.

        We probably should instead be trying to work out why *you* have struck this additional hitch, but *I* didn't. Hmmm ... better still ... we probably shouldn't even be thinking about it at all :-)

        Cheers,
        Rob
Re^2: RFC: Setting up a minGW compiling envronment for Perl 5.10
by Bloodrage (Monk) on Mar 08, 2008 at 01:26 UTC
    Now that we've sorted the mistakes with dlltool I now have these errors with dmake test. Sigh:
    t/set-scroll-adjustments-signal......Gtk-ERROR **: Incompatible build! The code using GTK+ thinks GtkBox is of different size than it actually is in this build of GTK+. On Windows, this probably means that you have compiled your code with gcc without the -mms-bitfields switch, or that you are using an unsupported compiler. at I:\strawberry\cpan\b +uild\Gtk2- 1.164-jWrGfH\blib\lib/Gtk2/TestHelper.pm line 41. This application has requested the Runtime to terminate it in an unusu +al way. Please contact the application's support team for more information. t/set-scroll-adjustments-signal...... Dubious, test returned 3 (wstat +768, 0x300
    Which causes it to skip almost all of the tests.
      Dang, adding -mms-bitfields to CCFLAGS in the Makefile simply results in gcc: unrecognized option `-MMS-BITFIELDS'... hang on writing this makes me notice it might be case sensitive... yup. Case sentitive. Oooh some tests segfault :)
        Oooh some tests segfault

        Yes - and it's a bit of a disappointment after all one has gone through just to get it to build. In addition to the segfaults I get a number of "Can't locate object method ..." errors scattered throughout when I run the tests verbosely - eg (from Gdk.t) Can't locate object method "get_xid" via package "Gtk2::Gdk::Window" at t\gdk.t line 108. And some of the "isa" tests report that the object being scrutinised is not of the expected type - which seems bizarre to me.

        Still, the module is probably usable for most situations.

        Cheers,
        Rob

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2024-04-26 08:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found