public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* GCC 6.3.0 build fails on Ubuntu 20.04: make: *** [Makefile:924: all] Error 2 - libitm / libquadmath
@ 2021-01-26 21:04 lordmund
  2021-01-26 21:23 ` Paul Smith
  0 siblings, 1 reply; 8+ messages in thread
From: lordmund @ 2021-01-26 21:04 UTC (permalink / raw)
  To: gcc-help

Dear members,

I would like to build GCC 6.3.0 on Ubuntu 20.04, but the build process fails at the below point.

 math/tanhq.lo math/expq.lo math/modfq.lo math/tanq.lo math/fabsq.lo math/nanq.lo math/tgammaq.lo math/finiteq.lo math/nextafterq.lo math/truncq.lo math/floorq.lo math/powq.lo math/fmaq.lo math/logbq.lo math/cacoshq.lo math/cacosq.lo math/casinhq.lo math/casinq.lo math/catanhq.lo math/catanq.lo math/cimagq.lo math/conjq.lo math/cprojq.lo math/crealq.lo math/fdimq.lo math/fmaxq.lo math/fminq.lo math/ilogbq.lo math/llrintq.lo math/log2q.lo math/lrintq.lo math/nearbyintq.lo math/remquoq.lo math/ccoshq.lo math/cexpq.lo math/clog10q.lo math/clogq.lo math/csinq.lo math/csinhq.lo math/csqrtq.lo math/ctanq.lo math/ctanhq.lo printf/addmul_1.lo printf/add_n.lo printf/cmp.lo printf/divrem.lo printf/flt1282mpn.lo printf/fpioconst.lo printf/lshift.lo printf/mul_1.lo printf/mul_n.lo printf/mul.lo printf/printf_fphex.lo printf/printf_fp.lo printf/quadmath-printf.lo printf/rshift.lo printf/submul_1.lo printf/sub_n.lo strtod/strtoflt128.lo strtod/mpn2flt128.lo strtod/tens_in_limb.lo
libtool: link: /home/rawpointer/build/./gcc/xgcc -B/home/rawpointer/build/./gcc/ -B/usr/local/gcc-6.3/x86_64-linux-gnu/bin/ -B/usr/local/gcc-6.3/x86_64-linux-gnu/lib/ -isystem /usr/local/gcc-6.3/x86_64-linux-gnu/include -isystem /usr/local/gcc-6.3/x86_64-linux-gnu/sys-include    -shared  -fPIC -DPIC  math/.libs/x2y2m1q.o math/.libs/isinf_nsq.o math/.libs/acoshq.o math/.libs/fmodq.o math/.libs/acosq.o math/.libs/frexpq.o math/.libs/rem_pio2q.o math/.libs/asinhq.o math/.libs/hypotq.o math/.libs/remainderq.o math/.libs/asinq.o math/.libs/rintq.o math/.libs/atan2q.o math/.libs/isinfq.o math/.libs/roundq.o math/.libs/atanhq.o math/.libs/isnanq.o math/.libs/scalblnq.o math/.libs/atanq.o math/.libs/j0q.o math/.libs/scalbnq.o math/.libs/cbrtq.o math/.libs/j1q.o math/.libs/signbitq.o math/.libs/ceilq.o math/.libs/jnq.o math/.libs/sincos_table.o math/.libs/complex.o math/.libs/ldexpq.o math/.libs/sincosq.o math/.libs/copysignq.o math/.libs/lgammaq.o math/.libs/sincosq_kernel.o math/.libs/coshq.o math/.libs/llroundq.o math/.libs/sinhq.o math/.libs/cosq.o math/.libs/log10q.o math/.libs/sinq.o math/.libs/cosq_kernel.o math/.libs/log1pq.o math/.libs/sinq_kernel.o math/.libs/erfq.o math/.libs/logq.o math/.libs/sqrtq.o math/.libs/expm1q.o math/.libs/lroundq.o math/.libs/tanhq.o math/.libs/expq.o math/.libs/modfq.o math/.libs/tanq.o math/.libs/fabsq.o math/.libs/nanq.o math/.libs/tgammaq.o math/.libs/finiteq.o math/.libs/nextafterq.o math/.libs/truncq.o math/.libs/floorq.o math/.libs/powq.o math/.libs/fmaq.o math/.libs/logbq.o math/.libs/cacoshq.o math/.libs/cacosq.o math/.libs/casinhq.o math/.libs/casinq.o math/.libs/catanhq.o math/.libs/catanq.o math/.libs/cimagq.o math/.libs/conjq.o math/.libs/cprojq.o math/.libs/crealq.o math/.libs/fdimq.o math/.libs/fmaxq.o math/.libs/fminq.o math/.libs/ilogbq.o math/.libs/llrintq.o math/.libs/log2q.o math/.libs/lrintq.o math/.libs/nearbyintq.o math/.libs/remquoq.o math/.libs/ccoshq.o math/.libs/cexpq.o math/.libs/clog10q.o math/.libs/clogq.o math/.libs/csinq.o math/.libs/csinhq.o math/.libs/csqrtq.o math/.libs/ctanq.o math/.libs/ctanhq.o printf/.libs/addmul_1.o printf/.libs/add_n.o printf/.libs/cmp.o printf/.libs/divrem.o printf/.libs/flt1282mpn.o printf/.libs/fpioconst.o printf/.libs/lshift.o printf/.libs/mul_1.o printf/.libs/mul_n.o printf/.libs/mul.o printf/.libs/printf_fphex.o printf/.libs/printf_fp.o printf/.libs/quadmath-printf.o printf/.libs/rshift.o printf/.libs/submul_1.o printf/.libs/sub_n.o strtod/.libs/strtoflt128.o strtod/.libs/mpn2flt128.o strtod/.libs/tens_in_limb.o   -lm  -Wl,--version-script=../../../gcc-6.3.0/libquadmath/quadmath.map   -Wl,-soname -Wl,libquadmath.so.0 -o .libs/libquadmath.so.0.0.0
libtool: link: (cd ".libs" && rm -f "libquadmath.so.0" && ln -s "libquadmath.so.0.0.0" "libquadmath.so.0")
libtool: link: (cd ".libs" && rm -f "libquadmath.so" && ln -s "libquadmath.so.0.0.0" "libquadmath.so")
libtool: link: x86_64-linux-gnu-ar rc .libs/libquadmath.a  math/x2y2m1q.o math/isinf_nsq.o math/acoshq.o math/fmodq.o math/acosq.o math/frexpq.o math/rem_pio2q.o math/asinhq.o math/hypotq.o math/remainderq.o math/asinq.o math/rintq.o math/atan2q.o math/isinfq.o math/roundq.o math/atanhq.o math/isnanq.o math/scalblnq.o math/atanq.o math/j0q.o math/scalbnq.o math/cbrtq.o math/j1q.o math/signbitq.o math/ceilq.o math/jnq.o math/sincos_table.o math/complex.o math/ldexpq.o math/sincosq.o math/copysignq.o math/lgammaq.o math/sincosq_kernel.o math/coshq.o math/llroundq.o math/sinhq.o math/cosq.o math/log10q.o math/sinq.o math/cosq_kernel.o math/log1pq.o math/sinq_kernel.o math/erfq.o math/logq.o math/sqrtq.o math/expm1q.o math/lroundq.o math/tanhq.o math/expq.o math/modfq.o math/tanq.o math/fabsq.o math/nanq.o math/tgammaq.o math/finiteq.o math/nextafterq.o math/truncq.o math/floorq.o math/powq.o math/fmaq.o math/logbq.o math/cacoshq.o math/cacosq.o math/casinhq.o math/casinq.o math/catanhq.o math/catanq.o math/cimagq.o math/conjq.o math/cprojq.o math/crealq.o math/fdimq.o math/fmaxq.o math/fminq.o math/ilogbq.o math/llrintq.o math/log2q.o math/lrintq.o math/nearbyintq.o math/remquoq.o math/ccoshq.o math/cexpq.o math/clog10q.o math/clogq.o math/csinq.o math/csinhq.o math/csqrtq.o math/ctanq.o math/ctanhq.o printf/addmul_1.o printf/add_n.o printf/cmp.o printf/divrem.o printf/flt1282mpn.o printf/fpioconst.o printf/lshift.o printf/mul_1.o printf/mul_n.o printf/mul.o printf/printf_fphex.o printf/printf_fp.o printf/quadmath-printf.o printf/rshift.o printf/submul_1.o printf/sub_n.o strtod/strtoflt128.o strtod/mpn2flt128.o strtod/tens_in_limb.o
libtool: link: x86_64-linux-gnu-ranlib .libs/libquadmath.a
libtool: link: ( cd ".libs" && rm -f "libquadmath.la" && ln -s "../libquadmath.la" "libquadmath.la" )
make[3]: Leaving directory '/home/suprawpointeru/build/x86_64-linux-gnu/libquadmath'
make[2]: Leaving directory '/home/rawpointer/build/x86_64-linux-gnu/libquadmath'
mv -f .deps/method-ml.Tpo .deps/method-ml.Plo
/bin/bash ./libtool --tag=CC   --mode=link /home/rawpointer/build/./gcc/xgcc -B/home/rawpointer/build/./gcc/ -B/usr/local/gcc-6.3/x86_64-linux-gnu/bin/ -B/usr/local/gcc-6.3/x86_64-linux-gnu/lib/ -isystem /usr/local/gcc-6.3/x86_64-linux-gnu/include -isystem /usr/local/gcc-6.3/x86_64-linux-gnu/sys-include    -mrtm -Wall -Werror  -Wc,-pthread -g -O2   -Wl,-O1    -o libitm.la -version-info 1:0:0 -Wl,--version-script,../../../gcc-6.3.0/libitm/libitm.map -rpath /usr/local/gcc-6.3/lib/../lib64 aatree.lo alloc.lo alloc_c.lo alloc_cpp.lo barrier.lo beginend.lo clone.lo eh_cpp.lo local.lo query.lo retry.lo rwlock.lo useraction.lo util.lo sjlj.lo tls.lo method-serial.lo method-gl.lo method-ml.lo  x86_sse.lo x86_avx.lo futex.lo
libtool: link: /home/rawpointer/build/./gcc/xgcc -B/home/rawpointer/build/./gcc/ -B/usr/local/gcc-6.3/x86_64-linux-gnu/bin/ -B/usr/local/gcc-6.3/x86_64-linux-gnu/lib/ -isystem /usr/local/gcc-6.3/x86_64-linux-gnu/include -isystem /usr/local/gcc-6.3/x86_64-linux-gnu/sys-include    -shared  -fPIC -DPIC  .libs/aatree.o .libs/alloc.o .libs/alloc_c.o .libs/alloc_cpp.o .libs/barrier.o .libs/beginend.o .libs/clone.o .libs/eh_cpp.o .libs/local.o .libs/query.o .libs/retry.o .libs/rwlock.o .libs/useraction.o .libs/util.o .libs/sjlj.o .libs/tls.o .libs/method-serial.o .libs/method-gl.o .libs/method-ml.o .libs/x86_sse.o .libs/x86_avx.o .libs/futex.o    -mrtm -pthread -Wl,-O1 -Wl,--version-script -Wl,../../../gcc-6.3.0/libitm/libitm.map   -Wl,-soname -Wl,libitm.so.1 -o .libs/libitm.so.1.0.0
libtool: link: (cd ".libs" && rm -f "libitm.so.1" && ln -s "libitm.so.1.0.0" "libitm.so.1")
libtool: link: (cd ".libs" && rm -f "libitm.so" && ln -s "libitm.so.1.0.0" "libitm.so")
libtool: link: x86_64-linux-gnu-ar rc .libs/libitm.a  aatree.o alloc.o alloc_c.o alloc_cpp.o barrier.o beginend.o clone.o eh_cpp.o local.o query.o retry.o rwlock.o useraction.o util.o sjlj.o tls.o method-serial.o method-gl.o method-ml.o x86_sse.o x86_avx.o futex.o
libtool: link: x86_64-linux-gnu-ranlib .libs/libitm.a
libtool: link: ( cd ".libs" && rm -f "libitm.la" && ln -s "../libitm.la" "libitm.la" )
make[4]: Leaving directory '/home/rawpointer/build/x86_64-linux-gnu/libitm'
make[3]: Leaving directory '/home/rawpointer/build/x86_64-linux-gnu/libitm'
make[2]: Leaving directory '/home/rawpointer/build/x86_64-linux-gnu/libitm'
make[1]: Leaving directory '/home/rawpointer/build'
make: *** [Makefile:924: all] Error 2

Unfortunately, the above error message is quite informative. (maybe just for me)

For the build process, I've been following this guide:

https://linuxhostsupport.com/blog/how-to-install-gcc-on-ubuntu-18-04/

For more information; I have applied changes from a previous thread here on this mailing list as I also had those same problems before. These are fixed now.

http://gcc.1065356.n8.nabble.com/Building-gcc6-3-0-on-Ubuntu-20-04-td1728254.html

However my current one is different and unresolved yet.

Could someone help me please in resolving this issue? Any hint, leads are highly appreciated.

Thank you in advance. /rawpointer

_____________________________________
Sent from http://gcc.1065356.n8.nabble.com


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

* Re: GCC 6.3.0 build fails on Ubuntu 20.04: make: *** [Makefile:924: all] Error 2 - libitm / libquadmath
  2021-01-26 21:04 GCC 6.3.0 build fails on Ubuntu 20.04: make: *** [Makefile:924: all] Error 2 - libitm / libquadmath lordmund
@ 2021-01-26 21:23 ` Paul Smith
  2021-01-27 14:34   ` lordmund
  0 siblings, 1 reply; 8+ messages in thread
From: Paul Smith @ 2021-01-26 21:23 UTC (permalink / raw)
  To: lordmund, gcc-help

On Tue, 2021-01-26 at 14:04 -0700, lordmund--- via Gcc-help wrote:
> Unfortunately, the above error message is quite informative. (maybe
> just for me)

I don't see any actual error messages here (other than the last line
which is just make telling you that something earlier failed).

I suspect that the actual error is much earlier in your build process
than what you quote here, and since you're using parallel builds the
build continues on with other things even after the error.

You should be sure you redirect the output of the build (and stderr!)
to a file, then search the file for the FIRST instance of a make error
message (has the "***" in the message) and look at what errors happened
just before that.  Maybe that will help you understand the problem.  If
not reply to the list with those error messages.


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

* Re: GCC 6.3.0 build fails on Ubuntu 20.04: make: *** [Makefile:924: all] Error 2 - libitm / libquadmath
  2021-01-26 21:23 ` Paul Smith
@ 2021-01-27 14:34   ` lordmund
  2021-01-27 14:38     ` lordmund
  2021-01-27 15:48     ` Jonathan Wakely
  0 siblings, 2 replies; 8+ messages in thread
From: lordmund @ 2021-01-27 14:34 UTC (permalink / raw)
  To: psmith; +Cc: gcc-help

Hi Paul / Hi All,

Thank you very much. I appreciate your very quick answer.

All your recommendations proved to be very useful.

As you suggested, I redirected the output of both the build and stderr to an external file, and let the build process run in serial mode instead of the parallel one that I had done before.

The serial build took much more time (about 2 hours) but this is normal behavior. I presume.

In fact, I had to let it run twice as after the first run. The same error message about 'sanitizer_platform_limits_posix.cc' occured as explained in the second link of my original post.

This one was straightforward to fix based on that information.

Then after the second run, which was successful, I have investigated again the log file. No error message appeared only a few warning messages. I think they are acceptable.

So after all these, I went further as described at the very first link of my OP.
which is for easier reference here again:
https://linuxhostsupport.com/blog/how-to-install-gcc-on-ubuntu-18-04/

These are the specific steps that I closely followed:

"
Once the build is finished, we can continue to actually installing GCC with the following command:

sudo make install

With adding the following lines at the end of the .bashrc file, we will permanently add the compilers to the system’s path.

nano /root/.bashrc

Add this to the end of that file:

export export PATH=/usr/local/gcc-8.2/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/gcc-8.2/lib64:$LD_LIBRARY_PATH

With this command, we will reload .bashrc without restarting the machine:

. .bashrc
"

No error messages or anything similar, therefore my opinion is that everything was successful.

The GCC 6.3.0 was installed in the below directory of my computer:

/usr/local/gcc-6.3

However, my Ubuntu (terminal) cannot find the path to the recently installed GCC 6.3.0, which I find very interesting why.

Could you please help me what I still miss to properly configure GCC 6.3.0?

In my opinion, there must be only a very minor command that needs to be run for the entirely correct configuration.

Thank you very much for your help in advance again.

/rawpointer



‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Tuesday, January 26, 2021 10:23 PM, Paul Smith <psmith@gnu.org> wrote:

> On Tue, 2021-01-26 at 14:04 -0700, lordmund--- via Gcc-help wrote:
>
> > Unfortunately, the above error message is quite informative. (maybe
> > just for me)
>
> I don't see any actual error messages here (other than the last line
> which is just make telling you that something earlier failed).
>
> I suspect that the actual error is much earlier in your build process
> than what you quote here, and since you're using parallel builds the
> build continues on with other things even after the error.
>
> You should be sure you redirect the output of the build (and stderr!)
> to a file, then search the file for the FIRST instance of a make error
> message (has the "***" in the message) and look at what errors happened
> just before that. Maybe that will help you understand the problem. If
> not reply to the list with those error messages.



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

* Re: GCC 6.3.0 build fails on Ubuntu 20.04: make: *** [Makefile:924: all] Error 2 - libitm / libquadmath
  2021-01-27 14:34   ` lordmund
@ 2021-01-27 14:38     ` lordmund
  2021-01-27 15:48     ` Jonathan Wakely
  1 sibling, 0 replies; 8+ messages in thread
From: lordmund @ 2021-01-27 14:38 UTC (permalink / raw)
  To: psmith; +Cc: gcc-help

Sorry. Minor correction.

Please disregard the previous ones at which I wrote "gcc-8.2". That was incorrect.

This is how I set the paths:

export export PATH=/usr/local/gcc-6.3/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/gcc-6.3/lib64:$LD_LIBRARY_PATH


‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Wednesday, January 27, 2021 3:34 PM, lordmund <lordmund@protonmail.com> wrote:

> Hi Paul / Hi All,
>
> Thank you very much. I appreciate your very quick answer.
>
> All your recommendations proved to be very useful.
>
> As you suggested, I redirected the output of both the build and stderr to an external file, and let the build process run in serial mode instead of the parallel one that I had done before.
>
> The serial build took much more time (about 2 hours) but this is normal behavior. I presume.
>
> In fact, I had to let it run twice as after the first run. The same error message about 'sanitizer_platform_limits_posix.cc' occured as explained in the second link of my original post.
>
> This one was straightforward to fix based on that information.
>
> Then after the second run, which was successful, I have investigated again the log file. No error message appeared only a few warning messages. I think they are acceptable.
>
> So after all these, I went further as described at the very first link of my OP.
> which is for easier reference here again:
> https://linuxhostsupport.com/blog/how-to-install-gcc-on-ubuntu-18-04/
>
> These are the specific steps that I closely followed:
>
> "
> Once the build is finished, we can continue to actually installing GCC with the following command:
>
> sudo make install
>
> With adding the following lines at the end of the .bashrc file, we will permanently add the compilers to the system’s path.
>
> nano /root/.bashrc
>
> Add this to the end of that file:
>
> export export PATH=/usr/local/gcc-8.2/bin:$PATH
> export LD_LIBRARY_PATH=/usr/local/gcc-8.2/lib64:$LD_LIBRARY_PATH
>
> With this command, we will reload .bashrc without restarting the machine:
>
> . .bashrc
> "
>
> No error messages or anything similar, therefore my opinion is that everything was successful.
>
> The GCC 6.3.0 was installed in the below directory of my computer:
>
> /usr/local/gcc-6.3
>
> However, my Ubuntu (terminal) cannot find the path to the recently installed GCC 6.3.0, which I find very interesting why.
>
> Could you please help me what I still miss to properly configure GCC 6.3.0?
>
> In my opinion, there must be only a very minor command that needs to be run for the entirely correct configuration.
>
> Thank you very much for your help in advance again.
>
> /rawpointer
>
> ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
> On Tuesday, January 26, 2021 10:23 PM, Paul Smith psmith@gnu.org wrote:
>
> > On Tue, 2021-01-26 at 14:04 -0700, lordmund--- via Gcc-help wrote:
> >
> > > Unfortunately, the above error message is quite informative. (maybe
> > > just for me)
> >
> > I don't see any actual error messages here (other than the last line
> > which is just make telling you that something earlier failed).
> > I suspect that the actual error is much earlier in your build process
> > than what you quote here, and since you're using parallel builds the
> > build continues on with other things even after the error.
> > You should be sure you redirect the output of the build (and stderr!)
> > to a file, then search the file for the FIRST instance of a make error
> > message (has the "***" in the message) and look at what errors happened
> > just before that. Maybe that will help you understand the problem. If
> > not reply to the list with those error messages.



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

* Re: GCC 6.3.0 build fails on Ubuntu 20.04: make: *** [Makefile:924: all] Error 2 - libitm / libquadmath
  2021-01-27 14:34   ` lordmund
  2021-01-27 14:38     ` lordmund
@ 2021-01-27 15:48     ` Jonathan Wakely
  2021-01-27 16:24       ` lordmund
  1 sibling, 1 reply; 8+ messages in thread
From: Jonathan Wakely @ 2021-01-27 15:48 UTC (permalink / raw)
  To: lordmund; +Cc: psmith, gcc-help

On Wed, 27 Jan 2021 at 15:45, lordmund via Gcc-help
<gcc-help@gcc.gnu.org> wrote:
> The GCC 6.3.0 was installed in the below directory of my computer:
>
> /usr/local/gcc-6.3
>
> However, my Ubuntu (terminal) cannot find the path to the recently installed GCC 6.3.0, which I find very interesting why.

Because you installed it to a directory that isn't in your PATH. This
is normal, and how linux/unix works.

Either run /usr/local/gcc-6.3/bin/gcc or add /usr/local/gcc-6.3/bin to
your PATH.

N.B. this is not a GCC question, this is a basic "how do I use
ubuntu?" question.

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

* Re: GCC 6.3.0 build fails on Ubuntu 20.04: make: *** [Makefile:924: all] Error 2 - libitm / libquadmath
  2021-01-27 15:48     ` Jonathan Wakely
@ 2021-01-27 16:24       ` lordmund
  2021-01-27 17:38         ` Jonathan Wakely
  0 siblings, 1 reply; 8+ messages in thread
From: lordmund @ 2021-01-27 16:24 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: psmith, gcc-help

Hi Jonathan / Hi All,

Thank you very much for the very prompt reply and hint.

You are right! That was rather a general Ubuntu related question. I'm sorry for that.

I took the N.B. on PATH for the rest of my life. Thanks much.

Back to the previous topic. The truth is that the directory "/usr/local/gcc-6.3/bin" was already correctly added to PATH after editing ".bashrc". I've just checked it now.

How I can see now, the reasons for throwing a "sudo: gcc-6: command not" found output after "sudo gcc-6 --version" command are two fold:

(1) the name of the file in that specific folder "usr/local/gcc-6.3/bin" is not "gcc-6" but "gcc-6.3" in my case;

(2) with the "sudo" prefix it does not work only without it. cf. below.

rawpointer@rawpointer-ubuntu:~$ gcc-6.3 --version
gcc-6.3 (GCC) 6.3.0
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

rawpointer@rawpointer-ubuntu:~$ sudo gcc-6.3 --version
[sudo] password for rawpointer:
sudo: gcc-6.3: command not found

I think it should be fine now, and I can go to direct MATLAB (which is the only reason why I built the legacy GCC 6.3.0 from source) to pick the path for GCC 6.3.0.

Thank you once again. I highly appreciate your support.

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Wednesday, January 27, 2021 4:48 PM, Jonathan Wakely <jwakely.gcc@gmail.com> wrote:

> On Wed, 27 Jan 2021 at 15:45, lordmund via Gcc-help
> gcc-help@gcc.gnu.org wrote:
>
> > The GCC 6.3.0 was installed in the below directory of my computer:
> > /usr/local/gcc-6.3
> > However, my Ubuntu (terminal) cannot find the path to the recently installed GCC 6.3.0, which I find very interesting why.
>
> Because you installed it to a directory that isn't in your PATH. This
> is normal, and how linux/unix works.
>
> Either run /usr/local/gcc-6.3/bin/gcc or add /usr/local/gcc-6.3/bin to
> your PATH.
>
> N.B. this is not a GCC question, this is a basic "how do I use
> ubuntu?" question.



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

* Re: GCC 6.3.0 build fails on Ubuntu 20.04: make: *** [Makefile:924: all] Error 2 - libitm / libquadmath
  2021-01-27 16:24       ` lordmund
@ 2021-01-27 17:38         ` Jonathan Wakely
  2021-01-27 17:48           ` lordmund
  0 siblings, 1 reply; 8+ messages in thread
From: Jonathan Wakely @ 2021-01-27 17:38 UTC (permalink / raw)
  To: lordmund; +Cc: psmith, gcc-help

On Wed, 27 Jan 2021 at 16:25, lordmund <lordmund@protonmail.com> wrote:
>
> Hi Jonathan / Hi All,
>
> Thank you very much for the very prompt reply and hint.
>
> You are right! That was rather a general Ubuntu related question. I'm sorry for that.

So then this is the wrong mailing list.


> I took the N.B. on PATH for the rest of my life. Thanks much.
>
> Back to the previous topic. The truth is that the directory "/usr/local/gcc-6.3/bin" was already correctly added to PATH after editing ".bashrc". I've just checked it now.

You also need to relogin, or do ". ~/.bashrc" for the new PATH to be set.

> How I can see now, the reasons for throwing a "sudo: gcc-6: command not" found output after "sudo gcc-6 --version" command are two fold:
>
> (1) the name of the file in that specific folder "usr/local/gcc-6.3/bin" is not "gcc-6" but "gcc-6.3" in my case;
>
> (2) with the "sudo" prefix it does not work only without it. cf. below.

Because you've added it to your user's path, but when you use sudo to
run a command as root it uses root's path.

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

* Re: GCC 6.3.0 build fails on Ubuntu 20.04: make: *** [Makefile:924: all] Error 2 - libitm / libquadmath
  2021-01-27 17:38         ` Jonathan Wakely
@ 2021-01-27 17:48           ` lordmund
  0 siblings, 0 replies; 8+ messages in thread
From: lordmund @ 2021-01-27 17:48 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: psmith, gcc-help

Thanks much. Indeed. You are right again.

That's why using "env" vs "sudo env" already makes a difference.

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Wednesday, January 27, 2021 6:38 PM, Jonathan Wakely <jwakely.gcc@gmail.com> wrote:

> On Wed, 27 Jan 2021 at 16:25, lordmund lordmund@protonmail.com wrote:
>
> > Hi Jonathan / Hi All,
> > Thank you very much for the very prompt reply and hint.
> > You are right! That was rather a general Ubuntu related question. I'm sorry for that.
>
> So then this is the wrong mailing list.
>
> > I took the N.B. on PATH for the rest of my life. Thanks much.
> > Back to the previous topic. The truth is that the directory "/usr/local/gcc-6.3/bin" was already correctly added to PATH after editing ".bashrc". I've just checked it now.
>
> You also need to relogin, or do ". ~/.bashrc" for the new PATH to be set.
>
> > How I can see now, the reasons for throwing a "sudo: gcc-6: command not" found output after "sudo gcc-6 --version" command are two fold:
> > (1) the name of the file in that specific folder "usr/local/gcc-6.3/bin" is not "gcc-6" but "gcc-6.3" in my case;
> > (2) with the "sudo" prefix it does not work only without it. cf. below.
>
> Because you've added it to your user's path, but when you use sudo to
> run a command as root it uses root's path.



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

end of thread, other threads:[~2021-01-27 17:48 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-26 21:04 GCC 6.3.0 build fails on Ubuntu 20.04: make: *** [Makefile:924: all] Error 2 - libitm / libquadmath lordmund
2021-01-26 21:23 ` Paul Smith
2021-01-27 14:34   ` lordmund
2021-01-27 14:38     ` lordmund
2021-01-27 15:48     ` Jonathan Wakely
2021-01-27 16:24       ` lordmund
2021-01-27 17:38         ` Jonathan Wakely
2021-01-27 17:48           ` lordmund

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