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.
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.
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).
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.
Let's see, just BASH the Owner on the head and take his CASH from the SASH.
Yeah, that's it, :U
Paul
DarkWolf,
"./file" mean the current dir
"../file" mean the parent dir
and "dir/file" mean the child dir
jmgk
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 ?
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.
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 ?
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.
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 ?
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.
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
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.
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 ?
set PATH =/home/sean/hla:$PATH
export hlalib=/home/sean/hla/hlalib/hlalib.a
export hlainc=/home/sean/hla/include
If you have these 3 lines saved with filename "setuphla" then from the bash prompt, you type:
source setuphla
I don't know what's going on but it doesn't work.
I can use those commands in the shell but not a script or swith source.
So far it appears that I would have to do it manually each time.
I am beginning to think this may yet be another Ubuntu 5.10 glitch (?)
Well I just tried an idea, I copied those three lines into .bashrc
HLA is found but I get the error for not being able to open stdlib.hff
hla reports:
Error in file "test.hla" at line 5 [errid:3462/hla.flx]:
Could not open include file "stdlib.hhf".
Near: << ) >>
Did I progress forwards or backwards ?
Well, now it seems like it can't find your hla include folder.
Try my khla program. I have it attached and I hope it's the working one as I had a bug recently and can't test it since I don't have access to linux.
There are 2 files in the archive.
khla
khla.ini
place them both in your hla folder. From there, all you need is a path to khla and the program will find all the relative files (if you already have a working path to hla, you won't have to worry about it).
Use khla just like hla, it recognizes most of hla command line arguments.
[attachment deleted by admin]
I hadn't thought of using khla, wasn't aware you had a linux version.
Everything works now, thanks.
To let you know (I don't think it was something I did) that the permissions are set wrong.
Khla is not set for anyone, even owner, to execute. But fixed that and now all works, Cool.
:)
Quote from: DarkWolf on January 20, 2006, 06:16:04 PM
I hadn't thought of using khla, wasn't aware you had a linux version.
Everything works now, thanks.
To let you know (I don't think it was something I did) that the permissions are set wrong.
Khla is not set for anyone, even owner, to execute. But fixed that and now all works, Cool.
:)
I'm glad you got that over with :)
About the permissions. I'm aware of that, but can't do anything about it. My linux box doesn't have internet access, so I have to transfer files using a jump drive partitioned as vfat (FAT32 in Windows lingo). Moving across to a vfat filesystem doesn't allow me to preserve permissions. Sorry, I should've mentioned it.