Install High Level Assembly (HLA) language compiler on Arch Linux x86_64

Useful things first

I am using Arch Linux x86_64 as my workstation operating system, which provides a lot of “bleeding edge” and up-to-date software. It has a HLA package from AUR so I don’t have to go to the source code and do a lot of compilation. AUR is quite amazing because it provides most of the software you may need as a student, developer or even a professional computer hacker.

To install the package, simply run aurget –Syu hla, and it will just automatically download and install it for you. However, after typing the first “Hello World” code, I encountered few problems when I was trying to compile the code.

Just before the compile errors, you can download a VIM syntax file here so that you get basic syntax for the hla file. It does not work really well but it is a good starting point for you to create your own syntax file.


What’s wrong and Solution:

This is because the library files which are used to compile the file cannot be found. To solve the problem, you have to set the environment variables hlalib and hlainc. Those two folders can be /usr/hla/lib and /usr/hla/include in most of the systems if you are using the source code combilation. In Arch Linux however, it is in /usr/lib and /usr/include. Therefore, the solution is pretty simple:

Just run the commands above and everything should work file now. You may find the hlalib.a file in the /usr/lib folder, which tells you that the hlalib virable should point to the folder where the hlalib.a file locates. It may help you if you are using some systems that you cannot get it to work using either /usr/hla/lib or /usr/lib. After fix the library issues, there is a new error when I was trying to compile:


What’s wrong and Solution:

The error comes from the wrong linking libraries between 32-bit application and 64-bit library. In one word, you cannot use 64-bit library to link 32-bit application. After knowing what is wrong, the fixes are even simpler:

This tells the hla program to use 32-bit library to link the application, which will immediately fix the problem. By the way, you may need to enable and install the multilib repository to allow 32-bit libraries to be installed in your system.


Recently I found that doing web apps is definitely not a way out in my career. I am not saying that creating web applications is something no worth doing, but I think it is not something that I want to spend the rest of my life to do. Meanwhile, I am taking a course at Monash University with specification of Network and Software Engineering, which motivates me to dig more in to computer science and computer architecture.

I think HLA is definitely something worth learning, because it helps you understand how computer works in a really low level. In order to learn this language, I chose the book The Art of Assembly Language Programming (AoA) by Randy Hyde. The first step is to install the HLA compiler.

Okay, here is the end of this post. Hope this can help you out with the errors you find in your compilation process. Thanks for reading and wish you happy coding.