<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-7">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div class="elementToProof"><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">configure.log with <span style="color:rgb(36, 36, 36);font-family:"Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif;font-size:14.6667px;background-color:rgb(255, 255, 255);display:inline !important" class="FluidPluginCopy ContentPasted0">-with-cc="win32fe
cl --use clang"</span></span></div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Satish Balay <balay@mcs.anl.gov><br>
<b>Sent:</b> Tuesday, January 24, 2023 5:15 PM<br>
<b>To:</b> Guo, Sam (DI SW STS SDDEV MECH PHY FEA FW) <sam.guo@siemens.com><br>
<b>Cc:</b> Barry Smith <bsmith@petsc.dev>; petsc-users <petsc-users@mcs.anl.gov><br>
<b>Subject:</b> Re: [petsc-users] compile PETSc on win using clang</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Configure Options: --configModules=PETSc.Configure --optionsModule=config.compilerOptions --with-cc="win32fe cl" --use win32fe clang --with-fc=0<br>
--with-debugging=0 -CFLAGS="-O2 -MD -wd4996" -CXXFLAGS="-O2 -MD -wd4996" --with-mpi=0 --with-clean=1 --force --with-scalar-type=real<br>
--ignore-cygwin-link -CFLAGS="-O2 -MD -wd4996" -CXXFLAGS="-O2 -MD -wd4996"<br>
<br>
It should be --with-cc="win32fe cl --use clang"<br>
<br>
But then - this mode is untested with configure - so there could be other issues.<br>
<br>
Also - do you need c++? If not - use --with-cxx=0. This can avoid the error below. [for clang++ - you might need --with-cxx="win32fe cl --use clang++" - again untested - so might not work..]<br>
<br>
Satish<br>
<br>
<br>
On Tue, 24 Jan 2023, Guo, Sam wrote:<br>
<br>
> Attached please find configure.log.<br>
> <br>
> error messgae:<br>
> C:\home\xian\dev\star\petsc\src\sys\objects\device\INTERF~1\device.cxx(486): error C2065: 'PETSC_DEVICE_CASE': undeclared identifier<br>
> <br>
> ________________________________<br>
> From: Satish Balay <balay@mcs.anl.gov><br>
> Sent: Tuesday, January 24, 2023 2:00 PM<br>
> To: Barry Smith <bsmith@petsc.dev><br>
> Cc: Guo, Sam (DI SW STS SDDEV MECH PHY FEA FW) <sam.guo@siemens.com>; petsc-users@mcs.anl.gov <petsc-users@mcs.anl.gov><br>
> Subject: Re: [petsc-users] compile PETSc on win using clang<br>
> <br>
> <a href="https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.wikihow.com%2FInstall-Clang-on-Windows&data=05%7C01%7Csam.guo%40siemens.com%7Cf91c34cd02bb4cea9d4808dafe71b408%7C38ae3bcd95794fd4addab42e1495d55a%7C1%7C0%7C638102061582605791%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=DW33e3209lC4piF9wlJeQLR%2BRmAHQakczlgTUKe%2Bcuo%3D&reserved=0">
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.wikihow.com%2FInstall-Clang-on-Windows&data=05%7C01%7Csam.guo%40siemens.com%7Cf91c34cd02bb4cea9d4808dafe71b408%7C38ae3bcd95794fd4addab42e1495d55a%7C1%7C0%7C638102061582605791%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=DW33e3209lC4piF9wlJeQLR%2BRmAHQakczlgTUKe%2Bcuo%3D&reserved=0</a><br>
> <br>
> Is the clang you have from visual studio - as described above?<br>
> <br>
> We don't have experience with using this variant of clang.<br>
> <br>
> If its compatible with 'cl' - and supports the same command interface as 'cl' then the following might work [assuming clang.exe is the compiler binary installed - and available in PATH]:<br>
> <br>
> '--with-cc=win32fe cl --use clang'<br>
> <br>
> Satish<br>
> <br>
> <br>
> On Tue, 24 Jan 2023, Barry Smith wrote:<br>
> <br>
> ><br>
> > Are you using clang as a replacement for the<br>
> ><br>
> > * "Unix-like" Cygwin GNU compilers compilers or<br>
> ><br>
> > * MinGW GNU compilers that are compatible with the Microsoft compilers?<br>
> ><br>
> > If the former, follow the instructions for using the Cygwin GNU compilers, if the latter follow the directions for the MinGW compilers.<br>
> ><br>
> > Send the configure.log and make.log if things go wrong and we'll help you out.<br>
> ><br>
> > Barry<br>
> ><br>
> ><br>
> ><br>
> ><br>
> > > On Jan 24, 2023, at 4:01 PM, Guo, Sam <sam.guo@siemens.com> wrote:<br>
> > ><br>
> > > Hi PETSc dev team,<br>
> > > I try to compile PETSc on win using clang. I am wondering if you could give me some hint. (I¢ve already made intel compiler work on win using win32fe icl).<br>
> > ><br>
> > > Thanks,<br>
> > > Sam Guo<br>
> ><br>
> ><br>
> </div>
</span></font></div>
</body>
</html>