Skip to content
GitLab
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
    Projects Groups Topics Snippets
  • Register
  • Sign in
  • GROMACS GROMACS
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 317
    • Issues 317
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 101
    • Merge requests 101
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • GROMACS
  • GROMACSGROMACS
  • Issues
  • #1919
Closed
Open
Issue created Mar 13, 2016 by Paul Bauer@acmnpvMaintainer

static linking issues cause by hwloc support - Redmine #1919

The hwloc support is causing a number of minor issues:
-* CMake output even when GMX_HWLOC=OFF
-* static linking breaks

/usr/bin/g++-4.8   -march=core-avx2    -std=c++0x -Wundef -Wextra -Wno-missing-field-initializers -Wpointer-arith -Wall -Wno-unused-function  -O3 -DNDEBUG -funroll-all-loops -fexcess-precision=fast  -Wno-array-bounds   src/programs/CMakeFiles/gmx.dir/gmx.cpo src/programs/CMakeFiles/gmx.dir/legacymodules.cpo src/programs/CMakeFiles/mdrun_objlib.dir/mdrun/md.cpo src/programs/CMakeFiles/mdrun_objlib.dir/mdrun/membed.cpo src/programs/CMakeFiles/mdrun_objlib.dir/mdrun/runner.cpo src/programs/CMakeFiles/mdrun_objlib.dir/mdrun/mdrun.cpo src/programs/CMakeFiles/mdrun_objlib.dir/mdrun/repl_ex.cpo src/programs/CMakeFiles/mdrun_objlib.dir/mdrun/resource-division.cpo src/programs/CMakeFiles/view_objlib.dir/view/view.cpo  -o bin/gmx  -rdynamic lib/libgromacs.a -fopenmp /opt/tcbsys/cuda/7.5/lib64/libcudart.so -Wl,-Bstatic -lhwloc -Wl,-Bdynamic -lrt -lm -Wl,-Bstatic -lz -Wl,-Bdynamic /opt/tcbsys/fftw/3.3.4-sse2-avx/lib/libfftw3f.a -lpthread -Wl,-rpath,/opt/tcbsys/cuda/7.5/lib64:::::::::::::::::::::::::::::::: && :
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libhwloc.a(components.o): In function `hwloc__dlforeach_cb':
(.text+0x77): undefined reference to `lt_dlopenext'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libhwloc.a(components.o): In function `hwloc__dlforeach_cb':
(.text+0x91): undefined reference to `lt_dlerror'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libhwloc.a(components.o): In function `hwloc__dlforeach_cb':
(.text+0x107): undefined reference to `lt_dlsym'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libhwloc.a(components.o): In function `hwloc__dlforeach_cb':
(.text+0x3d5): undefined reference to `lt_dlclose'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libhwloc.a(components.o): In function `hwloc_plugins_exit':
(.text+0x446): undefined reference to `lt_dlclose'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libhwloc.a(components.o): In function `hwloc_plugins_exit':
(.text+0x490): undefined reference to `lt_dlexit'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libhwloc.a(components.o): In function `hwloc_plugins_init':
(.text+0x4da): undefined reference to `lt_dlinit'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libhwloc.a(components.o): In function `hwloc_plugins_init':
(.text+0x556): undefined reference to `lt_dlforeachfile'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libhwloc.a(topology-linux.o): In function `hwloc_linux_set_area_membind':
(.text+0x1ce2): undefined reference to `mbind'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libhwloc.a(topology-linux.o): In function `hwloc_linux_set_area_membind':
(.text+0x1d52): undefined reference to `mbind'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libhwloc.a(topology-linux.o): In function `hwloc_linux_set_thisthread_membind':
(.text+0x1e72): undefined reference to `set_mempolicy'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libhwloc.a(topology-linux.o): In function `hwloc_linux_set_thisthread_membind':
(.text+0x1f08): undefined reference to `migrate_pages'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libhwloc.a(topology-linux.o): In function `hwloc_linux_set_thisthread_membind':
(.text+0x1f4b): undefined reference to `set_mempolicy'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libhwloc.a(topology-linux.o): In function `hwloc_linux_find_kernel_max_numnodes':
(.text+0x1fef): undefined reference to `get_mempolicy'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libhwloc.a(topology-linux.o): In function `hwloc_linux_get_thisthread_membind':
(.text+0x210b): undefined reference to `get_mempolicy'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libhwloc.a(topology-linux.o): In function `hwloc_linux_get_area_membind':
(.text+0x2282): undefined reference to `get_mempolicy'
collect2: error: ld returned 1 exit status

The former should be an easy fix; the latter likely requires figuring out which libraries need to be added to the link line, here at least libnuma and libltdtl is needed.

(from redmine: issue id 1919, created on 2016-03-13 by pszilard)

  • Changesets:
    • Revision ccbd250a by Szilárd Páll on 2016-12-09T00:43:49Z:
Turn off hwloc support when static lib found

Hwloc dependencies are not resolved at CMake time when static
libwloc.a is detected and in most of these cases link-time
errors will prevent building GROMACS. As it is hard for a user to know
how to solve such cryptic errors and hwloc is not a required dependency,
we turn off hwloc support when a static lib is detected. The user can
override this on the cmake command line.

Refs #1919

Change-Id: Ic3917e2e59ee4c291b78ee47150e513ae77ced85
Assignee
Assign to
Time tracking