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

fix plugin loading issues #64

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions recipe/3025.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
From 8ccec49ac29b484ea25ab7159baed7d9a3d9dfdb Mon Sep 17 00:00:00 2001
From: Jinzhe Zeng <[email protected]>
Date: Sat, 2 Dec 2023 18:20:53 -0500
Subject: [PATCH 1/2] set rpath for symlink and macos

Signed-off-by: Jinzhe Zeng <[email protected]>
---
source/lmp/plugin/CMakeLists.txt | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/source/lmp/plugin/CMakeLists.txt b/source/lmp/plugin/CMakeLists.txt
index bfc225341..e6dc0fc99 100644
--- a/source/lmp/plugin/CMakeLists.txt
+++ b/source/lmp/plugin/CMakeLists.txt
@@ -96,10 +96,13 @@ if(DEFINED LAMMPS_SOURCE_ROOT OR DEFINED LAMMPS_VERSION)
endif()
if(CMAKE_SYSTEM_NAME STREQUAL Darwin)
set_target_properties(${libname} PROPERTIES LINK_FLAGS
- "-Wl,-undefined,dynamic_lookup")
+ "-Wl,-undefined,dynamic_lookup"
+ INSTALL_RPATH
+ "@loader_path:${TensorFlow_LIBRARY_PATH}:@loader_path/.."
+ )
else()
set_target_properties(
- ${libname} PROPERTIES INSTALL_RPATH "$ORIGIN;${TensorFlow_LIBRARY_PATH}"
+ ${libname} PROPERTIES INSTALL_RPATH "$ORIGIN;${TensorFlow_LIBRARY_PATH};$ORIGIN/.."
LINK_FLAGS "-rdynamic")
endif()
target_compile_definitions(
4 changes: 3 additions & 1 deletion recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@ package:
source:
- url: https://github.com/deepmodeling/{{ name }}/archive/v{{ version }}.tar.gz
sha256: 25be126de336630493732b09d3b779b89cc916345b22dfb869cc4f3a3ba6dcde
patches:
- 3025.patch
- url: https://github.com/lammps/lammps/archive/{{ lammps_version }}.tar.gz
sha256: 48dc8b0b0583689e80ea2052275acbc3e3fce89707ac557e120db5564257f7df
folder: lammps

build:
number: 3
number: 4
string: cuda{{ cuda_compiler_version | replace('.', '') }}py{{ CONDA_PY }}h{{ PKG_HASH }}_{{ PKG_BUILDNUM }} # [cuda_compiler_version != "None"]
string: cpu_py{{ CONDA_PY }}h{{ PKG_HASH }}_{{ PKG_BUILDNUM }} # [cuda_compiler_version == "None"]
skip: true # [win]
Expand Down