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

pkgconfig and compiler wrappers #113

Open
cnegre opened this issue Apr 26, 2018 · 9 comments
Open

pkgconfig and compiler wrappers #113

cnegre opened this issue Apr 26, 2018 · 9 comments
Assignees

Comments

@cnegre
Copy link
Collaborator

cnegre commented Apr 26, 2018

When using pkgconfig to configure progress with bml there is a "clash" with the compiler wrappers used in the machine environment.

It seems that pkgconfig is not able to identify the wrapper that was used to compile, or, at least
cmake complains about the compilers been broken when pkgconfig path is set.

A way to make it work is to comment out line 75 in CMakeList.txt (#include(FindPkgConfig)) and
line 77 (#pkg_check_modules(BML bml REQUIRED)) and add the following extra fc and link flags to the configuration script:

export EXTRA_FCFLAGS=${DEXTRA_FCFLAGS:="-I$BML_LIB/../include"}
export EXTRA_LINK_FLAGS=${DEXTRA_LINK_FLAGS:="-L$BML_LIB/ -lbml_fortran -lbml"}

Is there any more elegant way of avoiding this problem?

@nicolasbock
Copy link
Collaborator

@cnegre What OS are you running this on? If it's not a Mac I can try to reproduce this which would help for proposing a fix.

@cnegre
Copy link
Collaborator Author

cnegre commented Apr 26, 2018 via email

@nicolasbock
Copy link
Collaborator

nicolasbock commented Apr 26, 2018 via email

@cnegre
Copy link
Collaborator Author

cnegre commented Apr 26, 2018 via email

@nicolasbock
Copy link
Collaborator

Thanks. Can you tell me how you set this up? Like clone bml and qmd-progress into ${HOME} and then install the bml library somewhere? Where? How are you calling the build script for the bml and for qmd-progress?

@cnegre
Copy link
Collaborator Author

cnegre commented Apr 26, 2018 via email

@nicolasbock
Copy link
Collaborator

When I run

PROGRESS_OPENMP=yes \
  PROGRESS_GRAPHLIB=no \
  PROGRESS_TESTING=yes \
  CMAKE_BUILD_TYPE=Release \
  PROGRESS_EXAMPLES=yes \
  CMAKE_PREFIX_PATH=${HOME}/bml/install \
  ./build.sh configure

it works. The CMAKE_PREFIX_PATH should not include lib. CMake will descend into the prefix path into lib and include as it needs to.

@nicolasbock
Copy link
Collaborator

I did this on a SLES12-SP2 system by the way. The only difference in setup was that I used BLAS_VENDOR= since I used SUSE BLAS/LAPACK and I used GCC as the compiler.

@cnegre
Copy link
Collaborator Author

cnegre commented Apr 30, 2018 via email

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

No branches or pull requests

3 participants