From: Ben Abbott on 9 Apr 2010 20:25 Nicholas Kinar <n.kinar(a)usask.ca> wrote in message <4BBF8754.309(a)usask.ca>... > > I forced the GMP and MPFR libraries to compile as 32-bit by passing the > following arguments during the ./configure process. > > CFLAGS="-arch i386" > LDFLAGS="-arch i386" > That doesn't actually force a 32bit build. Although, I haven't yet tried to build working mex files on 10.6, the 32bit apps I have built required the "-m32" option. Ben
From: Nicholas Kinar on 9 Apr 2010 20:40 On 10-04-09 6:25 PM, Ben Abbott wrote: > Nicholas Kinar <n.kinar(a)usask.ca> wrote in message > <4BBF8754.309(a)usask.ca>... >> >> I forced the GMP and MPFR libraries to compile as 32-bit by passing >> the following arguments during the ./configure process. >> >> CFLAGS="-arch i386" >> LDFLAGS="-arch i386" >> > > That doesn't actually force a 32bit build. > > Although, I haven't yet tried to build working mex files on 10.6, the > 32bit apps I have built required the "-m32" option. > > Ben Thanks, Ben - that's really appreciated! I will re-compile the libraries and give it another try. I'll post back here as soon as I've done that. Many thanks!
From: Nicholas Kinar on 9 Apr 2010 21:02 On 10-04-09 6:40 PM, Nicholas Kinar wrote: > On 10-04-09 6:25 PM, Ben Abbott wrote: >> Nicholas Kinar <n.kinar(a)usask.ca> wrote in message >> <4BBF8754.309(a)usask.ca>... >>> >>> I forced the GMP and MPFR libraries to compile as 32-bit by passing >>> the following arguments during the ./configure process. >>> >>> CFLAGS="-arch i386" >>> LDFLAGS="-arch i386" >>> >> >> That doesn't actually force a 32bit build. >> >> Although, I haven't yet tried to build working mex files on 10.6, the >> 32bit apps I have built required the "-m32" option. >> >> Ben > > Thanks, Ben - that's really appreciated! I will re-compile the libraries > and give it another try. I'll post back here as soon as I've done that. > > Many thanks! Okay, now I see that the libraries are being created as 32-bit with the "-m32" switch. Ben, thank you very much for pointing this out to me! After running: >> mex -I/usr/local/include T_Zeta.cpp mpreal.cpp /usr/local/lib/libgmp.a /usr/local/lib/libmpfr.a -v -g I now receive the error: ld: absolute addressing (perhaps -mdynamic-no-pic) used in ___gmpn_add_n from /Developer/SDKs/MacOSX10.5.sdk/usr/local/lib/libgmp.a(add_n.o) not allowed in slidable image. Use '-read_only_relocs suppress' to enable text relocs collect2: ld returned 1 exit status mex: link of ' "T_Zeta.mexmaci"' failed. However, running: >> mex -I/usr/local/include T_Zeta.cpp mpreal.cpp /usr/local/lib/libgmp.dylib /usr/local/lib/libmpfr.dylib -v -g The MEX file does indeed compile cleanly. But after trying to run the compiled MEX function in Matlab, I receive another bizarre error: >> [re, im] = T_Zeta(13.000) ??? Invalid MEX-file '/Volumes/FILES/DEVELOPMENT/reconstruction-algorithms/calculate-T-Zeta/T_Zeta.mexmaci': dlopen(/Volumes/FILES/DEVELOPMENT/reconstruction-algorithms/calculate-T-Zeta/T_Zeta.mexmaci, 1): Library not loaded: /usr/local/lib/libgmp.3.dylib Referenced from: /Volumes/FILES/DEVELOPMENT/reconstruction-algorithms/calculate-T-Zeta/T_Zeta.mexmaci Reason: Incompatible library version: T_Zeta.mexmaci requires version 9.0.0 or later, but libgmp.3.dylib provides version 8.0.0. This is really weird. What else should I try? In additon, why does "T_Zeta.mexmaci requires version 9.0.0 or later"?
From: Ben Abbott on 9 Apr 2010 21:27 Nicholas Kinar <n.kinar(a)usask.ca> wrote in message <4BBFCE31.104(a)usask.ca>... > Reason: Incompatible library version: T_Zeta.mexmaci requires version > 9.0.0 or later, but libgmp.3.dylib provides version 8.0.0. > > > This is really weird. What else should I try? In additon, why does > "T_Zeta.mexmaci requires version 9.0.0 or later"? > I'm not much of an expert, but in my experience this may indicate that a libgmp.3.dylib version 9.0.0 is seen during link time, but that version 8.0.0 is found during run time. I'm running Matlab R2009b at the present time. It was compiled to link to version 8.0.0. $ otool -L /Applications/MATLAB_R2009b.app/bin/maci/libgmp.dylib /Applications/MATLAB_R2009b.app/bin/maci/libgmp.dylib: @loader_path/libgmp.3.dylib (compatibility version 8.0.0, current version 8.1.0) /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.0.0) Please check the lib you have in /usr/lib as well as the one which comes with your version of Matlab.
From: Nicholas Kinar on 9 Apr 2010 21:46 > I'm not much of an expert, but in my experience this may indicate that a > libgmp.3.dylib version 9.0.0 is seen during link time, but that version > 8.0.0 is found during run time. > > I'm running Matlab R2009b at the present time. It was compiled to link > to version 8.0.0. > > $ otool -L /Applications/MATLAB_R2009b.app/bin/maci/libgmp.dylib > /Applications/MATLAB_R2009b.app/bin/maci/libgmp.dylib: > @loader_path/libgmp.3.dylib (compatibility version 8.0.0, current > version 8.1.0) > /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version > 1.0.0) > /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version > 111.0.0) > > Please check the lib you have in /usr/lib as well as the one which comes > with your version of Matlab. Once again, thank you very much Ben for pointing me in the right direction! For Matlab R2010a, I'm also finding that GMP has been compiled to link with version 8.0.0, which is GMP version 3.4.1. Here is the output of my otool run: $ otool -L /Applications/MATLAB_R2010aSV.app/bin/maci/libgmp.dylib /Applications/MATLAB_R2010aSV.app/bin/maci/libgmp.dylib: @loader_path/libgmp.3.dylib (compatibility version 8.0.0, current version 8.1.0) /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.0.0) Alternately, my version of GMP is indeed at 9.0.0, as shown below: $ otool -L /usr/local/lib/libgmp.dylib /usr/local/lib/libgmp.dylib: /usr/local/lib/libgmp.3.dylib (compatibility version 9.0.0, current version 9.2.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.0.1) So how do I reconcile these two versions? Should I link with the GMP library in /Applications/MATLAB_R2010aSV.app/bin/maci/libgmp.dylib, or should I download, build and install GMP 3.4.1 in my own /usr/local/lib?
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 4 Prev: please help me with the math Next: Unusual GUNZIP.m error |