Bug 29494 - [4.2/4.3 Regression] libgomp build fails with missing pthread_mutexattr_settype
Summary: [4.2/4.3 Regression] libgomp build fails with missing pthread_mutexattr_settype
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: libgomp (show other bugs)
Version: 4.2.0
: P3 normal
Target Milestone: 4.2.0
Assignee: Eric Botcazou
URL: http://gcc.gnu.org/ml/gcc-patches/200...
Keywords: build
Depends on:
Blocks:
 
Reported: 2006-10-18 03:01 UTC by Rodney Brown
Modified: 2006-10-27 04:38 UTC (History)
2 users (show)

See Also:
Host: sparc-sun-solaris2.6
Target: sparc-sun-solaris2.6
Build: sparc-sun-solaris2.6
Known to work:
Known to fail:
Last reconfirmed: 2006-10-21 08:08:43


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rodney Brown 2006-10-18 03:01:11 UTC
libgomp fails to build on Solaris 2.6 because it lacks pthread_mutexattr_settype
and PTHREAD_MUTEX_EXCLUSIVE in "@(#)pthread.h  1.16    97/05/05 SMI".
Solaris 2.8 "@(#)pthread.h  1.28    99/11/15 SMI" has the function and define.

/devel/src/gcc-4.2-20060930.obj/./gcc/xgcc -B/devel/src/gcc-4.2-20060930.obj/./gcc/ -B/usr/local/sparc-sun-solaris2.6/bin/   -B/usr/local/sparc-sun-solaris2.6/lib/
 -isystem /usr/local/sparc-sun-solaris2.6/include
 -isystem /usr/local/sparc-sun-solaris2.6/sys-include -DHAVE_CONFIG_H
 -I. -I../../../gcc-4.2-20060930/libgomp -I. -I../../../gcc-4.2-20060930/libgomp/config/posix  -I../../../gcc-4.2-20060930/libgomp
 -Wall -Werror -O2 -g -O2 -MT 
lock.lo -MD -MP -MF .deps/lock.Tpo -c ../../../gcc-4.2-20060930/libgomp/config/posix/lock.c  -fPIC -DPIC -o .libs/lock.o
cc1: warnings being treated as errors
../../../gcc-4.2-20060930/libgomp/config/posix/lock.c: In function 'omp_init_nest_lock':
../../../gcc-4.2-20060930/libgomp/config/posix/lock.c:78: warning: implicit declaration of function 'pthread_mutexattr_settype'
../../../gcc-4.2-20060930/libgomp/config/posix/lock.c:78: error: 'PTHREAD_MUTEX_RECURSIVE' undeclared (first use in this function)
../../../gcc-4.2-20060930/libgomp/config/posix/lock.c:78: error: (Each undeclared identifier is reported only once
../../../gcc-4.2-20060930/libgomp/config/posix/lock.c:78: error: for each function it appears in.)
make[4]: *** [lock.lo] Error 1
Comment 1 Eric Botcazou 2006-10-18 05:18:32 UTC
Right, bootstrap has been broken because of that for ages.

I've pinged the patch many times but to no avail...
Comment 2 Rodney Brown 2006-10-18 22:54:59 UTC
(In reply to comment #1)
> Right, bootstrap has been broken because of that for ages.
> 
> I've pinged the patch many times but to no avail...
> 

Eric's patch is http://gcc.gnu.org/ml/gcc-patches/2006-02/msg01300.html
Comment 3 Eric Botcazou 2006-10-19 04:49:03 UTC
> Eric's patch is http://gcc.gnu.org/ml/gcc-patches/2006-02/msg01300.html

Right, but the info is already in the "Patch URL" field.
Comment 4 Eric Botcazou 2006-10-24 13:59:21 UTC
Subject: Bug 29494

Author: ebotcazou
Date: Tue Oct 24 13:59:06 2006
New Revision: 118004

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=118004
Log:
	PR libgomp/29494
	* configure.tgt: Use posix95 configuration for Solaris 2.5.1 and 2.6.
	* config/posix95: New directory.
	* config/posix95/omp-lock.h: New file.
	* config/posix95/lock.c: Likewise.


Added:
    trunk/libgomp/config/posix95/
    trunk/libgomp/config/posix95/lock.c
    trunk/libgomp/config/posix95/omp-lock.h
Modified:
    trunk/libgomp/ChangeLog
    trunk/libgomp/configure.tgt

Comment 5 Eric Botcazou 2006-10-24 13:59:50 UTC
Subject: Bug 29494

Author: ebotcazou
Date: Tue Oct 24 13:59:39 2006
New Revision: 118005

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=118005
Log:
	PR libgomp/29494
	* configure.tgt: Use posix95 configuration for Solaris 2.5.1 and 2.6.
	* config/posix95: New directory.
	* config/posix95/omp-lock.h: New file.
	* config/posix95/lock.c: Likewise.


Added:
    branches/gcc-4_2-branch/libgomp/config/posix95/
    branches/gcc-4_2-branch/libgomp/config/posix95/lock.c
    branches/gcc-4_2-branch/libgomp/config/posix95/omp-lock.h
Modified:
    branches/gcc-4_2-branch/libgomp/ChangeLog
    branches/gcc-4_2-branch/libgomp/configure.tgt

Comment 6 Eric Botcazou 2006-10-24 14:01:19 UTC
Fixed everywhere.  My latest results on SPARC/Solaris 2.6 are:

		=== libgomp tests ===


Running target unix
WARNING: program timed out.
FAIL: libgomp.c/appendix-a/a.18.1.c execution test
WARNING: program timed out.
FAIL: libgomp.fortran/appendix-a/a.18.1.f90  -O0  execution test
WARNING: program timed out.
FAIL: libgomp.fortran/appendix-a/a.18.1.f90  -O1  execution test
WARNING: program timed out.
FAIL: libgomp.fortran/appendix-a/a.18.1.f90  -O2  execution test
WARNING: program timed out.
FAIL: libgomp.fortran/appendix-a/a.18.1.f90  -O3 -fomit-frame-pointer  execution test
WARNING: program timed out.
FAIL: libgomp.fortran/appendix-a/a.18.1.f90  -O3 -fomit-frame-pointer -funroll-loops  execution test
WARNING: program timed out.
FAIL: libgomp.fortran/appendix-a/a.18.1.f90  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  execution test
WARNING: program timed out.
FAIL: libgomp.fortran/appendix-a/a.18.1.f90  -O3 -g  execution test
WARNING: program timed out.
FAIL: libgomp.fortran/appendix-a/a.18.1.f90  -Os  execution test

		=== libgomp Summary ===

# of expected passes		1285
# of unexpected failures	9
# of unsupported tests		118
Comment 7 Jerry DeLisle 2006-10-27 00:55:17 UTC
Subject: Re:  [4.2/4.3 Regression] libgomp build fails with
 missing pthread_mutexattr_settype

Am I missing something here?
I am getting this with make check for libgomp on i686-linux on 4.2 branch:

Using /usr/share/dejagnu/config/unix.exp as generic interface file for target.
WARNING: Couldn't find tool config file for unix, using default.
Running /home/jerry/gcc/gcc42/libgomp/testsuite/libgomp.c/c.exp ...
FAIL: libgomp.c/appendix-a/a.18.1.c (test for excess errors)
WARNING: libgomp.c/appendix-a/a.18.1.c compilation failed to produce executable
FAIL: libgomp.c/appendix-a/a.2.1.c (test for excess errors)
WARNING: libgomp.c/appendix-a/a.2.1.c compilation failed to produce executable
FAIL: libgomp.c/appendix-a/a.33.3.c (test for excess errors)
FAIL: libgomp.c/appendix-a/a.36.1.c (test for excess errors)
WARNING: libgomp.c/appendix-a/a.36.1.c compilation failed to produce executable
FAIL: libgomp.c/appendix-a/a.39.1.c (test for excess errors)
WARNING: libgomp.c/appendix-a/a.39.1.c compilation failed to produce executable
FAIL: libgomp.c/appendix-a/a.4.1.c (test for excess errors)
WARNING: libgomp.c/appendix-a/a.4.1.c compilation failed to produce executable
FAIL: libgomp.c/appendix-a/a.40.1.c (test for excess errors)
FAIL: libgomp.c/appendix-a/a.5.1.c (test for excess errors)
WARNING: libgomp.c/appendix-a/a.5.1.c compilation failed to produce executable
FAIL: libgomp.c/barrier-1.c (test for excess errors)
WARNING: libgomp.c/barrier-1.c compilation failed to produce executable
FAIL: libgomp.c/copyin-1.c (test for excess errors)
WARNING: libgomp.c/copyin-1.c compilation failed to produce executable
FAIL: libgomp.c/copyin-2.c (test for excess errors)
WARNING: libgomp.c/copyin-2.c compilation failed to produce executable
FAIL: libgomp.c/copyin-3.c (test for excess errors)
WARNING: libgomp.c/copyin-3.c compilation failed to produce executable
FAIL: libgomp.c/critical-1.c (test for excess errors)
WARNING: libgomp.c/critical-1.c compilation failed to produce executable
FAIL: libgomp.c/critical-2.c (test for excess errors)
WARNING: libgomp.c/critical-2.c compilation failed to produce executable
FAIL: libgomp.c/lib-1.c (test for excess errors)
WARNING: libgomp.c/lib-1.c compilation failed to produce executable
FAIL: libgomp.c/loop-1.c (test for excess errors)
WARNING: libgomp.c/loop-1.c compilation failed to produce executable
FAIL: libgomp.c/loop-2.c (test for excess errors)
WARNING: libgomp.c/loop-2.c compilation failed to produce executable
FAIL: libgomp.c/nested-1.c (test for excess errors)
WARNING: libgomp.c/nested-1.c compilation failed to produce executable
FAIL: libgomp.c/nested-2.c (test for excess errors)
WARNING: libgomp.c/nested-2.c compilation failed to produce executable
FAIL: libgomp.c/nestedfn-1.c (test for excess errors)
WARNING: libgomp.c/nestedfn-1.c compilation failed to produce executable
FAIL: libgomp.c/nestedfn-3.c (test for excess errors)
WARNING: libgomp.c/nestedfn-3.c compilation failed to produce executable
FAIL: libgomp.c/nestedfn-4.c (test for excess errors)
WARNING: libgomp.c/nestedfn-4.c compilation failed to produce executable
FAIL: libgomp.c/omp-loop01.c (test for excess errors)
WARNING: libgomp.c/omp-loop01.c compilation failed to produce executable
FAIL: libgomp.c/omp-loop02.c (test for excess errors)
WARNING: libgomp.c/omp-loop02.c compilation failed to produce executable
FAIL: libgomp.c/omp-parallel-if.c (test for excess errors)
WARNING: libgomp.c/omp-parallel-if.c compilation failed to produce executable
FAIL: libgomp.c/omp-single-2.c (test for excess errors)
WARNING: libgomp.c/omp-single-2.c compilation failed to produce executable
FAIL: libgomp.c/omp_hello.c (test for excess errors)
WARNING: libgomp.c/omp_hello.c compilation failed to produce executable
FAIL: libgomp.c/omp_matvec.c (test for excess errors)
WARNING: libgomp.c/omp_matvec.c compilation failed to produce executable
FAIL: libgomp.c/omp_orphan.c (test for excess errors)
WARNING: libgomp.c/omp_orphan.c compilation failed to produce executable
FAIL: libgomp.c/omp_reduction.c (test for excess errors)
WARNING: libgomp.c/omp_reduction.c compilation failed to produce executable
FAIL: libgomp.c/omp_workshare1.c (test for excess errors)
WARNING: libgomp.c/omp_workshare1.c compilation failed to produce executable
FAIL: libgomp.c/omp_workshare2.c (test for excess errors)
WARNING: libgomp.c/omp_workshare2.c compilation failed to produce executable
FAIL: libgomp.c/omp_workshare3.c (test for excess errors)
FAIL: libgomp.c/omp_workshare4.c (test for excess errors)
WARNING: libgomp.c/omp_workshare4.c compilation failed to produce executable
FAIL: libgomp.c/ordered-1.c (test for excess errors)
WARNING: libgomp.c/ordered-1.c compilation failed to produce executable
FAIL: libgomp.c/ordered-2.c (test for excess errors)
WARNING: libgomp.c/ordered-2.c compilation failed to produce executable
FAIL: libgomp.c/parallel-1.c (test for excess errors)
WARNING: libgomp.c/parallel-1.c compilation failed to produce executable
FAIL: libgomp.c/reduction-1.c (test for excess errors)
WARNING: libgomp.c/reduction-1.c compilation failed to produce executable
FAIL: libgomp.c/reduction-2.c (test for excess errors)
WARNING: libgomp.c/reduction-2.c compilation failed to produce executable
FAIL: libgomp.c/reduction-3.c (test for excess errors)
WARNING: libgomp.c/reduction-3.c compilation failed to produce executable
FAIL: libgomp.c/reduction-4.c (test for excess errors)
WARNING: libgomp.c/reduction-4.c compilation failed to produce executable
FAIL: libgomp.c/sections-1.c (test for excess errors)
WARNING: libgomp.c/sections-1.c compilation failed to produce executable
FAIL: libgomp.c/shared-2.c (test for excess errors)
WARNING: libgomp.c/shared-2.c compilation failed to produce executable
FAIL: libgomp.c/single-1.c (test for excess errors)
WARNING: libgomp.c/single-1.c compilation failed to produce executable
FAIL: libgomp.c/vla-1.c (test for excess errors)
WARNING: libgomp.c/vla-1.c compilation failed to produce executable
Running /home/jerry/gcc/gcc42/libgomp/testsuite/libgomp.c++/c++.exp ...
Running /home/jerry/gcc/gcc42/libgomp/testsuite/libgomp.fortran/fortran.exp ...

                 === libgomp Summary ===

# of expected passes            58
# of unexpected failures        45
Comment 8 Jerry DeLisle 2006-10-27 01:01:07 UTC
I have no failures on 4.3 only on 4.2 branch
Comment 9 Eric Botcazou 2006-10-27 04:32:38 UTC
> Am I missing something here?

Definitely. :-)  This PR is about SPARC/Solaris 2.6 only.

> I am getting this with make check for libgomp on i686-linux on 4.2 branch:

Then open a new PR.
Comment 10 Jerry DeLisle 2006-10-27 04:38:18 UTC
:) Andrew is going to see if he can duplicate and if so we will open a new PR.