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

Support paths from macros extended to support binary relocation #36

Merged
merged 6 commits into from
Jul 7, 2021
Merged
Show file tree
Hide file tree
Changes from 2 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
22 changes: 22 additions & 0 deletions recipe/macro_path_binary_relocation.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
From 8d90eee1109a79135b5858d0d7a5fcb0f6cab641 Mon Sep 17 00:00:00 2001
From: Diego <[email protected]>
Date: Tue, 6 Jul 2021 15:47:04 +0200
Subject: [PATCH] Fix path in conda due to its binary relocation hacks

---
src/SystemPaths.cc | 2 ++
1 file changed, 2 insertions(+)

diff --git a/src/SystemPaths.cc b/src/SystemPaths.cc
index f809686..16e6e66 100644
--- a/src/SystemPaths.cc
+++ b/src/SystemPaths.cc
@@ -235,6 +235,8 @@ void SystemPaths::AddFilePaths(const std::string &_path)
std::string SystemPaths::NormalizeDirectoryPath(const std::string &_path)
{
std::string path = _path;
+ path.erase(std::find(path.begin(), path.end(), '\0'), path.end());
+
// Use '/' because it works on Linux, OSX, and Windows
std::replace(path.begin(), path.end(), '\\', '/');
// Make last character '/'
5 changes: 4 additions & 1 deletion recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,19 @@ source:
patches:
- librt_linkage.patch # [linux]
- framework.patch # [osx]
- macro_path_binary_relocation # [linux]

build:
number: 2
number: 3
run_exports:
- {{ pin_subpackage(name, max_pin='x') }}

requirements:
build:
- {{ compiler('cxx') }}
- {{ compiler('c') }}
- git
- patch
Copy link
Contributor Author

@diegoferigo diegoferigo Jul 6, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Btw, I had to add these two build dependencies otherwise building the package locally in my setup (without using docker) was failing, even though the active conda environment had it (I suspect the process runs isolated in a new env). To be precise, my setup is already in a docker container, and running the docker script would require me to setup DIND.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to know, but please remove them. The recipe should only contain the dependency required to build the recipe on the conda-forge CI, anything else is quite difficult to maintain.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

- cmake
- ninja
- pkgconfig
Expand Down