From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from zm-mta-out-3.u-ga.fr (zm-mta-out-3.u-ga.fr [152.77.200.56]) by sourceware.org (Postfix) with ESMTPS id 529453858D28 for ; Sun, 17 Oct 2021 15:57:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 529453858D28 Received: from mailhost.u-ga.fr (mailhost2.u-ga.fr [129.88.177.242]) by zm-mta-out-3.u-ga.fr (Postfix) with ESMTP id 12C2A415BA; Sun, 17 Oct 2021 17:57:09 +0200 (CEST) Received: from smtps.univ-grenoble-alpes.fr (smtps2.u-ga.fr [152.77.18.2]) by mailhost.u-ga.fr (Postfix) with ESMTP id 0DE3E60066; Sun, 17 Oct 2021 17:57:09 +0200 (CEST) Received: from localhost.localdomain (82-64-214-7.subs.proxad.net [82.64.214.7]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: begoup@univ-grenoble-alpes.fr) by smtps.univ-grenoble-alpes.fr (Postfix) with ESMTPSA id A38EC14005A; Sun, 17 Oct 2021 17:57:08 +0200 (CEST) Subject: Re: two gccs To: Dan Kegel Cc: gcc-help References: <60e030ff-3eb7-6e35-777f-64e29e84bf4b@gmail.com> From: Patrick Begou Message-ID: <147167fb-5c08-9677-89c2-06a1c4d01d0d@univ-grenoble-alpes.fr> Date: Sun, 17 Oct 2021 17:57:07 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: Content-Language: fr X-Greylist: Whitelist-UGA SMTP Authentifie (begoup@univ-grenoble-alpes.fr) via submission-587 ACL (41) X-Greylist: Whitelist-UGA MAILHOST (SMTP non authentifie) depuis 152.77.18.2 X-Spam-Status: No, score=1.7 required=5.0 tests=BAYES_00, BODY_8BITS, HTML_MESSAGE, KAM_DMARC_STATUS, NICE_REPLY_A, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.4 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: gcc-help@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-help mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Oct 2021 15:57:12 -0000 Yes this is the software. I think you are running Linux (speaking of $PATH) and this software is packaged for many distributions and largely used from laptop to supercompters. I use it for a while on CentOS Linux: CentOS6/RHEL6 rpm: environment-modules-3.2.10-2.el6.x86_64 CentOS7/RHEL7 rpm: environment-modules-3.2.10-10.el7.x86_64 CentOS8/RHEL8 rpm: environment-modules-4.1.4-4.el8.x86_64 Ubuntu 20.4 : environment-modules 4.4.1-1 etc... A module file can be as simple as this example for gcc10 installed in /opt/GCC10.2/Compilers on my cluster: #%Module1.0##################################################################### ## ## gnu gcc 10.2 modulefile ## ## modulefiles/ ## proc ModulesHelp { } {         puts stderr "\t Use gnu compilers 10.2" } module-whatis   "Use Gnu gcc 10.2 compilers suite" # for Tcl script use only set gccHome /opt/GCC10.2/Compilers setenv GCCHOME $gccHome prepend-path    MANPATH $gccHome/share/man prepend-path    PATH $gccHome/bin prepend-path    LD_LIBRARY_PATH $gccHome/lib prepend-path    LD_LIBRARY_PATH $gccHome/lib64 if [ module-info mode load ] {   puts stderr "\tLoaded Gnu 10.2 compilers (gcc, g++, gfortran)" } There is a system location where these file must be (for system wide use): /usr/share/Modules for CentOS/RHEL and you can create sub-directories. Module files can also be located in a private directory for a user. In this case use: module use /my/private/module/files/directory Then basic commands are: module avail             => list available modules module load foo        => loads module foo module unload foo    => unload the module foo module purge            => unload all the modules module list                 => show the currently loaded modules This a very powerfull tool and I never get any trouble with it on Redhat and RedHat-like systems that I use. Patrick Le 17/10/2021 à 16:44, Dan Kegel a écrit : > Patrick, are you referring to http://modules.sourceforge.net > ? > > (Not all build systems are especially happy with its use > of LD_LIBRARY_PATH, I think, fwiw.) > > Bill, > can you describe your situation a little better? > > - Dan > > Patrick Begou via Gcc-help > schrieb am So., 17. Okt. 2021, 01:59: > > Le 17/10/2021 à 04:16, Bill Cunningham via Gcc-help a écrit : > >     I am partially complete with a build of gcc-11.2.0. The thing is > > that I need the system to recognize the gcc driver I am calling > on. I > > will also be working on two glibcs, but first thing first. > > > >     There is the system gcc, and the test gcc. Of course I can only > > get the system gcc to work. Can the $PATH variable be changed to > > access the test gcc, which btw, is not fully complete? Or can sym > > links be used in a very skillful manner. I have read both these ways > > can, somehow, be used. But I would think gcc runtime switches would > > work. The system is considering these two gccs as different as their > > triplets are different. > > > > > To uses several flavor of a same software, have a look at the > environment module. On my cluster It allows users to select gcc6, gcc9 > or gcc10 flavor easily in production, setting PATH, > LD_LIBRARY_PATH,....etc. with "module load" / "module unload" > commands. > > Patrick >