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

[perl #133125] more -DNO_MATHOMS breakage on Win32

Thread Previous
From:
bulk88
Date:
April 20, 2018 03:43
Subject:
[perl #133125] more -DNO_MATHOMS breakage on Win32
Message ID:
rt-4.0.24-18135-1524195815-1368.133125-75-0@perl.org
# New Ticket Created by  bulk88 
# Please include the string:  [perl #133125]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=133125 >


This is a bug report for perl from bulk88@hotmail.com,
generated with the help of perlbug 1.41 running under perl 5.27.9.


-----------------------------------------------------------------
[Please describe your issue here]

This is a 5.28 blocker.

Round #2 of https://rt.perl.org/Public/Bug/Display.html?id=133098 .

The patch "fix -DNO_MATHOMS build, mathomed syms were not removed from 
perldll.def" breaks a WITH_MATHOMS (not a define) win32 build. I didn't 
test on my main machine a WITH_MATHOMS (default) build before submitting 
the patch but I tested today on another machine and got breakage.
-----------------------------------------------
cl -c   -nologo -GF -W3 -O1 -MD -Zi -DNDEBUG -GL -DWIN32 -D_CONSOLE 
-DNO_STRICT
-DPERL_TEXTMODE_SCRIPTS -DPERL_HASH_FUNC_ONE_AT_A_TIME 
-DPERL_DISABLE_PMC -DPERL
_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DWIN32_NO_REGISTRY -DUSE_PERLIO 
-D_USE_32
BIT_TIME_T -O1 -MD -Zi -DNDEBUG -GL   -DVERSION=\"0.97\" 
-DXS_VERSION=\"0.97\"
"-I..\..\lib\CORE"   APItest.c
APItest.c
"..\..\miniperl.exe" "-I..\..\lib" 
"C:\perl521\srcnew\dist\ExtUtils-ParseXS\lib\
ExtUtils/xsubpp"  -typemap C:\perl521\srcnew\lib\ExtUtils\typemap 
-typemap C:\pe
rl521\srcnew\ext\XS-APItest\typemap  XSUB-undef-XS_VERSION.xs > 
XSUB-undef-XS_VE
RSION.xsc
C:\perl521\srcnew\miniperl.exe "-I..\..\lib" -MExtUtils::Command -e mv 
-- XSUB-u
ndef-XS_VERSION.xsc XSUB-undef-XS_VERSION.c
cl -c   -nologo -GF -W3 -O1 -MD -Zi -DNDEBUG -GL -DWIN32 -D_CONSOLE 
-DNO_STRICT
-DPERL_TEXTMODE_SCRIPTS -DPERL_HASH_FUNC_ONE_AT_A_TIME 
-DPERL_DISABLE_PMC -DPERL
_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DWIN32_NO_REGISTRY -DUSE_PERLIO 
-D_USE_32
BIT_TIME_T -O1 -MD -Zi -DNDEBUG -GL   -DVERSION=\"0.97\" 
-DXS_VERSION=\"0.97\"
"-I..\..\lib\CORE"   XSUB-undef-XS_VERSION.c
XSUB-undef-XS_VERSION.c
"..\..\miniperl.exe" "-I..\..\lib" 
"C:\perl521\srcnew\dist\ExtUtils-ParseXS\lib\
ExtUtils/xsubpp"  -typemap C:\perl521\srcnew\lib\ExtUtils\typemap 
-typemap C:\pe
rl521\srcnew\ext\XS-APItest\typemap  XSUB-redefined-macros.xs > 
XSUB-redefined-m
acros.xsc
C:\perl521\srcnew\miniperl.exe "-I..\..\lib" -MExtUtils::Command -e mv 
-- XSUB-r
edefined-macros.xsc XSUB-redefined-macros.c
cl -c   -nologo -GF -W3 -O1 -MD -Zi -DNDEBUG -GL -DWIN32 -D_CONSOLE 
-DNO_STRICT
-DPERL_TEXTMODE_SCRIPTS -DPERL_HASH_FUNC_ONE_AT_A_TIME 
-DPERL_DISABLE_PMC -DPERL
_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DWIN32_NO_REGISTRY -DUSE_PERLIO 
-D_USE_32
BIT_TIME_T -O1 -MD -Zi -DNDEBUG -GL   -DVERSION=\"0.97\" 
-DXS_VERSION=\"0.97\"
"-I..\..\lib\CORE"   XSUB-redefined-macros.c
XSUB-redefined-macros.c
cl -c   -nologo -GF -W3 -O1 -MD -Zi -DNDEBUG -GL -DWIN32 -D_CONSOLE 
-DNO_STRICT
-DPERL_TEXTMODE_SCRIPTS -DPERL_HASH_FUNC_ONE_AT_A_TIME 
-DPERL_DISABLE_PMC -DPERL
_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DWIN32_NO_REGISTRY -DUSE_PERLIO 
-D_USE_32
BIT_TIME_T -O1 -MD -Zi -DNDEBUG -GL   -DVERSION=\"0.97\" 
-DXS_VERSION=\"0.97\"
"-I..\..\lib\CORE"   core.c
core.c
cl -c   -nologo -GF -W3 -O1 -MD -Zi -DNDEBUG -GL -DWIN32 -D_CONSOLE 
-DNO_STRICT
-DPERL_TEXTMODE_SCRIPTS -DPERL_HASH_FUNC_ONE_AT_A_TIME 
-DPERL_DISABLE_PMC -DPERL
_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DWIN32_NO_REGISTRY -DUSE_PERLIO 
-D_USE_32
BIT_TIME_T -O1 -MD -Zi -DNDEBUG -GL   -DVERSION=\"0.97\" 
-DXS_VERSION=\"0.97\"
"-I..\..\lib\CORE"   exception.c
exception.c
cl -c   -nologo -GF -W3 -O1 -MD -Zi -DNDEBUG -GL -DWIN32 -D_CONSOLE 
-DNO_STRICT
-DPERL_TEXTMODE_SCRIPTS -DPERL_HASH_FUNC_ONE_AT_A_TIME 
-DPERL_DISABLE_PMC -DPERL
_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DWIN32_NO_REGISTRY -DUSE_PERLIO 
-D_USE_32
BIT_TIME_T -O1 -MD -Zi -DNDEBUG -GL   -DVERSION=\"0.97\" 
-DXS_VERSION=\"0.97\"
"-I..\..\lib\CORE"   notcore.c
notcore.c
"..\..\miniperl.exe" "-I..\..\lib" -MExtUtils::Mksymlists \
      -e "Mksymlists('NAME'=>\"XS::APItest\", 'DLBASE' => 'APItest', 
'DL_FUNCS' =
 > {  }, 'FUNCLIST' => [], 'IMPORTS' => {  }, 'DL_VARS' => []);"
link -out:..\..\lib\auto\XS\APItest\APItest.dll -dll -nologo 
-nodefaultlib -debu
g -opt:ref,icf -ltcg -libpath:"c:\perl\lib\CORE" -machine:x86 
APItest.obj XSUB-u
ndef-XS_VERSION.obj XSUB-redefined-macros.obj core.obj exception.obj 
notcore.obj
    "..\..\lib\CORE\perl527.lib" oldnames.lib kernel32.lib user32.lib 
gdi32.lib w
inspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib 
netapi3
2.lib uuid.lib ws2_32.lib mpr.lib winmm.lib version.lib odbc32.lib 
odbccp32.lib
comctl32.lib msvcrt.lib -def:APItest.def
    Creating library ..\..\lib\auto\XS\APItest\APItest.lib and object 
..\..\lib\a
uto\XS\APItest\APItest.exp
APItest.obj : error LNK2001: unresolved external symbol 
__imp__Perl_to_utf8_titl
e
APItest.obj : error LNK2001: unresolved external symbol 
__imp__Perl_to_utf8_fold

APItest.obj : error LNK2001: unresolved external symbol 
__imp__Perl_to_utf8_lowe
r
APItest.obj : error LNK2001: unresolved external symbol 
__imp__Perl_to_utf8_uppe
r
..\..\lib\auto\XS\APItest\APItest.dll : fatal error LNK1120: 4 
unresolved extern
als
makefile:483: recipe for target '..\..\lib\auto\XS\APItest\APItest.dll' 
failed
gmake[1]: *** [..\..\lib\auto\XS\APItest\APItest.dll] Error 1120
gmake[1]: Leaving directory 'C:/perl521/srcnew/ext/XS-APItest'
Unsuccessful make(ext/XS-APItest): code=512 at ..\make_ext.pl line 570.
GNUmakefile:1578: recipe for target 'Extensions' failed
gmake: *** [Extensions] Error 2
--------------------------

These link errors bring up a question of what is a mathom-ed function 
anyways.

The link error I see is because of 
https://perl5.git.perl.org/perl.git/commitdiff/607313a19740cb756ab98d5e58e6040ea8c125d4 
which used mathomed functions by their full name "Perl_to_utf8_title" 
and not "to_utf8_title" which is redirected to a newer C func by preproc 
in 
https://perl5.git.perl.org/perl.git/blob/4273b0cccad37ddd85afb1abe763af2c6a6023a5:/utf8.h#l86

The top of embed.fnc 
https://perl5.git.perl.org/perl.git/blob/4273b0cccad37ddd85afb1abe763af2c6a6023a5:/embed.fnc#l107 
says that "m" symbols are not exported. Docs for "b" are ambiguous 
https://perl5.git.perl.org/perl.git/blob/4273b0cccad37ddd85afb1abe763af2c6a6023a5:/embed.fnc#l67 
  Those 4 funcs are "ApbmdD" So "A" for public API (IE exported), "b" 
for not avail on -DNO_MATHOMS, "m" for macro not a func. I thought I got 
the permutation right in 
https://perl5.git.perl.org/perl.git/commitdiff/1545ba5b042c208e23333479730479c0acd55325 
"xmi" flags mean not exported.  Previous KHW code that I was fixing 
https://perl5.git.perl.org/perl.git/commitdiff/3f1866a8f6c7a9d70d0c8bb1b4f20d2db63756f1 


so what is the definition of "b"?

I did a diff of my "fix -DNO_MATHOMS build, mathomed syms were not 
removed from perldll.def" commit and cooked up this regex of now deleted 
in WITH_MATHOMS symbols because they all have "m" flag but are also "b".

Perl_do_aexec|Perl_do_open|Perl_gv_AVadd|Perl_gv_HVadd|Perl_gv_IOadd|Perl_gv_SVadd|Perl_gv_efullname3|Perl_gv_fetchmethod|Perl_gv_fullname3|Perl_hv_delete|Perl_hv_delete_ent|Perl_hv_exists|Perl_hv_exists_ent|Perl_hv_fetch|Perl_hv_fetch_ent|Perl_hv_iternext|Perl_hv_magic|Perl_hv_store|Perl_hv_store_ent|Perl_hv_store_flags|Perl_instr|Perl_is_utf8_char_buf|Perl_is_utf8_string_loc|Perl_mem_collxfrm|Perl_my_lstat|Perl_my_stat|Perl_newAV|Perl_newHV|Perl_newIO|Perl_newSUB|Perl_ref|Perl_save_freeop|Perl_save_freepv|Perl_save_freesv|Perl_save_mortalizesv|Perl_save_op|Perl_sv_2iv|Perl_sv_2pv|Perl_sv_2pv_nolen|Perl_sv_2pvbyte_nolen|Perl_sv_2pvutf8_nolen|Perl_sv_2uv|Perl_sv_catpvn|Perl_sv_catpvn_mg|Perl_sv_catsv|Perl_sv_catsv_mg|Perl_sv_copypv|Perl_sv_force_normal|Perl_sv_insert|Perl_sv_mortalcopy|Perl_sv_nolocking|Perl_sv_pv|Perl_sv_pvbyte|Perl_sv_pvn_force|Perl_sv_pvutf8|Perl_sv_setsv|Perl_sv_taint|Perl_sv_unref|Perl_sv_usepvn|Perl_sv_usepvn_mg|Perl_sv_utf8_upgrade|Perl_to_utf8_fold|P
erl_to_utf8_lower|Perl_to_utf8_title|Perl_to_utf8_upper

but grep.metacpan.org doesn't pull up anything unless I narrow the 
search "to_utf8_title" (design bugs/search limit in seconds) and the 
more trusty grep.cpan.me is down.

So again, I wonder, what is the definition of "b"? Is 
https://perl5.git.perl.org/perl.git/commitdiff/607313a19740cb756ab98d5e58e6040ea8c125d4 
correct and exactly how mathom symbols are supposed to be used in 
fallback mode and "b" always means exported from binary unless 
NO_MATHOMS? or does "m" always mean "never exported" regardless of any 
other build choices and XS-Apitest and any CPAN code is wrong?

A decision must be made for 5.28.

[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
               category=core
               severity=low
---
Site configuration information for perl 5.27.9:

Configured by Administrator at Tue Jan 30 20:34:30 2018.

Summary of my perl5 (revision 5 version 27 subversion 9) configuration:

             Platform:
               osname=MSWin32
               osvers=5.2.3790
               archname=MSWin32-x86-multi-thread
               uname=''
               config_args='undef'
               hint=recommended
               useposix=true
               d_sigaction=undef
               useithreads=define
               usemultiplicity=define
               use64bitint=undef
               use64bitall=undef
               uselongdouble=undef
               usemymalloc=n
               default_inc_excludes_dot=define
               bincompat5005=undef
             Compiler:
               cc='cl'
               ccflags ='-nologo -GF -W3 -O1 -MD -Zi -DNDEBUG -GL -DWIN32
-D_CONSOLE -DNO_STRICT -D_CRT_SECURE_NO_DEPRECATE
-D_CRT_NONSTDC_NO_DEPRECATE  -DPERL_TEXTMODE_SCRIPTS
-DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DWIN32_NO_REGISTRY'
               optimize='-O1 -MD -Zi -DNDEBUG -GL'
               cppflags='-DWIN32'
               ccversion='15.00.30729.01'
               gccversion=''
               gccosandvers=''
               intsize=4
               longsize=4
               ptrsize=4
               doublesize=8
               byteorder=1234
               doublekind=3
               d_longlong=undef
               longlongsize=8
               d_longdbl=define
               longdblsize=8
               longdblkind=0
               ivtype='long'
               ivsize=4
               nvtype='double'
               nvsize=8
               Off_t='__int64'
               lseeksize=8
               alignbytes=8
               prototype=define
             Linker and Libraries:
               ld='link'
               ldflags ='-nologo -nodefaultlib -debug -opt:ref,icf -ltcg
-libpath:"c:\perl\lib\CORE"        -machine:x86'
               libpth="C:\Program Files (x86)\Microsoft Visual Studio
9.0\VC\lib"
               libs=oldnames.lib kernel32.lib user32.lib gdi32.lib
winspool.lib
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib
netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib version.lib
odbc32.lib odbccp32.lib comctl32.lib msvcrt.lib
               perllibs=oldnames.lib kernel32.lib user32.lib gdi32.lib
winspool.lib
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib
netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib version.lib
odbc32.lib odbccp32.lib comctl32.lib msvcrt.lib
               libc=msvcrt.lib
               so=dll
               useshrplib=true
               libperl=perl527.lib
               gnulibc_version=''
             Dynamic Linking:
               dlsrc=dl_win32.xs
               dlext=dll
               d_dlsymun=undef
               ccdlflags=' '
               cccdlflags=' '
               lddlflags='-dll -nologo -nodefaultlib -debug -opt:ref,icf
-ltcg
               -libpath:"c:\perl\lib\CORE"        -machine:x86'


---
@INC for perl 5.27.9:
               lib
               C:/p527/srcnew/lib

---
Environment for perl 5.27.9:
               CYGWIN=tty
               HOME (unset)
               LANG (unset)
               LANGUAGE (unset)
               LD_LIBRARY_PATH=/usr/lib/x86:/usr/X11R6/lib
               LOGDIR (unset)
               PATH=C:\WINDOWS\system32;C:\Program Files (x86)\Microsoft
Visual
Studio 9.0\VC\BIN;C:\Program Files\Microsoft
SDKs\Windows\v6.0A\bin;C:\Perl\bin;C:\WINDOWS;C:\Program Files
(x86)\Microsoft Visual Studio 9.0\Common7\IDE;C:\Program Files
(x86)\Git\bin;C:\sp3220\c\bin;
               PERL_BADLANG (unset)
               SHELL (unset)


Thread Previous


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