ubuntu
July 7, 2008 10:21 AM Subscribe
How do I install and use software I have extracted from the internet on Ubuntu?
When extracted, the folder's contents are: CHANGE_LOG, configure, COPYING, lc3.def, lc3.f, lc3convert.f, lc3os.asm, lc3sim.c, lc3sim.h, lc3sim-tk.def, Makefile.def, NO_WARRANTY, README, symbol.c, symbol.h
Here's what the README file says:
The LC-3 tools package contains the lc3as assembler, the lc3sim simulator,
and lc3sim-tk, a Tcl/Tk-based GUI frontend to the simulator. All tools,
code, etc., were developed by Steven S. Lumetta on his own time with his
own resources for use in teaching classes based on the textbook by
Yale N. Patt and Sanjay J. Patel entitled, "Introduction to Computing
Systems: From Bits & Gates to C & Beyond," second edition, McGraw-Hill,
New York, New York, 2004, ISBN-0-07-246750-9.
The contents of the LC-3 tools distribution, including sources, management
tools, and data, are Copyright (c) 2003 Steven S. Lumetta.
The LC-3 tools distribution is free software covered by the GNU General
Public License, and you are welcome to modify it and/or distribute copies
of it under certain conditions. The file COPYING (distributed with the
tools) specifies those conditions. There is absolutely no warranty for
the LC-3 tools distribution, as described in the file NO_WARRANTY (also
distributed with the tools).
---------------------
NECESSARY TOOLS
---------------------
Installation requires versions of gcc (the Gnu C compiler),
flex (Gnu's version of lex), and wish (the Tcl/Tk graphical shell).
All of these tools are available for free from many sources.
If you have Gnu's readline installed, the configure script should
find it and use it for the command line version of the simulator.
I don't currently use the history feature, but will add it...someday.
Other necessary but more standard tools include uname, rm, cp, mkdir,
and chmod.
Currently, the configure script searches only a few directories.
If your binaries are in a reasonable place that I overlooked, send
me a note and I'll add it to the default list. If you have
idiosyncratic path names (e.g., the name of your fileserver in your
path), you will have to add the correct paths to the search path at
the top of the configure script yourself.
N.B. I have installed the package on Cygwin, Solaris, and Linux
machines. Linux has been used by 2-3 other schools at the time of
the 0.5 release; Cygwin is stable on my home machine; Solaris GUI
version caused me grief last time I launched it, but I haven't
had time to investigate.
-------------------------------
INSTALLATION INSTRUCTIONS
-------------------------------
The LC-3 tools package is designed to work as either a personal or
administrative installation on various flavors of Unix, including
Windows NT-based systems with appropriate support (e.g., Cygwin).
First, decide where the binaries and LC-3 OS code should be installed.
* If you want it in the directory in which you unpacked the code,
simply type "configure."
* If you want it in a different directory, say /usr/bin, type
configure --installdir /usr/bin
replacing /usr/bin with the desired directory.
Then type 'make'.
If you want to make the tools available to other people, next type
'make install'. If not, don't.
When extracted, the folder's contents are: CHANGE_LOG, configure, COPYING, lc3.def, lc3.f, lc3convert.f, lc3os.asm, lc3sim.c, lc3sim.h, lc3sim-tk.def, Makefile.def, NO_WARRANTY, README, symbol.c, symbol.h
Here's what the README file says:
The LC-3 tools package contains the lc3as assembler, the lc3sim simulator,
and lc3sim-tk, a Tcl/Tk-based GUI frontend to the simulator. All tools,
code, etc., were developed by Steven S. Lumetta on his own time with his
own resources for use in teaching classes based on the textbook by
Yale N. Patt and Sanjay J. Patel entitled, "Introduction to Computing
Systems: From Bits & Gates to C & Beyond," second edition, McGraw-Hill,
New York, New York, 2004, ISBN-0-07-246750-9.
The contents of the LC-3 tools distribution, including sources, management
tools, and data, are Copyright (c) 2003 Steven S. Lumetta.
The LC-3 tools distribution is free software covered by the GNU General
Public License, and you are welcome to modify it and/or distribute copies
of it under certain conditions. The file COPYING (distributed with the
tools) specifies those conditions. There is absolutely no warranty for
the LC-3 tools distribution, as described in the file NO_WARRANTY (also
distributed with the tools).
---------------------
NECESSARY TOOLS
---------------------
Installation requires versions of gcc (the Gnu C compiler),
flex (Gnu's version of lex), and wish (the Tcl/Tk graphical shell).
All of these tools are available for free from many sources.
If you have Gnu's readline installed, the configure script should
find it and use it for the command line version of the simulator.
I don't currently use the history feature, but will add it...someday.
Other necessary but more standard tools include uname, rm, cp, mkdir,
and chmod.
Currently, the configure script searches only a few directories.
If your binaries are in a reasonable place that I overlooked, send
me a note and I'll add it to the default list. If you have
idiosyncratic path names (e.g., the name of your fileserver in your
path), you will have to add the correct paths to the search path at
the top of the configure script yourself.
N.B. I have installed the package on Cygwin, Solaris, and Linux
machines. Linux has been used by 2-3 other schools at the time of
the 0.5 release; Cygwin is stable on my home machine; Solaris GUI
version caused me grief last time I launched it, but I haven't
had time to investigate.
-------------------------------
INSTALLATION INSTRUCTIONS
-------------------------------
The LC-3 tools package is designed to work as either a personal or
administrative installation on various flavors of Unix, including
Windows NT-based systems with appropriate support (e.g., Cygwin).
First, decide where the binaries and LC-3 OS code should be installed.
* If you want it in the directory in which you unpacked the code,
simply type "configure."
* If you want it in a different directory, say /usr/bin, type
configure --installdir /usr/bin
replacing /usr/bin with the desired directory.
Then type 'make'.
If you want to make the tools available to other people, next type
'make install'. If not, don't.
Read that last section again. You're going to want to open a terminal, type configure --installdir /usr/bin (/usr/bin's a good place to put it, so you can run it more easily) and hit Enter. When that's done, type make install and hit Enter.
If you're having trouble doing that, you need a very basic Intro to Linux and the Command Line tutorial; hit up google ASAP.
posted by Tomorrowful at 10:33 AM on July 7, 2008
If you're having trouble doing that, you need a very basic Intro to Linux and the Command Line tutorial; hit up google ASAP.
posted by Tomorrowful at 10:33 AM on July 7, 2008
Response by poster: Yea, sorry the problem is when I type that it displays "bash: configure: command not found"
posted by amsterdam63 at 10:39 AM on July 7, 2008
posted by amsterdam63 at 10:39 AM on July 7, 2008
You need to cd to where you unpacked the sources and type ./configure.
The single dot (.) stands for your current path. Some people (and distributions) include it in their PATH variable, so typing just configure will work - apparently ubuntu doesn't.
posted by ghost of a past number at 10:43 AM on July 7, 2008
The single dot (.) stands for your current path. Some people (and distributions) include it in their PATH variable, so typing just configure will work - apparently ubuntu doesn't.
posted by ghost of a past number at 10:43 AM on July 7, 2008
You will probably also need the build-essential package:
sudo apt-get install build-essential
posted by qxntpqbbbqxl at 10:50 AM on July 7, 2008
sudo apt-get install build-essential
posted by qxntpqbbbqxl at 10:50 AM on July 7, 2008
At one point, and perhaps today still, Ubuntu did not by default install gcc and the all the other essential tools you need to compile something. However, it is quite easy to install them. Open a terminal window and type:
sudo apt-get install build-essential
If the package is already installed it will tell you. If not, it should install it. This will correct any gcc, make, etc command not found problems.
posted by ChrisHartley at 10:51 AM on July 7, 2008
sudo apt-get install build-essential
If the package is already installed it will tell you. If not, it should install it. This will correct any gcc, make, etc command not found problems.
posted by ChrisHartley at 10:51 AM on July 7, 2008
Response by poster: When I type ./configure, it says permission denied.
posted by amsterdam63 at 10:52 AM on July 7, 2008
posted by amsterdam63 at 10:52 AM on July 7, 2008
You will have to use sudo:
Users don't have full write access to the /usr/bin directory, so in order to install to that directory, you need to do it as a superuser.
posted by spiderskull at 10:53 AM on July 7, 2008
sudo ./configure --installdir /usr/bin
Users don't have full write access to the /usr/bin directory, so in order to install to that directory, you need to do it as a superuser.
posted by spiderskull at 10:53 AM on July 7, 2008
Yea, sorry the problem is when I type that it displays "bash: configure: command not found"Ah, different beast entirely.
Most likely is your system was installed without developer tools. Things like configure/make/gcc and so on and so forth were not installed with your system. That's why the system is telling you command not found.
You can either install them (not familiar with how ubuntu handles this - could be simple) or find a buddy with a box containing developer tools and say "Hey, compile this for me, will ya?"
posted by unixrat at 10:54 AM on July 7, 2008
FYI, this is the traditional process with installing a Linux package from sources:
1. Ungzip/untar the archive
2.
3.
4.
5.
Step 5 is sometimes optional if you don't want to install the program into the system. A lot of times, I'll build a program and play with it locally before installing it system-wide. The
On preview: What unixrat says might be true, but the error you're seeing is almost definitely because you left out the leading
posted by knave at 10:55 AM on July 7, 2008 [2 favorites]
1. Ungzip/untar the archive
2.
cd
into the directory that you just unpacked3.
./configure
(sometimes with options to customize it, try ./configure --help
to see what options are available)4.
make
5.
sudo make install
Step 5 is sometimes optional if you don't want to install the program into the system. A lot of times, I'll build a program and play with it locally before installing it system-wide. The
sudo
part says to run this command as the root user, your normal user shouldn't have permissions to install things system-wide.On preview: What unixrat says might be true, but the error you're seeing is almost definitely because you left out the leading
./
in ./configure
.posted by knave at 10:55 AM on July 7, 2008 [2 favorites]
When I type ./configure, it says permission denied.
The configure script should've been executable, but maybe it wasn't. Try
posted by knave at 10:56 AM on July 7, 2008
The configure script should've been executable, but maybe it wasn't. Try
chmod +x configure
then repeat running the configure script.posted by knave at 10:56 AM on July 7, 2008
Type ls -l configure where you unpacked the sources. Do you see the letter x in the first column ? If you don't, it probably means you unpacked the sources whithout setting permissions (or they were imporperly packed to begin with); typing chmod +x configure should fix this.
By the way, don't install stuff in /usr/bin. Things you compile yourself should go to /usr/local/bin, to avoid messing up your distro's upgrade system.
posted by ghost of a past number at 10:57 AM on July 7, 2008
By the way, don't install stuff in /usr/bin. Things you compile yourself should go to /usr/local/bin, to avoid messing up your distro's upgrade system.
posted by ghost of a past number at 10:57 AM on July 7, 2008
Most likely is your system was installed without developer tools. Things like configure/make/gcc and so on and so forth were not installed with your system. That's why the system is telling you command not found.
Erm ... unlike make or gcc, configure is generally part of the source archive, surely? Hence
When I type ./configure, it says permission denied.
It's true that you need to use sudo to run
Is it possible that for some reason the configure script is not executable? Try
posted by enn at 11:00 AM on July 7, 2008
Erm ... unlike make or gcc, configure is generally part of the source archive, surely? Hence
./configure
?When I type ./configure, it says permission denied.
It's true that you need to use sudo to run
make install
and install to /usr/bin
, but you shouldn't need superuser privileges only to run configure.Is it possible that for some reason the configure script is not executable? Try
chmod +x configure
, then ./configure
.posted by enn at 11:00 AM on July 7, 2008
Response by poster: Ok, I did chmod +x, and then typed sudo ./configure and it said "Cannot locate wish binary"
posted by amsterdam63 at 11:03 AM on July 7, 2008
posted by amsterdam63 at 11:03 AM on July 7, 2008
Response by poster: By the way, I unpacked everything to a folder I created during the unpacking process called lc3 which I put in the /home/robert folder. robert is my username by the way. All the files that I listed when I first posted my question are in /home/robert/lc3/lc3tools.
posted by amsterdam63 at 11:07 AM on July 7, 2008
posted by amsterdam63 at 11:07 AM on July 7, 2008
As the instructions said, "Installation requires versions of gcc (the Gnu C compiler), flex (Gnu's version of lex), and wish (the Tcl/Tk graphical shell)."
It looks like you need to install tk to get wish on Ubuntu, so here's the command:
It appears to me, however, that you're in over your head. I suggest you get some books on the Unix command line (or Ubuntu newbie books) and start reading from page 1.
posted by knave at 11:07 AM on July 7, 2008
It looks like you need to install tk to get wish on Ubuntu, so here's the command:
sudo aptitude install tk8.5
It appears to me, however, that you're in over your head. I suggest you get some books on the Unix command line (or Ubuntu newbie books) and start reading from page 1.
posted by knave at 11:07 AM on July 7, 2008
Skip the sudo, you don't need it to configure anyway. You may be getting the wrong environment and your configure script can't locate whish.
If you just type whish into a command prompt, do you get anything? If not, follow knave's instructions above.
posted by ghost of a past number at 11:11 AM on July 7, 2008
If you just type whish into a command prompt, do you get anything? If not, follow knave's instructions above.
posted by ghost of a past number at 11:11 AM on July 7, 2008
Yeah, I missed that. Ignore spiderskull's comment, it's useless. The only step that requires root access (hence sudo) is the final installation step.
posted by knave at 11:13 AM on July 7, 2008
posted by knave at 11:13 AM on July 7, 2008
Response by poster: Ok, installed tk8.5, then went through knave's steps 1-5, and they appear to have worked.
posted by amsterdam63 at 11:17 AM on July 7, 2008
posted by amsterdam63 at 11:17 AM on July 7, 2008
This thread is closed to new comments.
posted by knave at 10:32 AM on July 7, 2008