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

Defect: Resolving library path variable in the generated script setup.sh #629

Closed
dtabell opened this issue Jan 16, 2019 · 4 comments
Closed
Assignees

Comments

@dtabell
Copy link

dtabell commented Jan 16, 2019

Avg response time
Issue Stats

Defect/Bug Report

  • OpenCoarrays Version: caf version 2.4.0-6-gebc6f30
  • Fortran Compiler: gfortran 8.2.0
  • C compiler used for building lib: gcc 8.2.0
  • Installation method: install.sh
  • Output of uname -a: Linux v.radia.run 4.18.19-100.fc27.x86_64 tests dis_transpose: test passed  #1 SMP Wed Nov 14 22:04:34 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
  • MPI library being used: MPICH 3.3
  • Machine architecture and number of physical cores: MacBookPro running a Linux VM
  • Version of CMake: cmake version 3.11.2

Observed Behavior

In my OpenCoarrays setup.sh—which is generated automatically during the build and install process—I see the following stanza:

   # Prepend the compiler library paths to the LD_LIBRARY_PATH environment variable:
   if [[ -z "${!LD_LIB_P_VAR}" ]]; then
     export LD_LIBRARY_PATH="/opt/gcc/8.2.0/lib64/:/opt/gcc/8.2.0/lib"
   else
     export
   LD_LIBRARY_PATH="/opt/gcc/8.2.0/lib64/:/opt/gcc/8.2.0/lib:${!LD_LIB_P_VAR}"
   fi

Expected Behavior

The ${!LD_LIB_P_VAR} should read $LD_LIBRARY_PATH.

On my machine (a linux VM) ${!LD_LIB_P_VAR} does not resolve to anything, which means the if test takes the first branch and overwrites the previous contents of $LD_LIBRARY_PATH. I suspect you need ${!LD_LIB_P_VAR} and its associated logic higher up the chain, but that variable should be resolved to the appropriate value before its written to the generated setup.sh file.

While you're at it, you might as well also delete the trailing / after lib64, so that, for example, the penultimate line reads

  LD_LIBRARY_PATH="/opt/gcc/8.2.0/lib64:/opt/gcc/8.2.0/lib:$LD_LIBRARY_PATH"
@rouson rouson reopened this Mar 18, 2019
@zbeekman
Copy link
Collaborator

@rouson did the fix not work? Is that why you re-opened it?

@ghost ghost assigned rouson Mar 18, 2019
@rouson
Copy link
Member

rouson commented Mar 18, 2019

@zbeekman The previous fix left extraneous ! characters in setup.sh and those caused source setup.sh to return an error. Deleting the ! characters generates a setup.sh that works for me. I've done this in PR #641.

@zbeekman
Copy link
Collaborator

@rouson yeah, I just saw your PR. doh! I thought my logic was correct, but you are definitely right; the ! needs to go.

@zbeekman
Copy link
Collaborator

we can create a patch release while you're here.

rouson added a commit that referenced this issue Mar 19, 2019
@rouson rouson closed this as completed in d732567 Mar 19, 2019
@ghost ghost removed the needs-review label Mar 19, 2019
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

No branches or pull requests

3 participants