Opened 5 years ago
Last modified 5 years ago
#6148 closed defect
OpenModelica does not compile on Gentoo — at Initial Version
| Reported by: | Owned by: | Martin Sjölund | |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.16.0 | 
| Component: | Build Environment | Version: | v1.16.0-dev | 
| Keywords: | Cc: | 
Description
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
