Message Boards Message Boards

Compile to C in version 12 on new linux install

Posted 5 years ago

Dear All,

I recently installed Mathematica version 12.0.0.0 on a new machine with Linux Mint.

I have gcc installed, and recognized by Mathematica :

In[5]:= CCompilers[]

Out[5]= {{"Name" -> "GCC", 
  "Compiler" -> CCompilerDriver`GCCCompiler`GCCCompiler, 
  "CompilerInstallation" -> "/usr/bin", "CompilerName" -> Automatic}}

However, when I try to compile a function with C as compilation target, I get this error message :

CreateLibrary::cmperr: Compile error: /home/jonckhee/.Mathematica/ApplicationData/CCompilerDriver/BuildFolder/jonckhee-Precision-7730-8096/Working-jonckhee-Precision-7730-8096-1492406464-5/compiledFunction3.c:1:10: fatal error: math.h: No such file or directory

Compile::nogen: A library could not be generated from the compiled function.

Any hint at where the problem might be ? Until now (many versions of Mathematica used on standard linux install), C compilation was always working "out-of-box" on linux for me.

Thank you for your help,

Thibaut

2 Replies

Oh, thanks a lot, this was the problem. I just installed a package containing it and the problem is solved.

Thanks again,

Thibaut

Does your system have the math.h header file?

(that might need libc6-dev or some other appropriate package to be installed)

POSTED BY: Ilian Gachevski
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract