BigSur fortran not compiling

I have updated to macOS Big Sur Version 11.6 .

I am not able to compile simple fortran code now using 

gfortran hello_world.F90  ld: unexpected token: !tapi-tbd file '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libSystem.tbd' for architecture x86_64 collect2: error: ld returned 1 exit status xxxx-MacBook-Pro-2:fortran xxxxx$ which gfortran /usr/local/bin/gfortran

I found that it is the issue from macOS. I have tried many online forum suggestions but it didn't work. Is there a fix ?

Just make sure the command line tools version matches the Xcode version installed. Best to download Xcode 13.2.1 and the matching version of command-line tools.

I am installing only Xcode command line tools not full Xcode.

I tried all possible answers from stack exchange and other websites. Tried the latest version too. No change in error.

BigSur fortran not compiling
 
 
Q