Scilab Home Page | Wiki | Bug Tracker | Forge | Mailing List Archives | Scilab Online Help | File Exchange
ATOMS : MinGw toolbox details
Please login or create an account

MinGw toolbox

Dynamic link with MinGW for Scilab on Windows
(56656 downloads for this version - 66960 downloads for all versions)
Details
Version
0.9.3-1
Author(s)
Allan CORNET
Entity
Scilab Enterprises
Package maintainers
Vincent Couvert
Antoine Elias
Category
License
Supported Scilab Versions
>= 5.4.1
Creation Date
April 25, 2013
ATOMS packaging system
Available on
How To Install
atomsInstall('mingw')
Description
MinGW Compiler support for Scilab 5.4.1 and more on Windows You need to install MinGW package distributed by Equation Solution first and then you must install this interface module between MinGw and Scilab. http://www.equation.com/servlet/equation.cmd?fa=programminglog On Windows 32 bits platform (* x86) http://atoms.scilab.org/toolboxes/mingw/0.9.3/files/gcc-4.6.3-32.exe On Windows 64 bits platform with Scilab 32 bits: (* x86) http://atoms.scilab.org/toolboxes/mingw/0.9.3/files/gcc-4.6.3-32.exe with Scilab 64 bits: (* x64) http://atoms.scilab.org/toolboxes/mingw/0.9.3/files/gcc-4.6.3-64.exe
Files (5)
[103.45 Ko] mingw_0.9.3-1.bin.windows.zip
Windows version (i686)
Automatically generated by the ATOMS compilation chain

[103.45 Ko] mingw_0.9.3-1.bin.x64.windows.zip
Windows version (x64)
Automatically generated by the ATOMS compilation chain

[45.14 Mo] gcc-4.6.3-32.exe
mingw 4.6.3 32 bits package provides by http://equation.com/
[62.02 Mo] gcc-4.6.3-64.exe
mingw 4.6.3 64 bits package provides by http://equation.com/
News (0)
Comments (15)
    Leave a comment 
Comment from David Dorchies -- July 2, 2013, 05:45:07 PM    
Hi everyone, 

I've already post a message on a previous version for saying that the installation of this
module doesn't work on my computer because of a crash during the compilation of the
libraries used in the module (libblasplus.a).

I found why. I have installed recently Visual Studio Express with a C compiler and it
seems that Scilab uses this compiler instead of GCC for compiling the librairies during
the installation of the module. Therefore, I use another computer for compiling and this
is not a very practical solution.

Does anyone know how to specify to Scilab to use only the GCC compiler and not another one
?

Thanks for any help on this subject.
Comment from Dietr. Boo -- September 12, 2013, 04:31:35 PM    
Hi,

sometimes after installing mingw via atomsInstall, and you the next time start scilab, you
get the message:

-->
Converting Libraries.
Build libblasplus.a
Conversion failed libblasplus.a
Build liblapack.a
Conversion failed liblapack.a
Build libMALLOC.a
Conversion failed libMALLOC.a
Build libf2c.a
Conversion failed libf2c.a
Build liblapack.a
Conversion failed liblapack.a
Build libcore.a
Conversion failed libcore.a
Build libcore_f.a
Conversion failed libcore_f.a
Build libintersci.a
<--

Here the conversion fails for all of the librarys. Also the *.a - files in
%APPDATA%\%USERNAME%\mingwlib[_x64]\ are zero size.

Reason: scilab runs inside a directory where it not have write permissions. 

From

SCILIBDIR\contrib\mingw\0.9.3-0\macros\mgw_buildLib.sci

is called the dlltool:

-->
commandline = """" + mgw_getArchBinPath() + filesep() +
'dlltool.exe"" -d""' + TMPDIR +
filesep() + libraryname + '.exp""' + ' -l""' + destPath + filesep() +
libraryNameDest + '""';

  if ilib_verbose() == 2 then
    mprintf("%s\n", commandline);
    [msg, ierr] = dos(commandline);
<--

This dlltool will be run in the same directory as scilab himself. Actually, there is the
way, to edit the startlink for scylab, and choose a directory where all Users have write
permission.

Another way is, that scilab himself will correct its rundir to something like %TEMP%.
I suggest to correct SCILIBDIR\contrib\mingw\0.9.3-0\macros\mgw_buildLib.sci
as following:

-->
commandline = """" + mgw_getArchBinPath() + filesep() +
'dlltool.exe"" -d""' + TMPDIR +
filesep() + libraryname + '.exp""' + ' -l""' + destPath + filesep() +
libraryNameDest + '""';
chdir(getenv("TEMP"));

  if ilib_verbose() == 2 then
    mprintf("%s\n", commandline);
    [msg, ierr] = dos(commandline);
<--

This will correct the failures.

Some better way is, that rundir would be choosen trough the usersession, may be as saved
in the scilab - env.


Greetings,

JDB

Comment from Hans-Juergen Pirch -- November 12, 2013, 05:48:31 PM    
Hello everyone,

I have a Problem on one of my machines running Windows 7 Professional 64Bit and Scilab
5.4.1 64Bit.

When I install the MinGw toolbox and restart Scilab I get the following:


Mingw Compiler support for Scilab
	Load macros
Converting Libraries.
Build libblasplus.a
Warning !!!
Scilab has found a critical error (EXCEPTION_ACCESS_VIOLATION)
with "dos" function.
Save your data and restart Scilab.
atomsLoad: An error occurred while loading 'mingw-0.9.3-0':
	Undefined operation for the given operands.
	check or define function %c_5 for overloading.


On other machines (also Win 64Bit and Scilab 64Bit) it works flawless.
Would anyone of you be able to help me?

Thanks a lot in advance!

Hans
Comment from Hans-Juergen Pirch -- November 12, 2013, 06:49:15 PM    
Hi everyone,

I managed to solve the issue by starting Scilab with the "Run as Administrator"
option.
Interestingly this is not necessary on my other PC's.


I am still having a problem though:

When I try to compile a code that works on other machines I get the following:

ilib_build(lib_name, table, files, []);
   Generate a gateway file
   Generate a loader file
   Generate a Makefile
   Running the makefile
   Compilation of C:UsersHPirch.AAITGDocumentsScilabInductance
calculationsci_CalcL1xNx3.obj
   Compilation of C:UsersHPirch.AAITGDocumentsScilabInductance
calculationsci_CalcM2xNx3.obj
   Compilation of TestL_lib.obj
   Building shared library (be patient)
 
 make: *** No rule to make target `C:\Users\HPirch.AAITG\Documents\Scilab\Inductance',
needed by `TestL_lib. 
      dll'.  Stop.                                                                       
                   
 !--error 10000 
ilib_compile: Error while executing Makelib.
at line      25 of function dlwCompile called by :  
at line      51 of function ilib_compile called by :  
at line     106 of function ilib_build called by :  
ilib_build(lib_name, table, files, []);


The files 

loader.sce
Makelib 
TestL_lib.c

are generated but no Object files.

Again any help would be much appreciated!

Thanks
Hans

Comment from Celine Guivarch -- April 29, 2014, 12:03:14 PM    
Dear Hans, everyone,

I also have the same problem you are describing:

Mingw Compiler support for Scilab
	Load macros
Converting Libraries.
Build libblasplus.a
Warning !!!
Scilab has found a critical error (EXCEPTION_ACCESS_VIOLATION)
with "dos" function.
Save your data and restart Scilab.
atomsLoad : Une erreur est survenue au cours du chargement de 'mingw-0.9.3-1':
	Opration non dfinie pour les oprandes donnes.
	Vrifier ou dfinir la fonction %c_5 pour la surcharge.

I am using a machine running Win 7 pro 64bit.
I get the same error when I install scilab 5.5.0 64bit + gcc-4.6.3-64.exe, or
alternatively scilab 5.5.0 32bit+gcc-4.6.3-32.exe.

And starting scilab (either 64bit or 32bit version) with the "run as
administrator" option
does not solve my problem...

Some help would be greatly appreciated!

Thanks

Celine
Comment from Markus Nein -- May 27, 2014, 10:02:22 AM    
Hi,

also have trouble with SciLab and MinGW ...

Windows 7 (64bit)
Java 1.7.0_09 (32bit)
SciLab 5.5.0 (32bit)
installed GCC as described above:
<< On Windows 64 bits platform
     with Scilab 32 bits:
    (* x86) http://atoms.scilab.org/toolboxes/mingw/0.9.3/files/gcc-4.6.3-32.exe
>>

SciLab does not find the compiler, but its installed !!!
What is the MinGW atom looking for to find the compiler ?


--- My path includes the GCC:

XXX>path
 PATH=....;C:\user_programs\gcc__4.6.3_32bit\bin;C:\user_programs\gcc__4.6.3_32bit


--- And GCC is available on the cmd line:
XXX>gcc -v
Built by Equation Solution <http://www.Equation.com>.
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=c:/user_programs/gcc__4.6.3_32bit/bin/../libexec/gcc/i686-pc-mingw32/4.6.3/lto-wrapper.exe
Target: i686-pc-mingw32
Configured with: ../gcc-4.6.3-mingw/configure --host=i686-pc-mingw32
--build=x86_64-unknown-linux-gnu --target=i686-pc-mingw32
--prefix=/home/gfortran/gcc-home/
binary/mingw32/native/x86_32/gcc/4.6.3 --with-gcc --with-gnu-as --with-gnu-ld
--with-host-libstdcxx='-lstdc++ -lsupc++ -lm' --with-ppl=/home/gfortran/gcc-home/b
inary/mingw32/native/x86_32/ppl
--with-cloog=/home/gfortran/gcc-home/binary/mingw32/native/x86_32/cloog
--with-gmp=/home/gfortran/gcc-home/binary/mingw32/native
/x86_32/gmp --with-mpfr=/home/gfortran/gcc-home/binary/mingw32/native/x86_32/mpfr
--with-mpc=/home/gfortran/gcc-home/binary/mingw32/native/x86_32/mpc --with-sys
root=/home/gfortran/gcc-home/binary/mingw32/cross/x86_32/gcc/4.6.3 --disable-shared
--disable-nls --disable-tls --disable-win32-registry --enable-libquadmath-su
pport --enable-libquadmath --enable-languages=c,c++,fortran --enable-libgomp
--enable-threads=win32 --enable-lto --enable-static --enable-shared=lto-plugin --en
able-plugins --enable-ld=yes --enable-cloog-backend=ppl
Thread model: win32
gcc version 4.6.3 (GCC)



--- SciLab at startup:
  Startup execution:
    loading initial environment

  Mingw Compiler support for Scilab
  	Load macros
  WARNING: MinGW Compiler not detected.
  	Load help
 
--- some test:
  -->atomsIsInstalled('mingw')
   ans  =
 
    T  
 
  -->atomsIsLoaded('mingw')
   ans  =
 
    T  

  -->atomsTest('mingw')
     TMPDIR = C:\Users\dep02354\AppData\Local\Temp\SCI_TMP_1308_

     001/001 - [SCI\contrib\mingw\0.9.3-1] : 

     001/015 - [SCI\contrib\mingw\0.9.3-1] G_make.................failed: premature end of
the test script 
     002/015 - [SCI\contrib\mingw\0.9.3-1] addinter...............failed: premature end of
the test script 
     003/015 - [SCI\contrib\mingw\0.9.3-1] call...................failed: premature end of
the test script 
     004/015 - [SCI\contrib\mingw\0.9.3-1] dllinfo................failed: premature end of
the test script 
     005/015 - [SCI\contrib\mingw\0.9.3-1] ilib_build.............failed: premature end of
the test script 
  ....

chears
Markus
Comment from Jean-Bernard Blaisot -- July 22, 2014, 11:33:34 PM    
Hi,

when using ilib_build with mingw toolbox (I run Scilab 5.5.0 on windows 7 64bits) there is
an error message at linking step:

x86_64-w64-mingw32-gcc.exe: error: unrecognized command line option '-Wl'

I found where is the error: there is an extra -Wl option in the template Makefile
"TEMPLATE_MAKEFILE.MINGW" at line 103:
	$(LINKER) $(LINKER_FLAGS) -o $(LIBRARY).dll $(OTHERLIBS) -Wl,--out-implib=$(LIBRARY).a
-Wl,--export-all-symbols -Wl,--enable-auto-import -Wl	$(EXTRA_LDFLAGS)

Thie line should be replaced in the template file by:
	$(LINKER) $(LINKER_FLAGS) -o $(LIBRARY).dll $(OTHERLIBS) -Wl,--out-implib=$(LIBRARY).a
-Wl,--export-all-symbols -Wl,--enable-auto-import	$(EXTRA_LDFLAGS)

Hope this will be helpful.

Regards,
JB
Comment from Anne-Laure Cheffot -- June 4, 2015, 11:40:51 AM    
Dear all,

For the record before what follows I tried all the fix suggested before and none worked.

I managed to find a way to have mingw working with scilab 64bit.
This only work for the following error message:
Mingw Compiler support for Scilab
	Load macros
Converting Libraries.
Build libblasplus.a
Warning !!!
Scilab has found a critical error (EXCEPTION_ACCESS_VIOLATION)
with "dos" function.
Save your data and restart Scilab.
atomsLoad : Une erreur est survenue au cours du chargement de 'mingw-0.9.3-1':
	Opration non dfinie pour les oprandes donnes.
	Vrifier ou dfinir la fonction %c_5 pour la surcharge.

THIS IS NOT A FIX this is only a trick!

The first reason this warning pop up is that the file under
SCIHOME+"mingwlib_x64" does 
not build up properly and end up empty. So I obtained content from a working copy of 
another computer with same configuration and copy/paste it.. if someone has a better 
solution than google or dropbox to share this file I'll be happy to share it.

Then a new error appeared after atomsLoad('mingw'):

Load macros
Warning !!!
Scilab has found a critical error (EXCEPTION_ACCESS_VIOLATION)
with "setenv" function.
Save your data and restart Scilab.
	Load help

To solve that one you should modify the content of the environment 
variable "EQ_LIBRARY_PATH" in windows. the following webpage should help you to
do that.
http://www.nextofwindows.com/how-to-addedit-environment-variables-in-windows-7/?
bcsi_scan_680be4f748955657=bg+S+DuBiD8PDcZYZiR+kLmqWOQSAAAABwUa7w==:1

Be carefull! do NOT change PATH but "EQ_LIBRARY_PATH" to
"C:\gcc\x86_64-w64-mingw32\lib;"
if you installed your gcc in C:\ directly. 

Now the problem should be solved. Other wise you did not have the same problem or when 
copy paste some stuffs out of this post you copied the " with.

Hoping this helped
Anne-Laure
Answer from Anne-Laure Cheffot -- June 4, 2015, 02:08:53 PM    
For the record after installing a newer version of Scilab(5.5.2) today it seems that that 
the library builded naturally when I downloaded again the atoms' library mingw.
Comment from Roman Stoiber -- July 10, 2015, 10:31:30 PM    
Dear all,

same issue here:

Mingw Compiler support for Scilab
	Load macros
Converting Libraries.
Build libblasplus.a
Warning !!!
Scilab has found a critical error (EXCEPTION_ACCESS_VIOLATION)
with "dos" function.
Save your data and restart Scilab.
atomsLoad: An error occurred while loading 'mingw-0.9.3-0':
	Undefined operation for the given operands.
	check or define function %c_5 for overloading.

Tried all suggestions above, none works.

System is windows 7 professional 64 bit. Scilab 5.5.2 and mingw 0.9.3-0
I tried both versions gcc-4.6.3-64 and gcc-4.6.4-64 with multiple restarts without 
success.

Any help greatly appreciated!

Best regards
Roman
Comment from Vincent Couvert -- July 13, 2015, 08:51:19 AM    
Hello,

Please check that you do not have multiple gcc versions installed on your PC.

Regards.
Comment from Franco Concli -- July 30, 2015, 11:19:42 AM    
ERROR on Windows 7 professional 64 bit. Scilab 5.5.2 and mingw 0.9.3-0

Mingw Compiler support for Scilab
    Load macros
Converting Libraries.
Build libblasplus.a
Warning !!!
Scilab has found a critical error (EXCEPTION_ACCESS_VIOLATION)
with "dos" function.
Save your data and restart Scilab.
atomsLoad: An error occurred while loading 'mingw-0.9.3-0':
    Undefined operation for the given operands.
    check or define function %c_5 for overloading.

How to solve? Please help.

Franco
Comment from Vincent Couvert -- July 30, 2015, 11:24:05 AM    
Hello,

It seems you have more than one version of GCC installed. Please keep only one.

Regards.
Comment from Franco Concli -- July 30, 2015, 12:14:33 PM    
I have uninstalled all the versions (Scilab warning: no ggc installed) and re-installed 
just one (gcc-4.6.3-64), but I get the same problem.

Ideas?

Franco

PS: the same occurs also for v. 5.5.1 64bit
Comment from Franco Concli -- July 31, 2015, 09:19:41 AM    
Now I have solved the previous error by removing the old envoironmental variable but 
when I try to simulate the first SIMM example I get following.

Mingw Compiler support for Scilab
	Load macros
	Load help

  
 Fin SIMM pre_simulate   
--------------------------------------------\
 Main Modelica : 
C:\Users\fconcli\AppData\Local\Temp\SCI_TMP_6092_\Livret_SIMM_Exemple1_im.mo

 Flat Modelica : 
C:\Users\fconcli\AppData\Local\Temp\SCI_TMP_6092_\Livret_SIMM_Exemple1_imf.mo
 Simulation C code 
:C:\Users\fconcli\AppData\Local\Temp\SCI_TMP_6092_\Livret_SIMM_Exemple1_im.c
   Genera un file del loader
   Genera un makefile
   Esecuzione del makefile in corso
   Compilazione di Livret_SIMM_Exemple1_im.obj
   Creazione in corso della libreria condivisa (attendere)
 
!del *.bak                                                                                 
                   
!
!                                                                                          
                   
!
!Impossibile trovare C:\Users\fconcli\AppData\Local\Temp\SCI_TMP_6092_\*.bak               
                   
!
!                                                                                          
                   
!
!del *.o                                                                                   
                   
!
!                                                                                          
                   
!
!Impossibile trovare C:\Users\fconcli\AppData\Local\Temp\SCI_TMP_6092_\*.o                 
                   
!
!                                                                                          
                   
!
!del *.dll                                                                                 
                   
!
!                                                                                          
                   
!
!Impossibile trovare C:\Users\fconcli\AppData\Local\Temp\SCI_TMP_6092_\*.dll               
                   
!
!                                                                                          
                   
!
!del *.lib                                                                                 
                   
!
!                                                                                          
                   
!
!Impossibile trovare C:\Users\fconcli\AppData\Local\Temp\SCI_TMP_6092_\*.lib               
                   
!
!                                                                                          
                   
!
!del *.def                                                                                 
                   
!
!                                                                                          
                   
!
!Impossibile trovare C:\Users\fconcli\AppData\Local\Temp\SCI_TMP_6092_\*.def               
                   
!
!                                                                                          
                   
!
!------------- Compile file Livret_SIMM_Exemple1_im.c --------------                       
                   
!
!                                                                                          
                   
!
!x86_64-w64-mingw32-gcc.exe -c -DWIN32 -D_MSC_VER -DSTRICT -DFORDLL -
I"C:/PROGRA~1/SCILAB~1.2/libs/MALLOC/inclu!
!     des" -I"C:/PROGRA~1/SCILAB~1.2/modules/core/includes" -
I"C:/PROGRA~1/SCILAB~1.2/modules/api_scilab/includ!
!     es" -I"C:/PROGRA~1/SCILAB~1.2/modules/call_scilab/includes" -
I"C:/PROGRA~1/SCILAB~1.2/modules/output_stre!
!     am/includes" -I"C:/PROGRA~1/SCILAB~1.2/modules/jvm/includes" -
I"C:/PROGRA~1/SCILAB~1.2/modules/localizati!
!     on/includes" -I"C:/PROGRA~1/SCILAB~1.2/modules/dynamic_link/includes"
-
I"C:/PROGRA~1/SCILAB~1.2/modules/m!
!     exlib/includes" -I"C:/PROGRA~1/SCILAB~1.2/modules/time/includes" -
I"C:/PROGRA~1/SCILAB~1.2/modules/window!
!     s_tools/includes" -I"C:/PROGRA~1/SCILAB~1.2/libs/f2c" -
I"C:/PROGRA~1/SCILAB~1.2/libs/hashtable" -I"C:/PRO!
!     GRA~1/SCILAB~1.2/libs/intl" -m64  -
I"C:/PROGRA~1/SCILAB~1.2/modules/scicos/includes" -I"C:/PROGRA~1/SCILA!
!     B~1.2/modules/scicos_blocks/includes"  Livret_SIMM_Exemple1_im.c                
                        
!
!                                                                                          
                   
!
!------------- Link files --------------                                                   
                   
!
!                                                                                          
                   
!
!x86_64-w64-mingw32-gcc.exe --shared Livret_SIMM_Exemple1_im.o  -L"c:\gcc\x86_64-w64-
mingw32\lib" -LC:\Users\fc!
!     oncli\AppData\Roaming\Scilab\scilab-5.5.2\mingwlib_x64 -lstdc++ -lgfortran -
lMALLOC -lblasplus -lf2c -lla!
!     pack -lcore -lcore_f -lintersci -loutput_stream -ldynamic_link -linteger -
loptimization_f -ljvm -lsciloca!
!     lization -lintl -llinpack_f -lcall_scilab -ltime -lapi_scilab -lscilab_windows 
-lscicos -lscicos_blocks -!
!     lscicos_blocks_f -lscicos_f -o libLivret_SIMM_Exemple1_im.dll  -Wl,--out-
implib=libLivret_SIMM_Exemple1_i!
!     m.a -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl	
"C:\Users\fconcli\AppData\Roaming\Scilab\scilab!
!     -5.5.2\mingwlib_x64\libscicos.a" 
"C:\Users\fconcli\AppData\Roaming\Scilab\scilab-5.5.2\mingwlib_x64\libsc!
!     icos_f.a" "C:\Users\fconcli\AppData\Roaming\Scilab\scilab-
5.5.2\mingwlib_x64\libscicos_blocks.a" "C:\User!
!     s\fconcli\AppData\Roaming\Scilab\scilab-
5.5.2\mingwlib_x64\libscicos_blocks_f.a"                         !
!                                                                                          
                   
!
!x86_64-w64-mingw32-gcc.exe: error: unrecognized command line option '-Wl'                 
                   
!
!                                                                                          
                   
!
!make: *** [libLivret_SIMM_Exemple1_im.dll] Error 1                                        
                   
!
 
!sorry compiling problem                                !
!                                                       !
!ilib_compile: Errore durante l'esecuzione di Makelib.  !
c_pass1: build the modelica meta-block failed 
 
 xcos_simulate: Error during block parameters update.  
Leave a comment
You need to log in before you can leave a comment.