[sage-devel] gcc -pthread vs gcc -lpthread

2018-04-20 Thread Dima Pasechnik
I wonder how we deal with this issue in packages that have hand-written Makefiles; The issue is that some versions of gcc/g++ (if used as a linker) need -pthread option to be specified, apart from linking with -lpthread. In particular this has to be dealt on https://trac.sagemath.org/ticket/2335

Re: [sage-devel] gcc -pthread vs gcc -lpthread

2018-04-20 Thread François Bissey
-pthread like -openmp should always be the right option to use. gcc/g++ and other are compiler drivers (the real compilers are cc1/cc1++) and those switches tells the driver to set everything right for compiling and linking with these features. That’s the theory at least. Do you have an examp

Re: [sage-devel] gcc -pthread vs gcc -lpthread

2018-04-20 Thread Jeroen Demeyer
On 2018-04-20 13:48, Dima Pasechnik wrote: The issue is that some versions of gcc/g++ (if used as a linker) need -pthread option to be specified That's a true statement but why do you call it an "issue"? The GCC documentation says -pthread Adds support for multithreading wit

Re: [sage-devel] gcc -pthread vs gcc -lpthread

2018-04-20 Thread Dima Pasechnik
On Friday, April 20, 2018 at 1:00:56 PM UTC+1, François Bissey wrote: > > -pthread like -openmp should always be the right option to use. gcc/g++ > and other > are compiler drivers (the real compilers are cc1/cc1++) and those switches > tells > the driver to set everything right for compili

[sage-devel] Re: Wrong result for definite integral of sin(x)*exp(I*x)

2018-04-20 Thread rjf
If Sage calls Maxima, then it is a bug in Sage also. Interestingly, Maxima gets the INdefinite integral correct. On Sunday, April 15, 2018 at 10:31:36 PM UTC-7, Ralf Stephan wrote: > > Not Sage, it's Maxima: > (%i2) integrate(sin(x)*exp(%i*x),x,-%pi,0); >log

Re: [sage-devel] gcc -pthread vs gcc -lpthread

2018-04-20 Thread François Bissey
> On 21/04/2018, at 02:43, Dima Pasechnik wrote: > > clang -pthread does not do what gcc -pthread does, see > https://stackoverflow.com/a/19382746/557937 > > This means that with clang you need -lpthread > whereas with gcc you need -pthread > > It's probably OK to have them both, no? > Th