News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

HLA in ubuntu

Started by DarkWolf, November 25, 2005, 06:56:38 PM

Previous topic - Next topic

DarkWolf

I am trying to run HLA from the terminal (bash) in ubuntu and am told that it is a command that cannot be found.
The working directory is where hla and hello.hla can be found, I can verify this with ls and locate.
Do I still need to set an enviromental variable when hla can be found in the wd ?

First time trying to run hla in linux.
--
Where's there's smoke, There are mirrors.
Give me Free as in Freedom not Speech or Beer.
Thank You and Welcome to the Internet.

Evenbit

If I remember correctly, I got it to work under Linux by changing the ownership and permissions.  Use the 'chown' and 'chmod' commands to change these...

Nathan.

Sevag.K

I don't know the level of your Linux expertise, but this is a problem I encountered early on (so just ignore it if you already know this).
With Linux terminal, to access files in 'working directory' (but not on the system path), you have to specify the path with ./<filename> (dot slash).

DarkWolf

Evenbit: Recheck my permissions, yeah they're good.

Kain: Isn't using ./filename indicating that the file is in a child ( directory ) of the working directory ?

Okay, weird that works, but now it states that hlaparse cannot be found.
If the hla program runs hlaparse how do I get it to use ./hlaparse instead ?

Okay after some trial and error I got the path set .bashrc (hope I didn't screw anything up along the way).
It also seems that group permission wasn't set right even though owner was (on the file not the command).
Now I'll have to see if I screwed anything up.
--
Where's there's smoke, There are mirrors.
Give me Free as in Freedom not Speech or Beer.
Thank You and Welcome to the Internet.

PBrennick

Let's see, just BASH the Owner on the head and take his CASH from the SASH.

Yeah, that's it,  :U
Paul
The GeneSys Project is available from:
The Repository or My crappy website

JMGK

DarkWolf,

"./file" mean the current dir

"../file" mean the parent dir

and "dir/file" mean the child dir

jmgk

DarkWolf

Yep I screwed something up...

First I get this when I start a shell or use 'source .bashrc'

bash: PATH=/bin:/pgm:/home/sean/hla:/usr/local/bin:/usr/local/sbin:/sbin:/usr/sb
: No such file or directory11:/usr/games

: command not found

': not a valid identifier


Now I am not sure if I have the path the way I did previously. I reinstalled Ubuntu after having upgrade problems, lost the previous setup.

What it is now is:

# Added for HLA Support
"PATH=$DBROOT/bin:$DBROOT/pgm:/home/sean/hla:$PATH"

hlalib=/home/sean/hla/hlalib/hlalib.a
export hlalib
hlainc=/home/sean/hla/include
export hlainc


So what did I screw up ?

I can hla to work I just don't understand the error at the top of the terminal each time.
The second problem is hla not being able to open the include files.
A permission issue ? All includes are RW owner, all else is R only Is that correct ?
--
Where's there's smoke, There are mirrors.
Give me Free as in Freedom not Speech or Beer.
Thank You and Welcome to the Internet.

Sevag.K

Here is some info posted by paco in the aoaprogramming list recently:

Quote
Hi Guys,
I just wanted to share my experience installing the HLA program on
Linux(fedora). I am a newbie with it, but I could figure a couple
issues out, when I tried to run the Hello World program.
I followed the Randall procedure to how to install HLA under Linux,
but when you set up the .bashrc file you have to add one more line at
the beginning:
DBROOT=/usr/hla/hla
then you have to add one more HLA on the path directory, in order to
routed it to the right directory:
PATH=$DBROOT/bin:$DBROOT/pgm:/usr/hla/hla:$PATH
hlalib=/usr/hla/hla/hlalib/hlalib.a
export hlalib
hlainc=/usr/hla/hla/include
export hlainc
This is because I created a /usr/hla directory, then when I
uncompressed the gz and tar, they created another hla directory.
After this changes in the .bashrc and run source .bashrc , I could ran
the HelloWorld program smoothly.
Well, I hope this can help to a newbie guy with HLA. Now, I am going
to learn the art of assembly.


DarkWolf

I didn't keep the directory structure of the tarball so that extra hla was not my problem.
I noticed he didn't have quotes in the path statement.
When I removed them that took care of the first error.
But the other two are still being reported.

I just don't know which command is not found and what identifier is not valid.

: command not found
': not a valid identifier

What's not found or invalid ?
Still also have error with stdlib.hhf, it reportin gthat it cannot be opened.
Permission is -rw-r--r--  ,   correct ?
--
Where's there's smoke, There are mirrors.
Give me Free as in Freedom not Speech or Beer.
Thank You and Welcome to the Internet.

Sevag.K

First, I think you should try manually entering the commands in a shell to see if everything works with HLA.

For example, if hla is in /usr/hla, type these three lines

set PATH =/usr/hla:$PATH
export hlalib = /usr/hla/hlalib/hlalib.a
export hlainc = /usr/hla/include

And try to compile an example program that includes stdlib.hhf

If that runs, then your problem is within bashsrc
If it doesn't work then there might be something wrong with your hla installation.

DarkWolf

After runnig those three commands, it now works.
I guess my question now is what is the difference between those commands and whatever I did wrong with the .bashrc file ?
And how do I make the change permanment, if it is not already ?
--
Where's there's smoke, There are mirrors.
Give me Free as in Freedom not Speech or Beer.
Thank You and Welcome to the Internet.

Sevag.K

I guess the question is, what error report do you get when you 'source .bashrc'?
It seems that the script is terminating before it gets to the parts that setup the environment.


DarkWolf

In reply #6 you see the errors I get.

From bash I get...

: command not found
': not a valid identifier

(how is that code block done that everybody uses ?)

Path has no longer been a problem, so I don't know what error I am causing with the other commands.

The other commands being...

hlalib=/home/sean/hla/hlalib/hlalib.a
export hlalib
hlainc=/home/sean/hla/include
export hlainc
--
Where's there's smoke, There are mirrors.
Give me Free as in Freedom not Speech or Beer.
Thank You and Welcome to the Internet.

Sevag.K

Quote from: DarkWolf on January 12, 2006, 01:16:34 AM
In reply #6 you see the errors I get.

From bash I get...

: command not found
': not a valid identifier

(how is that code block done that everybody uses ?)

Path has no longer been a problem, so I don't know what error I am causing with the other commands.

The other commands being...

hlalib=/home/sean/hla/hlalib/hlalib.a
export hlalib
hlainc=/home/sean/hla/include
export hlainc

Can't really say as long as I don't know which command is not found that is causing the script to terminate.
To circumvent the problem, use a separate script (I call mine "setuphla") and source that.  eg: source setuphla

In the script:

set PATH =/home/sean/hla:$PATH
export hlalib=/home/sean/hla/hlalib/hlalib.a
export hlainc=/home/sean/hla/include

If you want to test the .bashrc file, remove everything to do with HLA and run it to see if you still get the command not found error.


DarkWolf

Just trying to make sure I understand.

I am trying to use a script like your example but hla cannot be found.
I am not famaliar with this source command, what am I doing ?
--
Where's there's smoke, There are mirrors.
Give me Free as in Freedom not Speech or Beer.
Thank You and Welcome to the Internet.