Skip to content

Modify compilation script to add new variable path to LDFLAGS #2441

@jprestop

Description

@jprestop

Describe the Task

Testing the installation of MET on WCOSS2 Acorn using Python 3.10.4 would not work without the addition of a new environment variable.

Running:

module load intel python/3.10.4 
module load intel
module load ve/evs/1.0
/apps/spack/python/3.10.4/intel/19.1.3.304/xqft4d45h4dp4xnbz2ue3nbxv65i6bgp/bin/python3-config --ldflags

on Acorn gave the following output:

-L/apps/spack/python/3.10.4/intel/19.1.3.304/xqft4d45h4dp4xnbz2ue3nbxv65i6bgp/lib64  -lcrypt -lintl -ldl  -lutil -lm -lm

However, when adding this information to MET_PYTHON_LD (along with an additional path and the python library):

export MET_PYTHON_LD=-L/apps/spack/python/3.10.4/intel/19.1.3.304/xqft4d45h4dp4xnbz2ue3nbxv65i6bgp/lib/python3.10/config-3.10-x86_64-linux-gnu/ -L/apps/spack/python/3.10.4/intel/19.1.3.304/xqft4d45h4dp4xnbz2ue3nbxv65i6bgp/lib64 -lpython3.10 -lintl -lcrypt -ldl -lutil -lm -lm

led to the following error:

/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: cannot find -lintl: No such file or directory

Running ldd /apps/prod/ve/intel/19.1.3.304/python/3.10.4/evs/1.0/bin/python resulted in locating this path:

libintl.so.8 => /apps/spack/gettext/0.21/intel/19.1.3.304/at2kdo4edvuhyzrt5g6zhwrdb7bdui4s/lib64/libintl.so.8 (0x0000150434aef000)

And adding a new environment variable to the configuration file:

export INTL_DIR=/apps/spack/gettext/0.21/intel/19.1.3.304/at2kdo4edvuhyzrt5g6zhwrdb7bdui4s/lib64

and modifying the value of LDFLAGS to include this path in the compile_MET_all.sh script resolved the problem and resulted in a successful compilation.

Time Estimate

<30 min

Sub-Issues

Consider breaking the task down into sub-issues.

  • Add a checkbox for each sub-issue here.

Relevant Deadlines

MET-11.1.0-beta1

Funding Source

Split 2792542, 2773542

Define the Metadata

Assignee

  • Select engineer(s) or no engineer required
  • Select scientist(s) or no scientist required

Labels

  • Select component(s)
  • Select priority
  • Select requestor(s)

Projects and Milestone

  • Select Repository and/or Organization level Project(s) or add alert: NEED PROJECT ASSIGNMENT label
  • Select Milestone as the next official version or Future Versions

Define Related Issue(s)

Consider the impact to the other METplus components.

Task Checklist

See the METplus Workflow for details.

  • Complete the issue definition above, including the Time Estimate and Funding Source.
  • Fork this repository or create a branch of develop.
    Branch name: feature_<Issue Number>_<Description>
  • Complete the development and test your changes.
  • Add/update log messages for easier debugging.
  • Add/update unit tests.
  • Add/update documentation.
  • Push local changes to GitHub.
  • Submit a pull request to merge into develop.
    Pull request: feature <Issue Number> <Description>
  • Define the pull request metadata, as permissions allow.
    Select: Reviewer(s) and Development issues
    Select: Repository level development cycle Project for the next official release
    Select: Milestone as the next official version
  • Iterate until the reviewer(s) accept and merge your changes.
  • Delete your fork or branch.
  • Close this issue.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

✅ Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions