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
giac fails to compile with clang-3.8 on OpenSuSE #24696
Comments
This comment has been minimized.
This comment has been minimized.
Attachment: giac-1.4.9.45.p1.log |
comment:2
Actually giac has involved configure detection of
|
comment:3
This snippet in
and the code in the same file giving the error:
|
comment:4
These days, it would be better to just assume C++11 and use |
Author: Ralf Stephan |
comment:6
Should be tested on other clang systems. New commits:
|
Commit: |
comment:7
If this works for you, I'm willing to set this to positive_review. |
comment:8
I guess it wasn't seen because we haven't tested a clang that old for some time. Also I think your clang uses libstdc++ from gcc-4.8 while all we made a point of testing with clang's own libstdc++. |
comment:9
Jeroen, it works fine, I assume I can set positive? Replying to @kiwifb:
Right, they have no official clang libstdc++ package on OpenSuSE.
Well, I think it's clearly a giac problem and the patch should be applied upstream. Could you please, @frederichan-IMJPRG? |
comment:10
To be honest this patch is a band aid. A proper fix is to detect hash_map properly from configure rather applying pragma trying to find compilers you think will support such and such form of the feature. Something a bit like this BRiAl/BRiAl@510694f#diff-67e997bcfdac55191033d57a16d1408a |
comment:11
Replying to @rwst:
they do have it: https://software.opensuse.org/package/libc++1 (libstdc++ is the name for the GNU c++ library)
|
comment:12
Replying to @dimpase:
Maybe but the ones for Leap 42.3 are all unstable (not official in my reading). |
comment:13
I installed clang-5 and libc++-5 but couldn't deinstall libstdc++ because even clang depends on it. With both libs installed |
comment:14
Removing libstdc++ would destroy your g++ and everything in your system built with it. So it is kind of important. Try |
comment:15
Replying to @kiwifb:
Yes everything up to
|
comment:16
Ah I should build NTL with that as well... |
comment:17
You may want to |
comment:18
Hello, I am reporting this here: |
comment:19
Reviewer name... |
Reviewer: Jeroen Demeyer |
comment:21
It looks like this is also necessary with clang-4.0.1 if no CXXFLAGS and LDFLAGS are set for libc++ but CLANG_DEFAULT_CXX_STDLIB=libc++ is set. |
comment:22
NB: upstream is testing if there are no side effects on some other configurations: |
Changed branch from u/rws/giac_fails_to_compile_with_clang_3_8_on_opensuse to |
hash_map
is not part of the C++ standard library. Some compilers like GCC implement it anyway. However clang does not have it, leading to compile failure withCC=clang
on OpenSuSE Leap 42.3:Instead
unordered_map
should be used.See also https://stackoverflow.com/questions/5908581/is-hash-map-part-of-the-stl
CC: @frederichan-IMJPRG
Component: packages: standard
Author: Ralf Stephan
Branch/Commit:
0c38a83
Reviewer: Jeroen Demeyer
Issue created by migration from https://trac.sagemath.org/ticket/24696
The text was updated successfully, but these errors were encountered: