Changing default version of GNU Make in Red-hat Ubuntu - linux

Currently I have GNU Make version 3.82 and I need GNU Make 4.x or higher. I do not have sudo privileges so I downloaded latest make-4.2.93 version from https://ftp.gnu.org/gnu/make/ in my local folder /home/username/local/bin/make-4.2.93. I tried to do following in order to add this to my path:
I added this line in my .tcshrc file:
set path=( $path /home/username/local/bin/make-4.2.93)
But my default make version still is the same old one.
make --version
GNU Make 3.82
Built for x86_64-redhat-linux-gnu
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
How can this be made right?
Thanks.

Related

GDB output problems after installation

I installed gdb because it was telling me that gdb was not found when I tried to run my .asm file. Since it got installed and I shouldn't expect 'gdb not found' I ended up with the whole copyright license and stuff whenever I run my code. Did I install it incorrectly? I used "$ sudo apt-get install gdb" in terminal.
rm: cannot remove '*.o': No such file or directory
rm: cannot remove '*.lis': No such file or directory
rm: cannot remove '*.out': No such file or directory
compile driver.cpp using the g++ compiler standard 2017
compile isFloat.cpp using the g++ compiler standard 2017
Assemble compare.asm
Link object files using the gcc Linker standard 2017
Run the Float Program:
GNU gdb (Ubuntu 9.2-0ubuntu1~20.04.1) 9.2
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
--Type <RET> for more, q to quit, c to continue without paging--q
Quit
Script file has terminated.

Why can't I use gcc-9.3.0 on Linux?

I installed gcc-9.3.0 by apt, but I can only use it with sudo like
sudo gcc --version
gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
Copyright (C) 2019 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.
and
gcc --version
gcc (OpenFOAM) 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.
I want to use it without sudo.
What is the difference?
How can I use gcc-9.3.0 from my normal user account?
GCC doesn't need special sudo rights - the difference you see is because you have 2 versions installed, but version 6 appears in your regular PATH before version 9.
To fix it, add the install directory of GCC 9 to the front of your PATH.

Why I read glibc version >= 2.7 while the current stable version of glibc is 2.23

I'm reading the chapter 2.3.1 of Getting Started Guide for Linux (Release 16.04.0), and I just saw :
Required:
glibc >= 2.7 (for features related to cpuset)
The version can be checked using the ldd --version command.
When I ran ldd --version I got
ldd (Ubuntu EGLIBC 2.19-0ubuntu6.9) 2.19
Copyright (C) 2014 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.
Written by Roland McGrath and Ulrich Drepper.
Does that mean my glibc version is 2.19?
I've tried some ways to upgrade the version, but got nothing new.
Actually, on The GNU Library, I noticed
Latest News
2016-02-19: glibc 2.23 released.
So how can I get the version of 2.7?? Does Getting Started Guide for Linux (Release 16.04.0) give the wrong message?

How to do gdb with java -cp myjar.jar class.myclass

How to tell gdb run this way: gdb java -cp /var/tmp/Test.jar myjava.class
$ gdb /var/tmp/Test.jar 14940
GNU gdb (Ubuntu/Linaro 7.2-1ubuntu11) 7.2
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
"/var/tmp/Test.jar": not in executable format: File format not recognized
Attaching to process 14940
Could not attach to process. If your uid matches the uid of the target
process, check the setting of /proc/sys/kernel/yama/ptrace_scope, or try
again as the root user. For more details, see /etc/sysctl.d/10-ptrace.conf
ptrace: Operation not permitted.
/var/tmp/14940: No such file or directory.
(gdb) run
Starting program:
No executable file specified.
Use the "file" or "exec-file" command.
(gdb)
$ gdb -p 14940
GNU gdb (Ubuntu/Linaro 7.2-1ubuntu11) 7.2
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Attaching to process 14940
Could not attach to process. If your uid matches the uid of the target
process, check the setting of /proc/sys/kernel/yama/ptrace_scope, or try
again as the root user. For more details, see /etc/sysctl.d/10-ptrace.conf
ptrace: Operation not permitted.
(gdb) run
Starting program:
No executable file specified.
Use the "file" or "exec-file" command.
(gdb)
From GDB's point of view, the program here is java. It accepts many arguments (-cp , classname etc)
You can set arguments using set args
http://www.delorie.com/gnu/docs/gdb/gdb_19.html

Trying to run faac's bootstrap script but running into errors

I'm trying to install faac and am running into errors. Here are the errors I get when trying to build it:
[root#test faac]# ./bootstrap
configure.in:11: warning: underquoted definition of MY_DEFINE
run info '(automake)Extending aclocal'
or see http://sources.redhat.com/automake/automake.html#Extending-aclocal
aclocal:configure.in:17: warning: macro `AM_PROG_LIBTOOL' not found in library
common/mp4v2/Makefile.am:5: Libtool library used but `LIBTOOL' is undefined
common/mp4v2/Makefile.am:5:
common/mp4v2/Makefile.am:5: The usual way to define `LIBTOOL' is to add `AC_PROG_LIBTOOL'
common/mp4v2/Makefile.am:5: to `configure.in' and run `aclocal' and `autoconf' again.
libfaac/Makefile.am:1: Libtool library used but `LIBTOOL' is undefined
libfaac/Makefile.am:1:
libfaac/Makefile.am:1: The usual way to define `LIBTOOL' is to add `AC_PROG_LIBTOOL'
libfaac/Makefile.am:1: to `configure.in' and run `aclocal' and `autoconf' again.
configure.in:17: error: possibly undefined macro: AM_PROG_LIBTOOL
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
Does anyone know what this means? I was unable to find anything about this so I figured I'd ask you guys. Thank you for your help.
EDIT:
Here's my versions of linux, libtool, automake and autoconf:
[root#test faac]# libtool --version
ltmain.sh (GNU libtool) 2.2
Written by Gordon Matzigkeit <gord#gnu.ai.mit.edu>, 1996
Copyright (C) 2008 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.
[root#test faac]# autoconf --version
autoconf (GNU Autoconf) 2.59
Written by David J. MacKenzie and Akim Demaille.
Copyright (C) 2003 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.
[root#test faac]# automake --version
automake (GNU automake) 1.9.2
Written by Tom Tromey <tromey#redhat.com>.
Copyright 2004 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.
[root#test faac]# cat /etc/redhat-release
Red Hat Enterprise Linux WS release 4 (Nahant)
I think the first thing to check is that you have libtool installed.
Edit:
This is what I get on Ubuntu 8.04:
$ ./bootstrap
configure.in:11: warning: underquoted definition of MY_DEFINE
configure.in:11: run info '(automake)Extending aclocal'
configure.in:11: or see http://sources.redhat.com/automake/automake.html#Extending-aclocal
configure.in:4: installing `./install-sh'
configure.in:4: installing `./missing'
common/mp4v2/Makefile.am: installing `./depcomp'
$ libtool --version
ltmain.sh (GNU libtool) 1.5.26 Debian 1.5.26-1ubuntu1 (1.1220.2.493 2008/02/01 16:58:18)
Copyright (C) 2008 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.
$ autoconf --version
autoconf (GNU Autoconf) 2.61
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software. You may redistribute copies of it under the terms of
the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
There is NO WARRANTY, to the extent permitted by law.
Written by David J. MacKenzie and Akim Demaille.
$ automake --version
automake (GNU automake) 1.10.1
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Tom Tromey <tromey#redhat.com>
and Alexandre Duret-Lutz <adl#gnu.org>.
So your problem is that automake/conf don't know about libtool.
You need to reinstall all of them. Either from all from source, or all from binary packages.
If installing from source, ensure they are all installed to the same location.
Maybe your automake doesn't know about your libtool for some reason. It looks like you've got two copies of libtool installed, which might be confusing it.
Maybe you should remove both copies, plus all automake, autoconf installs, and reinstall them (possibly from source?).
I guess the first step is to find out the locations of the active copies of the tools:
which libtool
which automake
which autoconf
It sounds like autoconf/automake cannot find libtool.m4, and therefore cannot resolve the macro AM_PROG_LIBTOOL. Look for this file under your libtool installation and copy/link it under /usr/share/aclocal/.

Resources