Re: [petsc-users] How do I supply the compiler PIC flag via CFLAGS, CXXXFLAGS, and FCFLAGS

2019-05-29 Thread Jed Brown via petsc-users
Lisandro Dalcin writes: > On Tue, 28 May 2019 at 22:05, Jed Brown wrote: > >> >> Note that all of these compilers (including Sun C, which doesn't define >> the macro) recognize -fPIC. (Blue Gene xlc requires -qpic.) Do we >> still need to test the other alternatives? >> >> > Well, worst case,

Re: [petsc-users] How do I supply the compiler PIC flag via CFLAGS, CXXXFLAGS, and FCFLAGS

2019-05-28 Thread Zhang, Junchao via petsc-users
Also works with PathScale EKOPath Compiler Suite installed on MCS machines. $ pathcc -c check-pic.c -fPIC $ pathcc -c check-pic.c check-pic.c:2:2: error: "no-PIC" #error "no-PIC" ^ 1 error generated. --Junchao Zhang On Tue, May 28, 2019 at 1:54 PM Smith, Barry F. via petsc-users mailto:petsc-

Re: [petsc-users] How do I supply the compiler PIC flag via CFLAGS, CXXXFLAGS, and FCFLAGS

2019-05-28 Thread Jed Brown via petsc-users
No love with: cc: Sun C 5.12 Linux_i386 2011/11/16 Note that all of these compilers (including Sun C, which doesn't define the macro) recognize -fPIC. (Blue Gene xlc requires -qpic.) Do we still need to test the other alternatives? "Smith, Barry F." writes: > Works for Intel and PGI compi

Re: [petsc-users] How do I supply the compiler PIC flag via CFLAGS, CXXXFLAGS, and FCFLAGS

2019-05-28 Thread Smith, Barry F. via petsc-users
Works for Intel and PGI compiles (the version I checked) bsmith@es:~$ pgcc check-pic.c -PIC pgcc-Error-Unknown switch: -PIC bsmith@es:~$ pgcc check-pic.c -fPIC bsmith@es:~$ pgcc check-pic.c PGC-F-0249-#error -- "no-PIC" (check-pic.c: 2) PGC/x86-64 Linux 19.3-0: compilation aborted bsmith@e

Re: [petsc-users] How do I supply the compiler PIC flag via CFLAGS, CXXXFLAGS, and FCFLAGS

2019-05-28 Thread Jed Brown via petsc-users
Lisandro Dalcin via petsc-users writes: > On Tue, 28 May 2019 at 17:31, Balay, Satish via petsc-users < > petsc-users@mcs.anl.gov> wrote: > >> Configure.log shows '--with-pic=1' - hence this error. >> >> Remove '--with-pic=1' and retry. >> >> > Nonsense. Why this behavior? Building a static libra

Re: [petsc-users] How do I supply the compiler PIC flag via CFLAGS, CXXXFLAGS, and FCFLAGS

2019-05-28 Thread Smith, Barry F. via petsc-users
> On May 28, 2019, at 10:01 AM, Lisandro Dalcin wrote: > > > > On Tue, 28 May 2019 at 17:31, Balay, Satish via petsc-users > wrote: > Configure.log shows '--with-pic=1' - hence this error. > > Remove '--with-pic=1' and retry. > > > Nonsense. Why this behavior? Building a static library

Re: [petsc-users] How do I supply the compiler PIC flag via CFLAGS, CXXXFLAGS, and FCFLAGS

2019-05-28 Thread Balay, Satish via petsc-users
Configure.log shows '--with-pic=1' - hence this error. Remove '--with-pic=1' and retry. Saitsh On Tue, 28 May 2019, Inge Gutheil via petsc-users wrote: > Dear PETSc list, > when I try to install the petsc-3.11.2 library as a static library - for > some reasons I do not want the dynamic library

[petsc-users] How do I supply the compiler PIC flag via CFLAGS, CXXXFLAGS, and FCFLAGS

2019-05-28 Thread Inge Gutheil via petsc-users
Dear PETSc list, when I try to install the petsc-3.11.2 library as a static library - for some reasons I do not want the dynamic library - I suddenly get the error Cannot determine compiler PIC flags if shared libraries is turned off Either run using --with-shared-libraries or --with-pic=0 and sup