clang 6.0.1
Modérateur : xcasadmin
-
- Messages : 1137
- Inscription : dim. mai 20, 2007 7:09 am
- Localisation : Paris
- Contact :
clang 6.0.1
Hi bernard,
on this topic,
https://trac.sagemath.org/ticket/26315#comment:14
dimpase suggest the following patch to build giac with clang 6.0.1
https://trac.sagemath.org/raw-attachmen ... g601.patch
could you tell us if you plan to include it in giac?
Best
Frederic
on this topic,
https://trac.sagemath.org/ticket/26315#comment:14
dimpase suggest the following patch to build giac with clang 6.0.1
https://trac.sagemath.org/raw-attachmen ... g601.patch
could you tell us if you plan to include it in giac?
Best
Frederic
Re: clang 6.0.1
Ok, I have patched with unsigned() and int(). Does this really stop compilation or is it a warning? Because I don't like to change int to unsigned, this is dangerous (seems safe here).
-
- Messages : 1137
- Inscription : dim. mai 20, 2007 7:09 am
- Localisation : Paris
- Contact :
Re: clang 6.0.1
Thank you,
Yes they were errors. NB dimpase also mention that register gives a warning that will become an error in C++17
cf: https://trac.sagemath.org/ticket/26315#comment:19
Yes they were errors. NB dimpase also mention that register gives a warning that will become an error in C++17
cf: https://trac.sagemath.org/ticket/26315#comment:19
Re: clang 6.0.1
One further small patch for clang 6.0.1 I need to make giac build is discussed here https://trac.sagemath.org/ticket/26315#comment:21
It's just
With this and the previous one in this thread, I can build on FreeBSD 12.0 - which hopefully will allow me to re-enable the port of giac on this system.
It's just
Code : Tout sélectionner
--- a/src/misc.h
+++ b/src/misc.h
@@ -23,6 +23,7 @@
#include "gen.h"
#include "unary.h"
#include "symbolic.h"
+#include <sys/time.h>
#ifndef NO_NAMESPACE_GIAC
namespace giac {
Re: clang 6.0.1
Ok, I'm adding
Code : Tout sélectionner
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
Re: clang 6.0.1
I tried this with 1.5.0-11 (with the extra sys/time.h patch, as it's not in this version yet), and I still have one error:
solve.cc:5811:49: error: non-constant-expression cannot be narrowed from type 'unsigned int' to 'unsigned char' in initializer list [-Wc++11-narrowing]
order_t order_={static_cast<short>(order),unsigned(lexvars)};
^~~~~~~~~~~~~~~~~
solve.cc:5811:49: note: insert an explicit cast to silence this issue
order_t order_={static_cast<short>(order),unsigned(lexvars)};
^~~~~~~~~~~~~~~~~
static_cast<unsigned char>( )
Re: clang 6.0.1
Perhaps
Code : Tout sélectionner
order_t order_={static_cast<short>(order),unsigned(lexvars/256),unsigned(lexvars)};
Re: clang 6.0.1
This still gives
Code : Tout sélectionner
solve.cc:5812:49: error: non-constant-expression cannot be narrowed from type 'unsigned int' to 'unsigned char' in
initializer list [-Wc++11-narrowing]
order_t order_={static_cast<short>(order),unsigned(lexvars/256),unsigned(lexvars)};
^~~~~~~~~~~~~~~~~~~~~
solve.cc:5812:49: note: insert an explicit cast to silence this issue
order_t order_={static_cast<short>(order),unsigned(lexvars/256),unsigned(lexvars)};
^~~~~~~~~~~~~~~~~~~~~
static_cast<unsigned char>( )
solve.cc:5812:71: error: non-constant-expression cannot be narrowed from type 'unsigned int' to 'unsigned char' in
initializer list [-Wc++11-narrowing]
order_t order_={static_cast<short>(order),unsigned(lexvars/256),unsigned(lexvars)};
^~~~~~~~~~~~~~~~~
solve.cc:5812:71: note: insert an explicit cast to silence this issue
order_t order_={static_cast<short>(order),unsigned(lexvars/256),unsigned(lexvars)};
^~~~~~~~~~~~~~~~~
static_cast<unsigned char>( )
Re: clang 6.0.1
Build succeeds if I do what the compiler says, i.e. write
Code : Tout sélectionner
order_t order_={static_cast<short>(order),
static_cast<unsigned char>(unsigned(lexvars/256)),
static_cast<unsigned char>(unsigned(lexvars))};
Re: clang 6.0.1
Ok, I changed unsigned to unsigned char. There is certainly a flag to avoid this warning, converting an unsigned (or an int) to an unsigned char is quite common...
Re: clang 6.0.1
It's not a warning, it's an error. Probably, conforming to a recent C++1x standard, I don't know.
Re: clang 6.0.1
the unstable tarball (dated 18/11/18) builds OK with clang 6.0.1, thanks!
I noticed that hevea is a requirement for a successful install, but there is no dedicated configure option to disable it.
Is it intentional, or one can still somehow use configure to disable hevea?
I noticed that hevea is a requirement for a successful install, but there is no dedicated configure option to disable it.
Is it intentional, or one can still somehow use configure to disable hevea?
Re: clang 6.0.1
It should be possible to build without hevea. Since I have it installed I don't know if something fails without.
hevea is anyway a very good addition, because if you have it installed, you can write latex files with giac commands, compile them with hevea2mml and display as HTML+MathML with input fields where the giac commands can be modified and executed from a browser.
hevea is anyway a very good addition, because if you have it installed, you can write latex files with giac commands, compile them with hevea2mml and display as HTML+MathML with input fields where the giac commands can be modified and executed from a browser.
Re: clang 6.0.1
No, without hevea it errors out, and with hevea (installed as a FreeBSD package) I get the following error:
Code : Tout sélectionner
gmake[3]: Entering directory '/usr/home/dimpase/Sage/sagemath/local/var/tmp/sage/build/giac-1.5.0-11/src/doc/el'
gmake[3]: warning: -jN forced in submake: disabling jobserver mode.
gmake[4]: Entering directory '/usr/home/dimpase/Sage/sagemath/local/var/tmp/sage/build/giac-1.5.0-11/src/doc/el'
gmake[4]: warning: -jN forced in submake: disabling jobserver mode.
gmake[4]: Nothing to be done for 'install-exec-am'.
TEXINPUTS=.:$TEXINPUTS cas_el.tex
/bin/sh: cas_el.tex: not found
gmake[4]: *** [Makefile:1029: cas_el.dvi] Error 127
Re: clang 6.0.1
there is something fishy with doc/el. Namely, if I remove el from the list of languages, i.e. apply
then the build works.
Code : Tout sélectionner
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -336,8 +336,8 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-SUBDIRS = en es fr el local pt zh de
-DIST_SUBDIRS = en es fr el local pt zh de
+SUBDIRS = en es fr local pt zh de
+DIST_SUBDIRS = en es fr local pt zh de
XCASHTML = xcasfr.html xcasen.html *.css *.js giacwasm.wasm logo.png giac.tex giacfr.tex test.tex testfr.tex test.html testfr.html algolycee.html graphtheory-user_manual.pdf *.sty
EXTRA_DIST = aide_cas README index.html $(XCASHTML) dxcas/* pari/* castex.tex tortue.tex
dist_pkgdata_DATA = aide_cas