Opened 5 years ago

Last modified 5 years ago

#5549 new defect

Cross compilation of FMUs for Win64 on Ubuntu is broken for some models working with files

Reported by: Anatoly Trosinenko Owned by: Lennart Ochel
Priority: high Milestone: 2.0.0
Component: FMI Version: v1.14.0-dev-nightly
Keywords: fmi, cross compilation, files Cc:

Description

While cross compilation from Ubuntu to Win64 generally works (supposing necessary MinGW packages are installed on Ubuntu), compiler cannot find some required .a-files for Win64 platform when model uses the Modelica.Utilities.Streams.readLine, for example.

How to reproduce

1) Install MinGW and OpenModelica 1.14-dev on Ubuntu (from the respective repositories)
2) Create the following files:

Test.mo:

model Test
  String line;
  output Boolean endOfFile;
equation
  (line, endOfFile) = Modelica.Utilities.Streams.readLine("test.txt", 1);
end Test;

Test.mos:

loadModel(Modelica);
print(buildModelFMU(Test, platforms={"i686-w64-mingw32"}));
print(getErrorString());

3) Compile with the following command:

omc Test.mos Test.mo

Expected behavior

The model is compiled correctly, path to the generated FMU is printed to the console, no errors.

Observed behavior

/tmp$ omc Test.mos Test.mo
true

Error: Error building simulator. Build log: checking build system type... x86_64-unknown-linux-gnu
checking host system type... i686-w64-mingw32
checking target system type... i686-w64-mingw32
build_short: x86_64-linux-gnu
host_short: i686-mingw32
checking for i686-w64-mingw32-gcc... i686-w64-mingw32-gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... yes
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether i686-w64-mingw32-gcc accepts -g... yes
checking for i686-w64-mingw32-gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... i686-w64-mingw32-gcc -E
checking whether make sets $(MAKE)... yes
checking for cross-compilation flags... not needed; i686-w64-mingw32-gcc contains the prefix
checking if -Werror works... ok
checking looking for --no-undefined... yes
checking looking for dollars in identifiers... CPPFLAGS: -fdollars-in-identifiers
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for an ANSI C-conforming const... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for size_t... yes
checking for vprintf... yes
checking for _doprnt... no
checking for strdup... yes
checking for strerror... yes
checking LAPACK/BLAS flags... not found
checking for static pthreads... OK (static)
checking for cos in -lm... yes
checking for filesystem access... OK
checking fmi2Functions.h usability... yes
checking fmi2Functions.h presence... yes
checking for fmi2Functions.h... yes
checking fmi2FunctionTypes.h usability... yes
checking fmi2FunctionTypes.h presence... yes
checking for fmi2FunctionTypes.h... yes
checking fmi2TypesPlatform.h usability... yes
checking fmi2TypesPlatform.h presence... yes
checking for fmi2TypesPlatform.h... yes
configure: creating ./config.status
config.status: creating Makefile
i686-w64-mingw32-gcc -Os -fno-stack-protector -Wno-parentheses-equality -Wno-unused-variable -fPIC -I/usr/include/omc/c/fmi -fdollars-in-identifiers -DCMINPACK_NO_DLL=1   -c -o Test.o Test.c
i686-w64-mingw32-gcc -Os -fno-stack-protector -Wno-parentheses-equality -Wno-unused-variable -fPIC -I/usr/include/omc/c/fmi -fdollars-in-identifiers -DCMINPACK_NO_DLL=1   -c -o Test_functions.o Test_functions.c
i686-w64-mingw32-gcc -Os -fno-stack-protector -Wno-parentheses-equality -Wno-unused-variable -fPIC -I/usr/include/omc/c/fmi -fdollars-in-identifiers -DCMINPACK_NO_DLL=1   -c -o Test_records.o Test_records.c
i686-w64-mingw32-gcc -Os -fno-stack-protector -Wno-parentheses-equality -Wno-unused-variable -fPIC -I/usr/include/omc/c/fmi -fdollars-in-identifiers -DCMINPACK_NO_DLL=1   -c -o Test_01exo.o Test_01exo.c
i686-w64-mingw32-gcc -Os -fno-stack-protector -Wno-parentheses-equality -Wno-unused-variable -fPIC -I/usr/include/omc/c/fmi -fdollars-in-identifiers -DCMINPACK_NO_DLL=1   -c -o Test_02nls.o Test_02nls.c
i686-w64-mingw32-gcc -Os -fno-stack-protector -Wno-parentheses-equality -Wno-unused-variable -fPIC -I/usr/include/omc/c/fmi -fdollars-in-identifiers -DCMINPACK_NO_DLL=1   -c -o Test_03lsy.o Test_03lsy.c
i686-w64-mingw32-gcc -Os -fno-stack-protector -Wno-parentheses-equality -Wno-unused-variable -fPIC -I/usr/include/omc/c/fmi -fdollars-in-identifiers -DCMINPACK_NO_DLL=1   -c -o Test_04set.o Test_04set.c
i686-w64-mingw32-gcc -Os -fno-stack-protector -Wno-parentheses-equality -Wno-unused-variable -fPIC -I/usr/include/omc/c/fmi -fdollars-in-identifiers -DCMINPACK_NO_DLL=1   -c -o Test_05evt.o Test_05evt.c
i686-w64-mingw32-gcc -Os -fno-stack-protector -Wno-parentheses-equality -Wno-unused-variable -fPIC -I/usr/include/omc/c/fmi -fdollars-in-identifiers -DCMINPACK_NO_DLL=1   -c -o Test_06inz.o Test_06inz.c
i686-w64-mingw32-gcc -Os -fno-stack-protector -Wno-parentheses-equality -Wno-unused-variable -fPIC -I/usr/include/omc/c/fmi -fdollars-in-identifiers -DCMINPACK_NO_DLL=1   -c -o Test_07dly.o Test_07dly.c
i686-w64-mingw32-gcc -Os -fno-stack-protector -Wno-parentheses-equality -Wno-unused-variable -fPIC -I/usr/include/omc/c/fmi -fdollars-in-identifiers -DCMINPACK_NO_DLL=1   -c -o Test_08bnd.o Test_08bnd.c
i686-w64-mingw32-gcc -Os -fno-stack-protector -Wno-parentheses-equality -Wno-unused-variable -fPIC -I/usr/include/omc/c/fmi -fdollars-in-identifiers -DCMINPACK_NO_DLL=1   -c -o Test_09alg.o Test_09alg.c
i686-w64-mingw32-gcc -Os -fno-stack-protector -Wno-parentheses-equality -Wno-unused-variable -fPIC -I/usr/include/omc/c/fmi -fdollars-in-identifiers -DCMINPACK_NO_DLL=1   -c -o Test_10asr.o Test_10asr.c
i686-w64-mingw32-gcc -Os -fno-stack-protector -Wno-parentheses-equality -Wno-unused-variable -fPIC -I/usr/include/omc/c/fmi -fdollars-in-identifiers -DCMINPACK_NO_DLL=1   -c -o Test_11mix.o Test_11mix.c
i686-w64-mingw32-gcc -Os -fno-stack-protector -Wno-parentheses-equality -Wno-unused-variable -fPIC -I/usr/include/omc/c/fmi -fdollars-in-identifiers -DCMINPACK_NO_DLL=1   -c -o Test_12jac.o Test_12jac.c
i686-w64-mingw32-gcc -Os -fno-stack-protector -Wno-parentheses-equality -Wno-unused-variable -fPIC -I/usr/include/omc/c/fmi -fdollars-in-identifiers -DCMINPACK_NO_DLL=1   -c -o Test_13opt.o Test_13opt.c
i686-w64-mingw32-gcc -Os -fno-stack-protector -Wno-parentheses-equality -Wno-unused-variable -fPIC -I/usr/include/omc/c/fmi -fdollars-in-identifiers -DCMINPACK_NO_DLL=1   -c -o Test_14lnz.o Test_14lnz.c
i686-w64-mingw32-gcc -Os -fno-stack-protector -Wno-parentheses-equality -Wno-unused-variable -fPIC -I/usr/include/omc/c/fmi -fdollars-in-identifiers -DCMINPACK_NO_DLL=1   -c -o Test_15syn.o Test_15syn.c
i686-w64-mingw32-gcc -Os -fno-stack-protector -Wno-parentheses-equality -Wno-unused-variable -fPIC -I/usr/include/omc/c/fmi -fdollars-in-identifiers -DCMINPACK_NO_DLL=1   -c -o Test_16dae.o Test_16dae.c
i686-w64-mingw32-gcc -Os -fno-stack-protector -Wno-parentheses-equality -Wno-unused-variable -fPIC -I/usr/include/omc/c/fmi -fdollars-in-identifiers -DCMINPACK_NO_DLL=1   -c -o Test_17inl.o Test_17inl.c
i686-w64-mingw32-gcc -Os -fno-stack-protector -Wno-parentheses-equality -Wno-unused-variable -fPIC -I/usr/include/omc/c/fmi -fdollars-in-identifiers -DCMINPACK_NO_DLL=1   -c -o Test_init_fmu.o Test_init_fmu.c
i686-w64-mingw32-gcc -Os -fno-stack-protector -Wno-parentheses-equality -Wno-unused-variable -fPIC -I/usr/include/omc/c/fmi -fdollars-in-identifiers -DCMINPACK_NO_DLL=1   -c -o Test_FMU.o Test_FMU.c
i686-w64-mingw32-gcc -Os -fno-stack-protector -Wno-parentheses-equality -Wno-unused-variable -fPIC -I/usr/include/omc/c/fmi -fdollars-in-identifiers -DCMINPACK_NO_DLL=1   -c -o util/read_matlab4.o util/read_matlab4.c
i686-w64-mingw32-gcc -Os -fno-stack-protector -Wno-parentheses-equality -Wno-unused-variable -fPIC -I/usr/include/omc/c/fmi -fdollars-in-identifiers -DCMINPACK_NO_DLL=1   -c -o util/read_csv.o util/read_csv.c
i686-w64-mingw32-gcc -Os -fno-stack-protector -Wno-parentheses-equality -Wno-unused-variable -fPIC -I/usr/include/omc/c/fmi -fdollars-in-identifiers -DCMINPACK_NO_DLL=1   -c -o util/libcsv.o util/libcsv.c
i686-w64-mingw32-gcc -Os -fno-stack-protector -Wno-parentheses-equality -Wno-unused-variable -fPIC -I/usr/include/omc/c/fmi -fdollars-in-identifiers -DCMINPACK_NO_DLL=1   -c -o gc/memory_pool.o gc/memory_pool.c
i686-w64-mingw32-gcc -Os -fno-stack-protector -Wno-parentheses-equality -Wno-unused-variable -fPIC -I/usr/include/omc/c/fmi -fdollars-in-identifiers -DCMINPACK_NO_DLL=1   -c -o gc/omc_gc.o gc/omc_gc.c
In file included from Test_FMU.c:54:0:
fmi-export/fmu2_model_interface.c.inc: In function ‘omc_assert_fmi_common’:
fmi-export/fmu2_model_interface.c.inc:162:16: warning: passing argument 1 of ‘GC_vasprintf’ from incompatible pointer type [-Wincompatible-pointer-types]
   GC_vasprintf(&str, msg, args);
                ^
i686-w64-mingw32-gcc -Os -fno-stack-protector -Wno-parentheses-equality -Wno-unused-variable -fPIC -I/usr/include/omc/c/fmi -fdollars-in-identifiers -DCMINPACK_NO_DLL=1   -c -o util/base_array.o util/base_array.c
In file included from openmodelica_func.h:52:0,
                 from Test_FMU.c:10:
util/modelica_string.h:71:5: note: expected ‘const char **’ but argument is of type ‘char **’
 int GC_vasprintf(const char **strp, const char *fmt, va_list ap);
     ^~~~~~~~~~~~
i686-w64-mingw32-gcc -Os -fno-stack-protector -Wno-parentheses-equality -Wno-unused-variable -fPIC -I/usr/include/omc/c/fmi -fdollars-in-identifiers -DCMINPACK_NO_DLL=1   -c -o util/boolean_array.o util/boolean_array.c
i686-w64-mingw32-gcc -Os -fno-stack-protector -Wno-parentheses-equality -Wno-unused-variable -fPIC -I/usr/include/omc/c/fmi -fdollars-in-identifiers -DCMINPACK_NO_DLL=1   -c -o util/omc_error.o util/omc_error.c
i686-w64-mingw32-gcc -Os -fno-stack-protector -Wno-parentheses-equality -Wno-unused-variable -fPIC -I/usr/include/omc/c/fmi -fdollars-in-identifiers -DCMINPACK_NO_DLL=1   -c -o util/omc_file.o util/omc_file.c
i686-w64-mingw32-gcc -Os -fno-stack-protector -Wno-parentheses-equality -Wno-unused-variable -fPIC -I/usr/include/omc/c/fmi -fdollars-in-identifiers -DCMINPACK_NO_DLL=1   -c -o util/division.o util/division.c
i686-w64-mingw32-gcc -Os -fno-stack-protector -Wno-parentheses-equality -Wno-unused-variable -fPIC -I/usr/include/omc/c/fmi -fdollars-in-identifiers -DCMINPACK_NO_DLL=1   -c -o util/generic_array.o util/generic_array.c
i686-w64-mingw32-gcc -Os -fno-stack-protector -Wno-parentheses-equality -Wno-unused-variable -fPIC -I/usr/include/omc/c/fmi -fdollars-in-identifiers -DCMINPACK_NO_DLL=1   -c -o util/index_spec.o util/index_spec.c
i686-w64-mingw32-gcc -Os -fno-stack-protector -Wno-parentheses-equality -Wno-unused-variable -fPIC -I/usr/include/omc/c/fmi -fdollars-in-identifiers -DCMINPACK_NO_DLL=1   -c -o util/integer_array.o util/integer_array.c
i686-w64-mingw32-gcc -Os -fno-stack-protector -Wno-parentheses-equality -Wno-unused-variable -fPIC -I/usr/include/omc/c/fmi -fdollars-in-identifiers -DCMINPACK_NO_DLL=1   -c -o util/list.o util/list.c
i686-w64-mingw32-gcc -Os -fno-stack-protector -Wno-parentheses-equality -Wno-unused-variable -fPIC -I/usr/include/omc/c/fmi -fdollars-in-identifiers -DCMINPACK_NO_DLL=1   -c -o util/modelica_string.o util/modelica_string.c
i686-w64-mingw32-gcc -Os -fno-stack-protector -Wno-parentheses-equality -Wno-unused-variable -fPIC -I/usr/include/omc/c/fmi -fdollars-in-identifiers -DCMINPACK_NO_DLL=1   -c -o util/real_array.o util/real_array.c
i686-w64-mingw32-gcc -Os -fno-stack-protector -Wno-parentheses-equality -Wno-unused-variable -fPIC -I/usr/include/omc/c/fmi -fdollars-in-identifiers -DCMINPACK_NO_DLL=1   -c -o util/ringbuffer.o util/ringbuffer.c
Test_FMU.c: At top level:
cc1: warning: unrecognized command line option ‘-Wno-parentheses-equality’
i686-w64-mingw32-gcc -Os -fno-stack-protector -Wno-parentheses-equality -Wno-unused-variable -fPIC -I/usr/include/omc/c/fmi -fdollars-in-identifiers -DCMINPACK_NO_DLL=1   -c -o util/string_array.o util/string_array.c
i686-w64-mingw32-gcc -Os -fno-stack-protector -Wno-parentheses-equality -Wno-unused-variable -fPIC -I/usr/include/omc/c/fmi -fdollars-in-identifiers -DCMINPACK_NO_DLL=1   -c -o util/utility.o util/utility.c
i686-w64-mingw32-gcc -Os -fno-stack-protector -Wno-parentheses-equality -Wno-unused-variable -fPIC -I/usr/include/omc/c/fmi -fdollars-in-identifiers -DCMINPACK_NO_DLL=1   -c -o util/varinfo.o util/varinfo.c
i686-w64-mingw32-gcc -Os -fno-stack-protector -Wno-parentheses-equality -Wno-unused-variable -fPIC -I/usr/include/omc/c/fmi -fdollars-in-identifiers -DCMINPACK_NO_DLL=1   -c -o util/ModelicaUtilities.o util/ModelicaUtilities.c
util/ModelicaUtilities.c: In function ‘ModelicaError’:
util/ModelicaUtilities.c:68:1: warning: ‘noreturn’ function does return
 }
 ^
util/ModelicaUtilities.c: In function ‘ModelicaVFormatError’:
util/ModelicaUtilities.c:72:1: warning: ‘noreturn’ function does return
 }
 ^
util/ModelicaUtilities.c: In function ‘ModelicaFormatError’:
util/ModelicaUtilities.c:79:1: warning: ‘noreturn’ function does return
 }
 ^
util/ModelicaUtilities.c: At top level:
cc1: warning: unrecognized command line option ‘-Wno-parentheses-equality’
i686-w64-mingw32-gcc -Os -fno-stack-protector -Wno-parentheses-equality -Wno-unused-variable -fPIC -I/usr/include/omc/c/fmi -fdollars-in-identifiers -DCMINPACK_NO_DLL=1   -c -o util/omc_msvc.o util/omc_msvc.c
i686-w64-mingw32-gcc -Os -fno-stack-protector -Wno-parentheses-equality -Wno-unused-variable -fPIC -I/usr/include/omc/c/fmi -fdollars-in-identifiers -DCMINPACK_NO_DLL=1   -c -o util/simulation_options.o util/simulation_options.c
i686-w64-mingw32-gcc -Os -fno-stack-protector -Wno-parentheses-equality -Wno-unused-variable -fPIC -I/usr/include/omc/c/fmi -fdollars-in-identifiers -DCMINPACK_NO_DLL=1   -c -o util/rational.o util/rational.c
i686-w64-mingw32-gcc -Os -fno-stack-protector -Wno-parentheses-equality -Wno-unused-variable -fPIC -I/usr/include/omc/c/fmi -fdollars-in-identifiers -DCMINPACK_NO_DLL=1   -c -o util/modelica_string_lit.o util/modelica_string_lit.c
i686-w64-mingw32-gcc -Os -fno-stack-protector -Wno-parentheses-equality -Wno-unused-variable -fPIC -I/usr/include/omc/c/fmi -fdollars-in-identifiers -DCMINPACK_NO_DLL=1   -c -o util/omc_init.o util/omc_init.c
i686-w64-mingw32-gcc -Os -fno-stack-protector -Wno-parentheses-equality -Wno-unused-variable -fPIC -I/usr/include/omc/c/fmi -fdollars-in-identifiers -DCMINPACK_NO_DLL=1   -c -o util/omc_mmap.o util/omc_mmap.c
i686-w64-mingw32-gcc -Os -fno-stack-protector -Wno-parentheses-equality -Wno-unused-variable -fPIC -I/usr/include/omc/c/fmi -fdollars-in-identifiers -DCMINPACK_NO_DLL=1   -c -o math-support/pivot.o math-support/pivot.c
i686-w64-mingw32-gcc -Os -fno-stack-protector -Wno-parentheses-equality -Wno-unused-variable -fPIC -I/usr/include/omc/c/fmi -fdollars-in-identifiers -DCMINPACK_NO_DLL=1   -c -o simulation/simulation_info_json.o simulation/simulation_info_json.c
i686-w64-mingw32-gcc -Os -fno-stack-protector -Wno-parentheses-equality -Wno-unused-variable -fPIC -I/usr/include/omc/c/fmi -fdollars-in-identifiers -DCMINPACK_NO_DLL=1   -c -o simulation/options.o simulation/options.c
simulation/simulation_info_json.c: In function ‘skipValue’:
simulation/simulation_info_json.c:113:19: warning: comparison between pointer and zero character constant [-Wpointer-compare]
         if (str+1 == '\0') {
                   ^~
simulation/simulation_info_json.c:113:13: note: did you mean to dereference the pointer?
         if (str+1 == '\0') {
             ^
i686-w64-mingw32-gcc -Os -fno-stack-protector -Wno-parentheses-equality -Wno-unused-variable -fPIC -I/usr/include/omc/c/fmi -fdollars-in-identifiers -DCMINPACK_NO_DLL=1   -c -o simulation/simulation_omc_assert.o simulation/simulation_omc_assert.c
i686-w64-mingw32-gcc -Os -fno-stack-protector -Wno-parentheses-equality -Wno-unused-variable -fPIC -I/usr/include/omc/c/fmi -fdollars-in-identifiers -DCMINPACK_NO_DLL=1   -c -o simulation/omc_simulation_util.o simulation/omc_simulation_util.c
i686-w64-mingw32-gcc -Os -fno-stack-protector -Wno-parentheses-equality -Wno-unused-variable -fPIC -I/usr/include/omc/c/fmi -fdollars-in-identifiers -DCMINPACK_NO_DLL=1   -c -o simulation/solver/delay.o simulation/solver/delay.c
i686-w64-mingw32-gcc -Os -fno-stack-protector -Wno-parentheses-equality -Wno-unused-variable -fPIC -I/usr/include/omc/c/fmi -fdollars-in-identifiers -DCMINPACK_NO_DLL=1   -c -o simulation/solver/fmi_events.o simulation/solver/fmi_events.c
i686-w64-mingw32-gcc -Os -fno-stack-protector -Wno-parentheses-equality -Wno-unused-variable -fPIC -I/usr/include/omc/c/fmi -fdollars-in-identifiers -DCMINPACK_NO_DLL=1   -c -o simulation/solver/omc_math.o simulation/solver/omc_math.c
i686-w64-mingw32-gcc -Os -fno-stack-protector -Wno-parentheses-equality -Wno-unused-variable -fPIC -I/usr/include/omc/c/fmi -fdollars-in-identifiers -DCMINPACK_NO_DLL=1   -c -o simulation/solver/model_help.o simulation/solver/model_help.c
i686-w64-mingw32-gcc -Os -fno-stack-protector -Wno-parentheses-equality -Wno-unused-variable -fPIC -I/usr/include/omc/c/fmi -fdollars-in-identifiers -DCMINPACK_NO_DLL=1   -c -o simulation/solver/stateset.o simulation/solver/stateset.c
simulation/simulation_info_json.c: At top level:
cc1: warning: unrecognized command line option ‘-Wno-parentheses-equality’
i686-w64-mingw32-gcc -Os -fno-stack-protector -Wno-parentheses-equality -Wno-unused-variable -fPIC -I/usr/include/omc/c/fmi -fdollars-in-identifiers -DCMINPACK_NO_DLL=1   -c -o simulation/solver/synchronous.o simulation/solver/synchronous.c
i686-w64-mingw32-gcc -Os -fno-stack-protector -Wno-parentheses-equality -Wno-unused-variable -fPIC -I/usr/include/omc/c/fmi -fdollars-in-identifiers -DCMINPACK_NO_DLL=1   -c -o simulation/solver/initialization/initialization.o simulation/solver/initialization/initialization.c
i686-w64-mingw32-gcc -Os -fno-stack-protector -Wno-parentheses-equality -Wno-unused-variable -fPIC -I/usr/include/omc/c/fmi -fdollars-in-identifiers -DCMINPACK_NO_DLL=1   -c -o meta/meta_modelica_catch.o meta/meta_modelica_catch.c
mkdir -p ../binaries/win32
i686-w64-mingw32-gcc -shared -o Test.dll Test.o Test_functions.o Test_records.o Test_01exo.o Test_02nls.o Test_03lsy.o Test_04set.o Test_05evt.o Test_06inz.o Test_07dly.o Test_08bnd.o Test_09alg.o Test_10asr.o Test_11mix.o Test_12jac.o Test_13opt.o Test_14lnz.o Test_15syn.o Test_16dae.o Test_17inl.o Test_init_fmu.o Test_FMU.o ./util/read_matlab4.o ./util/read_csv.o ./util/libcsv.o gc/memory_pool.o gc/omc_gc.o ./util/base_array.o ./util/boolean_array.o ./util/omc_error.o ./util/omc_file.o ./util/division.o ./util/generic_array.o ./util/index_spec.o ./util/integer_array.o ./util/list.o ./util/modelica_string.o ./util/real_array.o ./util/ringbuffer.o ./util/string_array.o ./util/utility.o ./util/varinfo.o ./util/ModelicaUtilities.o ./util/omc_msvc.o ./util/simulation_options.o ./util/rational.o ./util/modelica_string_lit.o ./util/omc_init.o ./util/omc_mmap.o ./math-support/pivot.o ./simulation/simulation_info_json.o ./simulation/options.o ./simulation/simulation_omc_assert.o ./simulation/omc_simulation_util.o ./simulation/solver/delay.o ./simulation/solver/fmi_events.o ./simulation/solver/omc_math.o ./simulation/solver/model_help.o ./simulation/solver/stateset.o ./simulation/solver/synchronous.o ./simulation/solver/initialization/initialization.o ./meta/meta_modelica_catch.o  -L"/tmp"  -Wl,-Bstatic "-L/usr/lib/x86_64-linux-gnu/omc" -Wl,-rpath="/usr/lib/x86_64-linux-gnu/omc" "-L/usr/lib/" -Wl,-rpath="/usr/lib/" "-L/home/trosinenko/.openmodelica/binaries/Modelica" -Wl,-rpath="/home/trosinenko/.openmodelica/binaries/Modelica" "-L/usr/lib/omlibrary/Modelica 3.2.2/Resources/Library/x86_64-linux" -Wl,-rpath="/usr/lib/omlibrary/Modelica 3.2.2/Resources/Library/x86_64-linux" "-L/usr/lib/omlibrary/Modelica 3.2.2/Resources/Library/linux64" -Wl,-rpath="/usr/lib/omlibrary/Modelica 3.2.2/Resources/Library/linux64" "-L/usr/lib/omlibrary/Modelica 3.2.2/Resources/Library" -Wl,-rpath="/usr/lib/omlibrary/Modelica 3.2.2/Resources/Library" -lModelicaExternalC -Wl,-Bdynamic -shared -static-libgcc -lm  -Wl,-Bstatic -lpthread -Wl,-Bdynamic
Test_functions.o:Test_functions.c:(.text+0x1f): undefined reference to `ModelicaInternal_readLine'
collect2: error: ld returned 1 exit status
Makefile:31: recipe for target 'nozip' failed
make: *** [nozip] Error 1

Change History (2)

comment:1 by Francesco Casella, 5 years ago

Milestone: Future2.0.0

I guess we should get this to work in 2.0.0. Too much stuff and not enough time for 1.14.0

comment:2 by Anatoly Trosinenko, 5 years ago

A bit of analysis, just to save time a little: that function is from OMCompiler/3rdParty/ModelicaExternalC/C-Sources/, and, as far as I understood from readme.txt from the same directory, those files should be compiled in some specific way according to the standard.

Note: See TracTickets for help on using tickets.