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
Compiling sagelib with clang on OS X (Sierra): failure in cythonized sage/symbolic/expression.pyx #21701
Comments
comment:1
Do you have a clue Ralph? I have a feeling this will require some work |
comment:2
Can you try with |
comment:3
I just noticed that clang is used instead of clang++, that may have an impact. I will try to rectify that and if it doesn't work try what you said. |
comment:4
No luck. Difficult to force
|
comment:5
The first error in the description comes from the following in the generated file
That's how the |
comment:6
Is this Mac or Linux? Please state in the description. |
comment:8
As you can see from https://gcc.gnu.org/onlinedocs/gcc-4.6.3/libstdc++/api/a00344.html the libstdc++ has an |
comment:9
Replying to @rwst:
Then somebody should test if this error happens only on OS X. So the question is: what happens with |
comment:10
Actually, using a command adapted from yours (clang-3.8.0):
So no errors. But I have a full libstdc++ on system. So it is possible that your Xcode version is missing a part of it. |
comment:11
Cannot dismiss that I guess. That would be a big blow on apple's part. |
comment:12
OK it is there: |
comment:13
Even manually adding |
comment:14
My understanding of some C++ matters is shaky at best. Does it make a difference that |
comment:15
Note that the missing Does the exact equivalent exist in your stl_list.h? |
comment:16
It appears to be in the header - which bears a lot of similarities with your link. We are talking about this section?
|
comment:17
Yes. |
comment:18
sage 7.5.beta2 (includes all the stuff we found out so far) and xcode 8.1 on sierra and still a similar kind of error. Different place but same error
|
comment:19
It's different. Before it was list, now it's tree. BTW the warning is fixed in flint git master. |
comment:20
Ah no sorry, different warning, not flint. |
comment:21
The original one had three errors, 2 "list" and one "tree". In any case it is extremely vexing. I need to find a C++ expert that could have a clue. |
comment:22
C++ guru needed... |
comment:23
I don't claim being a tenured C++ guru, but
looks strange. IIRC iterators can be compared for non-equality using merely
with
this still compiles (with gcc), and tests in symbolic/ pass, too. Can you try this with clang? |
comment:24
That appears to be effective, let's see how far I can go with it. |
comment:25
Had a new C/C++ conflict but I was still on 7.5.beta2. Switched to beta3 and rebuilding now. |
comment:43
If I want to test this on OS X, do I just do |
comment:44
Replying to @jhpalmieri:
No. You also need this
Then |
comment:45
I forgot there is one more problem to build sage with clang that is not included in this ticket. The first line |
comment:46
Replying to @kiwifb:
I see no problem because in
this is just a standard container with a standard iterator. Rather, the Pynac interface in |
comment:47
I think it's possible that the code in |
comment:48
Replying to @rwst:
and this is why the 1st chunk of the patch :
is perfectly fine with me, |
comment:49
Replying to @dimpase:
...if no custom operator |
comment:50
Replying to @jdemeyer:
it seems to me that for some |
Reviewer: Jeroen Demeyer |
comment:51
Replying to @dimpase:
It's in the C++ standard library, not Pynac. The fix makes sense to me. It could be that the C++ standard library on OS X is different, but that shouldn't matter here. |
comment:52
claiming co-authorship ;-) |
Changed author from François Bissey to François Bissey, Dima Pasechnik |
comment:53
Honestly, I only typed, so you are very welcome. |
comment:54
On OS X, I get a failure building the Sage library:
|
comment:55
This is after making the changes diff --git a/src/bin/sage-env b/src/bin/sage-env
index 54c0783..fa8c557 100644
--- a/src/bin/sage-env
+++ b/src/bin/sage-env
@@ -528,15 +528,15 @@ if [ "$UNAME" = "Darwin" ]; then
fi
# Override CC, CPP, CXX, FC if the GCC spkg was installed.
-if [ -x "$SAGE_LOCAL/bin/gcc" ]; then
- CC=gcc
-fi
-if [ -x "$SAGE_LOCAL/bin/cpp" ]; then
- CPP=cpp
-fi
-if [ -x "$SAGE_LOCAL/bin/g++" ]; then
- CXX=g++
-fi
+# if [ -x "$SAGE_LOCAL/bin/gcc" ]; then
+# CC=gcc
+# fi
+# if [ -x "$SAGE_LOCAL/bin/cpp" ]; then
+# CPP=cpp
+# fi
+# if [ -x "$SAGE_LOCAL/bin/g++" ]; then
+# CXX=g++
+# fi
if [ -x "$SAGE_LOCAL/bin/gfortran" ]; then
FC=gfortran
fi
diff --git a/src/sage/libs/pynac/pynac.pxd b/src/sage/libs/pynac/pynac.pxd
index 9b3ecfb..da5d447 100644
--- a/src/sage/libs/pynac/pynac.pxd
+++ b/src/sage/libs/pynac/pynac.pxd
@@ -1,4 +1,3 @@
-# distutils: language = c++
# distutils: libraries = pynac gmp
# distutils: extra_compile_args = -std=c++11
""" |
comment:56
Replying to @jhpalmieri:
Are you still on OSX 10.9 ? |
comment:57
This is on OS X 10.12, Xcode 8.1. |
comment:58
Replying to @jhpalmieri:
I was confused by Anyway, I think I know where this comes from: you probably need
|
comment:59
My fault I said to edit |
comment:60
Replying to @dimpase:
Right, so, and, as Francois says, put back |
comment:61
The
|
comment:62
Replying to @jhpalmieri:
|
comment:63
I plan to test what happens if we remove those lines and just set |
comment:64
|
Changed branch from u/fbissey/pynac-clang to |
I am hitting the following error in compiling sagelib with clang
This looks like a
pynac
orpynac
related problem.CC: @rwst @mkoeppe
Component: porting
Author: François Bissey, Dima Pasechnik
Branch/Commit:
86b2c2d
Reviewer: Jeroen Demeyer
Issue created by migration from https://trac.sagemath.org/ticket/21701
The text was updated successfully, but these errors were encountered: