Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

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

by Bloodrage (Monk)
on Mar 02, 2008 at 23:50 UTC ( #671557=note: print w/ replies, xml ) Need Help??


in reply to Re^2: RFC: Setting up a minGW compiling envronment for Perl 5.10
in thread RFC: Setting up a minGW compiling envronment for Perl 5.10

Appending -L"G:\GTK\lib" to these lines in the Makefile like so:

LDDLFLAGS = -mdll -s -L"G:\strawberry\perl\lib\CORE" -L"G:\strawberry\ +c\lib" -L"G:\GTK\lib" LDFLAGS = -s -L"G:\strawberry\perl\lib\CORE" -L"G:\strawberry\c\lib" - +L"G:\GTK\lib"

Makes no difference to the output from dmake except that these libs are now included :(


Comment on Re^3: RFC: Setting up a minGW compiling envronment for Perl 5.10
Select or Download Code
Re^4: RFC: Setting up a minGW compiling envronment for Perl 5.10
by syphilis (Canon) on Mar 03, 2008 at 01:02 UTC
    Makes no difference to the output from dmake except that these libs are now included

    Well ... all that you have done is to provide the *location* of those libs. Apparently, therefore, the build process is not even trying to find those libs - and you'll have to tell it to do that with -lglib (assuming the glib library is named glib.a or libglib.a). There are probably other libraries that need to be explicitly linked in, too - but start by just trying to get those glib undefined references fixed. That should (at least) greatly reduce the number of undefined references that you get.

    Cheers,
    Rob

      Ok, the library in question is G:\GTK\lib\glib-2.0.a so I assume that somewhere I've got to hand -lglib-2.0 over to the Makefile, dmake, or the compiler.

      Looking at the header of the Makefile shows me that indeed CPAN informed Makefile.PL and MakeMaker what's going on, but the Makefile.PL may not have done anything useful with it. Joy.

      # MakeMaker Parameters: # ABSTRACT_FROM => q[Glib.pm] # DL_FUNCS => { Glib=>[] } # SNIP! # INC => q[-IG:/GTK/include/glib-2.0 -IG:/GTK/lib/glib-2.0/include + -I.] # LIBS => q[-LG:/GTK/lib -lgobject-2.0 -lglib-2.0 -lintl -liconv - +lgthread-2.0] # SNIP! # --- MakeMaker post_initialize section:

      ...but -lglib-2.0 isn't found again in the Makefile.

      At the bottom of the Makefile is the EXTRALIBS and LDLOADLIBS, so I appended G:\GTK\lib\glib-2.0.a to those strings.

      Success! To a degree. the "undefined reference" errors have reduced from around a thousand to ~300. Now to figure out which other libs are needed. Hmm... those one's listed in the Makefile header snippet above look like prime suspects... especially the ones beginning with 'g'...

      Adding those changes my error log to:

      um... which looks successful...

      The conclusion from this is that:

      • My compile environment is complete.
      • The standard makefiles need help
      • syphilis is godlike
      • ...and I am his profit

      PS: That I've never seriously jiggered about a Makefile before and that I inferred that this is what I should do from syphilis' comment is just more evidence that I'm fucking psychic :P

      PPS: Putting your compiler-onna-stick in a different computer and having it assigned a different drive letter breaks your nicely fixed up files. Bother.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (15)
As of 2014-12-19 20:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (91 votes), past polls