Skip to content

Bugfix: Fix MET to compile without the optional --enable-python configuration option #2760

@JohnHalleyGotway

Description

@JohnHalleyGotway

Describe the Problem

METplus Discussion dtcenter/METplus#2450 reveals that the compilation of MET version 11.1.0 fails when the optional --enable-python configuration option is not used. The linking step for ascii2nc fails with the undefined references listed below.

Recommend fixing this bug in the main_v11.1 branch and providing the fix via a MET-11.1.1 bugfix release.

For the develop branch, after fixing this bug, recommend also adding a new GHA workflow to test the compilation of MET with permutations of the optional configuration arguments. This workflow should support a manual trigger, be automatically triggered for each tag, and also perhaps be run weekly via cron. It would run multiple compilations of MET with varying configuration options and then run make test.

Here are the ascii2nc linker errors:

Undefined symbols for architecture x86_64:
  "__ZN11MaskFilters11is_filteredEdd", referenced from:
      __ZN11FileHandler16_addObservationsERK11Observation in ascii2nc-file_handler.o
  "__ZN11MaskFilters12set_sid_maskEP11StringArray", referenced from:
      __ZN11FileHandler10setSIDMaskER11StringArray in ascii2nc-ascii2nc.o
  "__ZN11MaskFilters13set_area_maskEP10TwoD_ArrayIbE", referenced from:
      __ZN11FileHandler11setAreaMaskER10TwoD_ArrayIbE in ascii2nc-ascii2nc.o
  "__ZN11MaskFilters13set_grid_maskEP4Grid", referenced from:
      __ZN11FileHandler11setGridMaskER4Grid in ascii2nc-ascii2nc.o
  "__ZN11MaskFilters13set_poly_maskEP8MaskPoly", referenced from:
      __ZN11FileHandler11setPolyMaskER8MaskPoly in ascii2nc-ascii2nc.o
  "__ZN11MaskFilters15is_filtered_sidEPKc", referenced from:
      __ZN11FileHandler16_addObservationsERK11Observation in ascii2nc-file_handler.o
  "__ZN11MaskFiltersC1Ev", referenced from:
      __ZN11FileHandlerC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE in ascii2nc-file_handler.o
      __ZN11FileHandlerC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE in ascii2nc-file_handler.o
ld: symbol(s) not found for architecture x86_64

The mask_filters.h file resides in the vx_pointdata_python library:

src/libcode/vx_pointdata_python/mask_filters.h

The ascii2nc file_handler.h file references the functions defined by mask_filters.h. However, the vx_pointdata_python library is only linked (-lvx_pointdata_python) when the --enable-python configuration option is used. Without it, we get these undefined references.

Recommend relocating mask_filters.h/.cc, perhaps moving it into the vx_util library, alongside observation.h/.cc.

Expected Behavior

This issue is to compile MET

To Reproduce

Describe the steps to reproduce the behavior:
Compile MET version 11.1.0 without --enable-python.

Relevant Deadlines

List relevant project deadlines here or state NONE.

Funding Source

Define the source of funding and account keys here or state NONE.

Define the Metadata

Assignee

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

Labels

  • Review default alert labels
  • Select component(s)
  • Select priority
  • Select requestor(s)

Milestone and Projects

  • Select Milestone as the next bugfix version
  • Select Coordinated METplus-X.Y Support project for support of the current coordinated release
  • Select MET-X.Y.Z Development project for development toward the next official release

Define Related Issue(s)

Consider the impact to the other METplus components.

Bugfix 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 main_<Version>.
    Branch name: bugfix_<Issue Number>_main_<Version>_<Description>
  • Fix the bug 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 main_<Version>.
    Pull request: bugfix <Issue Number> main_<Version> <Description>
  • Define the pull request metadata, as permissions allow.
    Select: Reviewer(s) and Development issue
    Select: Milestone as the next bugfix version
    Select: Coordinated METplus-X.Y Support project for support of the current coordinated release
  • Iterate until the reviewer(s) accept and merge your changes.
  • Delete your fork or branch.
  • Complete the steps above to fix the bug on the develop branch.
    Branch name: bugfix_<Issue Number>_develop_<Description>
    Pull request: bugfix <Issue Number> develop <Description>
    Select: Reviewer(s) and Development issue
    Select: Milestone as the next official version
    Select: MET-X.Y.Z Development project for development toward the next official release
  • Close this issue.

Metadata

Metadata

Type

No type

Projects

Status

🏁 Done

Relationships

None yet

Development

No branches or pull requests

Issue actions