Perl / perl5

🐪 The Perl programming language
https://dev.perl.org/perl5/
Other
1.85k stars 527 forks source link

perlcc can't compile scripts requiring Socket.pm #4895

Closed p5pRT closed 13 years ago

p5pRT commented 22 years ago

Migrated from rt.perl.org#8314 (status was 'resolved')

Searchable as RT8314$

p5pRT commented 22 years ago

From rjhb@bb-c.de

Using a statically linked Perl\, a program compiled with perlcc produces the following message\, if it requires Socket.pm​:

Can't load module Socket\, dynamic loading not available in this perl.   (You may need to build a new perl executable which either supports   dynamic loading or has the Socket module statically linked into it.)

Since Perl has Socket statically linked in\, at least the advice given in parentheses is wrong.

Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration​:   Platform​:   osname=solaris\, osvers=2.8\, archname=sun4-solaris   uname='sunos defx0yag 5.8 generic_108528-11 sun4u sparc sunw\,sun-blade-100 '   config_args=''   hint=recommended\, useposix=true\, d_sigaction=define   usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef   useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef   use64bitint=undef use64bitall=undef uselongdouble=undef   Compiler​:   cc='gcc'\, ccflags ='-fno-strict-aliasing -I/opt/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'\,   optimize='-O4'\,   cppflags='-fno-strict-aliasing -I/opt/local/include'   ccversion=''\, gccversion='2.95.3 20010315 (release)'\, gccosandvers='solaris2.8'   intsize=4\, longsize=4\, ptrsize=4\, doublesize=8\, byteorder=4321   d_longlong=define\, longlongsize=8\, d_longdbl=define\, longdblsize=16   ivtype='long'\, ivsize=4\, nvtype='double'\, nvsize=8\, Off_t='off_t'\, lseeksize=8   alignbytes=8\, usemymalloc=y\, prototype=define   Linker and Libraries​:   ld='ld'\, ldflags =' -L/opt/local/lib '   libpth=/opt/local/lib /usr/lib /usr/ccs/lib   libs=-lsocket -lnsl -ldl -lm -lc   perllibs=-lsocket -lnsl -ldl -lm -lc   libc=/lib/libc.so\, so=so\, useshrplib=false\, libperl=libperl..a   Dynamic Linking​:   dlsrc=dl_none.xs\, dlext=none\, d_dlsymun=undef\, ccdlflags=''   cccdlflags=''\, lddlflags=''

Characteristics of this binary (from libperl)​:   Compile-time options​: USE_LARGE_FILES   Built under solaris   Compiled at Jan 15 2002 15​:56​:52   @​INC​:   /opt/SXperl-static/lib/5.6.1/sun4-solaris   /opt/SXperl-static/lib/5.6.1   /opt/SXperl-static/lib/site_perl/5.6.1/sun4-solaris   /opt/SXperl-static/lib/site_perl/5.6.1   /opt/SXperl-static/lib/site_perl   .


Rainer J. H. Brandt email​: rjhb@​bb-c.de Brandt & Brandt Computer GmbH web​: www.bb-c.de Voißeler Straße 12a phone​: +49 2441 779891 D 53925 Kall mobile​: +49 172 9593205

p5pRT commented 22 years ago

From @simoncozens

On Tue\, Jan 22\, 2002 at 04​:04​:21PM +0100\, Rainer Brandt wrote​:

Using a statically linked Perl\, a program compiled with perlcc produces the following message\, if it requires Socket.pm​:

Can't load module Socket\, dynamic loading not available in this perl. (You may need to build a new perl executable which either supports dynamic loading or has the Socket module statically linked into it.)

Since Perl has Socket statically linked in\, at least the advice given in parentheses is wrong.

Sort of. perlcc works by compiling your program to an op tree structure\, dumping that out as a C data structure\, and then embedding a Perl interpreter which loads up that op tree and runs it. So the "this perl" it's talking about is not /usr/bin/perl (which *does* have Socket statically linked in) but the embedded Perl interpreter that perlcc has put into your compiled file\, which doesn't have support for dynamic loading.

This seems odd\, and if it's true\, it's a problem with B​::C\, which should write out an xs_init function which loads DynaLoader.

-- "Contrariwise\," continued Tweedledee\, "if it was so\, it might be\, and if it were so\, it would be; but as it isn't\, it ain't. That's logic!"   -- Lewis Carroll\, "Through the Looking Glass"

p5pRT commented 17 years ago

@smpeters - Status changed from 'open' to 'stalled'

p5pRT commented 13 years ago

From @gannett-ggreer

The Perl Compiler is now maintained outside of the Perl core distribution. Please try out the updates from CPAN at​:

http​://search.cpan.org/dist/B-C/

If you still have trouble\, please file tickets on the bug tracker for the project\, which appears to be​:

http​://code.google.com/p/perl-compiler/issues/list

-- George Greer

p5pRT commented 13 years ago

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

p5pRT commented 13 years ago

@gannett-ggreer - Status changed from 'open' to 'resolved'