Re: Seg fault with hla 1.99 on Fedora 8 linux
- From: Frank Kotler <spamtrap@xxxxxxxxxx>
- Date: Thu, 28 Feb 2008 10:47:59 GMT
DaveR wrote:
Ok - thanks for the help guys! - I'll do my best. As you say, whilst
I'm happy to give NASM a go ( once I know a bit of assembler ) it
would be nice to get HLA working on my linux box, as it would make
following the book a lot easier ( BTW - I'm finding the book really
good and well layed out - only having done high level languages
before, this is all very enlightening... :-> )
Ok - now for the info that you wanted:
First - yes my install of FC8 is 32 bit.
Yeah... I'd have known that if I'd read your original post more carefully.
Second - install paths. I have the following setup
HLA 1.99 installed in /home/david/local/hla1.99
HLA 1.97 installed in /home/david/local/hla1.97
A symlink from /home/david/local/hla -> hla1.9X (depending on which
version I'm testing)
Chuck has pointed out some potential problems with this. Randy's "packaging system" is not "the way you do it in Unix". A long time ago, I tried installing HLA under /home/fbk, with the executables in /usr/bin or /usr/local/bin... I *thought* I had path and environment variables set "right" for what I was trying to do, but it behaved as if some component were hard-coded into... ??? I forget what the "diagnostic" was. Since then, I've done it "Randy's way" - as root, get into "/" and "tar zxf /home/fbk/hla-1.99.tar.gz" (I add the version info when I download it). (certain earlier versions, you had to be in "/usr", not "/") This has worked well enough so I haven't gone back to trying it the way I'd "like" to install it.
and the following env vars set:
[david@beechwood:~/local ] $ env | grep hla
hlalib=/home/david/local/hla/hlalib/hlalib.a
hlainc=/home/david/local/hla/include
PATH=/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/david/local/
hla:/home/david/bin
This looks right... Chuck quotes these as "HLAINC" and "HLALIB" - lasi I checked, they *had* to be lowercase - yet another "unusual" feature of "Randy's system".
I really think this "ought" to work the way you're doing it, but if all else fails, try it the "HLA way" and see if it helps...
Third - core dumps - I have done a little bit of C programming so have
some experience of gdb and examining core dumps, however , I'm not
really sure how this translates to assembler...
Well, best thing is to avoid 'em, I guess... Still on my "TODO" list to learn more about this...
... Having just written the out the above, whilst trying to get some
more info I have now found a way to make it work , by switching the
assemblers
With internal FASM:
[david@beechwood:~/local/AoA/Volume1/Ch02 ] $ hla -xo
HelloWorldWithVar.hla
[david@beechwood:~/local/AoA/Volume1/Ch02 ] $ ./HelloWorldWithVar
Hello, World of Assembly Language
InitDemo's value is Segmentation fault (core dumped)
With Gas:
[david@beechwood:~/local/AoA/Volume1/Ch02 ] $ hla -xg
HelloWorldWithVar.hla
[david@beechwood:~/local/AoA/Volume1/Ch02 ] $ ./HelloWorldWithVar
Hello, World of Assembly Language
InitDemo's value is 5
Any thoughts on why this might be ( although now I can get on with
trying the examples :-> ... )?
On the face of it, you've discovered a bug in the code generation of "internal Fasm". But... the funny build number, and the fact that HLA seems to work "as-is" for other people makes me suspect some subtle "mismatch" in the way you've got it installed. I'd expect a "diagnostic" rather than a faulting executable - this is a "bug" in HLA, perhaps, but not too unexpected (if that's what's happening).
At least now you've got two executables to compare - yourself or send 'em to someone - Randy, if it's really a bug in HLA. And you've got a workaround so you can do the examples...
But I'm really puzzled by that build number... Here's what's working for me (slightly pruned) - this is 1.99 (let's concentrate on that):
/usr/hla:
-rwxr-xr-x 1 root root 519176 2008-01-07 16:02 hla*
-rwxr-xr-x 1 root root 2191935 2008-01-07 16:02 hlaparse*
/usr/hla/hlalib:
-rw-r--r-- 1 root root 1575420 2008-01-07 16:09 hlalib.a
Sizes match, at least?
Nathan's suggestion that the build number suggests 1.10x masquerading as 1.99 is worrisome. HLA is in "version number hell" right now, so mixups (not necessarily yours) are possible...
Many thanks for all your help and advice!
No problem. Some people do crossword puzzles. :) If you get good at this, we'll be coming to *you* for help and advice!
Best,
Frank
.
- References:
- Seg fault with hla 1.99 on Fedora 8 linux
- From: DaveR
- Re: Seg fault with hla 1.99 on Fedora 8 linux
- From: Frank Kotler
- Re: Seg fault with hla 1.99 on Fedora 8 linux
- From: nbaker2328
- Re: Seg fault with hla 1.99 on Fedora 8 linux
- From: DaveR
- Re: Seg fault with hla 1.99 on Fedora 8 linux
- From: nbaker2328
- Re: Seg fault with hla 1.99 on Fedora 8 linux
- From: Frank Kotler
- Re: [Clax86list] Seg fault with hla 1.99 on Fedora 8 linux
- From: Charles Crayne
- Re: Seg fault with hla 1.99 on Fedora 8 linux
- From: DaveR
- Seg fault with hla 1.99 on Fedora 8 linux
- Prev by Date: Re: Seg fault with hla 1.99 on Fedora 8 linux
- Next by Date: Re: GNU Assembler (GAS) query
- Previous by thread: Re: Seg fault with hla 1.99 on Fedora 8 linux
- Next by thread: Re: Seg fault with hla 1.99 on Fedora 8 linux
- Index(es):
Relevant Pages
|