I built gcc 9.3.0 from source and want to test it with some simple examples. However, I'd like to keep the gcc installation on my Ubuntu 18.04 system intact. Ideally, I'd just open a console with environment variables ready for g .
Is there a simple way to achieve that? Some posts tell of "module" but I don't have such a tool.
Regards
To be more specific: I called configure and make, but not make install.
../gcc-9.3.0/configure -v --with-pkgversion='Ubuntu-18.04.4' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,c --program-suffix=-9.2 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-gtk-cairo --with-arch-directory=amd64 --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --disable-libstdcxx-pch
make -j12
I can't find a g binary in the build directory anywhere, only xg which produces the error output.
CodePudding user response:
Docker has taken the industry like a storm. To use gcc:9.3
, just install and run docker and do:
docker run -ti gcc9.3
You'll get a shell with gcc9.3 installed. For more information, see docker documentation.