LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Installing NASM (https://www.linuxquestions.org/questions/programming-9/installing-nasm-608590/)

jordan28 12-22-2007 12:48 PM

Installing NASM
 
I just installed openSuse 10.1 I'm a Linux newbie.

I want to install NASM so I can get some exposure to assembly.

I have download the source, unpacked it into a directory called:

/usr/local/src

I tried to use ./configure and I get this message:

linux-7fz7:/usr/local/src/nasm-2.00 # ./configure
checking for prefix by checking for nasm... no
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.

What is the next step here. Please assume I know nothing.

paulsm4 12-22-2007 01:11 PM

Hi -

You need "C" installed as a prerequisite for building NASM.

You have a couple of choices:

a) Go into YAST and install the C compiler:
SusE Desktop,
YaST Control Panel,
Software Manager,
[Search], gcc

b) After installing "gcc", you should be able to run "configure"
again and successfully build NASM

c) As an alternative, however, you can simply install NASM from
YAST. You don't have to build anything. The pre-built Suse
version might be a bit older ... but who cares?

d) I would recommend, however, that you also consider installing
"GAS" (the Gnu assembler).

NASM assembler syntax is useful if you're looking at old 16-bit DOS assembler examples; GAS syntax is useful if you're going to be trying assembly language with different kinds of processors.

Why not install and experiment with both?

IMHO .. PSM

PS:
As you're probably aware, you can also use "C" with assembler:

a) C supports "in-line assembler" - you can intermix assembler and C in the same source file

b) "gcc -C myprog.c" generates the assembly-language of your C program - a handy way to learn assembler.

jordan28 12-22-2007 02:17 PM

(a). After typing gcc in the search field, I hit accept and got this message:

"No installation source is defined, only installed packages will be displayed."

I hit accept after making sure libgcc was checked and I got no error messages. It asked me if I wanted to install more or remove. I exited out.

(b)I tried configure in /usr/local/src after that, but got the same message as before.

I'm glad you told me about GAS. Thanks. I will look into it. The flexibility looks more attractive.

(c) I tried YaST to directly install NASM, but when I typed NASM in the search field, I got the message:

No results.

I'm suspecting it has something to do with the "No installation source..." message, but I don't know what it means.

paulsm4 12-22-2007 03:37 PM

Hi -

By default, your "installation source" should be your SusE installation CD (assuming you installed from CD).

You can change it to anything you want (or any combination of media and internet depots). Here's how:

http://www.novell.com/communities/no...o-installation

'Hope that helps .. PSM

PS:
There are lots of other alternatives (like anything in Linux), but I don't want to confuse the issue. You want "Yast" to work, so it sounds like you should (re)define your Yast "installation source. It should be pretty easy... especially if you have the CD/DVD and/or Internet access...

jordan28 12-22-2007 09:21 PM

I went to that link above.

I can't get past instruction (1). I am a newbie, so non-stipulated language is discouraging for help.

This is the paragraph in question:
1. Create a Directory within the Installation Source that will contain your new YaST Source. ( replace Installation_Source with the path to your source, and replace test_directory with the directory you would like to create.)

mkdir /Installation_Source/test_directory

I don't know what they mean by Installation_Source or test_directry. I just want to install gcc. If I did make two new directories I don't know what to name them or do not know how to predict what they should be called if they need to be called something specific.

I read ahead and still could not create a context of what it means.

paulsm4 12-24-2007 12:10 AM

Hi -

I'm sorry that last suggestion didn't work out as well as we might have hoped :-(

New suggestion(s):
  • Install NASM (prebuilt) from an RPM
    The initial problem was that you wanted to experiment with NASM, but it looked like the requisite C compiler wasn't installed.

    I suggested using Yast to install the C compiler, thinking it would be a "sure thing" for you. It wasn't.

    The reason you need the C compiler in the first place is to "build" NASM, from source. The ability to build packages from source (and look at "what's under the hood") is a huge advantage ... but it's not a necessity. You can also install "pre-built" packages (like you're usually *forced* to do under Windows). One way is with Yast. Another way is to simply download an "RPM" package, and double-click on it from the Konqueror GUI.

    Please try this:
    a) Download the NASM .rpm from here:
    http://www.novell.com/products/linux...inux/nasm.html

    b) Save the (binary) .rpm file to any directory on your system ("/tmp"
    is fine)

    c) Go into Konqueror (aka "Computer") and double-click on it

    d) This should bring up the "KPackage" GUI

    e) You should be able to install the pre-built NASM
  • Experiment with YaST and make sure it's working OK
    Yast is Good. Yast should work. Yast should even have installed GCC for you when you asked it to ;-)

    This tutorial might help
    http://www.linux-tutorial.info/modul...ent&pageid=206
    <= It covers both Yast2 and KPackage.
    It also has screen shots (unlike LQ :-()
  • Continue posting to LQ (and/or any relevant Linux forum)
    Open new posts if you have any questions/problems with these suggestions ... or *any* questions.

    If it's a programming question, please be sure to cut/paste relevant sample code.

    Otherwise, for non-programming questions, please try to post to the moset "relevant" column.

    I'd be happy to continue helping in any way I can, but you're more likely to get prompt attention if you get in the habit of making new posts for separate questions.

Good luck .. PSM


All times are GMT -5. The time now is 06:28 AM.