-
Notifications
You must be signed in to change notification settings - Fork 3
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
Problems w/ ___errno on Solaris #112
Comments
This issue is (of course) not present with "-pthreads" since then Looking deeper, the problem is only with "-network=smp" or "udp", but not "ibv". While sticking with For the record, compiling the following confirms that it is only
|
AMDG On 03/02/2015 03:42 PM, Paul H. Hargrove wrote:
This really doesn't make sense to me. Does clang really In Christ, |
Steven, First, I need to make a correction:
it is clang:
|
Looking at the code, I see lots of:
All of them are like this, except for Solaris:
|
More on this here http://newsgroups.derkeiler.com/Archive/Comp/comp.programming.threads/2006-09/msg00018.html And this post for gcc suggests that _REENTRANT is needed for Solaris thread? Note that GCC has this for Solaris:
|
And GCC also condition _REENTRANT on -pthreads
|
AMDG On 03/03/2015 11:22 AM, Paul H. Hargrove wrote:
Thank you. That makes a lot more sense. In Christ, |
Paul, can you try the following patch on Solaris. This is the Clang repository.
|
Sure, it will take about 1.5hr to build. FYI: this is on pcp-j-19 and pcp-j-20 located "behind" n2001. -Paul |
Nenad, The patch did as it was intended, and now However, I find the original failure is still present. -Paul |
OK, this is not as simple as expected.
The |
OK, the difference is
The defn So, passing This interesting chain of defines also reveals why Since we don't know if it is safe to modify Here is my test for definitions of
|
I checked GCC and this seems to be defined only for C++
I think we should follow gcc in defining macros in Clang-UPC. Paul, if you can do additional patch:
Paul, if you can please update the master, otherwise I'll do it, unless there are objections. |
Nenad, Your patch is on my TODO list. -Paul |
Nenad, For the record the gcc code you quoted also shows the following three as c++-only:
|
Nenad, The patch to only define I would suggest you also conditionalize the three defines I mentioned in the previous comment to make clang match gcc as closely as possible (even for tokens that haven't yet caused problems). -Paul |
With clang-upc on Solaris/x86 and gcc or cc (Sun/Oracle compiler) as the back-end compiler, I see failures on
upc_io_test.upc
:The problem stems from the following in
/usr/include/errno.h
:It appears that clang (and thus clang-upc2c) defines
_REENTRANT
on Solaris, leading to incompatible differences between the first and second pre-process with respect tothe handling oferrno
.This is odd because clang does not appear to unconditionally pre-define
_REENTRANT
on Linux, Darwin, FreeBSD, NetBSD or OpenBSD. Additionally, neither the vendor compiler nor gcc on Solaris are predefining it. So, this might simply by a side-effect of something that is already a "bug".The text was updated successfully, but these errors were encountered: