It is being developed for different operating systems of different digits. Working OS - ArchLinux x64. Due to the unwillingness to use virtual machines, it was decided to create virtual environments with a minimum number of system elements under which development is being conducted. In addition, in order to be able to use the latest compiler, I move my gcc / g ++ binaries to the appropriate folder (for example, / mnt / testOS1 / bin, / mnt / testOS1 / usr / bin ...). This is followed by chroot, then build and run.

All anything, but when the target system is x32, problems begin. Despite the fact that I put gcc-multilib, the gcc / g ++ binary itself has x64 digits and looks for corresponding libraries (libc and libm) for its launch, otherwise it gives ... wrong ELF class: ELFCLASS32. It is obviously impossible to change libraries, so that the whole system does not go.

By solving the problem with the given initial conditions, I see an indication of the paths to these libraries of the required width at the time of launch of g ++. Is it possible?

In addition, I would like to hear other, more correct, options for implementing such a development system.

  • what you are doing is very similar to vagrant. It is possible that for him already wrote configs for your case. And he uses virtual box. But very, very transparent. But I would try to get it all under the docker. This will allow you not to litter the main system and have ready-made "sets" for different cases. - KoVadim
  • @KoVadim that is, I can, let's say, run g ++ on my system from the environment of another system, using docker? - AccumPlus
  • inside the docker you can put the desired g ++. Thus, when it is necessary to switch to another machine (or even an axis), simply transfer the pre-file (which is text) and everything rises. - KoVadim
  • @KoVadim sounds comfortable. It remains to understand ... Thank you! - AccumPlus
  • Is the gcc / g ++ binary itself x64 bit wide - is something stopping to run an instance compiled for another architecture? - aleksandr barakin

0