public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* two gccs
@ 2021-10-17  2:16 Bill Cunningham
  2021-10-17  4:27 ` Dan Kegel
  2021-10-17  8:58 ` Patrick Begou
  0 siblings, 2 replies; 5+ messages in thread
From: Bill Cunningham @ 2021-10-17  2:16 UTC (permalink / raw)
  To: gcc-help

     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.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: two gccs
  2021-10-17  2:16 two gccs Bill Cunningham
@ 2021-10-17  4:27 ` Dan Kegel
  2021-10-17  8:58 ` Patrick Begou
  1 sibling, 0 replies; 5+ messages in thread
From: Dan Kegel @ 2021-10-17  4:27 UTC (permalink / raw)
  To: gcc-help

You may be interested in https://github.com/crosstool-ng/crosstool-ng,
which tries to make building nonsystem (aka cross) compliers easy...

Bill Cunningham via Gcc-help <gcc-help@gcc.gnu.org> schrieb am Sa., 16.
Okt. 2021, 19:21:

>      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.
>
>
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: two gccs
  2021-10-17  2:16 two gccs Bill Cunningham
  2021-10-17  4:27 ` Dan Kegel
@ 2021-10-17  8:58 ` Patrick Begou
  2021-10-17 14:44   ` Dan Kegel
  1 sibling, 1 reply; 5+ messages in thread
From: Patrick Begou @ 2021-10-17  8:58 UTC (permalink / raw)
  To: gcc-help

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: two gccs
  2021-10-17  8:58 ` Patrick Begou
@ 2021-10-17 14:44   ` Dan Kegel
  2021-10-17 15:57     ` Patrick Begou
  0 siblings, 1 reply; 5+ messages in thread
From: Dan Kegel @ 2021-10-17 14:44 UTC (permalink / raw)
  To: Patrick Begou; +Cc: gcc-help

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 <gcc-help@gcc.gnu.org> 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
>
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: two gccs
  2021-10-17 14:44   ` Dan Kegel
@ 2021-10-17 15:57     ` Patrick Begou
  0 siblings, 0 replies; 5+ messages in thread
From: Patrick Begou @ 2021-10-17 15:57 UTC (permalink / raw)
  To: Dan Kegel; +Cc: gcc-help

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
> <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 <gcc-help@gcc.gnu.org
> <mailto:gcc-help@gcc.gnu.org>> 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
>


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-10-17 15:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-17  2:16 two gccs Bill Cunningham
2021-10-17  4:27 ` Dan Kegel
2021-10-17  8:58 ` Patrick Begou
2021-10-17 14:44   ` Dan Kegel
2021-10-17 15:57     ` Patrick Begou

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).