LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-05-2011, 02:59 PM   #1
ghantauke
Member
 
Registered: Nov 2010
Posts: 114

Rep: Reputation: 6
tgrep command not found


The tgrep commands not working in my terminal at the moment and I was told by someone the following.

"It's not a standard command. I suspect the source needs to be recompiled for the
current platform. Can you find the source files and compile them in your home dir?"

I can't get into touch with that someone at the moment so could anyone explain what exactly that means and how I get tgrep working.

Thanks

Last edited by ghantauke; 03-05-2011 at 03:00 PM.
 
Old 03-05-2011, 03:25 PM   #2
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,186

Rep: Reputation: 346Reputation: 346Reputation: 346Reputation: 346
I'd never heard of tgrep so I Googled it, and discovered several different tgrep: "Threaded grep," "Time grep," the "Telephony Gateway Registration Protocol," et al.

So, the first questions you need to answer, is "What tgrep are you interested in? For what goal are you hoping to use it? If we know the answers to those questions, we can, perhaps, offer some advice or assistance.
 
Old 03-05-2011, 04:20 PM   #3
ghantauke
Member
 
Registered: Nov 2010
Posts: 114

Original Poster
Rep: Reputation: 6
tgrep which is a version of grep (I think), which helps you to work with PennTreebank. I guess the main question is I have a command which isn't a standard linux command and I don't know how to "install" it. I'm not sure whether the term "install" is correct in this case because I'm trying to do what I was told which is stated in my earlier post. Explaining what that means to a linux beginner like me would be very helpful.

Last edited by ghantauke; 03-05-2011 at 04:30 PM.
 
Old 03-06-2011, 06:59 PM   #4
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,186

Rep: Reputation: 346Reputation: 346Reputation: 346Reputation: 346
As far as I can see, tgrep2 is the version used by the U Penn people, That is distributed in source code only, not pre-compiled for you. (As you said your friend told.)

In general terms, what you need to do is:
  1. Download the compressed "tape archive" file: wget ftp://ftp.crl.ucsd.edu/pub/tgrep/tgrep.tar.gz
  2. Uncompress the file into the ~/tgrep/ directory: tar -xgf tgrep.tar.gz
  3. Change your working directory to that directory: cd tgrep/
  4. Read the instructions: less README.LINUX
  5. Create the tgrep command: ./INSTALL
That is a general outline because the specifics of how you do each of those steps will depend on the Linux distribution you're using. Note, however, that the install script assumes that you have the commands bison, flex, imake and gcc available on your system, and that you have the X11 application libraries available. (Re the X11 libraries, the script seems to be assuming the obsolete X11R86 libraries, so you may have a problem with graphical output.) The script is written in the csh script language, and you'll also need that installed before you can run it.

Last edited by PTrenholme; 03-06-2011 at 07:01 PM.
 
Old 03-07-2011, 05:16 AM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,634

Rep: Reputation: 3268Reputation: 3268Reputation: 3268Reputation: 3268Reputation: 3268Reputation: 3268Reputation: 3268Reputation: 3268Reputation: 3268Reputation: 3268Reputation: 3268
The OP has two threads about tgrep.

> > http://www.linuxquestions.org/questi...e-file-866671/
 
Old 03-08-2011, 08:57 PM   #6
ghantauke
Member
 
Registered: Nov 2010
Posts: 114

Original Poster
Rep: Reputation: 6
Quote:
Originally Posted by PTrenholme View Post
As far as I can see, tgrep2 is the version used by the U Penn people, That is distributed in source code only, not pre-compiled for you. (As you said your friend told.)

In general terms, what you need to do is:
  1. Download the compressed "tape archive" file: wget ftp://ftp.crl.ucsd.edu/pub/tgrep/tgrep.tar.gz
  2. Uncompress the file into the ~/tgrep/ directory: tar -xgf tgrep.tar.gz
  3. Change your working directory to that directory: cd tgrep/
  4. Read the instructions: less README.LINUX
  5. Create the tgrep command: ./INSTALL
That is a general outline because the specifics of how you do each of those steps will depend on the Linux distribution you're using. Note, however, that the install script assumes that you have the commands bison, flex, imake and gcc available on your system, and that you have the X11 application libraries available. (Re the X11 libraries, the script seems to be assuming the obsolete X11R86 libraries, so you may have a problem with graphical output.) The script is written in the csh script language, and you'll also need that installed before you can run it.
Very informative thanks. I've done what you told me but I get an error in the installation process. The following shows what I've done and what error I get.


Code:
denish@ubuntu:~/tgrep$ ./INSTALL
 
****************************************************************
	      THIS IS THE CONFIGURATION SCRIPT FOR TGREP
 
	   Please answer all questions with full pathnames
****************************************************************
 
I cannot determine the gcc include path on your system.
  Please enter the gcc include path if it is available: /usr/include
 
/usr/src/linux/include was not found on your system.
  Please enter a substitute include path if it is available: /usr/src/linux-headers-2.6.35-24-generic
 
/usr/X11R6/include was not found on your system.
  Please enter a substitute include path if it is available: 
 
/usr/X11R6/lib was not found on your system.
  Please enter a substitute include path if it is available: 
 
Warning: /Xm was not found.  The X progress display will
not be available.
 
 
****************************************************************
The perl command is   :: /usr/bin/perl
The bison command is  :: /usr/bin/bison
The flex command is   :: /usr/bin/flex
The imake command is  :: /usr/bin/imake
gcc include path is   :: /usr/include
linux include path is :: /usr/src/linux-headers-2.6.35-24-generic
standard include path :: /usr/include
standard library path :: /usr/lib
 
Are these parameters correct? [y/n/q] y
continuing with configuration
 
Enter the directory where you wish to install the tgrep executables: 
  [the default is /home/denish/tgrep/bin : return = default] 
  :  
 
Enter the directory where you wish to install the tgrep corpora: 
  [the default is /home/denish/tgrep/data : return = default] 
  : 
 
The tgrep man pages are for the first section of the manual.
  Enter the directory where you wish to install
  the tgrep man pages (i.e. /usr/local/man/man1): 
  [the default is /home/denish/tgrep/doc/man1 : return = default ]
  : 
 
****************************************************************
install executables in      :: /home/denish/tgrep/bin
install corpora in        :: /home/denish/tgrep/data
install man pages in        :: /home/denish/tgrep/doc/man1
 
Are these parameters correct? [y/n/q] y
continuing with configuration
***** MAKING MAKEFILE IN DIRECTORY src/tools
***** MAKING MAKEFILE IN DIRECTORY src/environ
***** MAKING MAKEFILE IN DIRECTORY src/tgrep
***** MAKING MAKEFILE IN DIRECTORY bin
***** MAKING MAKEFILE IN DIRECTORY doc
***** MAKING MAKEFILE IN DIRECTORY data
***** MAKING MAKEFILE IN DIRECTORY /home/denish/tgrep/config
 
 
 
*********************************************************
 
THE CONFIGURATION STAGE OF THE BUILD PROCESS IS COMPLETE
 
If you experience trouble beyond this point you don't
need to run INSTALL again, you can just run 'make'
to make everything or 'make install' to make everything
and install everything. 
If need be, you should run make from the directory /home/denish/tgrep
 
*********************************************************
 
 
 
***** MAKING AND INSTALLING FROM DIRECTORY src/tools
make[1]: Entering directory `/home/denish/tgrep/src/tools'
gcc -c -o ArgPack.o ArgPack.c -g -I/usr/include -I/usr/src/1-headers-2.6.35-24-generic -I -I/usr/include -I. -Dconst= -DMEMDEBUG=0   -Wall -m486 -O4 
cdenish@ubuntu:~/tgrep$ ./INSTALL
 
****************************************************************
	      THIS IS THE CONFIGURATION SCRIPT FOR TGREP
 
	   Please answer all questions with full pathnames
****************************************************************
 
I cannot determine the gcc include path on your system.
  Please enter the gcc include path if it is available: /usr/include
 
/usr/src/linux/include was not found on your system.
  Please enter a substitute include path if it is available: /usr/src/linux-headers-2.6.35-24-generic
 
/usr/X11R6/include was not found on your system.
  Please enter a substitute include path if it is available: 
 
/usr/X11R6/lib was not found on your system.
  Please enter a substitute include path if it is available: 
 
Warning: /Xm was not found.  The X progress display will
not be available.
 
 
****************************************************************
The perl command is   :: /usr/bin/perl
The bison command is  :: /usr/bin/bison
The flex command is   :: /usr/bin/flex
The imake command is  :: /usr/bin/imake
gcc include path is   :: /usr/include
linux include path is :: /usr/src/linux-headers-2.6.35-24-generic
standard include path :: /usr/include
standard library path :: /usr/lib
 
Are these parameters correct? [y/n/q] y
continuing with configuration
 
Enter the directory where you wish to install the tgrep executables: 
  [the default is /home/denish/tgrep/bin : return = default] 
  :  
 
Enter the directory where you wish to install the tgrep corpora: 
  [the default is /home/denish/tgrep/data : return = default] 
  : 
 
The tgrep man pages are for the first section of the manual.
  Enter the directory where you wish to install
  the tgrep man pages (i.e. /usr/local/man/man1): 
  [the default is /home/denish/tgrep/doc/man1 : return = default ]
  : 
 
****************************************************************
install executables in      :: /home/denish/tgrep/bin
install corpora in        :: /home/denish/tgrep/data
install man pages in        :: /home/denish/tgrep/doc/man1
 
Are these parameters correct? [y/n/q] y
continuing with configuration
***** MAKING MAKEFILE IN DIRECTORY src/tools
***** MAKING MAKEFILE IN DIRECTORY src/environ
***** MAKING MAKEFILE IN DIRECTORY src/tgrep
***** MAKING MAKEFILE IN DIRECTORY bin
***** MAKING MAKEFILE IN DIRECTORY doc
***** MAKING MAKEFILE IN DIRECTORY data
***** MAKING MAKEFILE IN DIRECTORY /home/denish/tgrep/config
 
 
 
*********************************************************
 
THE CONFIGURATION STAGE OF THE BUILD PROCESS IS COMPLETE
 
If you experience trouble beyond this point you don't
need to run INSTALL again, you can just run 'make'
to make everything or 'make install' to make everything
and install everything. 
If need be, you should run make from the directory /home/denish/tgrep
 
*********************************************************
 
 
 
***** MAKING AND INSTALLING FROM DIRECTORY src/tools
make[1]: Entering directory `/home/denish/tgrep/src/tools'
gcc -c -o ArgPack.o ArgPack.c -g -I/usr/include -I/usr/src/1-headers-2.6.35-24-generic -I -I/usr/include -I. -Dconst= -DMEMDEBUG=0   -Wall -m486 -O4 
cc1: error: unrecognized command line option "-m486"
make[1]: *** [ArgPack.o] Error 1
make[1]: Leaving directory `/home/denish/tgrep/src/tools'
exit: 1: Illegal number: -1
make: *** [install] Error 2
 
************************************************************
 It seems that the build process did not go smoothly
 If you cannot diagnos and fix the problem yourself
 send email to tgrep-support@linc.cis.upenn.edu
 containing a copy of all the output from this failed
 installation process.
************************************************************
c1: error: unrecognized command line option "-m486"
make[1]: *** [ArgPack.o] Error 1
make[1]: Leaving directory `/home/denish/tgrep/src/tools'
exit: 1: Illegal number: -1
make: *** [install] Error 2
 
************************************************************
 It seems that the build process did not go smoothly
 If you cannot diagnos and fix the problem yourself
 send email to tgrep-support@linc.cis.upenn.edu
 containing a copy of all the output from this failed
 installation process.
************************************************************

Hope you can help

Last edited by ghantauke; 03-08-2011 at 09:00 PM.
 
Old 03-08-2011, 11:54 PM   #7
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,634

Rep: Reputation: 3268Reputation: 3268Reputation: 3268Reputation: 3268Reputation: 3268Reputation: 3268Reputation: 3268Reputation: 3268Reputation: 3268Reputation: 3268Reputation: 3268
Quote:
cc1: error: unrecognized command line option "-m486"
Editing tgrep/config/user.def.orig, line 9 to :
USER_CC_FLAGS = -Wall -mcpu=i486 $(OPTIMIZE_FLAG)
... may bring you a fragment of a step further.

But the code time stamp = August 2000, and gcc-2.95 specific headers
are used ( e.g. varargs.h ), so do not expect this tgrep to be usable.

Suggest : TGrep2, already suggested in one of your duplicate threads
http://www.linuxquestions.org/questi...file-866671/#3

..
 
Old 03-09-2011, 12:32 AM   #8
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,634

Rep: Reputation: 3268Reputation: 3268Reputation: 3268Reputation: 3268Reputation: 3268Reputation: 3268Reputation: 3268Reputation: 3268Reputation: 3268Reputation: 3268Reputation: 3268
There may be a solution for the old tgrep :
dpkg -i cpp-2.95_2.95.4-11woody1_i386.deb gcc-2.95_2.95.4-11woody1_i386.deb
http://archive.debian.org/debian-arc...in/g/gcc-2.95/

'tgrep/config/user.def.orig' : line 9 will then do with ..
USER_CC_FLAGS = -Wall -m486 $(OPTIMIZE_FLAG)

And : line 3, edit to : CC = gcc-2.95

..
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off




All times are GMT -5. The time now is 09:35 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration