mono / gtk-sharp

Gtk# is a Mono/.NET binding to the cross platform Gtk+ GUI toolkit and the foundation of most GUI apps built with Mono
http://www.mono-project.com/GtkSharp
Other
424 stars 140 forks source link

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 closed 5 years ago

polonia commented 5 years ago

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 commented 5 years ago

Issue moved to mono/mono #13583 via ZenHub