0

I've built from source a version of GCC for Red Hat. Given that was a fairly expensive exercise, I'd like to "back up" the built version so I can avoid having to do it again on other machines or even if I scrap the VM it's currently built on.

What are my best options for doing that please?

imrichardcole
  • 4,633
  • 3
  • 23
  • 45

1 Answers1

0

This is what package managers are for. However, you have to build (usually) or deploy the package under the control of the package manager, because it is what keeps track of where the installed files are. You built it without using a package manager, and no longer have the complete build directory? Sorry, it's going to be quite tricky to find all the installed files.

However, if you still have the build directory and you haven't run make clean, you can just tar that up and copy that tar file somewhere, and run make install from an untarred copy of that tar file on each machine. Alternatively, you could use something like GNU Stow or XStow as a poor-man's package manager to deploy and undeploy it on various machines, by installing it to /usr/local/stow/gcc, tarring up the /usr/local/stow/gcc directory, untarring it on another machine, and then using GNU Stow to install it.

Robin Green
  • 32,079
  • 16
  • 104
  • 187
  • See available extra-gcc.rpm here https://stackoverflow.com/questions/47175706/how-to-install-gcc-4-9-2-on-rhel-7-4/47189915#47189915 → My answer. ( All versions were built from "gcc org.version" (no patches), installed, and the install result used to build the rpm packages.) Backup : Dropbox, Google Drive, etc. – Knud Larsen Apr 28 '18 at 13:26