Linux Installation using StaMPS and S-1 data



i dont know why the error in image 1 above and when i tried processing it in matlab i got that error in image 2 above

Try to install this StaMPS code, and rerun mt_prep_snap once.
dbekaert/StaMPS: Stanford Method for Persistent Scatterers (github.com)


this is what i have been seeing after trying so many time

It’s ok. Try to run mt_prep_snap command



@suribabu is till the same thing. here image 1 is the error i have getting while image 2 is my stamps_config i dont know if the problem is from there

Try this once, best post by @ABraun

wow it works this time around after installing gcc version 7. thank you sir i really appreciate

1 Like

please i want to install stamps but i have error
click@click:/media/click/New Volume1/PHD/daren/psi/New folder/StaMPS-4.1-beta/src$ sudo su
[sudo] password for click:
root@click:/media/click/New Volume1/PHD/daren/psi/New folder/StaMPS-4.1-beta/src# sudo make
g++ -O3 -c -o calamp.o calamp.c
calamp.c: In function ‘int cshortswap(std::complex)’:
calamp.c:50:1: warning: no return statement in function returning non-void [-Wreturn-type]
50 | }
| ^
calamp.c: In function ‘int cfloatswap(std::complex
)’:
calamp.c:66:1: warning: no return statement in function returning non-void [-Wreturn-type]
66 | }
| ^
calamp.c: In function ‘int main(int, char**)’:
calamp.c:129:21: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister]
129 | for (register int x=0; x<width; x++) // for each pixel in range
| ^
Assembler messages:
Fatal error: can’t create calamp.o: Read-only file system
make: *** [: calamp.o] Error 1
root@click:/media/click/New Volume1/PHD/daren/psi/New folder/StaMPS-4.1-beta/src# sudo make install
g++ -O3 -c -o calamp.o calamp.c
calamp.c: In function ‘int cshortswap(std::complex)’:
calamp.c:50:1: warning: no return statement in function returning non-void [-Wreturn-type]
50 | }
| ^
calamp.c: In function ‘int cfloatswap(std::complex
)’:
calamp.c:66:1: warning: no return statement in function returning non-void [-Wreturn-type]
66 | }
| ^
calamp.c: In function ‘int main(int, char**)’:
calamp.c:129:21: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister]
129 | for (register int x=0; x<width; x++) // for each pixel in range
| ^
Assembler messages:
Fatal error: can’t create calamp.o: Read-only file system
root@click:/media/click/New Volume1/PHD/daren/psi/New folder/StaMPS-4.1-beta/src#
please help

You appear to be using an external file system. Linux installs to external drives often fail if the external filesystem is not a linux filesystem (ext4, xfs, etc).

You should not be using sudo to run make. Depending on the mount options and file system, the “root” user may not have access to your external file system.

You will find it helpful to spend some time learning some basic linux concepts and procedures. For a two-week course in ocean remote sensing we found that devoting a couple afternoon “practicals” to linux basics greatly reduced the time lost later due to problems using linux.

You may need to clean up file ownership and permissions resulting from incorrect application of sudo.

1 Like

/media/click/New Volume1/PHD/daren/psi/New folder/StaMPS-4.1-beta/src
Try to remove the spacing between the New Volume1 and New folder first.

click@click:~/Documents/InSAR/StaMPS-4.1-beta/src$ make
g++ -O3 -c -o calamp.o calamp.c
calamp.c: In function ‘int cshortswap(std::complex)’:
calamp.c:50:1: warning: no return statement in function returning non-void [-Wreturn-type]
50 | }
| ^
calamp.c: In function ‘int cfloatswap(std::complex
)’:
calamp.c:66:1: warning: no return statement in function returning non-void [-Wreturn-type]
66 | }
| ^
calamp.c: In function ‘int main(int, char**)’:
calamp.c:129:21: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister]
129 | for (register int x=0; x<width; x++) // for each pixel in range
| ^
g++ -O3 calamp.o -o calamp
g++ -O3 -c -o selpsc_patch.o selpsc_patch.c
selpsc_patch.c: In function ‘int cshortswap(std::complex)’:
selpsc_patch.c:60:1: warning: no return statement in function returning non-void [-Wreturn-type]
60 | }
| ^
selpsc_patch.c: In function ‘int shortswap(short int
)’:
selpsc_patch.c:70:1: warning: no return statement in function returning non-void [-Wreturn-type]
70 | }
| ^
selpsc_patch.c: In function ‘int cfloatswap(std::complex)’:
selpsc_patch.c:86:1: warning: no return statement in function returning non-void [-Wreturn-type]
86 | }
| ^
selpsc_patch.c: In function ‘int floatswap(float
)’:
selpsc_patch.c:98:1: warning: no return statement in function returning non-void [-Wreturn-type]
98 | }
| ^
selpsc_patch.c: In function ‘int longswap(int32_t*)’:
selpsc_patch.c:110:1: warning: no return statement in function returning non-void [-Wreturn-type]
110 | }
| ^
selpsc_patch.c: In function ‘int main(int, char**)’:
selpsc_patch.c:244:19: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister]
244 | register float* calib_factor = new float[num_files];
| ^~~~~~~~~~~~
selpsc_patch.c:246:21: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister]
246 | for (register int i=0; i<num_files; ++i)
| ^
selpsc_patch.c:341:21: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister]
341 | for (register int x=0; x<patch_width; x++) // for each pixel in range
| ^
selpsc_patch.c:349:21: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister]
349 | for (register int x=0; x<patch_width; x++) // for each pixel in range
| ^
selpsc_patch.c:370:16: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister]
370 | register int y=0; // amplitude files line number
| ^
selpsc_patch.c:371:16: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister]
371 | register int pscid=0; // PS candidate ID number
| ^~~~~
selpsc_patch.c:373:22: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister]
373 | register long long pix_start;
| ^~~~~~~~~
selpsc_patch.c:374:22: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister]
374 | register long long pos_start;
| ^~~~~~~~~
selpsc_patch.c:383:21: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister]
383 | for (register int i=0; i<num_files; i++) // read in first line from each amp file
| ^
selpsc_patch.c:406:26: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister]
406 | for (register int x=0; x<patch_width; x++) // for each pixel in range (width of the patch)
| ^
selpsc_patch.c:409:24: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister]
409 | register float sumamp = 0;
| ^~~~~~
selpsc_patch.c:410:24: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister]
410 | register float sumampsq = 0;
| ^~~~~~~~
selpsc_patch.c:436:27: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister]
436 | for (register int i=0; i<num_files; i++) // for each amp file
| ^
selpsc_patch.c:459:27: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister]
459 | register float amp=abs(camp)/calib_factor[i]/abs(master_amp); // get amp value
| ^~~
selpsc_patch.c:480:28: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister]
480 | register float D_sq=num_filessumampsq/(sumampsumamp) - 1; // var/mean^2
| ^~~~
selpsc_patch.c:499:31: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister]
499 | register float D_a = sqrt(D_sq);
| ^~~
selpsc_patch.c:515:24: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister]
515 | for (register int i=0; i<num_files; i++) // read in next line from each amp file
| ^
g++ -O3 selpsc_patch.o -o selpsc_patch
g++ -O3 -c -o selsbc_patch.o selsbc_patch.c
selsbc_patch.c: In function ‘int cshortswap(std::complex)’:
selsbc_patch.c:57:1: warning: no return statement in function returning non-void [-Wreturn-type]
57 | }
| ^
selsbc_patch.c: In function ‘int cfloatswap(std::complex
)’:
selsbc_patch.c:73:1: warning: no return statement in function returning non-void [-Wreturn-type]
73 | }
| ^
selsbc_patch.c: In function ‘int longswap(int32_t*)’:
selsbc_patch.c:84:1: warning: no return statement in function returning non-void [-Wreturn-type]
84 | }
| ^
g++ -O3 selsbc_patch.o -o selsbc_patch
g++ -O3 -c -o cpxsum.o cpxsum.c
g++ -O3 cpxsum.o -o cpxsum
g++ -O3 -c -o pscphase.o pscphase.c
g++ -O3 pscphase.o -o pscphase
g++ -O3 -c -o psclonlat.o psclonlat.c
g++ -O3 psclonlat.o -o psclonlat
g++ -O3 -c -o pscdem.o pscdem.c
g++ -O3 pscdem.o -o pscdem
click@click:~/Documents/InSAR/StaMPS-4.1-beta/src$ make install
make definstall;
make[1]: Entering directory ‘/home/click/Documents/InSAR/StaMPS-4.1-beta/src’
dir=…/bin;
if test ! -d $dir; then
echo “Sorry, dir …/bin does not exist, exiting…”; exit; fi;
echo Installing in directory: $dir;
list='calamp selpsc_patch selsbc_patch cpxsum pscphase psclonlat pscdem '; for p in $list; do
echo “Installing (copy): $p”;
cp -f $p …/bin/$p;
done
Installing in directory: …/bin
Installing (copy): calamp
Installing (copy): selpsc_patch
Installing (copy): selsbc_patch
Installing (copy): cpxsum
Installing (copy): pscphase
Installing (copy): psclonlat
Installing (copy): pscdem
make cleaner
make[2]: Entering directory ‘/home/click/Documents/InSAR/StaMPS-4.1-beta/src’

  • Removed junk.
  • Removed executables in source dir: /home/click/Documents/InSAR/StaMPS-4.1-beta/src.
    make[2]: Leaving directory ‘/home/click/Documents/InSAR/StaMPS-4.1-beta/src’
    make[1]: Leaving directory ‘/home/click/Documents/InSAR/StaMPS-4.1-beta/src’
    click@click:~/Documents/InSAR/StaMPS-4.1-beta/src$ g in directory: …/bin
    Installing (copy): calamp
    Installing (copy): cpxsum
    Installing (copy): pscphase
    Installing (copy): psclonlat
    Installing (copy): pscdem
    make cleaner
    make[2]: Entering directory ‘/home/click/Documents/InSAR/StaMPS-4.1-beta/src’
  • Removed junk.
  • Removed executables in source dir: /home/click/Documents/InSAR/StaMPS-4.1-beta/src.
    make[2]: Leaving directory ‘/home/click/Documents/InSAR/StaMPS-4.1-beta/src’
    make[1]: Leaving directory ‘/home/click/Documents/InSAR/StaMPS-4.1-beta/src’
    click@click:~/Documents/InSAR/StaMPS-4.1-beta/src$ g in directory: …/bin
    Installing (copy): calamp
    Installing (copy): selpsc_patch
    Installing (copy): selsbc_patch
    Installing (copy): cpxsum
    Installing (copy): pscphase
    Installing (copy): psclonlat
    Installing (copy): pscdem
    make cleaner
    make[2]: Entering directory ‘/home/click/Documents/InSAR/StaMPS-4.1-beta/src’
  • Removed junk.
  • Removed executables in source dir: /home/click/Documents/InSAR/StaMPS-4.1-beta/src.
    make[2]: Leaving directory ‘/home/click/Documents/InSAR/StaMPS-4.1-beta/src’
    make[1]: Leaving directory ‘/home/click/Documents/InSAR/StaMPS-4.1-beta/src’
    click@click:~/Documents/InSAR/StaMPS-4.1-beta/src$^C
    click@click:~/Documents/InSAR/StaMPS-4.1-beta/src$
    is that right please

I want to install snaphu
root@click:/usr/local/snaphu# apt install snaphu
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
snaphu is already the newest version (2.0.5-1).
0 upgraded, 0 newly installed, 0 to remove and 197 not upgraded.
root@click:/usr/local/snaphu#
but I do not anything in snaphu
image

if my work is right Where STaMPS was installed
please help
thank you so much in advance gnwiii , suribabu

Nice, I think you installed StaMPS correctly. Better try to process your data set and check it.

I want to install snaphu
root@click:/usr/local/snaphu# apt install snaphu
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
snaphu is already the newest version (2.0.5-1).
0 upgraded, 0 newly installed, 0 to remove and 197 not upgraded.
root@click:/usr/local/snaphu#
but I do not find anything in snaphu
https://forum.step.esa.int/uploads/default/original/3X/d/f/df3d582cc6cd2d060cb7297510a7fabc39c2dc2a.png

Already snaphu installed in your PC. Better try to process your data first.

please another question to in stall triangle
click@click:~/Documents/InSAR/triangle$ sudo apt-get install Triangle
[sudo] password for click:
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
E: Unable to locate package Triangle
click@click:~/Documents/InSAR/triangle$ sudo mkdir /usr/local/triangle
click@click:~/Documents/InSAR/triangle$ cd /usr/local/triangle
click@click:/usr/local/triangle$ sudo apt-get install Triangle
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
E: Unable to locate package Triangle
click@click:/usr/local/triangle$

please i try to run mt_prep_snap command but i have
click@click:~/Documents/stamps/INSAR_master_data$ sudo su
[sudo] password for click:
root@click:/home/click/Documents/stamps/INSAR_master_data# mt_prep_snap 20200508 ~/Documents/stamps/INSAR_master_data/ 0.4
mt_prep_snap: command not found
root@click:/home/click/Documents/stamps/INSAR_master_data#

Try this once.

do you mean this
export STAMPS="/home/click/Douments/InSAR/StaMPS-4.1-beta/bin"
#export SAR="/home/ahooper/software/ROI_PAC_3_0"
#export GETORB_BIN="/home/ahooper/software/getorb/bin"
#export SAR_ODR_DIR="/home/ahooper/software/SAR_FILES/ODR"
#export SAR_PRC_DIR “/home/ahooper/software/SAR_FILES/PRC”
#export VOR_DIR="/home/ahooper/software/SAR_FILES/VOR"
#export INS_DIR="/home/ahooper/software/SAR_FILES/INS"
#export DORIS_BIN="/home/ahooper/software/doris_v4.02/bin"
export TRIANGLE_BIN="/Documents/InSAR/triangle/bin"
export SNAPHU_BIN="/Documents/InSAR/snaphu-v2.0.3/bin"

#export ROI_PAC="$SAR/ROI_PAC"
#####################################

ROI_PAC VERSION 3

#####################################
#export INT_BIN="$ROI_PAC/INT_BIN"
#export INT_SCR="$ROI_PAC/INT_SCR"
#####################################

#####################################

ROI_PAC VERSION 2.3 and before

#####################################
and i run source .bashrc
click@click:~/Documents/InSAR/StaMPS-4.1-beta$ dir
bin INSTALL Manual README.md snaphu.conf StaMPS_CONFIG.bash
DORIS_SCR LICENSE matlab ROI_PAC_SCR src StaMPS_CONFIG.tcsh
click@click:~/Documents/InSAR/StaMPS-4.1-beta$ source StaMPS_CONFIG.bash
click@click:~/Documents/InSAR/StaMPS-4.1-beta$ cd …/
click@click:~/Documents/InSAR$ dir
INSAR_master_data StaMPS-4.1-beta TRAIN-master.zip triangle.zip
snaphu-v2.0.3 TRAIN-master triangle
click@click:~/Documents/InSAR$ cd …/
click@click:~/Documents$ dir
InSAR MATLAB stamps
click@click:~/Documents$ cd InSAR
click@click:~/Documents/InSAR$ dir
INSAR_master_data StaMPS-4.1-beta TRAIN-master.zip triangle.zip
snaphu-v2.0.3 TRAIN-master triangle
click@click:~/Documents/InSAR$ cd …/
click@click:~/Documents$ dir
InSAR MATLAB stamps
click@click:~/Documents$ cd InSAR/
click@click:~/Documents/InSAR$ sudo su
[sudo] password for click:
root@click:/home/click/Documents/InSAR# dir
INSAR_master_data StaMPS-4.1-beta TRAIN-master.zip triangle.zip
snaphu-v2.0.3 TRAIN-master triangle
root@click:/home/click/Documents/InSAR# cd INSAR_master_data
root@click:/home/click/Documents/InSAR/INSAR_master_data# dir
dem diff0 geo rslc
root@click:/home/click/Documents/InSAR/INSAR_master_data# mt_prep_snap 20200508 ~/Documents/stamps/INSAR_master_data/ 0.4
mt_prep_snap: command not found
root@click:/home/click/Documents/InSAR/INSAR_master_data# mt_prep_snap 20200508 /home/click/Documents/stamps/INSAR_master_data/ 0.4
mt_prep_snap: command not found
root@click:/home/click/Documents/InSAR/INSAR_master_data#
please help