I am a very inexperienced Ubuntu user. I am using a computer cluster at my university via SSH. The cluster has a version of gcc that was too old for something else that I needed to install, and I am trying to install an updated version of it just in my user space. I am trying to install version 4.9.4, while the cluster has 4.4.7. I do not have sudo privileges, and cannot use apt-get. I am following instructions from the official gcc page (which was also explained in this blog post I found).

The gcc page says that the make step could take a very long time, so I left it running overnight. At some point, I think my connection was interrupted, because today morning, my terminal said "Broken pipeline". This is the last thing that was shown from the make command to the terminal on my laptop:

make[2]: Entering directory `/nfs/thry/drpv/Gowri/Software/objdir'
make[3]: Entering directory `/nfs/thry/drpv/Gowri/Software/objdir'
rm -f stage_current
make[3]: Leaving directory `/nfs/thry/drpv/Gowri/Software/objdir'
Comparing stages 2 and 3
warning: gcc/cc1-checksum.o differs
warning: gcc/cc1plus-checksum.o differs

I would expect that even if my ssh connection was interrupted, the command that I typed in on the cluster computers should finish running. Am I wrong in assuming that?

I decided to go ahead and try make install anyway, and after a few minutes of running (and showing a bunch of steps on screen), I got this:

make[3]: Entering directory `/nfs/thry/drpv/Gowri/Software/objdir/x86_64-unknown-linux-gnu/libsanitizer/sanitizer_common'
Makefile:373: .deps/sanitizer_allocator.Plo: No such file or directory
Makefile:374: .deps/sanitizer_common.Plo: No such file or directory
Makefile:375: .deps/sanitizer_common_libcdep.Plo: No such file or directory
Makefile:376: .deps/sanitizer_coverage.Plo: No such file or directory
Makefile:377: .deps/sanitizer_flags.Plo: No such file or directory
Makefile:378: .deps/sanitizer_libc.Plo: No such file or directory
Makefile:379: .deps/sanitizer_libignore.Plo: No such file or directory
Makefile:380: .deps/sanitizer_linux.Plo: No such file or directory
Makefile:381: .deps/sanitizer_linux_libcdep.Plo: No such file or directory
Makefile:382: .deps/sanitizer_mac.Plo: No such file or directory
Makefile:383: .deps/sanitizer_platform_limits_linux.Plo: No such file or directory
Makefile:384: .deps/sanitizer_platform_limits_posix.Plo: No such file or directory
Makefile:385: .deps/sanitizer_posix.Plo: No such file or directory
Makefile:386: .deps/sanitizer_posix_libcdep.Plo: No such file or directory
Makefile:387: .deps/sanitizer_printf.Plo: No such file or directory
Makefile:388: .deps/sanitizer_stackdepot.Plo: No such file or directory
Makefile:389: .deps/sanitizer_stacktrace.Plo: No such file or directory
Makefile:390: .deps/sanitizer_stacktrace_libcdep.Plo: No such file or directory
Makefile:391: .deps/sanitizer_stoptheworld_linux_libcdep.Plo: No such file or directory
Makefile:392: .deps/sanitizer_suppressions.Plo: No such file or directory
Makefile:393: .deps/sanitizer_symbolizer.Plo: No such file or directory
Makefile:394: .deps/sanitizer_symbolizer_libbacktrace.Plo: No such file or directory
Makefile:395: .deps/sanitizer_symbolizer_libcdep.Plo: No such file or directory
Makefile:396: .deps/sanitizer_symbolizer_posix_libcdep.Plo: No such file or directory
Makefile:397: .deps/sanitizer_symbolizer_win.Plo: No such file or directory
Makefile:398: .deps/sanitizer_thread_registry.Plo: No such file or directory
Makefile:399: .deps/sanitizer_win.Plo: No such file or directory
make[3]: *** No rule to make target `.deps/sanitizer_win.Plo'.  Stop.
make[3]: Leaving directory `/nfs/thry/drpv/Gowri/Software/objdir/x86_64-unknown-linux-gnu/libsanitizer/sanitizer_common'
make[2]: *** [install-recursive] Error 1
make[2]: Leaving directory `/nfs/thry/drpv/Gowri/Software/objdir/x86_64-unknown-linux-gnu/libsanitizer'
make[1]: *** [install-target-libsanitizer] Error 2
make[1]: Leaving directory `/nfs/thry/drpv/Gowri/Software/objdir'
make: *** [install] Error 2

Does this mean that the install did not work properly, and I should try to redo the make? I would like to avoid the long wait time if possible, but I can redo it if necessary. Apologies for the rather long question and thanks in advance.

  • 1
    Looks like your gcc download is incomlplete. Did you read and follow all the README*, INSTALL*, etc files? – waltinator Apr 14 '18 at 20:25
  • The README file referred me to the webpage that I linked in my question. I followed the steps written there. I am not sure how I could be missing files from the download, since I got the tar file directly from one of the mirror sites mentioned on the official website. Could files be missing if the make didn't work properly? – Gowri Apr 14 '18 at 20:34
  • 2
    One of the main jobs of make is to figure out what targets are not up to date - so probably the simplest way to find out whether it completed successfully is to run it again and look for a make: '<progname>' is up to date. message – steeldriver Apr 14 '18 at 21:26
  • Can I run make again without uninstalling/removing any files? Does it just figure out what else needs to be done? – Gowri Apr 14 '18 at 22:45
  • If you want to run a remote job or keep a shell session throughout disconnections (deliberate or forced) you should look into terminal multiplexers and session managers like tmux or screen. That would also allow you to check the exit status of long running commands and see (at least the last few lines of) their output. – David Foerster Apr 16 '18 at 11:38

You could redirect your output for later perusal:

make <options> 2>&1 | tee make.out;  echo status $?

But I think the broken ssh link will stop it from completing. If that is a problem, use something like mosh. Mosh will let you reconnect a broken session even if you loose all connectivity, hibernate, change APs, etc.

  • after rereading your original question - I see you may not be able to install mosh of the server - you could try using screen for a similar capability. Here are some other suggestions: [askubuntu.com/questions/8653/… – Eric Apr 14 '18 at 21:10
  • Thank you for all the info! Normally when I need to submit jobs to the cluster, I use qsub. I suppose for installing software, this isn't really helpful? And do you think I should restart the make? If yes, do I need to throw out both the gcc folder and the objdir folder before I do it? I ask because untarring itself took some time. – Gowri Apr 14 '18 at 21:17

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.