Skip to content
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

Install static versions of xspress3 and img_mod libraries to build wi… #52

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jwlodek
Copy link
Contributor

@jwlodek jwlodek commented Apr 25, 2024

…th STATIC_BUILD=YES

At the moment, it seems if you perform a build with STATIC_BUILD=YES you get an error about how -lxspress3 and -limg_mod could not be found.

@MarkRivers
Copy link
Member

Just a note on this. In this case Quantum did provide static versions (.a) of their libraries. Often vendors don't do that, they only provide shareable versions (.so). However, even if they had only provided .so files you could still build the application statically by changing these lines:

$(PROD_NAME)_LIBS += xspress3
$(PROD_NAME)_LIBS += img_mod

to this:

$(PROD_NAME)_SYS_LIBS += xspress3
$(PROD_NAME)_SYS_LIBS += img_mod

@newville
Copy link
Contributor

@jwlodek why would you want to do that?
Should building a statically linked version with older versions of the libraries be encouraged?

@jwlodek
Copy link
Contributor Author

jwlodek commented Apr 25, 2024

I prefer to build statically whenever possible, so I can make the executable entirely portable. It was not clear to me that the static builds are an older version of the libraries given that they do not have version numbers.

Maybe what we can do is make the installation of the static libraries conditional on if STATIC_BUILD is true.

Edit: Or, if we want to always use the newer shared libraries during linking even in a static build we can apply Mark's suggestion and use SYS_LIBS instead of just LIBS?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants