<div dir="ltr"><div dir="ltr">On Fri, Mar 12, 2021 at 3:44 AM Pierre Jolivet <<a href="mailto:pierre@joliv.et">pierre@joliv.et</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;">Sorry to dig up this old thread, but this is triggering false positives while make checking for people who don’t want to toy around with MACOSX_DEPLOYMENT_TARGET.<div>Could/should we filter this somehow, or have BuildSystem tinker with the environment variable itself?</div></div></blockquote><div><br></div><div>I worry about suppressing this warning because the variable has real consequences for linking (especially if CMake is somehow involved), </div><div>and it might make it harder to debug. I would rather have a large warning suggesting people unset this.</div><div><br></div><div>  Thanks,</div><div><br></div><div>     Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;"><div>Thanks,</div><div>Pierre</div><div><br></div><div><div>$ make check</div><div>Running check examples to verify correct installation</div><div>Using PETSC_DIR=/Users/jolivet/repo/petsc and PETSC_ARCH=arch-darwin-c-debug-real</div><div>*******************Error detected during compile or link!*******************</div><div>See <a href="http://www.mcs.anl.gov/petsc/documentation/faq.html" target="_blank">http://www.mcs.anl.gov/petsc/documentation/faq.html</a></div><div>/Users/jolivet/repo/petsc/src/snes/tutorials ex19</div><div>*********************************************************************************</div><div>mpicc -Wl,-bind_at_load -Wl,-multiply_defined,suppress -Wl,-multiply_defined -Wl,suppress -Wl,-commons,use_dylibs -Wl,-search_paths_first -Wl,-no_compact_unwind -Wall -g  -Wall -g    -I/Users/jolivet/repo/petsc/include -I/Users/jolivet/repo/petsc/arch-darwin-c-debug-real/include -I/opt/intel/mkl/include     ex19.c  -Wl,-rpath,/Users/jolivet/repo/petsc/arch-darwin-c-debug-real/lib -L/Users/jolivet/repo/petsc/arch-darwin-c-debug-real/lib -Wl,-rpath,/Users/jolivet/repo/petsc/arch-darwin-c-debug-real/lib -L/Users/jolivet/repo/petsc/arch-darwin-c-debug-real/lib -Wl,-rpath,/opt/intel/mkl/lib -L/opt/intel/mkl/lib -Wl,-rpath,/opt/intel/lib -L/opt/intel/lib -Wl,-rpath,/usr/local/Cellar/mpich/3.4.1_1/lib -L/usr/local/Cellar/mpich/3.4.1_1/lib -Wl,-rpath,/usr/local/Cellar/gcc/10.2.0_4/lib/gcc/10/gcc/x86_64-apple-darwin20/10.2.0 -L/usr/local/Cellar/gcc/10.2.0_4/lib/gcc/10/gcc/x86_64-apple-darwin20/10.2.0 -Wl,-rpath,/usr/local/Cellar/gcc/10.2.0_4/lib/gcc/10 -L/usr/local/Cellar/gcc/10.2.0_4/lib/gcc/10 -lpetsc -lHYPRE -lcmumps -ldmumps -lsmumps -lzmumps -lmumps_common -lpord -lmkl_scalapack_lp64 -lmkl_blacs_mpich_lp64 -lEl -lElSuiteSparse -lpmrrr -lp4est -lsc -liomp5 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lparmmg -lmmg -lmmg3d -lptesmumps -lptscotchparmetis -lptscotch -lptscotcherr -lesmumps -lscotch -lscotcherr -lparmetis -lmetis -ltriangle -ltet -lz -lX11 -lc++ -ldl -lmpifort -lmpi -lpmpi -lgfortran -lquadmath -lm -lc++ -ldl -o ex19</div><div>ld: warning: dylib (/usr/local/Cellar/mpich/3.4.1_1/lib/libmpifort.dylib) was built for newer macOS version (11.1) than being linked (11.0)</div><div>ld: warning: dylib (/usr/local/Cellar/gcc/10.2.0_4/lib/gcc/10/libgfortran.dylib) was built for newer macOS version (11.2) than being linked (11.0)</div><div>ld: warning: dylib (/usr/local/Cellar/gcc/10.2.0_4/lib/gcc/10/libquadmath.dylib) was built for newer macOS version (11.2) than being linked (11.0)</div><div>ld: warning: dylib (/usr/local/Cellar/gcc/10.2.0_4/lib/gcc/10/libquadmath.0.dylib) was built for newer macOS version (11.2) than being linked (11.0)</div><div>ld: warning: object file (/Users/jolivet/repo/petsc/arch-darwin-c-debug-real/lib/libcmumps.a(cana_aux.o)) was built for newer macOS version (11.2) than being linked (11.0)</div><div>ld: warning: object file (/Users/jolivet/repo/petsc/arch-darwin-c-debug-real/lib/libdmumps.a(dana_aux.o)) was built for newer macOS version (11.2) than being linked (11.0)</div><div>ld: warning: object file (/Users/jolivet/repo/petsc/arch-darwin-c-debug-real/lib/libsmumps.a(sana_aux.o)) was built for newer macOS version (11.2) than being linked (11.0)</div><div>ld: warning: object file (/Users/jolivet/repo/petsc/arch-darwin-c-debug-real/lib/libzmumps.a(zana_aux.o)) was built for newer macOS version (11.2) than being linked (11.0)</div><div>ld: warning: object file (/Users/jolivet/repo/petsc/arch-darwin-c-debug-real/lib/libmumps_common.a(front_data_mgt_m.o)) was built for newer macOS version (11.2) than being linked (11.0)</div><div>C/C++ example src/snes/tutorials/ex19 run successfully with 1 MPI process</div><div><br><div><br><blockquote type="cite"><div>On 15 Feb 2021, at 6:08 PM, Jacob Faibussowitsch <<a href="mailto:jacob.fai@gmail.com" target="_blank">jacob.fai@gmail.com</a>> wrote:</div><br><div><div style="overflow-wrap: break-word;">Yes, this also seems to work on my end.<div><br><div>
<div dir="auto" style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><div>Best regards,<br><br>Jacob Faibussowitsch<br>(Jacob Fai - booss - oh - vitch)<br>Cell: (312) 694-3391</div></div>

</div>
<div><br><blockquote type="cite"><div>On Feb 15, 2021, at 12:05, Satish Balay <<a href="mailto:balay@mcs.anl.gov" target="_blank">balay@mcs.anl.gov</a>> wrote:</div><br><div><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;float:none;display:inline">Does setting MACOSX_DEPLOYMENT_TARGET also work?</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;float:none;display:inline">Satish</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;float:none;display:inline">On Mon, 15 Feb 2021, Jacob Faibussowitsch wrote:</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><blockquote type="cite" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">I think this problem ultimately stems from the fact that gcc/g++ and gfortran are not from the same people on macOS. It seems like clang is configured to build for 11.0 target, whilst gcc defaults to newest available target. And indeed if I change my compile command there is no warning:<br><br>mkdir -p build && gfortran -c -o ./build/conftest.o conftest.F90 && gcc-10 -o ./build/libconftest.dylib ./build/conftest.o -dynamiclib -undefined dynamic_lookup && rm -rf ./build<br><br>Note I now call gcc-10 as the linker which is the __actual__ gcc (not clang in a trench coat).<br><br>Best regards,<br><br>Jacob Faibussowitsch<br>(Jacob Fai - booss - oh - vitch)<br>Cell: (312) 694-3391<br><br><blockquote type="cite">On Feb 15, 2021, at 11:46, Jacob Faibussowitsch <<a href="mailto:jacob.fai@gmail.com" target="_blank">jacob.fai@gmail.com</a>> wrote:<br><br>Ok so if I pass -mmacosx-version-min=11.2 to the linker the warning disappears...<br><br>Best regards,<br><br>Jacob Faibussowitsch<br>(Jacob Fai - booss - oh - vitch)<br>Cell: (312) 694-3391<br><br><blockquote type="cite">On Feb 15, 2021, at 11:41, Jacob Faibussowitsch <<a href="mailto:jacob.fai@gmail.com" target="_blank">jacob.fai@gmail.com</a><span> </span><<a href="mailto:jacob.fai@gmail.com" target="_blank">mailto:jacob.fai@gmail.com</a>>> wrote:<br><br>I can reproduce the warning compiling just that simple code you listed. This is the compile command:<br><br>mkdir -p build && gfortran -c -o ./build/conftest.o conftest.F90 && gcc -o ./build/libconftest.dylib ./build/conftest.o -dynamiclib -undefined dynamic_lookup && rm -rf ./build<br><br>And error:<br>ld: warning: object file (./build/conftest.o) was built for newer macOS version (11.2) than being linked (11.0)<br><br>Note I recently uninstalled and reinstalled command line tools too, which does not seem to have fixed it.<br><br>Best regards,<br><br>Jacob Faibussowitsch<br>(Jacob Fai - booss - oh - vitch)<br>Cell: (312) 694-3391<br><br><blockquote type="cite">On Feb 15, 2021, at 11:30, Satish Balay <<a href="mailto:balay@mcs.anl.gov" target="_blank">balay@mcs.anl.gov</a><span> </span><<a href="mailto:balay@mcs.anl.gov" target="_blank">mailto:balay@mcs.anl.gov</a>>> wrote:<br><br>Here is the compile command and the warning:<br><br><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote>===== Checking linker<br>Executing: gfortran -c -o /var/folders/9w/7dlszmmn6q1gd5yf3r9n79bc0000gn/T/petsc-dk9aiv7x/config.setCompilers/conftest.o -I/var/folders/9w/7dlszmmn6q1gd5yf3r9n79bc0000gn/T/petsc-dk9aiv7x/config.setCompilers   /var/folders/9w/7dlszmmn6q1gd5yf3r9n79bc0000gn/T/petsc-dk9aiv7x/config.setCompilers/conftest.F90<span> </span><br>Successful compile:<br>Source:<br>    function foo(a)<br>    real:: a,x,bar<br>    common /xx/ x<br>    x=a<br>    foo = bar(x)<br>    end<br>Executing: gcc  -o /var/folders/9w/7dlszmmn6q1gd5yf3r9n79bc0000gn/T/petsc-dk9aiv7x/config.setCompilers/libconftest.dylib  -dynamiclib -single_module -undefined dynamic_lookup -multiply_defined suppress  /var/folders/9w/7dlszmmn6q1gd5yf3r9n79bc0000gn/T/petsc-dk9aiv7x/config.setCompilers/conftest.o<span> </span><br>Possible ERROR while running linker:<br>stderr:<br>ld: warning: object file (/var/folders/9w/7dlszmmn6q1gd5yf3r9n79bc0000gn/T/petsc-dk9aiv7x/config.setCompilers/conftest.o) was built for newer macOS version (11.2) than being linked (11.0)<br>        Accepted FC PIC code without compiler flag<br>        =============================================================================================<br><<<<<<<br><br>Its likely due to the way brew built gfortran. You can try compiling a simple test code and see if you can reproduce this warning.<br><br>There is a related issue at:<br><br><a href="https://github.com/spack/spack/issues/21644" target="_blank">https://github.com/spack/spack/issues/21644</a><span> </span><<a href="https://github.com/spack/spack/issues/21644" target="_blank">https://github.com/spack/spack/issues/21644</a>><br><br>Satish<br><br><br>On Sat, 13 Feb 2021, Jacob Faibussowitsch wrote:<br><br><blockquote type="cite">Hello All,<br><br>I’ve been getting these warnings for weeks, at first I figured it was due to gfortran brew package not being updated for Big Sur, but since it has persisted through a few gfortran brew updates I’m thinking it may be petsc related. This is on clean build on master.<br><br>ld: warning: object file (master-arch-darwin-c-debug/obj/sys/classes/bag/f2003-src/fsrc/bagenum.o) was built for newer macOS version (11.2) than being linked (11.0)<br>ld: warning: object file (master-arch-darwin-c-debug/obj/sys/f90-src/fsrc/f90_fwrap.o) was built for newer macOS version (11.2) than being linked (11.0)<br>ld: warning: object file (master-arch-darwin-c-debug/obj/sys/objects/f2003-src/fsrc/optionenum.o) was built for newer macOS version (11.2) than being linked (11.0)<br>ld: warning: object file (master-arch-darwin-c-debug/obj/sys/fsrc/somefort.o) was built for newer macOS version (11.2) than being linked (11.0)<br>ld: warning: object file (master-arch-darwin-c-debug/obj/sys/f90-mod/petscsysmod.o) was built for newer macOS version (11.2) than being linked (11.0)<br><br>Best regards,<br><br>Jacob Faibussowitsch<br>(Jacob Fai - booss - oh - vitch)<br>Cell: (312) 694-3391</blockquote></blockquote></blockquote></blockquote></blockquote></div></blockquote></div><br></div></div></div></blockquote></div><br></div></div></div></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>