in reply to Re: perl 5.14.0-RC1 is available for testing!
in thread perl 5.14.0-RC1 is available for testing!

perl.exe/perl514.dll needs libgcc_s_dw2-1.dll, but op/taint modifies $ENV{PATH} so when it uses $Invoke_Perl, it can't find libgcc_s_dw2-1.dll

This section of makefile.mk is supposed to deal with that issue:
# # If building with gcc-4.x.x (or x86_64-w64-mingw32-gcc-4.x.x), then # uncomment the following assignment to GCC_4XX, make sure that CCHOM +E # has been set correctly above, and uncomment the appropriate # GCCHELPERDLL line. # The name of the dll can change, depending upon which vendor has supp +lied # your 4.x.x compiler, and upon the values of "x". # (The dll will be in your mingw/bin folder, so check there if you're # unsure about the correct name.) # Without these corrections, the op/taint.t test script will fail. # #GCC_4XX *= define #GCCHELPERDLL *= $(CCHOME)\bin\libgcc_s_sjlj-1.dll #GCCHELPERDLL *= $(CCHOME)\bin\libgcc_s_dw2-1.dll #GCCHELPERDLL *= $(CCHOME)\bin\libgcc_s_1.dll
Not sure how that fits in with your method of building. I've only ever built perl with gcc by running dmake -f makefile.mk

With my mingw port of gcc-3.4.5 I'm finding that porting/buildtoc.t fails test 2. All other tests pass.
With my mingw64 port of gcc-4.6.0, I'm finding that the tests hang when 19_CPANPLUS-Dist.t is run, so I don't get to find out what failures there are.

Cheers,
Rob

Replies are listed 'Best First'.
Re^3: perl 5.14.0-RC1 is available for testing!
by Anonymous Monk on Apr 21, 2011 at 15:44 UTC
    AHA, typical dumb makefile and I forgot to grep :)

    That makefile is really really unreadable (someone should indent it, rewrite it)

    I shouldn't need to know anything about this :) The GCC_4XX way should be automatic one way or another, something like

    .IF "$(CCTYPE)" == "GCC" GCC_VERSION *= $(shell gcc -dumpversion) GCC_MAJOR_VERSION *= $(GCC_VERSION:b:b) .IF "$(GCC_MAJOR_VERSION)" == "4" GCC_4XX *= define .ENDIF .ENDIF
    Or my way (untested)
    .IF "$(CCTYPE)" == "GCC" GCC_VERSION *= $(shell gcc -dumpversion) GCC_MAJOR_VERSION *= $(GCC_VERSION:b:b) .IF "$(GCC_MAJOR_VERSION)" == "4" CFLAGS +=-static-libgcc LIBC += -static-libgcc .ENDIF .ENDIF
    Checking my make commands, a test makefile.mk
    CCTYPE *= GCC .IF "$(CCTYPE)" == "GCC" GCC_VERSION *= $(shell gcc -dumpversion) GCC_MAJOR_VERSION *= $(GCC_VERSION:b:b) .IF "$(GCC_MAJOR_VERSION)" == "4" CFLAGS += -static-libgcc LIBC += -static-libgcc GCC_4XX *= define .ENDIF .ENDIF __echo_GCC: @echo GCC_VERSION $(GCC_VERSION) @echo GCC_MAJOR_VERSION $(GCC_MAJOR_VERSION) @echo GCC_4XX $(GCC_4XX) @echo CFLAGS $(CFLAGS) @echo LIBC $(LIBC) $(NOOP)
    how it runs (output)
    $ dmake -f makefile.mk dmake: Executing shell macro: gcc -dumpversion dmake: Executing shell macro: gcc -dumpversion GCC_VERSION 4.5.2 dmake: Executing shell macro: gcc -dumpversion GCC_MAJOR_VERSION 4 GCC_4XX define CFLAGS -static-libgcc LIBC -static-libgcc

    Not sure how that fits in with your method of building. I've only ever built perl with gcc by running dmake -f makefile.mk

    Yup, thats what I do, the -f makefile.mk isn't mandatory since that is the default

      You know, I wrote a little program to use objdump to find out what dlls are linked to perl.exe/perl514.dll , to copy them to t directory

      I tested it, it worked, and then I dawned me how stupid I find this :)

      The whole thing should be replaced with

      .IF "$(CCTYPE)" == "GCC" $(XCOPY) $(CCHOME)\bin\* ..\t\$(NULL) .ENDIF
      Since the dll's in ..\t\ aren't used for anything else and they're deleted during dmake clean

      KISS

      .IF "$(CCTYPE)" == "GCC" GCC_VERSION *= $(shell gcc -dumpversion) GCC_MAJOR_VERSION *= $(GCC_VERSION:b:b) .IF "$(GCC_MAJOR_VERSION)" == "4" GCC_4XX *= define .ENDIF .ENDIF
      If that works, it would be an improvement.
      One problem with it is that it's not guaranteed that the C compiler is called 'gcc'. With the mingw64 compiler that I use it's called 'x86_64-w64-mingw32-gcc' - and  gcc -dumpversion would simply return something like 'gcc' is not recognized as an internal or external command, operable program or batch file.

      I guess, however, there might also be a way to cater for that possibility.

      Cheers,
      Rob
        FWIW the actual compiler name is supposed to be in $(CC), CCTYPE is configuration variable I now prefer this.