Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

universal.c:1031: undefined reference to `PerlIO_get_layers' #11178

Closed
p5pRT opened this issue Mar 6, 2011 · 4 comments
Closed

universal.c:1031: undefined reference to `PerlIO_get_layers' #11178

p5pRT opened this issue Mar 6, 2011 · 4 comments

Comments

@p5pRT
Copy link

p5pRT commented Mar 6, 2011

Migrated from rt.perl.org#85510 (status was 'open')

Searchable as RT85510$

@p5pRT
Copy link
Author

p5pRT commented Mar 6, 2011

From @rurban

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

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
Perl Info
-----------------------------------------------------------------
---
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)

@p5pRT
Copy link
Author

p5pRT commented Jan 6, 2012

From @cpansprout

On Sun Mar 06 05​:55​:31 2011, rurban wrote​:

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)

Why not?

2. universal.o not linkable because PerlIO_get_layers is not exported
in embed.fcn

Should it be added to makedef.pl (c.f. 3dfd1b5)?

--

Father Chrysostomos

@p5pRT
Copy link
Author

p5pRT commented Jan 6, 2012

The RT System itself - Status changed from 'new' to 'open'

@toddr
Copy link
Member

toddr commented Jan 31, 2020

Given there is no response since 2012, I'm closing this. If more details are made available, we can re-open it.

@toddr toddr closed this as completed Jan 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants