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

(43272/52927 downloads)
Dynamic link with MinGW for Scilab on Windows
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
25th of April 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 (7)
    Leave a comment 
Comment from David Dorchies -- 2nd of July 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 -- 12th of September 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 -- 12th of November 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 -- 12th of November 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 -- 29th of April 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':
	Opération non définie pour les opérandes données.
	Vérifier ou définir 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 -- 27th of May 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 it´s 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 -- 22nd of July 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
Leave a comment
You need to log in before you can leave a comment.