cpmech / gosl

Linear algebra, eigenvalues, FFT, Bessel, elliptic, orthogonal polys, geometry, NURBS, numerical quadrature, 3D transfinite interpolation, random numbers, Mersenne twister, probability distributions, optimisation, differential equations.
BSD 3-Clause "New" or "Revised" License
1.83k stars 145 forks source link

gcc version is hardcoded? #26

Closed sbromberger closed 6 years ago

sbromberger commented 6 years ago

Hi,

It's not a huge deal, but I noticed that for Darwin, the gcc version is hard-coded in https://github.com/cpmech/gosl/blob/840c88707193892f069608d0ca5afa8662cb9aba/num/qpck/flags.go#L12

The current version of gcc installed via homebrew is 8.1.0. How difficult would it be to change this to be more dynamic?

cpmech commented 6 years ago

Hi, sorry for the delay.

I've tried to improve this but it seems impossible.

The problem is that HomeBrew does not install GCC in a standard location (e.g. /usr/local/lib). Only with a script or a manual creation of a linked directory would fix this.

Thanks for the suggestion, nevertheless.

cpmech commented 6 years ago

All right! I think I've fixed this inconvenience.

My all.bash script should now autodetect the GCC version on macOS.

See changes here: https://github.com/cpmech/gosl/commit/c34297e62614b37a77d9a492fb7386f44e35fdb9

NOTE: I've tested with the most recent HomeBrew packages. The installation procedure from the user perspective hasn't changed.

Thanks for your help.