Bart B. wrote:
Paul L. wrote:
For some reason, you have a very limited math library on your system.
Chances are you will succeed in the compilation if you will replace your
math library with a complete one.
I removed the check for the function and now the Makefile is perfectly
generated and make works flawlessly.
This is not a very good idea. The resulting library may appear to be
intact,
but it may fail at some future point when the missing function is
required.
There is a reason the test is present in the configuration procedure, it
should not be removed.
Make test fails however:
/ … snip long section of test results
Somehow the setup methods don’t work? It seems there is something wrong
with the testsuite, but I don’t see what…
It’s possible the methods used to force the compilation to finish have
ruined the library’s functioning. It’s also possible that there is
something wrong with your system’s math library. But those are minor
points.
I have been having a friendly debate in this newsgroup about the use of
libraries. I am in favor of using whatever method solves the problem at
hand, some others feel that a library, by definition carefully designed
and
wrung out, is a better approach. There are good arguments for both sides
of
this question.
But if the library is not wrung out or isn’t very portable, or if it
cannot
be easily compiled and run, the arguments in favor of using it break
down.
It turns out that 3D math, that is to say, math involving vectors of at
most
three elements, is not very difficult to write. If one executes a lot of
mathematical statements involving 3D vectors, one may encounter a
significant speed penalty if the executed code is written in plain Ruby
code, when compared to using a compiled library such as the one you are
trying to compile.
But I ask you to consider this. From a user’s perspective, the total
runtime
is the total of the preparation time plus the time spent using the
library.
I suspect that the total time for making this library work for you will
soon cross over a threshold beyond which it would have been quicker and
easier to write, test and use your own 3D vector routines, composed in
plain Ruby.
Another advantage to writing your own code – oops, I mean your
own /library/ – is that the resulting /library/ will be understood by
you,
it will be composed in the very readable and transparent syntax for
which
Ruby is justly famous, and you will be able to change it very quickly
and
easily to meet new requirements.
In exchange, it will not be nearly as fast as a compiled, native-code
library would have been, if the library had ever been successfully
compiled
and run.
It’s your time, your requirements, therefore it’s your decision.