Problem with Using TMRpcm Library with LiquidCrystal.h, Keypad.h libraries

Hi, I’m making Fingerprint+Keypad Locker with voice. So, I’m Using
<Adafruit_Fingerprint.h> library for Fingerprint Scanner.
<TMRpcm.h> Library for playing the audio files.
<SD.h> library for accessing audio files from SD card.
<Keypad.h> Library for Keypad.
<EEPROM.h> for Saving code.
<LiquidCrystal.h> For 20x4 LCD Display.
My problem is that when I compile the code it gives Error

"Arduino: 1.8.9 (Windows Store (Windows 10), Board: “Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)”

C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.21.0_x86__mdqgnx93n4wtt\hardware\arduino\avr\cores\arduino\Print.cpp: In function ‘println.constprop’:

C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.21.0_x86__mdqgnx93n4wtt\hardware\arduino\avr\cores\arduino\Print.cpp:136:1: internal compiler error: Segmentation fault



Please submit a full bug report,

with preprocessed source if appropriate.

See for instructions.

lto-wrapper.exe: fatal error: C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.21.0_x86__mdqgnx93n4wtt\hardware\tools\avr/bin/avr-gcc returned 1 exit status

compilation terminated.

c:/program files/windowsapps/arduinollc.arduinoide_1.8.21.0_x86__mdqgnx93n4wtt/hardware/tools/avr/bin/…/lib/gcc/avr/5.4.0/…/…/…/…/avr/bin/ld.exe: error: lto-wrapper failed

collect2.exe: error: ld returned 1 exit status

Multiple libraries were found for “SD.h”
Used: C:\Users\jawad\Documents\Arduino\libraries\SD
Not used: C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.21.0_x86__mdqgnx93n4wtt\libraries\SD
Multiple libraries were found for “TMRpcm.h”
Used: C:\Users\jawad\Documents\Arduino\libraries\TMRpcm
Not used: C:\Users\jawad\Documents\Arduino\libraries\TMRpcm-master
exit status 1
Error compiling for board Arduino/Genuino Mega or Mega 2560.

This report would have more information with
“Show verbose output during compilation”
option enabled in File → Preferences.
This is the code Section in which I initialize all Variables. I checked my code line by line and all is correct so I’m posting The only code which is giving the error. I think it is bcz of <SD.h> library.
I need help to know the reason of this Error. Please reply me ASAP.

#include <Adafruit_Fingerprint.h>
#include <Keypad.h>
#include <EEPROM.h>
#include <LiquidCrystal.h>
//#include <SdFat.h>
#include <SD.h>
#include <TMRpcm.h>
#include <SPI.h>
// On Leonardo/Micro or others with hardware serial, use those! #0 is green wire, #1 is white
// uncomment this line:
// for Mega use pin#18(white-Rx) pin#19(green-TX)
 #define mySerial Serial1   

// For UNO and others without hardware serial, we must use software serial...
// pin #2 is IN from sensor (GREEN wire)
// pin #3 is OUT from arduino  (WHITE wire)
// comment these two lines if using hardware serial
//SoftwareSerial mySerial(2, 3);

Adafruit_Fingerprint finger = Adafruit_Fingerprint(&mySerial);
uint8_t id = 0;
// Define pins
//------LED PINS----
#define blue 6
#define red 7
#define green 8
//------Relay PINS---
#define relay1 9
#define relay2 10
//------LCD PINS----
#define En_pin 11    // LCD pin 6  white color
#define Rs_pin 12    // LCD pin 4  yellow color
#define D4_pin 5     // LCD pin 11 blue color
#define D5_pin 4     // LCD pin 12 green color 
#define D6_pin 3     // LCD pin 13 yellow color
#define D7_pin 2     // LCD pin 14 orange color
//------Keypad PINS---
#define Row1 36
#define Row2 38
#define Row3 40
#define Row4 42
// Col 1--->4 white strip pins from mid to right
#define col1 37
#define col2 39
#define col3 41
#define col4 43
//---- SD Card Pin ----
//----Mega pin50-->MISO, pin51--> MOSI, pin52-->SCK and pin53--> CS
#define SD_ChipSelectPin 53      // uses hardware SS pin 53 on Mega2560
#define speaker1 44              //Use Pins 5-2,6-7,11-12,44-46-45 for Speaker Output
#define speaker2 45 

TMRpcm tmrpcm;                   // create an object for use in this sketch
const byte numRows= 4;           //number of rows on the keypad
const byte numCols= 4;           //number of columns on the keypad

char keymap[numRows][numCols]= 
{'1', '2', '3', 'A'}, 
{'4', '5', '6', 'B'}, 
{'7', '8', '9', 'C'},
{'*', '0', '#', 'D'}
char checkkey;                   // To store previouse key pressed
char keypressed;                 //Where the keys are stored it changes very often
char code[]= {'8','9','0','0'};  //The default code, you can change it or make it a 'n' digits one

char code_buff1[sizeof(code)];   //Where the new key is stored
char code_buff2[sizeof(code)];   //Where the new key is stored again so it's compared to the previous one
char codeID[3];
short siz=0,i=0,s=0,j=0;           //Variables used later
//SdFat sd;
byte rowPins[numRows] = {Row1,Row2,Row3,Row4}; //Rows 0 to 3 //if you modify your pins you should modify this too
byte colPins[numCols]= {col1,col2,col3,col4}; //Columns 0 to 3

LiquidCrystal lcd(Rs_pin,En_pin,D4_pin,D5_pin,D6_pin,D7_pin);
Keypad myKeypad= Keypad(makeKeymap(keymap), rowPins, colPins, numRows, numCols);

void setup()
  while (!Serial);               // For Yun/Leo/Micro/Zero/...
//----- All OutPut Pins used ----- 
  pinMode(blue, OUTPUT);
  pinMode(red, OUTPUT);
  pinMode(green, OUTPUT);
  pinMode(relay1, OUTPUT);
  digitalWrite(relay1, HIGH);
  pinMode(relay2, OUTPUT);
  digitalWrite(relay2, HIGH);
  pinMode(speaker2, OUTPUT);
//  tmrpcm.speakerPin = 44;
//----- Check for Fingerprint Sensor -----  
  Serial.println("\n\nAdafruit finger detect test");
// set the data rate for the sensor serial port
  if (finger.verifyPassword())
    Serial.println("Found fingerprint sensor!");
  } else 
      Serial.println("Did not find fingerprint sensor :(");
      while (1) 
//---- Count for Already present Fingerprint templates ----- 
  Serial.print("Sensor contains "); Serial.print(finger.templateCount); Serial.println(" templates");
  Serial.println("Waiting for valid finger...");
//---- Begin LCD ----
  lcd.begin (20,4);
  lcd.home ();
  lcd.print("Place Your Finger");      //What's written on the LCD you can change
  lcd.print("Press * to Enter");
  lcd.print("4 digit PIN");
//---- Begin SD card Check ----
if (!SD.begin(SD_ChipSelectPin))     // see if the card is present and can be initialized:
  { Serial.println("SD fail");  
    return;                                            // don't do anything more if not
    Serial.println("SD ok");   
  /*if (!sd.begin(SD_ChipSelectPin, SPI_FULL_SPEED))     // see if the card is present and can be initialized:
  { Serial.println("SD fail");  
    return;                                            // don't do anything more if not
    Serial.println("SD ok");