I am trying to download the program FDist2 (Beaumont and Nichols 1996) for Mac but for some reason it appears that all the links I find are broken.

It appears that the program Lositan is an faster implementation of FDist2 but in my understanding Lositan works only through a GUI and not via the command line (and given the number of analyses I want to perform I need to be able to run this algorithm from the command line).

  • 1
    $\begingroup$ I found this link in Mark Beaumont's web site. The links seem to work. I am not completely sure whether this is a question for this forum though. $\endgroup$ – ddiez Jan 13 '16 at 2:52

The link that ddiez has mentioned, has a download link for a zip file (fidist2). The zip file contains windows executables and C-codes. Just compile the C-codes in your terminal.

This is from the readme:

The .exe files are pc binaries, which is only what most people want. I include the source file in case anyone wants to play with them. In this case compilation is e.g.:

gcc -o fdist2 -O fdist2.c -lm
gcc -o cplot -O cplot.c as100.c as99.c -lm
gcc -o datacal -O datacal.c -lm

Actually in the readme, the first compile command says fdist.c (no such file) instead of fdist2.c. I corrected that here.

Your system should have gcc. I tried compiling in my system (linux) and it works. It should work in Mac too.

  • $\begingroup$ OS X doesn't come with a compiler by default, but if you install XCode and the command-line tools, you'll get clang, which works (in this case) very much in the same manner. $\endgroup$ – MattDMo Jan 13 '16 at 14:56
  • $\begingroup$ @MattDMo ohh okay.. I didn't know that... That's bad .. This page says that XCode comes with gcc (don't know what version but once you have a compiler you can always compile the other versions). $\endgroup$ – WYSIWYG Jan 13 '16 at 15:08
  • $\begingroup$ Well, I'm avoiding a lot of "nerd" details. I think the command gcc will work from the command line once the proper tools are installed (@Remi.b, make sure you run XCode first!). The problem I'm running into currently is that the files aren't compiling. Remi will need to find a C expert, I think.... $\endgroup$ – MattDMo Jan 13 '16 at 15:16
  • $\begingroup$ Yes, the compilation fails on Mac. I'll try to figure this out (eventually with some help from the StackOverflow community) and suggest an edit. Thank you! $\endgroup$ – Remi.b Jan 13 '16 at 17:48
  • $\begingroup$ @Remi.b Have a look at this page.. Once you compile gcc on your system, you won't have much trouble. Having gcc in your system would be useful for other purposes in future as well. $\endgroup$ – WYSIWYG Jan 14 '16 at 5:50

Lotterhos and Whitlock 2014 recoded fdist2 in R and it can be found here on Dryad.


Not the answer you're looking for? Browse other questions tagged or ask your own question.