Skip to content
This repository has been archived by the owner on Oct 1, 2024. It is now read-only.

Install of mono 5.18.0.268 on 64-bit Solaris 11/x86 (x86_64-pc-solaris2.11) with gcc 4.8.2 failed #268

Closed
polonia opened this issue Mar 14, 2019 · 1 comment

Comments

@polonia
Copy link

polonia commented Mar 14, 2019

I downloaded the last mono tar to Solaris 11
I install the required packages:

# pkg install autoconf
# pkg install automake
# pkg install libtool
# pkg install gcc

When I tried to configure mono 5.18.0.268 on 64-bit Solaris 11/x86 (x86_64-pc-solaris2.11) with gcc 4.8.2, it failed
like this:
$ ./autogen.sh

(...)
checking for PTHREAD_MUTEX_RECURSIVE... no
configure: error: Posix system lacks support for recursive mutexes

I changed the "D_XOPEN_SOURCE=500" to "D_XOPEN_SOURCE=600" in the configure.ac with no improvement

        dnl *****************************
        dnl *** Checks for libxnet    ***
        dnl *****************************
        case "${host}" in
                *solaris* )
                        AC_MSG_CHECKING(for Solaris XPG4 support)
                        if test -f /usr/lib/libxnet.so; then
                                CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=600 -std=c99"
                                CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
                                CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED=1"
                                LIBS="$LIBS -lxnet"
                                AC_MSG_RESULT(yes)
                        else
                                AC_MSG_RESULT(no)
                        fi

I am aware of the Bug 31999 - C99 and XPG5 don't match on Solaris 10+
https://bugzilla.xamarin.com/show_bug.cgi?id=31999

Acording to Oracle documentation, Solaris 11 supports thread mutex using Oracle Solaris Threads and POSIX pthreads API. Some functions are:

Oracle Solaris Threads POSIX pthreads
mutex_lock() pthread_mutex_lock()
mutex_unlock() pthread_mutex_unlock()
mutex_trylock() pthread_mutex_trylock()
mutex_init() pthread_mutex_init()
mutex_destroy() pthread_mutex_destroy()
- pthread_mutexattr_init()
- pthread_mutexattr_destroy()
type argument in mutex_init() pthread_mutexattr_setpshared()
- pthread_mutexattr_getpshared()
- pthread_mutex_attr_settype()
- pthread_mutex_attr_gettype()

More details in:
https://docs.oracle.com/cd/E53394_01/html/E54803/sthreads-96692.html

I run

$ grep PTHREAD_MUTEX_RECURSIVE /usr/include/*
/usr/include/pthread.h:#define	PTHREAD_MUTEX_RECURSIVE		0x4
@Therzok
Copy link
Contributor

Therzok commented Mar 21, 2019

Issue moved to mono/mono #13583 via ZenHub

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants