I am installing GSI V3.5 https://dtcenter.org/com-GSI/users/. I have no experience in gcc so I cannot use a correct terminolgy for this. After compiling the program I get an error
” ........... "/raid60/raid2/opt/local/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: cannot find Scrt1.o: No such file or directory /raid60/raid2/opt/local/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: cannot find crti.o: No such file or directory /raid60/raid2/opt/local/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: cannot find -lm /raid60/raid2/opt/local/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: cannot find -lgomp "
It seems that there is problem with gcc which cannot find the directory including Scrt1.0, crti.o and others.I found these files in this directory /home/opt/anaconda/x86_64-conda_cos6-linux-gnu/sysroot/usr/lib. Because I do not have adminstration previlage, as suggested, I could not install packages like libc6-dev. Follwing https://askubuntu.com/questions/251978/cannot-find-crti-o-no-such-file-or-directory And https://askubuntu.com/questions/251978/cannot-find-crti-o-no-such-file-or-directory, I added the directory above to ~/.cshrc.
setenv LD_LIBRARY_PATH /home/opt/anaconda/x86_64-conda_cos6-linux-gnu/sysroot/usr/lib But still gcc does not recognize this path.
I also tried to feed this path into configure using LDFLGAS
> ./configure > LDFLAGS="-L/home/opt/anaconda/x86_64-conda_cos6-linux-gnu/sysroot/usr/lib" But no success. At the end I added LDFLAGS into configure
script. But it also did not work. Any help is highly apreaciated.
Of course, the expected answer would be making gcc identify the path
of crti.o and other missing files.
UPDATE: As Florian Weimer suggested, I made the file crt.specs. I also updated related line in configure. These files are in dropbox link . But I still get the same error.
UPDATE 2. These are some lines before error occurs:
../write_obsdiags.o ../wrwrfmassa.o ../wrwrfnmma.o -L/opt/local/wrf_kpp/gsi35/comGSIv3.5_EnKFv1.1/lib -lsp_i4r8 -lsigio_i4r4 -lsfcio_i4r4 -lnemsio -lbacio -lw3nco_i4r8 -lbufr_i4r8 -lw3emc_i4r8 -lcrtm /opt/local/wrf_kpp/WRFV3//external/io_int/libwrfio_int.a /opt/local/wrf_kpp/WRFV3//external/io_netcdf/libwrfio_nf.a /opt/local/wrf_kpp/WRFV3//frame/pack_utils.o /opt/local/wrf_kpp/WRFV3//frame/module_machine.o /opt/local/wrf_kpp/WRFV3//frame/module_driver_constants.o -L/home/srvx11/lehre/users/a1276905/.conda/envs/libgsi/lib -lnetcdff -lnetcdf -L/home/srvx11/lehre/users/a1276905/.conda/envs/libgsi/lib -L/home/srvx11/lehre/users/a1276905/.conda/envs/libgsi/lib -llapack -lblas -fopenmp /raid60/raid2/opt/local/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: cannot find Scrt1.o: No such file or directory
Update 3 I have used option -B to add directory including crti.o to the search path of gcc. when I invoke
gcc -print-search-dirs I see my desired path "/home/opt/anaconda/x86_64-conda_cos6-linux-gnu/sysroot/usr/lib" among known paths
libraries: =/home/opt/anaconda/x86_64-conda_cos6-linux-gnu/sysroot/usr/lib/x86_64-unknown-linux-gnu/5.3.0/:/home/opt/anaconda/x86_64-conda_cos6-linux-gnu/sysroot/usr/lib/:/usr/local/lib/gcc/x86_64-unknown-linux-gnu/5.3.0/:/usr/local/lib/gcc/x86_64-unknown-linux-gnu/5.3.0/../../../../x86_64-unknown-linux-gnu/lib/x86_64-unknown-linux-gnu/5.3.0/:/usr/local/lib/gcc/x86_64-unknown-linux-gnu/5.3.0/../../../../x86_64-unknown-linux-gnu/lib/../lib64/:/usr/local/lib/gcc/x86_64-unknown-linux-gnu/5.3.0/../../../x86_64-unknown-linux-gnu/5.3.0/:/usr/local/lib/gcc/x86_64-unknown-linux-gnu/5.3.0/../../../../lib64/:/lib/x86_64-unknown-linux-gnu/5.3.0/:/lib/../lib64/:/usr/lib/x86_64-unknown-linux-gnu/5.3.0/:/usr/lib/../lib64/:/usr/local/lib/gcc/x86_64-unknown-linux-gnu/5.3.0/../../../../x86_64-unknown-linux-gnu/lib/:/usr/local/lib/gcc/x86_64-unknown-linux-gnu/5.3.0/../../../:/lib/:/usr/lib/
But I am not through.