-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Linux Ubuntu compilation issue #34
Comments
@xmirabel maybe the fixes in #7 work for you as well. That is how I solved issues with expat. IIRC we encountered your issue at some point as well. |
I think it should be fine. You just need to adjust it a bit first delete all these lines: and add this where the lines used to be ### Set the options of expat and add it as subdirectory.
option(EXPAT_BUILD_TOOLS "build the xmlwf tool for expat library" OFF)
option(EXPAT_BUILD_EXAMPLES "build the examples for expat library" OFF)
option(EXPAT_BUILD_TESTS "build the tests for expat library" OFF)
option(EXPAT_SHARED_LIBS "build a shared expat library" OFF)
option(EXPAT_DTD "Define to make parameter entity parsing functionality available" OFF)
option(EXPAT_NS "Define to make XML Namespaces functionality available" OFF)
add_subdirectory(ThirdParty/Expat/expat-2.4.8)
set(EXPAT_INCLUDE_DIRS ThirdParty/Expat/expat-2.4.8) then try recompiling and hopefully it should go fine. If you have no specific reason for choosing |
I have just tried the OpenModelica's FMIL modifications. First, it seems that OpenModelica/OMCompiler-3rdParty root CMakeLists.txt uses Open Modelica specific extensions: "omc_add_subdirectory". Second, if I open OpenModelica/OMCompiler-3rdParty/FMIL directory with Visual Studio Pro 2022 with WSL:Ubuntu + Linux Debug configuration (automatic CMakePresets.json) a certain number of errors occurs: Group of errors 1: install DIRECTORY given no DESTINATION. in FMIL/CMakeLists.txt install(DIRECTORY install(DIRECTORY And in expat-2.1.0/CMakeLists.txt: install(FILES lib/expat.h lib/expat_external.h |
I think this might work for you. I mentioned the OpenModelica code just as reference to cross-check changes and get some ideas from. I don' think it can be directly copied. Check the comment above and I will try to help you as much as I can. |
I have another group of errors in runtime_test.cmake: concerned lines: and file(COPY "${COMPRESS_DUMMY_FILE_PATH_SRC}" DESTINATION "${COMPRESS_DUMMY_FOLDER_PATH_DIST}") I have to investigate |
I solved it by setting the cache variable : "FMILIB_BUILD_TESTS" to "false" |
Now, I built: error: "unable to find source file "zlib.h". |
I have just read your message now and tried it:
Then the compilation on WSL: Ubuntu + Linux Release is building and installing fine! PS: And it continues to build and install on Windows.
In fact, I have a good reason to use it. That is why I have another question: how does it works to update vcpkg with a new fmilib version? |
Contexts of compilation:
a/ Windows 10 mode:
=> compilation ok
b/ Linux mode:
CMake Error:
Running
'/usr/bin/ninja' '-C' '/home/xmirabel/.vs/fmi-library-master/out/build/linux-debug' '-t' 'recompact'
failed with:
ninja: error: build.ninja:4558: multiple rules generate ExpatEx/libexpat.a [-w dupbuild=err] C:\R\fmi-library-master\ ninja
How can I solve it, please?
The text was updated successfully, but these errors were encountered: