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

5.6.0 RC1 failure in Solaris 7 gcc with threads #1298

Closed
p5pRT opened this issue Mar 9, 2000 · 2 comments
Closed

5.6.0 RC1 failure in Solaris 7 gcc with threads #1298

p5pRT opened this issue Mar 9, 2000 · 2 comments

Comments

@p5pRT
Copy link

p5pRT commented Mar 9, 2000

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

Searchable as RT2299$

@p5pRT
Copy link
Author

p5pRT commented Mar 9, 2000

From @jhi

Created by jhi@ugli.hut.fi

This report has been sent using Linux' 5.6.0 RC1 perlbug, I replaced
the config info (the one below "[Please do not change anything below
his line]" :-) with the "./myconfig" output from the failing Solaris
build.

What happens​:

mimosa​:/tmp/jhi/perl-5.6.0-RC1 ; make
`sh cflags libperl.a miniperlmain.o` miniperlmain.c
  CCCMD = gcc -DPERL_CORE -c -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O
miniperlmain.c​: In function `main'​:
miniperlmain.c​:40​: `thr' undeclared (first use in this function)
miniperlmain.c​:40​: (Each undeclared identifier is reported only once
miniperlmain.c​:40​: for each function it appears in.)
make​: *** [miniperlmain.o] Error 1
mimosa​:/tmp/jhi/perl-5.6.0-RC1 ;

Perl Info


Site configuration information for perl v5.6.0:

Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration:
  Platform:
    osname=solaris, osvers=2.7, archname=sun4-solaris-thread-64int
    uname='sunos mimosa.hut.fi 5.7 generic_106541-05 sun4u sparc '
    config_args='-ders -Dcc=gcc -Duse64bitint -Dusethreads -Duse5005threads'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=define use5005threads=define useithreads=undef usemultiplicity=undef
    useperlio=undef d_sfio=undef uselargefiles=define
    use64bitint=define use64bitall=undef uselongdouble=undef usesocks=undef
  Compiler:
    cc='gcc', optimize='-O', gccversion=2.8.1
    cppflags='-D_REENTRANT'
    ccflags ='-D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
    stdchar='char', d_stdstdio=define, usevfork=false
    intsize=4, longsize=4, ptrsize=4, doublesize=8
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=8, usemymalloc=y, prototype=define
  Linker and Libraries:
    ld='gcc', ldflags =' '
    libpth=/lib /usr/lib /usr/ccs/lib
    libs=-lsocket -lnsl -ldl -lm -lposix4 -lpthread -lc -lcrypt -lsec
    libc=, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
    cccdlflags='-fPIC', lddlflags='-G'

Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration:
  Platform:
    osname=linux, osvers=2.2.13, archname=i686-linux-thread-64int
    uname='linux ugli.hut.fi 2.2.13 #14 smp mon oct 25 14:06:55 eet dst 1999 i686 unknown '
    config_args='-ders -Duse64bitint -Dusethreads -Duse5005threads'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=define use5005threads=define useithreads=undef usemultiplicity=undef
    useperlio=undef d_sfio=undef uselargefiles=define 
    use64bitint=define use64bitall=undef uselongdouble=undef usesocks=undef
  Compiler:
    cc='cc', optimize='-O2', gccversion=2.7.2.3
    cppflags='-D_REENTRANT -I/usr/local/include'
    ccflags ='-D_REENTRANT -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
    stdchar='char', d_stdstdio=define, usevfork=false
    intsize=4, longsize=4, ptrsize=4, doublesize=8
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=4
    alignbytes=4, usemymalloc=n, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =''
    libpth=/lib /usr/lib
    libs=-lnsl -lndbm -lgdbm -ldbm -ldb -ldl -lm -lpthread -lc -lposix -lcrypt
    libc=/lib/libc-2.0.7.so, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
    cccdlflags='-fpic', lddlflags='-shared'

Locally applied patches:
    v5.6.0-RC1



@p5pRT
Copy link
Author

p5pRT commented Mar 9, 2000

From @doughera88

On Thu, 9 Mar 2000, Jarkko Hietaniemi wrote​:

What happens​:

mimosa​:/tmp/jhi/perl-5.6.0-RC1 ; make
`sh cflags libperl.a miniperlmain.o` miniperlmain.c
CCCMD = gcc -DPERL_CORE -c -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O
miniperlmain.c​: In function `main'​:
miniperlmain.c​:40​: `thr' undeclared (first use in this function)
miniperlmain.c​:40​: (Each undeclared identifier is reported only once
miniperlmain.c​:40​: for each function it appears in.)

This happens only with the following combination (both on Solaris and Linux,
so I suspect it's quite general)​:

  -Dusethreads -Duse5005thread -Dusemymalloc

The following line in miniperlmain.c​:

  PERL_SYS_INIT3(&argc,&argv,&env);

ultimately gets translated to (line breaks inserted to make mailers happy)

  if ( pthread_mutex_init ( ( & PL_malloc_mutex ) , 0 ) )
  Perl_croak( thr , "panic​: MUTEX_INIT" ) ;

I freely confess not understanding the .THX macros anywhere deeply enough
to suggest the appropriate fix.

If I just omit the croak, Solaris 2.6 passes all tests except the
known-to-fail lib/thread.t test 19.

  Andy Dougherty doughera@​lafayette.edu
  Dept. of Physics
  Lafayette College, Easton PA 18042

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

1 participant