Perl / perl5

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

Not OK: v5.7.0 on alpha-dec_osf-thread-multi #2592

Closed p5pRT closed 20 years ago

p5pRT commented 23 years ago

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

Searchable as RT4263$

p5pRT commented 23 years ago

From spider@web.zk3.dec.com

The perl -V output isn't really available\, but the ./myconfig output is appended. The attempt to make lib/Config.pm fails. I'm not sure exactly why\, although I do know that the search for CONFIGDOTSH in the resulting file wound up with unrelated crap in '$marker' inside the generated configpm.tmp file. This is with -Duseithreads.

  --s.

./myconfig output​: Summary of my perl5 (revision 5.0 version 7 subversion 0) configuration​:   Platform​:   osname=dec_osf\, osvers=5.1\, archname=alpha-dec_osf-thread-multi   uname='osf1 peano.zk3.dec.com x5.1 717 alpha '   config_args='-dsEO -Dusedevel -Darchlib=/local/opt/perl/lib/5.7.0/alpha-dec_osf-thread-multi -Darchname=alpha-dec_osf-thread-multi -Dbin=/local/bin/tmexp -Dbinexp=/local/bin/tmexp -Dcc=cc -Dccflags=-std -pthread -I/usr/local/include -DDEBUGGING -DDEBUGGING_OPS -D_INTRINSICS -D_INLINE_INTRINSICS -Drand=__random -Dsrand=__srandom -DUSE_PERL_SBRK -DPERL_SBRK_VIA_MALLOC -DEMBEDMYMALLOC= -fprm d -ieee -Ud_bincompat3 -Ud_bincompat5005 -Dd_dosuid=define -Dinc_version_list= -Uinc_version_list_init= -Dinstallbin=/local/OSF1/alpha/bin/tmexp -Uinstallstyle= -Dlddlflags=-shared -msym -expect_unresolved "*" -g3 -O4 -std -Dldflags=-std -msym -g3 -O4 -Dlibswanted=sfio gdbm pthread m exc iconv -Ulibsfiles= -Ulibsfound= -Dman1dir=/local/man/man1 -Dman1ext=1 -Dman3dir=/local/man/man3 -Dman3ext=3pl -Doptimize=-g3 -O4 -Dpager=/local/bin/less -Dprefix=/local/opt/perl -Dscriptdir=/local/share/tmexp -Dsitebin=/local/opt/perl/lib/5.7.0/alpha-dec_osf-thread-multi/bin -Dsitevers=5.7.0 -Usitebine! xp= -Uinstallsitebin= -Dsitelib=/local/opt/perl/lib/site_perl/5.7.0 -Dsitearch=/local/opt/perl/lib/site_perl/5.7.0/alpha-dec_osf-thread-multi -Duseshrplib -Ud_safemcpy= -Ud_sfio= -Ui_dbm -Uinstallarchlib= -Uinstallprivlib= -Uinstallscript= -Uinstallsitearch= -Uinstallsitelib= -Uinstallusrbinperl -Ulibs= -Uperlpath= -Uprivlib= -Urandbits= -Dusethreads -Dlibperl=libperlshr.so -Dusemymalloc=y -Duseithreads -e'   hint=recommended\, useposix=true\, d_sigaction=define   usethreads=define use5005threads=undef useithreads=define usemultiplicity=define   useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef   use64bitint=define use64bitall=define uselongdouble=undef   Compiler​:   cc='cc'\, ccflags ='-std -pthread -I/usr/local/include -DDEBUGGING -DDEBUGGING_OPS -D_INTRINSICS -D_INLINE_INTRINSICS -Drand=__random -Dsrand=__srandom -DUSE_PERL_SBRK -DPERL_SBRK_VIA_MALLOC -DEMBEDMYMALLOC= -fprm d -ieee'\, optimize='-g3 -O4'\, cppflags='-std -pthread -I/usr/local/include -DDEBUGGING -DDEBUGGING_OPS -D_INTRINSICS -D_INLINE_INTRINSICS -Drand=__random -Dsrand=__srandom -DUSE_PERL_SBRK -DPERL_SBRK_VIA_MALLOC -DEMBEDMYMALLOC= -ieee'   ccversion=''\, gccversion=''\, gccosandvers=''   intsize=4\, longsize=8\, ptrsize=8\, doublesize=8\, byteorder=12345678   d_longlong=define\, longlongsize=8\, d_longdbl=define\, longdblsize=16   ivtype='long'\, ivsize=8\, nvtype='double'\, nvsize=8\, Off_t='off_t'\, lseeksize=8   alignbytes=8\, usemymalloc=y\, prototype=define   Linker and Libraries​:   ld='ld'\, ldflags ='-std -msym -g3 -O4'   libpth=/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /var/shlib   libs=-lpthread -lm -lexc -liconv   libc=/usr/shlib/libc.so\, so=so\, useshrplib=true\, libperl=libperlshr.so   Dynamic Linking​:   dlsrc=dl_dlopen.xs\, dlext=so\, d_dlsymun=undef\, ccdlflags=' -Wl\,-rpath\,/local/opt/perl/lib/5.7.0/alpha-dec_osf-thread-multi/CORE'   cccdlflags=' '\, lddlflags='-shared -msym -expect_unresolved "*" -g3 -O4 -std'

p5pRT commented 23 years ago

From @jhi

On Fri\, Sep 08\, 2000 at 01​:30​:27AM -0400\, Spider Boardman wrote​:

On Thu\, 07 Sep 2000 18​:35​:18 -0400\, I wrote​:

sb> On Thu\, 07 Sep 2000 18​:12​:11 -0400\, I wrote​: The attempt to sb> make lib/Config.pm fails. I'm not sure exactly why\, although sb> I do know that the search for CONFIGDOTSH in the resulting sb> file wound up with unrelated crap in '$marker' inside the sb> generated configpm.tmp file.

sb> The "unrelated crap" is the last string constant in the sb> configpm script\, and it's really passed to Config​::FETCH as sb> $_[1]. I still don't know why\, but it smells bad.

OK\, it's because of the attempt to optimize hash keys into shared strings\, and it (apparently) only fails for -Duseithreads. The following patch fixes it. The first portion of the patch was

Applied\, thanks. Incidentally\, shouldn't ithreads and threads5005 result in different archnames?

p5pRT commented 23 years ago

From @jhi

On Fri\, Sep 08\, 2000 at 10​:50​:02AM -0400\, Spider Boardman wrote​:

On Fri\, 8 Sep 2000 09​:41​:30 -0500\, Jarkko Hietaniemi wrote (in part)​:

jhi> Incidentally\, shouldn't ithreads and threads5005 result in jhi> different archnames?

Yes\, they should. Right now\, if you don't use -Dusemultiplicity (what a typo-prone string!) with 5005threads\, they accidentally do\, since ithreads will give you "-thread-multi" and 5005threads will only give you "-thread". However\, that's still an accident waiting to happen. I'd prefer to see "-ithread" be what gets added for -Duseithreads (or\, really\, in the absence of -Duse5005threads\, considering the defaults).

The downside of changing the archname would be binary incompatibility.

p5pRT commented 23 years ago

From @doughera88

On Tue\, 12 Sep 2000\, Spider Boardman wrote​:

On Tue\, 12 Sep 2000 08​:03​:56 -0500\, Jarkko Hietaniemi wrote (in part)​:

[regarding -Dusethreads always using "-thread" whether "-Duseithreads" or "-Duse5005threads"]

jhi> The downside of changing the archname would be binary jhi> incompatibility.

Not changing the archname also has a binary compatibility issue.

The two names were supposed to be temporary. One or the other of the two threading models is supposed to disappear. Soon. That's mostly why I hadn't worried about such issues when I first introduced the names.

If indeed the current state may persist indefinitely\, then we do indeed need to give different archnames. I'd suggest -thread and -5thread (since the 5.005 version is NOT the default\, it should get the longer name).

p5pRT commented 23 years ago

From @gsar

On Tue\, 12 Sep 2000 12​:19​:43 EDT\, Spider Boardman wrote​:

On Tue\, 12 Sep 2000 08​:03​:56 -0500\, Jarkko Hietaniemi wrote (in part)​:

[regarding -Dusethreads always using "-thread" whether "-Duseithreads" or "-Duse5005threads"]

jhi> The downside of changing the archname would be binary jhi> incompatibility.

Yes\, but consider this​:

./Configure -Dusethreads -Duseithreads -e make all test install ... install some CPAN modules with XS components ... make distclean ./Configure -Dusethreads -Duse5005threads -Dusemultiplicity make all test install ... try using those CPAN modules ...

Not changing the archname also has a binary compatibility issue.

Maybe so\, but the other is the more serious incompatibility because it breaks existing binary distributions. And though the 5005threads+multiplicity combination builds\, I'm not willing to bet that it actually works. ;-)

I'd agree it should probably have been called ithread though\, but it is too late to change it for 5.6.x. If 5.8 will break bincompat in any case\, then we could change it there.

Sarathy gsar@​ActiveState.com