In this article I am going to teach you how to compile Astrolog on macOS with X11 Graphics. This is absolutely a geeky post 🤓, and it is addressed specifically to people interested in having the Astrolog software running on macOS with graphics features on. As you might know the version available on the official website doesn’t support graphics so what you need to do is to compile it from scratch with the X Windows System (X11) enabled.

Installing X11 on macOS
At the time of this article the last version available of Astrolog is the 6.50, click on this link to download it. If the link doesn’t work most likely a new version has been released, so visit astrolog.org and get it.
We are going to compile+link the code from the terminal, but first you need to download and install X11 libraries for macOS, available at XQuartz.org. X11 is no longer pre-installed on macOS and you need to manually install it. This is a very quick and easy thing to do, but if you are having any problem please follow the tutorial below.
Now you should have everything you need to compile the source code and link the objects. If you are not a computer programmer you can follow the instructions step by step—you should make it through. But please note you still need to be somewhat familiar with the terminal to do that.
Compiling Astrolog
We are going to compile the source code now. If you open the makefile in the /ast65src source code folder you are going to find this comment:
# This Makefile is included only for convenience. One could easily compile
# Astrolog on a Unix system by hand with the command:
# % cc -c -O -Wno-write-strings *.cpp; cc -o astrolog *.o -lm -lX11
# Generally, all that needs to be done to compile once astrolog.h has been
# edited, is compile each source file, and link them together with the math
# library, and if applicable, the main X library.
We are going to compile it by hand, we are not going to use the makefile. However, the command like provided is missing the reference to include the X11 Library you have just installed. This means that if you try to launch that command you are going to get a bunch of errors referring to X11 libraries missing.
So try to run the command line below instead. Before doing that please be sure that your X11 libraries have been installed under /usr/X11/. You can open the /usr folder with the “go to” command in the finder by pressing ⌘⇧G.
Open the terminal, go to the /ast65src folder and launch this command:
cc -I /usr/X11/include -c -O -Wno-write-strings *.cpp; cc -o astrolog *.o -lm -lX11 -v
If this is your first time launching the compiler you should get a message box, asking you to install the developer command line tools. Press OK and finish the installation process. Once finished, launch the command line again, you should get two things:
- A bunch of object files (with .o extension) in the /ast65src folder
- An error thrown by the linker (red arrow below) that we are going to solve in the next step:

Linking Astrolog
We are almost done, we just need to link the .o objects together and obtain the executable file. The errors given by the linker are caused again by a wrong reference to X11 libraries. The linker is looking for them in /usr/local/lib, but they are in /usr/X11/lib instead. We can tell the linker to look for them under the correct folder replacing the wrong reference in the -L option.
If you are running macOS 10.14 Simply copy and paste the command below, it should work:
"/Library/Developer/CommandLineTools/usr/bin/ld" -demangle -lto_library /Library/Developer/CommandLineTools/usr/lib/libLTO.dylib -dynamic -arch x86_64 -macosx_version_min 10.14.0 -syslibroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -o *.o -lm -lX11 -L/usr/X11/lib -lSystem /Library/Developer/CommandLineTools/usr/lib/clang/10.0.1/lib/darwin/libclang_rt.osx.a
If it doesn’t work copy and paste the code highlighted in the green box (see picture above), you should get it from the output of the previous step. Your command line should be somewhat different (most likely CommandLineTools references and macOS version are going to slightly change), but all you need to do is replacing -L/usr/local/lib with -L/usr/X11/lib.
Once you run the modified command line, nothing happens. This is a good sign, it means it worked. The linker linked successfully the program! Now you can give it a try launching this spectacular command:
astrolog -Xn -XG
Enjoy! 🙏
Very helpful, thanks!
You’re welcome! :)
Hi,
thank you for writing this easy-to-follow guide! Everything went exactly as you described it but, i encountered the following message, and I am unable to execute the program:
Undefined symbols for architecture x86_64:
“_main”, referenced from:
implicit entry/start for main executable
ld: symbol(s) not found for architecture x86_64
I am using a MacBook Pro (MacBookPro9,2) Dual-Core Intel Core i5.
I’d appreciate if you could offer any help with this. Thank you in advance!
Jose
Hey Jose,
try not to use my linking command with *.o and use the command you should find from the compilation output. Just remember to correct the X11 library reference. Also remember to delete all .o objects before starting..
Thank you for compiling Astrolog for the Mac with interactive graphics, and for making this guide available! :) Would it be possible to make the precompiled Astrolog Mac binary available for download? That would allow Mac users to easily run the program without having to compile it themselves (which not every Mac user will be able to do, even with these quality instructions).
Hey Walter, that sounds great :)
I didn’t want to publish the program without your permission, so I published this mini tutorial instead.
I’m gonna make another post to download it, adding some instructions (you still need to install X11 for Mac).
I am also going to include the bug fix you provided me for the rendering problems on the -V command.
Thanks for reaching out
Dear Sir
thank for you help
and i also want make Secondary Progression with Expects
i use command
[ /astrolog -qa 12 30 2003 19:30 CCT 106:17E 38:28N -pd 365.2251 -pC 366.24219 -b0 -aa ]
but it’s different about the other software
on North Node and Midheaven planets
other software shows applying but astrolog shows separating
the angle is same and the other planets info is same
i am so confuse!
thx sir
Hi Anni,
you are loading a chart to work on with the -qa command.
Then you are setting options with the -pdf and -pC commands, but you are loading “chart info” and not progressions :)
To do it you need to take a look at the -t/-V commands with the p option (-tp/-Vp). For example, try adding the -Vpy0 2021 option like this:
> astrolog -qa 12 30 2003 19:30 CCT 106:17E 38:28N -Vpy0 2021 -pd 365.2251 -pC 366.24219 -b0 -aa
You can see the details of the -t/-V here:
https://www.astrolog.org/ftp/astrolog.htm
Hope that helped! :)
Rob
Sorry Sir
i lost some detail
i use command
> ./astrolog -qa 12 30 2003 19:30 CCT 106:17E 38:28N -pd 365.2251 -pC 366.24219 -b0 -aa -pt 5 12 2021 12:00
The -pt switch shows the progressed chart only, not the aspects between the natal chart (loaded with -qa) and the progressed chart. If you remove the “-aa” switch by the command line you can see the progressed Sun at 28° Capricorn (the natal Sun is at 8° Capricorn).
In order to obtain aspects between the natal and the progressed you need to look at the -tp command (again, check the documentation for the -t/-V commands):
> astrolog -qa 12 30 2003 19:30 CCT 106:17E 38:28N -pd 365.2251 -pC 366.24219 -b0 -tpy 2021
> Fri 21- 5-2021 0:01:31 progr Moon (17Sco46) Opp natal [17Tau46] North Node
> Fri 18- 6-2021 9:45:32 progr Moon (18Sco52) Sex natal (18Vir52) Jupiter
Hello Sir, i hope you are doing great!
When i did the steps and enter ➜ astrolog -Xn -XG
i have this message:
➜ ast65src git:(master) ✗ astrolog -Xn -XG
zsh: command not found: astrolog
Any help?
Hello Sir, i hope you are doing great!
When i did the steps and enter ➜ astrolog -Xn -XG
i have this message:
➜ ast65src git:(master) ✗ astrolog -Xn -XG
zsh: command not found: astrolog
Any help?
Hey Sami,
it looks to me that you are trying to launch the compiled astrolog executable but it’s not there in the first place.
Did the other steps succeed? The should have produced the astrolog file.
Rob
hey Sami, if you call `./astrolog -Xn -XG` instead of `astrolog …` (note the preceeding `./`), it should work for you :).
whenever you type an executable command (such as `astrolog` or `grep`), Terminals will look for a file in a variety of directories that are listed on what’s called a `PATH` until they find an executable file in one of those directories. then they will execute the code in that file with whatever arguments (e.g., `-Xn -XG` follow it.
when you compiled the `ast…src/` `.h` (header) and `.c` files into a binary (an executable file), the output file, called `astrolog` was created in the same directory, `ast…src/`. if you `ls -la astrolog`, you will see it here.
because that executable file is not on your `PATH`, you have to give the Terminal a path to the file. thus, `./astrolog` works while `astrolog` doesn’t (hint – on unix systems, file paths are formatted `./a/b/c`, where `c` is a file in directory `b`, which is itself in directory `a`. `.` means “start here” and it resolves to the current working directory.
probably more than you needed to know but i like teaching so here we are.
thanks for the tutorial Rob! for whatever reason, on Mac OS 11.6 (Big Sur), i did not get a clang linker error telling me to use `ld`, but i ran that command anyway.
in order for the graphics to open, i have to run `./astrolog …` _in a terminal running through XQuartz, which is hilarious and weird, but it works!! greatly appreciate your post. happy new year
Hey Caleb,
thanks for your support to other users :)
Yeah, astrolog is an old style command line software (at least for Mac, there’s a Windows version with a GUI). It might seem weird at first, but once you learn how to use it it’s way much faster than any other astrology software around.. I love it! :)
Hi Rob!
I’d like to thank you for taking the time to make this post and Walter for creating such a wonderful wonderful application. However, I’m still having issues getting it to work properly on my mid 2012 MacBook Pro, even after following the walkthrough and trying to use the precompiled version that was posted here: https://astronomicon.co/en/download-astrolog-for-macos-with-x11-graphics/.
As far as following the instructions for the walkthrough is concerned, everything worked just fine, as far as I can tell, until it came time to run the application. Typing this command did nothing: astrolog -Xn -XG.
Reading further, on the walkthrough’s page, I saw that you responded to Jose, who was having issues, and instructed him to delete the *.o files before running, so I did that, to no avail.
I continued to read the page and saw that Caleb assisted someone, by instructing him/her to use this command: ./astrolog -Xn -XG. That didn’t work either.
Bear in mind that I can open the application, without any of the X graphics.
Eventually, I discovered that you had created a bin file that should make things much less complicated and tried it. Yet again, no success. However, this time instead of nothing happening, I’m getting the message: Unknown switch ‘:Xv’.
Any help to get me past this dilemma will be greatly appreciated. Thanks, in advance.
– Nate
Hey Nate,
try to rename or delete the astrolog.as file you might have in the same folder of the binary.
It might contain a dirty switch that is not recognized by the program
Hi Roberto!
Thank you for your reply and suggestion. I gave it a go and still no luck, but I am not giving up. This application is a powerful tool that I need in my bag and will be worth every moment of effort that I use, in order to get it going.
Also, to be clear, if I wasn’t before, I can get the application to open in Terminal, but without graphics. Perhaps, someone is willing to setup a video call to troubleshoot. I know that may be asking a lot, but I’ll won’t know if I don’t ask.
Again, thank you Roberto and anyone else who helps me get to the bottom of my dilemma.
Question: did you install XQuartz?
Yes. XQuartz was installed, prior to installing Astrolog. Also, I reinstalled it, just to make sure. Thanks again, for following up.