freemat4.0 on ubuntu 9.10

89 views
Skip to first unread message

Liz

unread,
Jul 8, 2011, 2:38:28 PM7/8/11
to freemat
Hi there,

in ccmake, I set use_llvm to off, and install freemat, when I run my
software package. It says

Error: Support for the import command requires that the LLVM library
be installed. FreeMat was compiled without this library being
available, and hence imported functions are unavailable. To enable
imported commands, please install llvm and recompile FreeMat.

anybody know this problem ?

I installed llvm2.5

Thanks

Samit Basu

unread,
Jul 9, 2011, 12:49:19 AM7/9/11
to fre...@googlegroups.com
Hi Liz,

When you set "use_llvm" to "off", you disabled those parts of FreeMat
that require LLVM to work -- the JIT compiler, and the "import"
function. If you set "use_llvm" to "on" and rebuild, those pieces
should work again.

Samit

> --
> You received this message because you are subscribed to the Google Groups "freemat" group.
> To post to this group, send email to fre...@googlegroups.com.
> To unsubscribe from this group, send email to freemat+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/freemat?hl=en.
>
>

Liz

unread,
Jul 9, 2011, 1:50:52 AM7/9/11
to freemat
Hi Samit,

Thank you very much for the instruction. I need to import functions.
If I set use_llvm to on, there are always JIT errors when I make
freemat.

Now, I updated my ubuntu to 10.04, and download source from here:

https://freemat.svn.sourceforge.net/svnroot/freemat/trunk

when I ccmake freemat, it can't find this library:
libclangserialization.a . I make and build llvm-2.7 from freemat
dependencies, so I guess this is a bug(I installed several times,
still can't find libclangserialization.a) ? or any idea ?

then I disabled CLANGSERIALIZATION library in freemat cmakelists.txt,
while I make freemat, the following error comes out:

../Interpreter.cpp:50:22: error: CArray.hpp: No such file or directory
Interpreter.cpp:1920: error: ‘CJIT_Success’ was not declared in this
scope
Interpreter.cpp:1931: error: ‘CJIT_Prepfail’ was not declared in this
scope
...

I couldn't find CArray.hpp in libMatc, is it missed ? or any idea?

thank you very much

zhengmin






On Jul 9, 12:49 am, Samit Basu <basu.sa...@gmail.com> wrote:
> Hi Liz,
>
> When you set "use_llvm" to "off", you disabled those parts of FreeMat
> that require LLVM to work -- the JIT compiler, and the "import"
> function.  If you set "use_llvm" to "on" and rebuild, those pieces
> should work again.
>
> Samit
>

Samit Basu

unread,
Jul 9, 2011, 11:44:21 PM7/9/11
to fre...@googlegroups.com
Hi,

Yes, I'm aware of the problem. I recently checked in the new
C++-based JIT (it compiles a far larger subset of FreeMat code than
the older JIT, and should be more stable), and am working through some
of the issues now. A couple of pointers:

1. Install the "clang" package. I don't know how you do this on
ubuntu, but clang is part of llvm. You should then be able to build
with the JIT.
2. Install the "libffcall" package. I have actually reverted
FreeMat's import mechanism to the one from FreeMat 3.6 (I had too many
problems with the new one).

With these two steps, you should be OK. I am also committing fixes as
I work through the issues, so update regularly.

Samit

Liz

unread,
Jul 10, 2011, 4:53:50 PM7/10/11
to freemat
Hi Samit,

Thank you very much.

Actually, I installed clang library from freemat dependencies, I have
all other components installed , but only can't find
libclangserialization.a

And I also installed libffcall. Do you know where is CArray.hpp ? I
couldn't find it anywhere. The error is the same: in Interpreter.cpp,
CArray.hpp: No such file or directory. and CJIT_Success, CJIT_Prepfail
were not declared in this scope.

Looking forward to you help, thank you

Liz
> > For more options, visit this group athttp://groups.google.com/group/freemat?hl=en.- Hide quoted text -
>
> - Show quoted text -

Samit Basu

unread,
Jul 11, 2011, 1:07:55 AM7/11/11
to fre...@googlegroups.com
Hi Liz,

I think everything you need is committed now. Please try again.

Samit

Liz

unread,
Jul 11, 2011, 1:43:57 AM7/11/11
to freemat
Dear Samit,

No...I tried several times, when I make freemat, at 97%, following
error appears

/home/liz7/sources/trunk/FreeMat/libs/libMatC/CJitFuncClang.cpp:6:41:
error: clang/CodeGen/CodeGenAction.h: No such file or directory
In file included from /usr/local/include/clang/Driver/Driver.h:13,
from /home/liz7/sources/trunk/FreeMat/libs/libMatC/
CJitFuncClang.cpp:8:
/usr/local/include/clang/Basic/Diagnostic.h:63:49: error: clang/Basic/
DiagnosticCommonKinds.inc: No such file or directory
In file included from /home/liz7/sources/trunk/FreeMat/libs/libMatC/
CJitFuncClang.cpp:13:
/usr/local/include/clang/Frontend/FrontendDiagnostic.h:20:51: error:
clang/Basic/DiagnosticFrontendKinds.inc: No such file or directory
/home/liz7/sources/trunk/FreeMat/libs/libMatC/CJitFuncClang.cpp: In
member function ‘bool CJitFuncClang::compile(const std::string&, const
std::string&)’:
/home/liz7/sources/trunk/FreeMat/libs/libMatC/CJitFuncClang.cpp:77:
error: ‘err_fe_expected_compiler_job’ is not a member of ‘clang::diag’
/home/liz7/sources/trunk/FreeMat/libs/libMatC/CJitFuncClang.cpp:82:
error: ‘err_fe_expected_clang_command’ is not a member of
‘clang::diag’
/home/liz7/sources/trunk/FreeMat/libs/libMatC/CJitFuncClang.cpp:94:
error: no matching function for call to
‘clang::HeaderSearchOptions::AddPath(const char*,
clang::frontend::IncludeDirGroup, bool, bool, bool)’
/usr/local/include/clang/Frontend/HeaderSearchOptions.h:83: note:
candidates are: void
clang::HeaderSearchOptions::AddPath(llvm::StringRef,
clang::frontend::IncludeDirGroup, bool, bool)
/home/liz7/sources/trunk/FreeMat/libs/libMatC/CJitFuncClang.cpp:113:
error: ‘CodeGenAction’ was not declared in this scope
/home/liz7/sources/trunk/FreeMat/libs/libMatC/CJitFuncClang.cpp:113:
error: template argument 1 is invalid
/home/liz7/sources/trunk/FreeMat/libs/libMatC/CJitFuncClang.cpp:113:
error: invalid type in declaration before ‘(’ token
/home/liz7/sources/trunk/FreeMat/libs/libMatC/CJitFuncClang.cpp:113:
error: expected type-specifier before ‘EmitLLVMOnlyAction’
/home/liz7/sources/trunk/FreeMat/libs/libMatC/CJitFuncClang.cpp:113:
error: expected ‘)’ before ‘EmitLLVMOnlyAction’
/home/liz7/sources/trunk/FreeMat/libs/libMatC/CJitFuncClang.cpp:113:
error: invalid conversion from ‘int*’ to ‘int’
/home/liz7/sources/trunk/FreeMat/libs/libMatC/CJitFuncClang.cpp:114:
error: invalid type argument of ‘unary *’
/home/liz7/sources/trunk/FreeMat/libs/libMatC/CJitFuncClang.cpp:116:
error: ‘JITExceptionHandling’ is not a member of ‘llvm’
/home/liz7/sources/trunk/FreeMat/libs/libMatC/CJitFuncClang.cpp:117:
error: base operand of ‘->’ is not a pointer

It is almost done, but I still can't finish it...(I disabled
clangserialization library, because can't find it at ccmake)

The clang in llvm-2.7 in freemat dependencies is version 1.1 ? is this
the reason that clangserialization is missed.

Thank you, I am struggling on this for several days :(

liz

Samit Basu

unread,
Jul 12, 2011, 12:04:07 AM7/12/11
to fre...@googlegroups.com
Hi Liz,

If you don't need the JIT, you can disable it (set USE_LLVM to no).
If you need the JIT, you may need to use a more recent version of
CLANG. I have tested with 2.8 and it works fine.

HTH
Samit

Liz

unread,
Jul 12, 2011, 12:00:56 PM7/12/11
to freemat
Hi Samit,

Thank you !

How did you install clang-2.8? I downloaded llvm-2.8 and clang-2.8
from the llvm website, and installed llvm-2.8, but when I install
clang-2.8, the following error appears


CMake Error at CMakeLists.txt:27 (string):
string sub-command REGEX, mode MATCH needs at least 5 arguments
total to
command.

CMake Error at CMakeLists.txt:31 (string):
string sub-command REGEX, mode REPLACE needs at least 6 arguments
total to
command.

CMake Error at CMakeLists.txt:33 (string):
string sub-command REGEX, mode REPLACE needs at least 6 arguments
total to
command.

Could you please see what is the problem ? or if you have any other
method to install clang-2.8 ?

Thank you very much
Liz



On Jul 12, 12:04 am, Samit Basu <basu.sa...@gmail.com> wrote:
> Hi Liz,
>
> If you don't need the JIT, you can disable it (set USE_LLVM to no).
> If you need the JIT, you may need to use a more recent version of
> CLANG.  I have tested with 2.8 and it works fine.
>
> HTH
> Samit
>

Samit Basu

unread,
Jul 13, 2011, 8:53:52 PM7/13/11
to fre...@googlegroups.com
Hi Liz,

I installed clang via Fedora's "yum" utilitiy, so I didn't have to
build it from source. Where does this error occur? while building
FreeMat? or while building Clang? Do you have the right version of
cmake? Perhaps you should open a ticket so the rest of the FreeMat
group doesn't have to listen :)

Samit

Liz

unread,
Jul 17, 2011, 10:02:29 PM7/17/11
to freemat
Hi Samit,

Thanks for the instruction, I noticed that the Freemat source included
llvm-2.9, and I installed it. But when I ccmake freemat,

clangchecker.a is missing, and the following errors appeared

/home/xiaolei/liz/src/trunk/FreeMat/libs/libMatC/CJitFuncClang.cpp:
27:30: error: llvm/System/Host.h: No such file or directory
/home/xiaolei/liz/src/trunk/FreeMat/libs/libMatC/CJitFuncClang.cpp:
28:30: error: llvm/System/Path.h: No such file or directory

Is this still because of the installation of clang library ?

Thank you

Liz

On Jul 13, 8:53 pm, Samit Basu <basu.sa...@gmail.com> wrote:
> HiLiz,
>
> I installed clang via Fedora's "yum" utilitiy, so I didn't have to
> build it from source.  Where does this error occur? while building
> FreeMat? or while building Clang?  Do you have the right version of
> cmake? Perhaps you should open a ticket so the rest of the FreeMat
> group doesn't have to listen :)
>
> Samit
>

EI

unread,
Jul 18, 2011, 2:24:23 PM7/18/11
to fre...@googlegroups.com

I added llvm 2.9 to the source tree two days ago. Trunk doesn't compile with it yet.

Reply all
Reply to author
Forward
0 new messages