Segmentation fault (core dumped) , gcc complier version

Dear all,
I want to ask for help, when I run the mt_prep_snap I got the segmentation error, I,m using Ubuntu 22.04.2 LTS and gcc 11.3.0. I have studied that the problem is the compiler version. StaMPS has to be compiled with gcc-7 (gcc-11 was installed in my case). To solve this error, I tried many times to install gcc-7 but facing (no installation candidate) every time. kindly guide me, Thanks.

kamran@DESKTOP-6LAQBUA:~/PSI_insar/INSAR_master_data$ mt_prep_snap 20150331 ~/PSI_insar/INSAR_master_data/ 0.4
mt_prep_snap Andy Hooper, August 2017

Amplitude Dispersion Threshold: 0.4
Processing 1 patch(es) in range and 1 in azimuth


   Segmentation violation detected at Fri Jul 14 08:46:49 2023 +0500

Configuration:
Crash Decoding : Disabled - No sandbox or build area path
Crash Mode : continue (default)
Default Encoding : UTF-8
Deployed : false
GNU C Library : 2.35 stable
Graphics Driver : Unknown software
MATLAB Architecture : glnxa64
MATLAB Entitlement ID : 9786130
MATLAB Root : /home/kamran/Downloads/matlab
MATLAB Version : 9.4.0.813654 (R2018a)
OpenGL : software
Operating System : Linux 4.4.0-19041-Microsoft #1-Microsoft Fri Dec 06 14:06:00 PST 2019 x86_64
Process ID : 973
Processor ID : x86 Family 6 Model 142 Stepping 9, GenuineIntel
Session Key : ce512735-8615-4d8e-acd5-fb6c820f507e
Static TLS mitigation : Disabled: Cannot load X11
Window System : No active display

Fault Count: 1
Abnormal termination

Register State (from fault):
RAX = 0000000000000006 RBX = 00007fe290039bf0
RCX = 0000000062616c74 RDX = 00007fe298beb430
RSP = 00007fe298beb280 RBP = 00007fe298beb4c0
RSI = 000000006c74616d RDI = 00007fe298beb430

R8 = 00007fe29405bc00 R9 = 0000000000000000
R10 = 00007fe2c5210ac0 R11 = f3ce36e79c9c0895
R12 = 0000000000000000 R13 = 0000000000000000
R14 = 00007fe298beb420 R15 = 00000000ffffffff

RIP = 00007fe2c53188e7 EFL = 0000000000010202

CS = 0033 FS = 002b GS = 0053

Stack Trace (from fault):
[ 0] 0x00007fe2c53188e7 bin/glnxa64/libmwsettingscore.so+01149159
[ 1] 0x00007fe2a049fae7 bin/glnxa64/libmwddux_impl.so+00654055
[ 2] 0x00007fe2a04a4daf bin/glnxa64/libmwddux_impl.so+00675247
[ 3] 0x00007fe2a04a4caf bin/glnxa64/libmwddux_impl.so+00674991
[ 4] 0x00007fe2a04a9906 bin/glnxa64/libmwddux_impl.so+00694534
[ 5] 0x00007fe29b41bc0f bin/glnxa64/libmwflhttpclient.so+00113679
[ 6] 0x00007fe29b4169c1 bin/glnxa64/libmwflhttpclient.so+00092609
[ 7] 0x00007fe29b4126d4 bin/glnxa64/libmwflhttpclient.so+00075476 _ZNK10foundation10httpclient16WebServiceClient3GETERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt3mapIS8_S8_St4lessIS8_ESaISt4pairIS8_S8_EEESI_St8functionIFviRSiEE+00000228
[ 8] 0x00007fe2a04ab783 bin/glnxa64/libmwddux_impl.so+00702339
[ 9] 0x00007fe2a047b5e2 bin/glnxa64/libmwddux_impl.so+00505314
[ 10] 0x00007fe2a046b990 bin/glnxa64/libmwddux_impl.so+00440720
[ 11] 0x00007fe2a0471e4a bin/glnxa64/libmwddux_impl.so+00466506
[ 12] 0x00007fe2a046dc3c bin/glnxa64/libmwddux_impl.so+00449596
[ 13] 0x00007fe2c9279962 bin/glnxa64/libmwms.so+02595170
[ 14] 0x00007fe2a046e0e7 bin/glnxa64/libmwddux_impl.so+00450791
[ 15] 0x00007fe2ca410dc4 /home/kamran/Downloads/matlab/bin/glnxa64/libmwboost_thread.so.1.56.0+00069060
[ 16] 0x00007fe2cb064b43 /lib/x86_64-linux-gnu/libc.so.6+00609091
[ 17] 0x00007fe2cb0f5bb4 /lib/x86_64-linux-gnu/libc.so.6+01203124 clone+00000068
[ 18] 0x0000000000000000 +00000000

** This crash report has been saved to disk as /home/kamran/matlab_crash_dump.973-1 **

MATLAB is exiting because of fatal error
Killed
opening /home/kamran/PSI_insar/INSAR_master_data//rslc/20150118.rslc…
Segmentation fault (core dumped)
4577
1491
mt_extract_cands Andy Hooper, Jan 2007

Patch: PATCH_1
selpsc_patch /home/kamran/PSI_insar/INSAR_master_data/selpsc.in patch.in pscands.1.ij pscands.1.da mean_amp.flt f 1
file name for zero amplitude PS: pscands.1.ij0
dispersion threshold = 0.4
width = 4577
number of amplitude files = 0
Segmentation fault (core dumped)

psclonlat /home/kamran/PSI_insar/INSAR_master_data/psclonlat.in pscands.1.ij pscands.1.ll
opening pscands.1.ij…
Error opening file pscands.1.ij

pscdem /home/kamran/PSI_insar/INSAR_master_data/pscdem.in pscands.1.ij pscands.1.hgt
opening pscands.1.ij…
pscdem: Error opening file pscands.1.ij

pscphase /home/kamran/PSI_insar/INSAR_master_data/pscphase.in pscands.1.ij pscands.1.ph
opening pscands.1.ij…
Error opening file pscands.1.ij

Install several compilers

kamran@DESKTOP-6LAQBUA:~/PSI_insar/INSAR_master_data$ sudo apt install software-properties-common
sudo: /etc/sudo.conf is world writable
sudo: /etc/sudo.conf is world writable
sudo: /etc/sudoers.d is world writable
[sudo] password for kamran:
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
software-properties-common is already the newest version (0.99.22.7).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
kamran@DESKTOP-6LAQBUA:~/PSI_insar/INSAR_master_data$ sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo: /etc/sudo.conf is world writable
sudo: /etc/sudo.conf is world writable
sudo: /etc/sudoers.d is world writable
PPA publishes dbgsym, you may need to include ‘main/debug’ component
Repository: ‘deb Index of /ubuntu-toolchain-r/test/ubuntu jammy main’
Description:
Toolchain test builds; see ToolChain - Ubuntu Wiki

More info: https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test
Adding repository.
Press [ENTER] to continue or Ctrl-c to cancel.
Found existing deb entry in /etc/apt/sources.list.d/ubuntu-toolchain-r-ubuntu-test-jammy.list
Adding deb entry to /etc/apt/sources.list.d/ubuntu-toolchain-r-ubuntu-test-jammy.list
Found existing deb-src entry in /etc/apt/sources.list.d/ubuntu-toolchain-r-ubuntu-test-jammy.list
Adding disabled deb-src entry to /etc/apt/sources.list.d/ubuntu-toolchain-r-ubuntu-test-jammy.list
Adding key to /etc/apt/trusted.gpg.d/ubuntu-toolchain-r-ubuntu-test.gpg with fingerprint 60C317803A41BA51845E371A1E9377A2BA9EF27F
Hit:1 Index of /ubuntu jammy InRelease
Get:2 Index of /ubuntu jammy-updates InRelease [119 kB]
Hit:3 Index of /ubuntu-toolchain-r/test/ubuntu jammy InRelease
Get:4 Index of /ubuntu jammy-backports InRelease [108 kB]
Get:5 Index of /ubuntu jammy-updates/main amd64 Packages [792 kB]
Get:6 Index of /ubuntu jammy-security InRelease [110 kB]
Get:7 Index of /ubuntu jammy-updates/main Translation-en [200 kB]
Get:8 Index of /ubuntu jammy-updates/main amd64 c-n-f Metadata [15.4 kB]
Get:9 Index of /ubuntu jammy-updates/restricted amd64 Packages [567 kB]
Get:10 Index of /ubuntu jammy-updates/restricted Translation-en [88.2 kB]
Get:11 Index of /ubuntu jammy-updates/universe amd64 Packages [943 kB]
Get:12 Index of /ubuntu jammy-security/main amd64 Packages [572 kB]
Get:13 Index of /ubuntu jammy-security/main Translation-en [140 kB]
Get:14 Index of /ubuntu jammy-security/main amd64 c-n-f Metadata [11.0 kB]
Get:15 Index of /ubuntu jammy-security/restricted amd64 Packages [558 kB]
Get:16 Index of /ubuntu jammy-security/restricted Translation-en [87.2 kB]
Fetched 4,310 kB in 16s (263 kB/s)
Reading package lists… Done
kamran@DESKTOP-6LAQBUA:~/PSI_insar/INSAR_master_data$ sudo apt install gcc-7 g+±7 gcc-8 g+±8 gcc-9 g+±9
sudo: /etc/sudo.conf is world writable
sudo: /etc/sudo.conf is world writable
sudo: /etc/sudoers.d is world writable
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
Package g+±8 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package g+±7 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package gcc-8 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package gcc-7 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package ‘gcc-7’ has no installation candidate
E: Package ‘g+±7’ has no installation candidate
E: Package ‘gcc-8’ has no installation candidate
E: Package ‘g+±8’ has no installation candidate

hi @mkamran,
In case it helps, I have the same version of ubuntu and managed to install the right compiler following this: PSI: Error on first step on Matlab - #77 by suat

In summary:

  • Update the sources.list file (sudo gedit /etc/apt/sources.list) by pasting the following line:

deb [arch=amd64] Index of /ubuntu focal main universe

note: replace “Index of /ubuntu” by httx://archive.ubuntu.com/ubuntu as in this post:

thanks Cristian_SP for your kind suggestions,