Opened 5 years ago
Last modified 5 years ago
#6148 closed defect
OpenModelica does not compile on Gentoo — at Version 3
Reported by: | Owned by: | Martin Sjölund | |
---|---|---|---|
Priority: | normal | Milestone: | 1.16.0 |
Component: | Build Environment | Version: | v1.16.0-dev |
Keywords: | Cc: |
Description (last modified by )
Hi,
I'm trying to compile OpenModelica from GIT sources on my Gentoo installation. I was able to compile it successfully until version 1.13. I even started creating an ebuild for it.
Now it's been some time that I'm not able to compile it anymore. In the attached build log (it's not a clean build, but the error is the same) you can see that the compiler fails here:
clang -c -o "om_unzip.o" "om_unzip.c" -g -O2 -fno-stack-protector -fPIC -Wno-parentheses-equality -Wno-unused-variable -Werror=implicit-function-declaration -Werror=incompatible-pointer-types -I../../SimulationRuntime/c -I../../SimulationRuntime/c/simulation/results -I../../SimulationRuntime/c/util -I../../SimulationRuntime/c/meta -I../../SimulationRuntime/c/meta/gc -I. -DGC_THREADS -I../../3rdParty/gc/include -I../../3rdParty/FMIL/install/include -I../../3rdParty/graphstream/gs-netstream/c++/src/ -I../../3rdParty/metis-5.1.0/include -I../../3rdParty/cJSON -I../../3rdParty/libzmq/include -I../boot/tarball-include -I.. In file included from om_unzip.c:4: In file included from ./../../3rdParty/FMIL/ThirdParty/Minizip/minizip/unzip.h:55: ./../../3rdParty/FMIL/ThirdParty/Minizip/minizip/ioapi.h:135:45: error: expected ';' after top level declarator typedef voidpf (ZCALLBACK *open_file_func) OF((voidpf opaque, const char* filename, int mode)); ^ ;
I think the root cause is that on my system I already have minizip installed. In fact, I've been able to successfully build OpenModelica if I simply modify the include of the boundled minizip library:
#include "../../3rdParty/FMIL/ThirdParty/Minizip/minizip/unzip.h"
with my system minizip
#include <minizip/unzip.h>
Of course I'd like to have this fixed in the build system, which should detect the presence of the system's library and use that when available.
Thanks!
Leo
Change History (5)
by , 5 years ago
comment:1 by , 5 years ago
Milestone: | Future → 1.17.0 |
---|
comment:2 by , 5 years ago
comment:3 by , 5 years ago
Description: | modified (diff) |
---|
You can try to go to
/OpenModelica/OMCompiler/3rdParty/FMIL/build/Config.cmake/Minizip
directory and then run*Note that those are double underscores. Tab completion can help you as well.
Then find this file
OpenModelica/OMCompiler/3rdParty/FMIL/build/Config.cmake/Minizip/CMakeFiles/minizip.dir/__/__/ThirdParty/Minizip/minizip/ioapi.c.i
and attach it here so we can make more sense of what happened. You can also search for "# 135" in this file to see what caused the error.