NREL / SOEP-QSS

BSD 3-Clause "New" or "Revised" License
11 stars 3 forks source link

problems on building #5

Closed herocbn closed 1 year ago

herocbn commented 1 year ago

I am a green finger on how to build this poject, how can i get detailed operations?

DeadParrot commented 1 year ago

Start with the Building QSS https://github.com/NREL/SOEP-QSS#building-qss section of the README and then let me know what, if any, problems you run into.

For the FMI Library I suggest getting version 2.4.1 from https://github.com/modelon-community/fmi-library/releases/tag/2.4.1. If you have trouble building or using it (use the same compiler as you choose for QSS) just ask.

herocbn commented 1 year ago

hello, when i build FMI,running the followings

mkdir build-fmil; cd build-fmil cmake -FMILIB_BUILD_STATIC_LIB=../../custom ../../custom.Linux/ make install test

I run into error, what shoud I do here? image

herocbn commented 1 year ago

I guess I misunderstand the two parameters prefix
path to FMIL source can someone help me ? image

DeadParrot commented 1 year ago

The cmake line would look something like:

cmake -DFMILIB_INSTALL_PREFIX=/home/<user>/libs/FMIL /home/<user>/code/FMIL
herocbn commented 1 year ago

image here, the steps are a little confusing, i am using Linux

DeadParrot commented 1 year ago

Once you are able to build FMIL directly I'd recommend using the scripts and code under the FMIL directory of this repository to do build an FMIL ready for QSS usage, especially adding all the extra headers QSS needs.

This would mean copying the FMIL repository source code into a FMIL/custom directory, merging the changes in custom.Linux over that, and then using the build scripts in bin to build the FMIL, such as FMIL/bin/bld.GCC.r.sh (r is for the release build). These scripts are set up to install to directories of the form: /opt/FMIL.<compiler>.<build> so if you want to put FMIL somewhere else you'll need to customize the scripts.

herocbn commented 1 year ago

OK,thks,when i do mak command as follow: image i cannot get any information about the progress, is that correct?

DeadParrot commented 1 year ago

You should see each source compiling and the libQSS.a library build command and then the QSS executable linking. If nothing is happening then there is a problem. You can try adding -d to the mak command to get debugging output from make. You can also run the bld command instead of mak to get more environment setup/checks before it runs mak. You have to do the builds from a console configured with the desired setQSS script, such as source bin/Linux/GCC/r/setQSS, as the build instructions specify.

herocbn commented 1 year ago

when i run mak -d as you say image it seems deadlock?

herocbn commented 1 year ago

Here is the detailed information, when i run mak -d debug.txt

DeadParrot commented 1 year ago

It looks like you didn't use FMIL 2.4.1 -- you have failures for headers of the form fmi3_*.h and those are from the latest FMIL master branch where they have started adding FMI 3.0 support. QSS doesn't use FMI 3.0 and the FMIL support isn't yet updated to work with the latest FMIL master branch. Try deleting your FMIL install directory /opt/FMIL.GCC.r, checking out the 2.4.1 tag revision from the FMIL Library git repository and then following the instructions in FMIL/README.md for merging the custom.Linux modifications into a copy of that code and then building that FMIL. If you get that right there should be no fmi3_*.h headers under /opt/FMIL.GCC.r and then I think/hope your QSS build will succeed.

Please also make sure:

herocbn commented 1 year ago

Hello, i run into the last step image and in /opt/FMIL.GCC.r/lib image what's wrong?

DeadParrot commented 1 year ago

Since you don't show your full environment and the full command and output (text is better than a screenshot) I can only guess that you not using the custom.Linux changes when you build FMIL, which includes turning FMILIB_INSTALL_SUBLIBS on in CMakeLists.txt.

herocbn commented 1 year ago

thank u, i make it!