Closed mblakele closed 6 years ago
I'm not a Mac user, but this looks like the GSL 2.x bug that hit us on Linux earlier this year. In the Arch package we use the patch from the Debian package. You could see if applying that patch lets you build the program.
@pigmonkey this bit?
-INCLUDES = -I ./curses -I ./gsl -I ./units
+INCLUDES = -I ./curses -I /usr/lib/ocaml/gsl/ -I ./units
I don't think that'll help on osx, much as I'd like it to. The homebrew ocaml doesn't install its own gsl.
--- mlgsl_sf.c
+++ mlgsl_sf.c
@@ -258,7 +258,8 @@
SF3(ellint_F, Double_val, Double_val, GSL_MODE_val)
SF3(ellint_E, Double_val, Double_val, GSL_MODE_val)
SF4(ellint_P, Double_val, Double_val, Double_val, GSL_MODE_val)
-SF4(ellint_D, Double_val, Double_val, Double_val, GSL_MODE_val)
+//SF4(ellint_D, Double_val, Double_val, Double_val, GSL_MODE_val)
+SF3(ellint_D, Double_val, Double_val, GSL_MODE_val)
SF3(ellint_RC, Double_val, Double_val, GSL_MODE_val)
SF4(ellint_RD, Double_val, Double_val, Double_val, GSL_MODE_val)
SF4(ellint_RF, Double_val, Double_val, Double_val, GSL_MODE_val)
@@ -452,6 +453,7 @@
SF2(legendre_Ql, Int_val, Double_val)
/* Associated Legendre Polynomials and Spherical Harmonics */
+/*
SF3(legendre_Plm, Int_val, Int_val, Double_val)
CAMLprim value
ml_gsl_sf_legendre_Plm_array(value lmax, value m, value x, value result_array)
@@ -487,6 +489,7 @@
ret = Val_int(gsl_ret);
CAMLreturn(ret);
}
+*/
/* LOGARITHM and related functions */
SF1(log, Double_val)
This might be a better approach:
--- a/orpie.rb
+++ b/orpie.rb
@@ -1,10 +1,10 @@
class Orpie < Formula
desc "RPN calculator for the terminal"
- homepage "http://pessimization.com/software/orpie/"
- url "http://pessimization.com/software/orpie/orpie-1.5.2.tar.gz"
+ homepage "https://github.com/pelzlpj/orpie"
+ url "https://github.com/pelzlpj/orpie/releases/download/release-1.5.2/orpie-1.5.2.tar.gz"
sha256 "de557fc7f608c6cb1f44a965d3ae07fc6baf2b02a0d7994b89d6a0e0d87d3d6d"
- depends_on "gsl"
+ depends_on "homebrew/versions/gsl1"
depends_on "ocaml"
depends_on "camlp4" => :build
That seems to get me past the compile error above, but fails with a link error instead:
ocamlopt.opt -c -pp camlp4o -I ./curses -I ./gsl -I ./units -thread main.ml
ocamlopt.opt -pp camlp4o -I ./curses -I ./gsl -I ./units -thread -o orpie.opt curses/curses.cmx curses/ml_curses.o nums.cmxa bigarray.cmxa str.cmxa unix.cmxa threads.cmxa gsl/mlgsl_error.o gsl/mlgsl_blas.o gsl/mlgsl_blas_complex.o gsl/mlgsl_complex.o gsl/mlgsl_blas_float.o gsl/mlgsl_blas_complex_float.o gsl/mlgsl_matrix_complex.o gsl/mlgsl_matrix_double.o gsl/mlgsl_matrix_float.o gsl/mlgsl_matrix_complex_float.o gsl/mlgsl_vector_double.o gsl/mlgsl_vector_float.o gsl/mlgsl_permut.o gsl/mlgsl_linalg.o gsl/mlgsl_linalg_complex.o gsl/mlgsl_fun.o gsl/mlgsl_math.o gsl/mlgsl_sf.o gsl/gsl_error.cmx gsl/gsl_blas.cmx gsl/gsl_complex.cmx gsl/gsl_matrix.cmx gsl/gsl_matrix_complex.cmx gsl/gsl_vector.cmx gsl/gsl_vector_complex.cmx gsl/gsl_vector_flat.cmx gsl/gsl_matrix_flat.cmx gsl/gsl_vector_complex_flat.cmx gsl/gsl_matrix_complex_flat.cmx gsl/gsl_vectmat.cmx gsl/gsl_permut.cmx gsl/gsl_linalg.cmx gsl/gsl_fun.cmx units/units.cmx big_int_str.cmx gsl_assist.cmx install.cmx operations.cmx utility.cmx version.cmx rcfile.cmx rpc_stack.cmx add.cmx sub.cmx mult.cmx div.cmx inv.cmx pow.cmx solvelin.cmx rpc_calc.cmx txtin_parser.cmx txtin_lexer.cmx statefile.cmx interface.cmx interface_draw.cmx interface_main.cmx main.cmx -cclib ' -lcurses -L/usr/local/Cellar/gsl1/1.16/lib -lgsl -lgslcblas -lm'
File "_none_", line 1:
Error: No implementations provided for the following modules:
Gsl_sf referenced from rpc_calc.cmx
Gsl_math referenced from rpc_calc.cmx
Using brew install orpie --debug
to open a shell, I applied this patch:
--- Makefile.in.orig 2016-09-25 13:11:46.000000000 -0700
+++ Makefile.in 2016-09-25 13:11:53.000000000 -0700
@@ -81,7 +81,7 @@
GSL_CMO = gsl/gsl_error.cmo gsl/gsl_blas.cmo gsl/gsl_complex.cmo gsl/gsl_matrix.cmo gsl/gsl_matrix_complex.cmo \
gsl/gsl_vector.cmo gsl/gsl_vector_complex.cmo gsl/gsl_vector_flat.cmo gsl/gsl_matrix_flat.cmo \
gsl/gsl_vector_complex_flat.cmo gsl/gsl_matrix_complex_flat.cmo gsl/gsl_vectmat.cmo \
- gsl/gsl_permut.cmo gsl/gsl_linalg.cmo gsl/gsl_fun.cmo
+ gsl/gsl_permut.cmo gsl/gsl_linalg.cmo gsl/gsl_fun.cmo gsl/gsl_math.cmo gsl/gsl_sf.cmo
GSL_CMX = $(GSL_CMO:.cmo=.cmx)
GSL_COBJS = gsl/mlgsl_error.o gsl/mlgsl_blas.o gsl/mlgsl_blas_complex.o gsl/mlgsl_complex.o gsl/mlgsl_blas_float.o \
gsl/mlgsl_blas_complex_float.o gsl/mlgsl_matrix_complex.o gsl/mlgsl_matrix_double.o gsl/mlgsl_matrix_float.o \
Finally ./configure && make && make install
. It's a bit crude because homebrew ends up confused about the state or the orpie package, but at least it runs. I'll see if I can do anything to clean it up.
When compiling against Ocaml 4.04 on Fedora Rawhide, I had to add the following to complement the patch mentioned by pigmonkey:
--- gsl/gsl_sf.ml› 2016-11-29 20:45:11.975346785 -0600
+++ gsl/gsl_sf.ml.new› 2016-11-29 20:44:53.898348781 -0600
@@ -1150,8 +1150,8 @@
= ml_gsl_sf_legendre_Plm_e"
-external legendre_Plm_array : int -> int -> float -> float array -> unit
- = "ml_gsl_sf_legendre_Plm_array"
+(*external legendre_Plm_array : int -> int -> float -> float array -> unit
+ = "ml_gsl_sf_legendre_Plm_array"*)
external legendre_sphPlm : int -> int -> float -> float
@@ -1161,8 +1161,8 @@
= "ml_gsl_sf_legendre_sphPlm_e"
-external legendre_sphPlm_array : int -> int -> float -> float array -> unit
- = "ml_gsl_sf_legendre_sphPlm_array"
+(*external legendre_sphPlm_array : int -> int -> float -> float array -> unit
+ = "ml_gsl_sf_legendre_sphPlm_array"*)
external legendre_array_size : int -> int -> int•
Moving forward, the supported workflow for Homebrew will be through OPAM. This should be available somewhere in the next couple of days, tracking progress in https://github.com/pelzlpj/orpie/issues/5 .
I was very glad to find this repo with some recent commits, after I noticed that
brew install orpie
was broken and http://pessimization.com/software/orpie seemed to be offline. I use orpie almost every day, and it has a dedicated terminal tab open at all times.You probably already know about the homebrew problems, but if I open this issue maybe it'll save you from some duplicate requests.
This was initial problem after a recent reboot:
I tried this:
After finding this github repo I tried to patch the download URL:
That got me past the download error, but led to a compile time error:
Any ideas? Maybe the version of gsl is too new?
Thanks!