octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MathGL: failure to load


From: CdeMills
Subject: Re: MathGL: failure to load
Date: Sun, 22 Jan 2012 23:55:28 -0800 (PST)

Jordi Gutiérrez Hermoso-2 wrote
> 
> On 22 January 2012 16:53, CdeMills <Pascal.Dupuis@> wrote:
>> mkoctfile-3.5.91+ -v mgl_octave.cpp -o mathgl.oct -I../../include
>> -I../include -lmgl 2>&1 | tee mkoct.log
>>
>> Relevant part:
>>
>> g++-4.6 -c -fPIC -I${HOME}/usr/include/octave-3.5.91+/octave/..
>> -I${HOME}/usr/include/octave-3.5.91+/octave -I${HOME}/usr/include
>> -mieee-fp
>> -I${HOME}/usr/include/freetype2 -I${HOME}/usr/include
>> -I${HOME}/usr/include
>> -g -O2 -I../../include -I../include mgl_octave.cpp -o mgl_octave.o
>>
>> g++-4.6 -shared -Wl,-Bsymbolic -o mathgl.oct mgl_octave.o -lmgl
>> -L${HOME}/usr/lib/octave/3.5.91+ -L${HOME}/usr/lib -loctinterp -loctave
>> -lcruft
> 
> Thanks, so at least the linking commands seem "correct".
> 
> Have you verified that libmgl.so does contain the correct symbols? If
> you have GNU binutils installed, you should be able to do
> 
>     nm libmgl.so | grep mgl_data_value
> 
> When I run that command in what appears to be my libgml.so, I don't
> see that symbol. Indeed, grepping through the source I only see a
> declaration for it in include/mgl/data.h, but I can't find a
> corresponding definition. I suspect this may be a bug in the 2.x
> MathGL release.
> 
> So how are you able to compile mgl_octave.cpp? SWIG doesn't seem to
> generate code for me that compiles. Did you do anything special to
> handle the compilation step?
> 
> 
Hello Jordi,

sorry I didn't check myself with nm. Now mgl.so has functions mgl_set_value
and mgl_get_value: maybe accessors were introduced in this version ?

With MathGL-2x:
1) to compile it, you need a small patch:
diff -bBur mathgl-2x.orig/src/data_png.cpp mathgl-2x/src/data_png.cpp
--- mathgl-2x.orig/src/data_png.cpp     2011-08-22 19:09:04.000000000 +0200
+++ mathgl-2x/src/data_png.cpp  2012-01-19 14:59:23.000000000 +0100
@@ -19,6 +19,7 @@
 
***************************************************************************/
 #include <stdlib.h>
 #ifndef NO_PNG
+#include <zlib.h>
 #include <png.h>
 #endif
 #include "mgl/data.h"

because png.h makes use of zlib function
2) about MathGL config, I enabled the options phtread, hdf5, and octave
3) the swig phase produce a few warnings, as well as the subsequent
compilation. F.i., it complains about a few symbols PACKAGE_* being
redefined. Yet there is a mgl_oct.cpp file produced.

I will contact MathGL author and see if he can help.

Regards

Pascal

--
View this message in context: 
http://octave.1599824.n4.nabble.com/MathGL-failure-to-load-tp4318358p4320076.html
Sent from the Octave - Maintainers mailing list archive at Nabble.com.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]