<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div><br></div> Please do as Satish previously suggested<div><br></div><div>~/petsc/lib/petsc/bin/win32fe/win32fe cl --use clang --verbose sizeof.c<br style="font-size: 14.666667px;"><div><br></div><div><br></div><div> Also do </div><div><br></div><div>clang sizeof.c</div><div><br></div><div>and send the output of both. Where sizeof.c is </div><div><br></div><div>#include <stdio.h></div><div>int main(int argc,char **args)</div><div>{</div><div> printf("%d\n",(int)sizeof(int));</div><div> return 0;</div><div>}</div><div><br></div><div>I may have typos in my sample code so please fix those.</div><div><br></div><div>Barry</div><div><br></div><div><br><blockquote type="cite"><div>On Jan 24, 2023, at 6:22 PM, Guo, Sam <sam.guo@siemens.com> wrote:</div><br class="Apple-interchange-newline"><div><meta charset="UTF-8"><div class="elementToProof" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 18px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);">Attached please find configure.log.</span></div><div class="elementToProof" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 18px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);"><br></span></div><div class="elementToProof" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 18px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);">error messgae:</span></div><div class="elementToProof" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 18px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><span class="ContentPasted0" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);">C:\home\xian\dev\star\petsc\src\sys\objects\device\INTERF~1\device.cxx(486): error C2065: 'PETSC_DEVICE_CASE': undeclared identifier<br class="FluidPluginCopy ContentPasted0"><br></span></div><div id="appendonsend" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 18px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"></div><hr tabindex="-1" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 18px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; display: inline-block; width: 1013.3125px;"><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 18px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;"></span><div id="divRplyFwdMsg" dir="ltr" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 18px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><font face="Calibri, sans-serif" style="font-size: 11pt;"><b>From:</b><span class="Apple-converted-space"> </span>Satish Balay <<a href="mailto:balay@mcs.anl.gov">balay@mcs.anl.gov</a>><br><b>Sent:</b><span class="Apple-converted-space"> </span>Tuesday, January 24, 2023 2:00 PM<br><b>To:</b><span class="Apple-converted-space"> </span>Barry Smith <<a href="mailto:bsmith@petsc.dev">bsmith@petsc.dev</a>><br><b>Cc:</b><span class="Apple-converted-space"> </span>Guo, Sam (DI SW STS SDDEV MECH PHY FEA FW) <<a href="mailto:sam.guo@siemens.com">sam.guo@siemens.com</a>>;<span class="Apple-converted-space"> </span><a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a><span class="Apple-converted-space"> </span><<a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a>><br><b>Subject:</b><span class="Apple-converted-space"> </span>Re: [petsc-users] compile PETSc on win using clang</font><div> </div></div><div class="BodyFragment" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 18px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><font size="2"><span style="font-size: 11pt;"><div class="PlainText"><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%7Ca6e1607f7e23403f9b4008dafe56627d%7C38ae3bcd95794fd4addab42e1495d55a%7C1%7C0%7C638101944252560682%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=BOy9RDMGw11IlwRthzcB5Il3YUIgVVrukbzOMFdV8MI%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%7Ca6e1607f7e23403f9b4008dafe56627d%7C38ae3bcd95794fd4addab42e1495d55a%7C1%7C0%7C638101944252560682%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=BOy9RDMGw11IlwRthzcB5Il3YUIgVVrukbzOMFdV8MI%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>><span class="Apple-converted-space"> </span><br>> Are you using clang as a replacement for the<br>><span class="Apple-converted-space"> </span><br>> * "Unix-like" Cygwin GNU compilers compilers or<span class="Apple-converted-space"> </span><br>><span class="Apple-converted-space"> </span><br>> * MinGW GNU compilers that are compatible with the Microsoft compilers?<br>><span class="Apple-converted-space"> </span><br>> If the former, follow the instructions for using the Cygwin GNU compilers, if the latter follow the directions for the MinGW compilers.<span class="Apple-converted-space"> </span><br>><span class="Apple-converted-space"> </span><br>> Send the configure.log and make.log if things go wrong and we'll help you out.<br>><span class="Apple-converted-space"> </span><br>> Barry<br>><span class="Apple-converted-space"> </span><br>><span class="Apple-converted-space"> </span><br>><span class="Apple-converted-space"> </span><br>><span class="Apple-converted-space"> </span><br>> > On Jan 24, 2023, at 4:01 PM, Guo, Sam <<a href="mailto:sam.guo@siemens.com">sam.guo@siemens.com</a>> wrote:<br>> ><span class="Apple-converted-space"> </span><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>> > <span class="Apple-converted-space"> </span><br>> > Thanks,<br>> > Sam Guo<br>><span class="Apple-converted-space"> </span><br>><span class="Apple-converted-space"> </span><br></div></span></font></div><span id="cid:5A57EF55-90DC-4069-9228-3C1F517415DF"><configure.log></span></div></blockquote></div><br></div></body></html>