develooper Front page | perl.perl5.porters | Postings from March 2011

[perl #85510] universal.c:1031: undefined reference to `PerlIO_get_layers'

From:
Reini Urban
Date:
March 6, 2011 05:55
Subject:
[perl #85510] universal.c:1031: undefined reference to `PerlIO_get_layers'
Message ID:
rt-3.6.HEAD-4136-1299419731-1734.85510-75-0@perl.org
# New Ticket Created by  Reini Urban 
# Please include the string:  [perl #85510]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=85510 >


This is a bug report for perl from rurban@x-ray.at,
generated with the help of perlbug 1.39 running under perl 5.12.2.


-----------------------------------------------------------------
Compiling and embedding perl on OS with strict linkers (Win32, AIX, mingw,
and linux/bsd with PERL_DL_NONLAZY) not possible because of:

1. universal.o not included in libperl.a (windows only)
2. universal.o not linkable because PerlIO_get_layers is not exported
   in embed.fcn

Typical failure:

cpan
> look B::C
perl -Mblib -MO=C,-occode16.c -e BEGIN "{ tie @a, __PACKAGE__; sub
TIEARRAY { bless{} } sub FETCH{1} }
print $a[1];"
perl -Mblib script\cc_harness ccode16.c

  ccode16.c:6973: undefined reference to `XS_utf8_is_utf8'

perl -Mblib script\cc_harness ccode16.c
C:\Perl\5.12.2d\lib\MSWin32-x86-multi-thread\CORE\universal.o

  gcc  -g3 -O2 -DDEBUGGING -DWIN32 -DHAVE_DES_FCRYPT
-DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fno-strict-aliasing -mm
s-bitfields -DPERL_MSVCRT_READFIX
-Ic:\perl\5.12.2d\lib\MSWin32-x86-multi-thread/CORE ccode16.c
C:\Perl\5.12.2d\lib\MSWi
n32-x86-multi-thread\CORE\universal.o   -g3
-L"c:\perl\5.12.2d\lib\MSWin32-x86-multi-thread\CORE" -L"D:\MinGW\lib"
C:\Pe
rl\5.12.2d\lib\MSWin32-x86-multi-thread\auto\DynaLoader\DynaLoader.a
C:\Perl\5.12.2d\lib\MSWin32-x86-multi-thread\auto\W
in32CORE\Win32CORE.a
C:\perl\5.12.2d\lib\MSWin32-x86-multi-thread\CORE\libperl512.a
D:\MinGW\lib\libmoldname.a D:\MinGW\
lib\libkernel32.a D:\MinGW\lib\libuser32.a D:\MinGW\lib\libgdi32.a
D:\MinGW\lib\libwinspool.a D:\MinGW\lib\libcomdlg32.a
 D:\MinGW\lib\libadvapi32.a D:\MinGW\lib\libshell32.a
D:\MinGW\lib\libole32.a D:\MinGW\lib\liboleaut32.a D:\MinGW\lib\li
bnetapi32.a D:\MinGW\lib\libuuid.a D:\MinGW\lib\libws2_32.a
D:\MinGW\lib\libmpr.a D:\MinGW\lib\libwinmm.a D:\MinGW\lib\l
ibversion.a D:\MinGW\lib\libodbc32.a D:\MinGW\lib\libodbccp32.a
D:\MinGW\lib\libcomctl32.a

C:\Perl\5.12.2d\lib\MSWin32-x86-multi-thread\CORE\universal.o: In
function `XS_PerlIO_get_layers':
N:/usr/src/perl/perl-5.12.0/perl-5.12.2/win32/../universal.c:1031:
undefined reference to `PerlIO_get_layers'
collect2: ld returned 1 exit status

-----------------------------------------------------------------
---
Flags:
    category=core
    severity=high
---
Site configuration information for perl 5.12.2:

Configured by urbanr at Thu Dec 16 13:18:36 2010.

Summary of my perl5 (revision 5 version 12 subversion 2) configuration:

  Platform:
    osname=MSWin32, osvers=6.1, archname=MSWin32-x86-multi-thread
    uname=''
    config_args='undef'
    hint=recommended, useposix=true, d_sigaction=undef
    useithreads=define, usemultiplicity=define
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=undef, use64bitall=undef, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='gcc', ccflags =' -g3 -O2 -DDEBUGGING -DWIN32 -DHAVE_DES_FCRYPT
 -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fno-strict-aliasing
-mms-bitfields -DPERL_MSVCRT_READFIX',
    optimize='-g3 -O2 -DDEBUGGING',
    cppflags='-DWIN32'
    ccversion='', gccversion='3.4.5', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='long
long', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='g++', ldflags ='-g3
-L"c:\perl\5.12.2d\lib\MSWin32-x86-multi-thread\CORE"
-L"D:\MinGW\lib"'
    libpth=D:\MinGW\lib
    libs= -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32
-ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32
-lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32
    perllibs= -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool
-lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid
-lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32
    libc=, so=dll, useshrplib=true, libperl=libperl512.a
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
    cccdlflags=' ', lddlflags='-mdll -g3
-L"c:\perl\5.12.2d\lib\MSWin32-x86-multi-thread\CORE"
-L"D:\MinGW\lib"'

Locally applied patches:


---
@INC for perl 5.12.2:
    C:\perl\site\5.12.2d\lib/MSWin32-x86-multi-thread
    C:\perl\site\5.12.2d\lib
    c:/Perl/5.12.2d/lib/MSWin32-x86-multi-thread
    c:/Perl/5.12.2d/lib
    .

---
Environment for perl 5.12.2:
    HOME (unset)
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=c:\windows\system32;c:\windows;c:\Perl\5.12.2d\bin\MSWin32-x86-multi-thread;c:\Perl\5.12.2d\bin;c:\strawberry\c\bin;d:\cygwin\bin
    PERL5LIB=C:\perl\site\5.12.2d\lib
    PERL_BADLANG (unset)
    SHELL (unset)

-- 
Reini Urban
http://phpwiki.org/           http://murbreak.at/




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