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

Fix MUMPS libraries discovery: find_library doesn't find libraries when "lib" prefixes are included in names #295

Closed
wants to merge 1 commit into from

Conversation

yurivict
Copy link
Contributor

No description provided.

@dariomangoni
Copy link
Member

dariomangoni commented Feb 12, 2021

@yurivict with which Makefile/CMakeLists are you building Mumps?
Are you, by any chance, using scivision/mumps? If so, I would be really happy BTW.
Anyway, in the official Mumps Makefile the naming is with the lib prefix, e.g.

mumps_lib:    $(incdir)/mumps_int_def.h \
              $(libdir)/libmumps_common$(PLAT)$(LIBEXT) \
              $(libdir)/lib$(ARITH)mumps$(PLAT)$(LIBEXT)

so I would suggest you to not delete the lib-prefixed libraries names, but to use the find_library with the NAMES options instead, so to allow to look for both naming standards, e.g.

find_library(MUMPS_ONLY_LIBRARY_COMMON
			 NAMES "libmumps_common" "mumps_common"
			 PATHS ${MUMPS_ROOT}
			 PATH_SUFFIXES "lib" "lib64" "libraries"
         )

Because of this I wouldn't merge this PR as is.

A separate comment applies to the PATH_SUFFIXES directory that you changed for the Mumps shared library version.
I was not aware of the different installation folders between different OS. In order to be compliant with any OS then I would rather add lib to PATH_SUFFIXES instead of replacing bin with lib.

It would be great if you have time to fix this few things, but obviously we can do it ourselves too!

@yurivict
Copy link
Contributor Author

yurivict commented Feb 12, 2021

I install MUMPS using the FreeBSD port math/mumps that uses the upstream URL http://www.code-aster.org/FICHIERS/aster-xxx.tar.gz

I experimented and found that cmake's find_library doesn't find shared libraries when the name argument has the lib prefix included in it.

@rserban rserban deleted the branch projectchrono:develop August 4, 2022 09:31
@rserban rserban closed this Aug 4, 2022
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