<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div dir="ltr"></div><div dir="ltr"><br></div><div dir="ltr"><br><blockquote type="cite">On 8 Apr 2022, at 3:37 PM, Veronika Ulanova <19veronika97@gmail.com> wrote:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr"><div dir="ltr">Thank you Blaise Bourdin, will try that !</div></div></blockquote><div><br></div><div>Do not do that unless you know exactly what you are doing and the inner workings of Brew.</div><div>You are not doing a fresh build, so you need first to rm arch-darwin-c-debug. That’s why you have an error.</div><div><br></div><div>Thanks,</div><div>Pierre</div><br><blockquote type="cite"><div dir="ltr"><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Apr 8, 2022 at 2:36 PM Veronika Ulanova <<a href="mailto:19veronika97@gmail.com">19veronika97@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Here it is attached:</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Apr 8, 2022 at 11:11 AM Satish Balay <<a href="mailto:balay@mcs.anl.gov" target="_blank">balay@mcs.anl.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">This is strange. We have a successful build on M1 - for ex: <a href="https://gitlab.com/petsc/petsc/-/jobs/2308081220" rel="noreferrer" target="_blank">https://gitlab.com/petsc/petsc/-/jobs/2308081220</a><br>
<br>
Can you send corresponding configure.log?<br>
<br>
Satish<br>
<br>
On Fri, 8 Apr 2022, Veronika Ulanova wrote:<br>
<br>
> To get this error i run the following commands:<br>
> <br>
> 1.<br>
> <br>
> *➜ * *petsc **git:(**release**)** ✗ *./configure --with-cc=gcc<br>
> --with-cxx=g++ --with-petsc4py=1 --with-fc=gfortran --download-mpich<br>
> --download-fblaslapack<br>
> <br>
> *➜ * *petsc **git:(**release**)** ✗ * make<br>
> PETSC_DIR=/Users/veronikaulanova/Documents/documents/Oxford_work/petsc<br>
> PETSC_ARCH=arch-darwin-c-debug all<br>
> <br>
> On Fri, Apr 8, 2022 at 10:41 AM Veronika Ulanova <<a href="mailto:19veronika97@gmail.com" target="_blank">19veronika97@gmail.com</a>><br>
> wrote:<br>
> <br>
> > I pulled the updated repo but now I get a different error also related to<br>
> > architecture:<br>
> ><br>
> > ld: file not found: @rpath/libgcc_s.1.1.dylib for architecture arm64<br>
> ><br>
> > clang: error: linker command failed with exit code 1 (use -v to see<br>
> > invocation)<br>
> ><br>
> > error: command<br>
> > '/Users/veronikaulanova/Documents/documents/Oxford_work/petsc/arch-darwin-c-debug/bin/mpicc'<br>
> > failed with exit code 1<br>
> ><br>
> > **************************ERROR*************************************<br>
> ><br>
> > Error building petsc4py.<br>
> ><br>
> > ********************************************************************<br>
> ><br>
> > make[2]: *** [petsc4pybuild] Error 1<br>
> ><br>
> > ***************************ERROR**************************************<br>
> ><br>
> > * Error during compile, check arch-darwin-c-debug/lib/petsc/conf/make.log*<br>
> ><br>
> > * Send it and arch-darwin-c-debug/lib/petsc/conf/configure.log to<br>
> > <a href="mailto:petsc-maint@mcs.anl.gov" target="_blank">petsc-maint@mcs.anl.gov</a> <<a href="mailto:petsc-maint@mcs.anl.gov" target="_blank">petsc-maint@mcs.anl.gov</a>>*<br>
> ><br>
> > **********************************************************************<br>
> ><br>
> ><br>
> > Any idea about this one? Thank you<br>
> ><br>
> > On Fri, Apr 8, 2022 at 10:09 AM Veronika Ulanova <<a href="mailto:19veronika97@gmail.com" target="_blank">19veronika97@gmail.com</a>><br>
> > wrote:<br>
> ><br>
> >> Hello Satish,<br>
> >><br>
> >> By the repo you mean the main PETSc repository?<br>
> >><br>
> >> Thank you, Veronika<br>
> >><br>
> >> On Fri, Apr 8, 2022 at 9:49 AM Satish Balay <<a href="mailto:balay@mcs.anl.gov" target="_blank">balay@mcs.anl.gov</a>> wrote:<br>
> >><br>
> >>> A fix for M1 was recently pushed to the git repo.<br>
> >>><br>
> >>> Can you try using it [with either release or main branches] - and see if<br>
> >>> that works?<br>
> >>><br>
> >>> Satish<br>
> >>><br>
> >>><br>
> >>><br>
> >>> On Fri, 8 Apr 2022, Veronika Ulanova wrote:<br>
> >>><br>
> >>> > Hi,<br>
> >>> ><br>
> >>> > I have been trying to configure the petsc4py package along with my<br>
> >>> PETSc<br>
> >>> > installation for my research. I have searched for solutions on the<br>
> >>> internet<br>
> >>> > but there was no luck, this is the error I get when I am trying to<br>
> >>> > configure PETSC and use it to run examples of code that utilise the<br>
> >>> > petsc4py package...<br>
> >>> ><br>
> >>> ><br>
> >>> ><br>
> >>> > File<br>
> >>> ><br>
> >>> "/Users/veronikaulanova/Documents/documents/Oxford_work/petsc/arch-darwin-c-debug/lib/petsc4py/PETSc.py",<br>
> >>> > line 3, in <module><br>
> >>> ><br>
> >>> > PETSc = ImportPETSc(ARCH)<br>
> >>> ><br>
> >>> > File<br>
> >>> ><br>
> >>> "/Users/veronikaulanova/Documents/documents/Oxford_work/petsc/arch-darwin-c-debug/lib/petsc4py/lib/__init__.py",<br>
> >>> > line 29, in ImportPETSc<br>
> >>> ><br>
> >>> > return Import('petsc4py', 'PETSc', path, arch)<br>
> >>> ><br>
> >>> > File<br>
> >>> ><br>
> >>> "/Users/veronikaulanova/Documents/documents/Oxford_work/petsc/arch-darwin-c-debug/lib/petsc4py/lib/__init__.py",<br>
> >>> > line 73, in Import<br>
> >>> ><br>
> >>> > module = import_module(pkg, name, path, arch)<br>
> >>> ><br>
> >>> > File<br>
> >>> ><br>
> >>> "/Users/veronikaulanova/Documents/documents/Oxford_work/petsc/arch-darwin-c-debug/lib/petsc4py/lib/__init__.py",<br>
> >>> > line 58, in import_module<br>
> >>> ><br>
> >>> > with f: return imp.load_module(fullname, f, fn, info)<br>
> >>> ><br>
> >>> > File "/opt/homebrew/Cellar/python@3.9<br>
> >>> /3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/imp.py",<br>
> >>> > line 242, in load_module<br>
> >>> ><br>
> >>> > return load_dynamic(name, filename, file)<br>
> >>> ><br>
> >>> > File "/opt/homebrew/Cellar/python@3.9<br>
> >>> /3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/imp.py",<br>
> >>> > line 342, in load_dynamic<br>
> >>> ><br>
> >>> > return _load(spec)<br>
> >>> ><br>
> >>> > ImportError:<br>
> >>> ><br>
> >>> dlopen(/Users/veronikaulanova/Documents/documents/Oxford_work/petsc/arch-darwin-c-debug/lib/petsc4py/lib/arch-darwin-c-debug/<br>
> >>> > <a href="http://PETSc.cpython-39-darwin.so" rel="noreferrer" target="_blank">PETSc.cpython-39-darwin.so</a> <<a href="http://petsc.cpython-39-darwin.so/" rel="noreferrer" target="_blank">http://petsc.cpython-39-darwin.so/</a>>, 2):<br>
> >>> no<br>
> >>> > suitable image found. Did find:<br>
> >>> ><br>
> >>> ><br>
> >>> /Users/veronikaulanova/Documents/documents/Oxford_work/petsc/arch-darwin-c-debug/lib/petsc4py/lib/arch-darwin-c-debug/<br>
> >>> > <a href="http://PETSc.cpython-39-darwin.so" rel="noreferrer" target="_blank">PETSc.cpython-39-darwin.so</a> <<a href="http://petsc.cpython-39-darwin.so/" rel="noreferrer" target="_blank">http://petsc.cpython-39-darwin.so/</a>>:<br>
> >>> mach-o,<br>
> >>> > but wrong architecture<br>
> >>> ><br>
> >>> ><br>
> >>> /Users/veronikaulanova/Documents/documents/Oxford_work/petsc/arch-darwin-c-debug/lib/petsc4py/lib/arch-darwin-c-debug/<br>
> >>> > <a href="http://PETSc.cpython-39-darwin.so" rel="noreferrer" target="_blank">PETSc.cpython-39-darwin.so</a> <<a href="http://petsc.cpython-39-darwin.so/" rel="noreferrer" target="_blank">http://petsc.cpython-39-darwin.so/</a>>:<br>
> >>> stat()<br>
> >>> > failed with errno=25<br>
> >>> ><br>
> >>> ><br>
> >>> > As you can see I am using an M1 mac and therefore that causes the<br>
> >>> petsc4py<br>
> >>> > package to give me an error (highlighted above), but do you have any<br>
> >>> idea<br>
> >>> > of how I can solve it or why it is even there? I know that the new M1<br>
> >>> has a<br>
> >>> > different architecture to intel macs but I have no idea of where to<br>
> >>> > start with fixing this or how to make it work. Any help would be much<br>
> >>> > appreciated, thank you in advance.<br>
> >>> ><br>
> >>> > Kind Regards, Veronika<br>
> >>> ><br>
> >>><br>
> >>><br>
> <br>
</blockquote></div>
</blockquote></div>
</div></blockquote></body></html>