Bug 32020 - Don't default to --with-tls=pthread on Solaris/x86
Summary: Don't default to --with-tls=pthread on Solaris/x86
Status: RESOLVED FIXED
Alias: None
Product: Runtime
Classification: Mono
Component: General ()
Version: 4.0.0
Hardware: PC Other
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-07-16 08:22 UTC by Rainer Orth
Modified: 2016-04-11 16:16 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Rainer Orth 2015-07-16 08:22:07 UTC
After an initial build of mono 4.0.2.5 on 64-bit Solaris 11/x86 with --disable-sgen (since that's what I'd needed
with mono 3.2.6 to get a working mono at all), I tried again without to check what happens.  The build aborted here:

usage: mcs [-cdHpVz] [-A file ] [-a string] [-n name] file...
make[6]: *** [build/deps/basic-profile-check.exe] Error 1
*** The compiler 'mcs' doesn't appear to be usable.
*** Trying the 'monolite' directory.
sgen is not supported when using --with-tls=pthread.

When I commented the corresponding clause in configure.ac:

@@ -295,7 +295,7 @@ case "$host" in
 		libmono_cflags="-D_REENTRANT"
 		libgc_threads=pthreads
 		# This doesn't seem to work on solaris/x86, but the configure test runs
-		with_tls=pthread
+		#with_tls=pthread
 		has_dtrace=yes
 		use_sigposix=yes
 		enable_solaris_tar_check=yes

and rebuilt, the build went fine.  Contrary to the the make check results with --with-tls=pthread, where 4
different tests hang hard and had to be killed manually, make check with --with-tls=__thread passed without
those hangs.  I've no idea what this comment above refers to, but I'm not aware of any TLS problems on Solaris 10+,
so this seems ill-conceived.  There were all sorts of problems in Solaris 8 and 9, but both are no longer relevant.

  Rainer
Comment 1 Alex Rønne Petersen 2016-04-11 07:54:59 UTC
Hi,

None of us on the team really test Mono on Solaris regularly, so I'll take your word for it that it works. It's also worth noting that the fallback to pthread TLS was added nearly a decade ago, so it's certainly unlikely that it's needed anymore.

PR: https://github.com/mono/mono/pull/2866
Comment 2 Alex Rønne Petersen 2016-04-11 16:16:13 UTC
PR merged, marking as fixed.