[Scilab-users] Compiling an MBLOCK

Nicolas Fezans nicolas.fezans at gmail.com
Tue Oct 6 23:28:17 CEST 2015


Hi Umut,

well unfortunately I was not able to reproduce your issue on any of
the following combinations:

A) Windows 7 Enterprise x64 (German) - Scilab 5.5.2 32bit
B) Windows 7 Enterprise x64 (German) - Scilab 5.5.2 64bit
C) Windows 7 Enterprise x64 (German) - Scilab 5.5.0 32bit
D) Windows 7 Home x86 (English) - Scilab 5.5.2 32bit

In all cases with Visual Studio 2010 (English version).

My guess is that something is not configured "properly" on your
machine (e.g. Path, Environment variable, ...) leading to things like
not calling the right version of NMAKE or something like that happened
earlier leading to generate commands that are not adequate for use
with nmake. Maybe that helps but it seems that the NMAKE is
complaining about being passed an option beginning with "--" or "/-"
so I think somehow the call to NMAKE must be erroneous by itself and I
see two main possibilities for that (but I know too little about the
Xcos/Modelica compilation under Scilab to pretend that there are no
other obvious possibilities):

1) you have another make system (e.g. gnu make or cmake) on your
computer that was detected at some point during the process and the
options passed to nmake where actually intended/generated for the
other detected make system (which indeed can take options like
--always-make , --ignore-errors , --trace etc.)

2) somehow compiler or linker flags were included in the nmake call
(even though I can't think of any flags/options for cl or link
beginning like the one that apparently causes your issue)

If I had to bet on that I'll my money on number 1)


Hope that helps,
Nicolas



On Tue, Oct 6, 2015 at 5:30 PM, Dr.Umut Durak
<umut.durak at tu-clausthal.de> wrote:
> Thanks Clement,
> the model you will find attached and the log with verbose level 2 is as
> follows:
>
>  --------------------------------------------\
>  Main Modelica :
> C:\Users\dura_um\AppData\Local\Temp\SCI_TMP_6816_\loop1_im.mo
>
>  Flat Modelica :
> C:\Users\dura_um\AppData\Local\Temp\SCI_TMP_6816_\loop1_imf.mo
>  Simulation C code
> :C:\Users\dura_um\AppData\Local\Temp\SCI_TMP_6816_\loop1_im.c
>    erzeuge eine Laderdatei
>  !// This file is released under the 3-clause BSD license. Se!
> !     e COPYING-BSD.                                        !
> !                                                           !
> !// Generated by builder.sce : Please, do not edit this file!
> !                                                           !
> !// --------------------------------------------------------!
> !     --------------------                                  !
> !                                                           !
> !//                                                         !
> !                                                           !
> !if ~win64() then                                           !
> !                                                           !
> !  warning(_("This module requires a Windows x64 platform.")!
> !     );                                                    !
> !                                                           !
> !  return                                                   !
> !                                                           !
> !end                                                        !
> !                                                           !
> !//                                                         !
> !                                                           !
> !loop1_im_path = get_absolute_file_path('loader.sce');      !
> !                                                           !
> !//                                                         !
> !                                                           !
> !// ulink previous function with same name                  !
> !                                                           !
> ![bOK, ilib] = c_link('loop1_im');                          !
> !                                                           !
> !if bOK then                                                !
> !                                                           !
> !  ulink(ilib);                                             !
> !                                                           !
> !end                                                        !
> !                                                           !
> !//                                                         !
> !                                                           !
> !link(loop1_im_path + 'libloop1_im' + getdynlibext(), ['loop!
> !     1_im'],'c');                                          !
> !                                                           !
> !// remove temp. variables on stack                         !
> !                                                           !
> !clear loop1_im_path;                                       !
> !                                                           !
> !clear bOK;                                                 !
> !                                                           !
> !clear ilib;                                                !
> !                                                           !
> !// --------------------------------------------------------!
> !     --------------------                                  !
>    erzeuge ein Makefile
>  !# ------------------------------------------------------   !
> !                                                           !
> !# generated by builder.sce : Please do not edit this file  !
> !                                                           !
> !# see TEMPLATE makefile for Visual Studio                  !
> !                                                           !
> !# see SCI/modules/dynamic_link/src/scripts/TEMPLATE_MAKEFIL!
> !     E.VC                                                  !
> !                                                           !
> !# ------------------------------------------------------   !
> !                                                           !
> !SCIDIR = C:/PROGRA~1/SCILAB~1.2                            !
> !                                                           !
> !# ------------------------------------------------------   !
> !                                                           !
> !# default include options                                  !
> !                                                           !
> !INCLUDES = -I"$(SCIDIR)/libs/MALLOC/includes" \
> -I"$(SCIDIR!
> !     )/libs/f2c" \
> -I"$(SCIDIR)/libs/hashtable" \
> -I"$(SCID!
> !     IR)/libs/intl" \
> -I"$(SCIDIR)/modules/core/includes" \!
> !
> -I"$(SCIDIR)/modules/api_scilab/includes" \
> -I"$(SCID!
> !     IR)/modules/call_scilab/includes" \
> -I"$(SCIDIR)/modul!
> !     es/output_stream/includes" \
> -I"$(SCIDIR)/modules/jvm/!
> !     includes" \
> -I"$(SCIDIR)/modules/localization/includes!
> !     " \
> -I"$(SCIDIR)/modules/dynamic_link/includes" \
> -I"$!
> !     (SCIDIR)/modules/mexlib/includes" \
> -I"$(SCIDIR)/modul!
> !     es/time/includes" \
> -I"$(SCIDIR)/modules/windows_tools!
> !     /includes"                                            !
> !                                                           !
> !# ------------------------------------------------------   !
> !                                                           !
> !# SCILAB_LIBS is used by the binary version of Scilab for l!
> !     inking external codes                                 !
> !                                                           !
> !SCILAB_LIBS = "$(SCIDIR)/bin/blasplus.lib" \
> "$(SCIDIR)/bin!
> !     /libf2c.lib" \
> "$(SCIDIR)/bin/core.lib" \
> "$(SCIDIR)/b!
> !     in/core_f.lib" \
> "$(SCIDIR)/bin/lapack.lib" \
> "$(SCIDI!
> !     R)/bin/libintl.lib" \
> "$(SCIDIR)/bin/intersci.lib" \
> "!
> !     $(SCIDIR)/bin/output_stream.lib" \
> "$(SCIDIR)/bin/dyna!
> !     mic_link.lib" \
> "$(SCIDIR)/bin/integer.lib" \
> "$(SCIDI!
> !     R)/bin/optimization_f.lib" \
> "$(SCIDIR)/bin/libjvm.lib!
> !     " \
> "$(SCIDIR)/bin/scilocalization.lib" \
> "$(SCIDIR)/b!
> !     in/linpack_f.lib" \
> "$(SCIDIR)/bin/call_scilab.lib" \
> !
> !     "$(SCIDIR)/bin/time.lib" \
> "$(SCIDIR)/bin/api_scilab.l!
> !     ib" \
> "$(SCIDIR)/bin/libintl.lib" \
> "$(SCIDIR)/bin/sci!
> !     lab_windows.lib"                                      !
> !                                                           !
> !# ------------------------------------------------------   !
> !                                                           !
> !# name of the dll to be built                              !
> !                                                           !
> !LIBRARY = libloop1_im                                      !
> !                                                           !
> !# ------------------------------------------------------   !
> !                                                           !
> !# list of files                                            !
> !                                                           !
> !FILES_SRC = loop1_im.c                                     !
> !                                                           !
> !# ------------------------------------------------------   !
> !                                                           !
> !# list of objects file                                     !
> !                                                           !
> !OBJS = loop1_im.obj                                        !
> !                                                           !
> !OBJS_WITH_PATH = Release/loop1_im.obj                      !
> !                                                           !
> !# ------------------------------------------------------   !
> !                                                           !
> !# added libraries                                          !
> !                                                           !
> !FORTRAN_RUNTIME_LIBRARIES =                                !
> !                                                           !
> !OTHERLIBS =                                                !
> !                                                           !
> !# ------------------------------------------------------   !
> !                                                           !
> !!include $(SCIDIR)\modules\dynamic_link\src\scripts\Makefil!
> !     e.incl.mak                                            !
> !                                                           !
> !# ------------------------------------------------------   !
> !                                                           !
> !#CC =                                                      !
> !                                                           !
> !# ------------------------------------------------------   !
> !                                                           !
> !CFLAGS = $(CC_OPTIONS) -D__SCILAB_TOOLBOX__ -DFORDLL  -I"$(!
> !     SCIDIR)/modules/scicos/includes" -I"$(SCIDIR)/modules/!
> !     scicos_blocks/includes"                               !
> !                                                           !
> !# ------------------------------------------------------   !
> !                                                           !
> !FFLAGS = $(FC_OPTIONS) -DFORDLL                            !
> !                                                           !
> !# ------------------------------------------------------   !
> !                                                           !
> !EXTRA_LDFLAGS =  "C:/PROGRA~1/SCILAB~1.2/bin/scicos.lib" "C!
> !     :/PROGRA~1/SCILAB~1.2/bin/scicos_f.lib" "C:/PROGRA~1/S!
> !     CILAB~1.2/bin/scicos_blocks.lib" "C:/PROGRA~1/SCILAB~1!
> !     .2/bin/scicos_blocks_f.lib"                           !
> !                                                           !
> !# ------------------------------------------------------   !
> !                                                           !
> !!include $(SCIDIR)\modules\dynamic_link\src\scripts\Makedll!
> !     .incl                                                 !
> !                                                           !
> !# ------------------------------------------------------   !
>    Führe Makefile aus
>    Kompilation von loop1_im.c
>    erzeuge eine gemeisame Bibliothek (habe Sie Geduld)
>  !                                                           !
> !                                                           !
> !Microsoft (R) Program Maintenance Utility, Version 10.00.30!
> !     319.01                                                !
> !                                                           !
> !Copyright (C) Microsoft Corporation. Alle Rechte vorbehalte!
> !     n.                                                    !
> !                                                           !
> !                                                           !
> !                                                           !
> !NMAKE : fatal error U1065: Ung³ltige Option "-"            !!
> !
> !Stop.                                                      !
>  !sorry compiling problem                                    !
> !                                                           !
> !ilib_compile: Fehler während der Ausführung Makelib.mak. !
> c_pass1: build the modelica meta-block failed
>   xcos_simulate: Error during block parameters update.
>
>
>
>
>
> On Tue, 06 Oct 2015 16:12:54 +0200
>  Clément David <clement.david at scilab-enterprises.com> wrote:
>>
>> Hello Umut,
>>
>> This error seems to be an NMAKE issue. Can you provide us more
>> information please ? Did you try logging the makefile using
>> `ilib_verbose(2)` ?
>>
>> If possible, can you attach the MBLOCK content or the schema ?
>>
>> Regards,
>>
>> --
>> Clément
>>
>> Le mardi 06 octobre 2015 à 14:57 +0200, Dr.Umut Durak a écrit :
>>>
>>> Folks,
>>> I am trying to run a simple model that has a MBLOCK inside using
>>> Scilab 5.5.2. During compiling the modelica, everything works quite well
>>> until "Building shared library (be patient)", then it fails with "NMAKE :
>>> fatal error U1065". Haveacompiler returns true and findmsvccompiler
>>> returns
>>> msvc100pro. Any suggestions?
>>> Bests,
>>>
>>>
>>>
>>> Dr.Umut Durak
>>>
>>> Adjunct Lecturer
>>> TU Clausthal Institute of Informatics
>>> Model-based Systems Analysis and Simulation Department
>>> https://www.in.tu-clausthal.de/en/divisions/model-based-systems-analy
>>> sis-and-simulation/members/drumut-durak/
>>>
>>> Research Scientist
>>> DLR e.V. Institute of Flight Systems
>>> Flight Dynamics and Simulation Department
>>> Phone +49 531 295-2907 | umut.durak at dlr.de
>>> www.DLR.de/ft | de.linkedin.com/in/umutdurak
>>>
>>> Come to: SpringSim'16
>>> Submit to:
>>> 6th International Workshop on Model-driven Approaches for Simulation
>>> Engineering (MOD4SIM’16)
>>> Ontologies in Simulation Special Interest Track of Annual Simulation
>>> Symposium (ANSS)
>>> _______________________________________________
>>> users mailing list
>>> users at lists.scilab.org
>>> http://lists.scilab.org/mailman/listinfo/users
>>
>> _______________________________________________
>> users mailing list
>> users at lists.scilab.org
>> http://lists.scilab.org/mailman/listinfo/users
>
>
> Dr.Umut Durak
>
> Adjunct Lecturer
> TU Clausthal Institute of Informatics
> Model-based Systems Analysis and Simulation Department
> https://www.in.tu-clausthal.de/en/divisions/model-based-systems-analysis-and-simulation/members/drumut-durak/
>
> Research Scientist
> DLR e.V. Institute of Flight Systems
> Flight Dynamics and Simulation Department
> Phone +49 531 295-2907 | umut.durak at dlr.de
> www.DLR.de/ft | de.linkedin.com/in/umutdurak
>
> Come to: SpringSim'16
> Submit to:
> 6th International Workshop on Model-driven Approaches for Simulation
> Engineering (MOD4SIM’16)
> Ontologies in Simulation Special Interest Track of Annual Simulation
> Symposium (ANSS)
>
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users
>



More information about the users mailing list