Fortran compiler?

I was trying to port a piece of software today, but the autoconfigure shut me down, not finding a fortran compiler. It doesn’t seem like we have one on HaikuDepot. Any suggestions?

There is fortran for Haiku, see: https://github.com/haikuports/haikuports/blob/f85fb2d8ddbc31ce149a3395a48ff1cca61c05c9/sys-devel/gcc/gcc-7.3.0_2018_05_01.recipe#L63

Are you running 32-bit or 64-bit Haiku? (searching in Terminal with: “pkgman search fortran” should give you a clue if it’s installed or not)

As @Begasus said gfortran 8.3 is available, if you are using 32 bit Haiku make sure you switch arch with setarch command to make it visible/usable. Eventually you will have to install the fortran package first.

Thank you both for the information. I am really quite naive regarding coding.

Anyhow, with your coaching I’ve been able to make some progress, installing gfortran, hdf5 and something called ocaml needed for the configuration. It wanted something else called ocamlopt, which we don’t seem to have available… I can skip that, by eliminating the modelica compiler in the final executable, but what confused me was that the script couldn’t find the symbol clock_gettime, which I’m guessing is a call to get info from the computers clock. It states the librt library is missing (rt-real time?). I thought that sort of thing would be in the basic c libraries. But maybe I’m way off?

The symbol is probably available, but the library named differently and the configure script tries only some which are hardcoded in the script. It means you should adjust/extend the configure script (configure.ac / cmakelists.txt )
If the software auto* based (e.g have configure.ac) then the configure script have to be regenerated with autogen.sh or with autoconf.

Whats the name of this software?

It’s scilab. It’s something that I’m trying to learn in Linux, and I thought I’d do what I can to bring it to Haiku.

1 Like

I saw somewhere in forum the attempt to port Octave to Haiku. I would like to see more mathematics software in Haiku.

clock_gettime is in libroot, it seems. You can patch the configure script, but it seems to be optional.

checking for clock_gettime in -lroot... yes

I was unable to found ocamplopt, ocaml comes with ocamloptp, i don’t know if it is the same or not. I don’t know ocaml.

Disabling modellica helps with it, but the configure then fails with ant missing. I pushed a fix for ant ( https://github.com/haikuports/haikuports/pull/5602 ) so after the merge this should be also OK.

It fails then because not finding jgraphx.

So basically scilab have many dependencies, you should port them one by one. This is a long and boring task, but not too hard, you can’t hovewer skip your homework: you will have to read a LOT, and understand most of them. Do not forget to check out the haikuports wiki.

Some problems however won’t be trivial, so expect bumps, like arpack not working, or eigen 3.3.9 considered as older than 3.3.2, complains about tcl, while it searching for tk, and many other compicated bugs. You probably won’t find relevant info on the net in some cases.

Have fun!

1 Like

You should also consider to try to port something easier.

Worded this way it sounds a bit negative :slight_smile:
Be aware of the kind of problems you may hit, but decide for yourself if that should stop you or if you should give it a try anyway.

Maybe more importantly, it would be a good idea to document your work on haikuports (create an “issue” at http://github.com/haikuports/haikuports ). So that even if you don’t get it all fully working, at least the next person to try it will be able to benefit from your work, and spend their time and motivation in the next set of problems, rather than redoing the first part that you already solved. And after enough people doing that, eventually one will figure out the last missing piece and get things to run

4 Likes

Thanks for the review and words of wisdom! I look forward to the challenge.

Yeah, I can see that, but I’m having a hard time thinking of something easier that is actually interesting to me. Pressing on!

Will do! Thanks for the directions.