develooper Front page | perl.perl5.porters | Postings from April 2018

[Win32] 5.27.11 fails to build with MinGW

Thread Next
From:
sisyphus1
Date:
April 21, 2018 02:12
Subject:
[Win32] 5.27.11 fails to build with MinGW
Message ID:
6DEEBCD181324422B616121182B66620@OwnerPC311012
Hi,

I'm using gcc version 7.2.0 (i686-posix-dwarf-rev1, Built by MinGW-W64 
project).
And I'm building with gmake on Windows 7.

There was no problem building 5.27.10 with these tools, but with 5.27.11 
(and using the very same tools) XS\APItest\APItest.dll  fails to build.

Firstly, there's some deprecation warnings during the compilation of 
APItest.c, followed soon after by linking failures when the attempt to build 
the dll is made.
(I don't know whether those deprecation warnings were also present in the 
5.27.10 build.)

########################
....
gcc -c   -s -O2 -DWIN32 -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS 
 -DUSE_PERLIO -D__USE_MINGW_ANSI_STDIO -fwrapv -fno-strict-aliasing -mms-bitfields 
 -s -O2   -DVERSION=\"0.97\" -DXS_VERSION=\"0.97\"  "-I..\..\lib\CORE" 
APItest.c

APItest.c: In function 'XS_XS__APItest__PtrTable_clear':
APItest.c:3209:2: warning: 'Perl_ptr_table_clear' is deprecated 
[-Wdeprecated-declarations]
  ptr_table_clear(table);
  ^~~~~~~~~~~~~~~
In file included from ..\..\lib\CORE/perl.h:5264:0,
                 from APItest.xs:10:
..\..\lib\CORE/proto.h:2720:20: note: declared here
PERL_CALLCONV void Perl_ptr_table_clear(pTHX_ PTR_TBL_t *const tbl)
                    ^~~~~~~~~~~~~~~~~~~~
APItest.xs: In function 'XS_XS__APItest__Magic_test_toLOWER_utf8':
APItest.xs:6439:13: warning: 'Perl_to_utf8_lower' is deprecated 
[-Wdeprecated-declarations]
             resultant_cp = Perl_to_utf8_lower(aTHX_ input, s, &len);
             ^~~~~~~~~~~~
In file included from ..\..\lib\CORE/perl.h:5264:0,
                 from APItest.xs:10:
..\..\lib\CORE/proto.h:3736:18: note: declared here
PERL_CALLCONV UV Perl_to_utf8_lower(pTHX_ const U8 *p, U8* ustrp, STRLEN 
*lenp)

                  ^~~~~~~~~~~~~~~~~~
APItest.xs: In function 'XS_XS__APItest__Magic_test_toFOLD_utf8':
APItest.xs:6529:13: warning: 'Perl_to_utf8_fold' is deprecated 
[-Wdeprecated-declarations]
             resultant_cp = Perl_to_utf8_fold(aTHX_ input, s, &len);
             ^~~~~~~~~~~~
In file included from ..\..\lib\CORE/perl.h:5264:0,
                 from APItest.xs:10:
..\..\lib\CORE/proto.h:3729:18: note: declared here
PERL_CALLCONV UV Perl_to_utf8_fold(pTHX_ const U8 *p, U8* ustrp, STRLEN 
*lenp)
                  ^~~~~~~~~~~~~~~~~
APItest.xs: In function 'XS_XS__APItest__Magic_test_toUPPER_utf8':
APItest.xs:6619:13: warning: 'Perl_to_utf8_upper' is deprecated 
[-Wdeprecated-declarations]
             resultant_cp = Perl_to_utf8_upper(aTHX_ input, s, &len);
             ^~~~~~~~~~~~
In file included from ..\..\lib\CORE/perl.h:5264:0,
                 from APItest.xs:10:
..\..\lib\CORE/proto.h:3750:18: note: declared here
PERL_CALLCONV UV Perl_to_utf8_upper(pTHX_ const U8 *p, U8* ustrp, STRLEN 
*lenp)

                  ^~~~~~~~~~~~~~~~~~
APItest.xs: In function 'XS_XS__APItest__Magic_test_toTITLE_utf8':
APItest.xs:6702:13: warning: 'Perl_to_utf8_title' is deprecated 
[-Wdeprecated-declarations]
             resultant_cp = Perl_to_utf8_title(aTHX_ input, s, &len);
             ^~~~~~~~~~~~
In file included from ..\..\lib\CORE/perl.h:5264:0,
                 from APItest.xs:10:
..\..\lib\CORE/proto.h:3743:18: note: declared here
PERL_CALLCONV UV Perl_to_utf8_title(pTHX_ const U8 *p, U8* ustrp, STRLEN 
*lenp)

                  ^~~~~~~~~~~~~~~~~~
"..\..\miniperl.exe" "-I..\..\lib" 
"C:\_32\comp\perl-5.27.11\dist\ExtUtils-Parse ......

[snip]

g++ APItest.def -o 
..\..\lib\auto\XS\APItest\APItest.dll -mdll -s -L"c:\perl\lib\CORE" -L"C:\_32\gcc-mingw-720\mingw32\lib" 
APItest.o XSUB-undef-XS_VERSION.o XSUB-redefined-macros.o core.o exception.o 
notcore.o 
  "..\..\lib\CORE\libperl527.a" -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool 
 -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 
 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32 -Wl,--enable-auto-image-base

APItest.o:APItest.c:(.text+0x5a8f): undefined reference to 
`_imp__Perl_to_utf8_title'
APItest.o:APItest.c:(.text+0xaf0f): undefined reference to 
`_imp__Perl_to_utf8_upper'
APItest.o:APItest.c:(.text+0xb64f): undefined reference to 
`_imp__Perl_to_utf8_fold'
APItest.o:APItest.c:(.text+0xbf3f): undefined reference to 
`_imp__Perl_to_utf8_lower'
collect2.exe: error: ld returned 1 exit status
Makefile:483: recipe for target '..\..\lib\auto\XS\APItest\APItest.dll' 
failed
gmake[1]: *** [..\..\lib\auto\XS\APItest\APItest.dll] Error 1

#########################

Same result when I build using gcc version 7.2.0 (x86_64-posix-seh-rev1, 
Built by MinGW-W64 project).

Cheers,
Rob

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About