<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">I can reproduce the warning compiling just that simple code you listed. This is the compile command:<div class=""><br class=""></div><div class="">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</div><div class=""><br class=""></div><div class="">And error:</div><div class="">ld: warning: object file (./build/conftest.o) was built for newer macOS version (11.2) than being linked (11.0)</div><div class=""><br class=""></div><div class="">Note I recently uninstalled and reinstalled command line tools too, which does not seem to have fixed it.</div><div class=""><br class=""></div><div class=""><div class=""><div class="">
<div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); 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; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div>Best regards,<br class=""><br class="">Jacob Faibussowitsch<br class="">(Jacob Fai - booss - oh - vitch)<br class="">Cell: (312) 694-3391</div></div>
</div>
<div><br class=""><blockquote type="cite" class=""><div class="">On Feb 15, 2021, at 11:30, Satish Balay <<a href="mailto:balay@mcs.anl.gov" class="">balay@mcs.anl.gov</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Here is the compile command and the warning:<br class=""><br class=""><blockquote type="cite" class=""><blockquote type="cite" class=""><blockquote type="cite" class=""><blockquote type="cite" class=""><blockquote type="cite" class=""><blockquote type="cite" class=""><br class=""></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote>===== Checking linker<br class="">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 <br class="">Successful compile:<br class="">Source:<br class=""> function foo(a)<br class=""> real:: a,x,bar<br class=""> common /xx/ x<br class=""> x=a<br class=""> foo = bar(x)<br class=""> end<br class="">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 <br class="">Possible ERROR while running linker:<br class="">stderr:<br class="">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 class=""> Accepted FC PIC code without compiler flag<br class=""> =============================================================================================<br class=""><<<<<<<br class=""><br class="">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 class=""><br class="">There is a related issue at:<br class=""><br class=""><a href="https://github.com/spack/spack/issues/21644" class="">https://github.com/spack/spack/issues/21644</a><br class=""><br class="">Satish<br class=""><br class=""><br class="">On Sat, 13 Feb 2021, Jacob Faibussowitsch wrote:<br class=""><br class=""><blockquote type="cite" class="">Hello All,<br class=""><br class="">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 class=""><br class="">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 class="">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 class="">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 class="">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 class="">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 class=""><br class="">Best regards,<br class=""><br class="">Jacob Faibussowitsch<br class="">(Jacob Fai - booss - oh - vitch)<br class="">Cell: (312) 694-3391<br class=""><br class=""></blockquote></div></div></blockquote></div><br class=""></div></div></body></html>