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

Update FINEMAP to 1.4.2 #51978

Merged
merged 16 commits into from
Nov 21, 2024
74 changes: 51 additions & 23 deletions recipes/finemap/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,37 +1,65 @@
# This file created by conda-build 3.22.0
# meta.yaml template originally from:
# /home/conda/conda-forge/recipes/finemap, last modified Thu Oct 20 22:53:08 2022
# ------------------------------------------------
{% set name = "finemap" %}
{% set version = "1.4.2" %}

package:
name: finemap
version: 1.4.1
name: {{ name }}
version: {{ version }}

source:
sha256: 75c919d9cc981bc08e1a982b1632110109ffe6a057e803c9aa36c143aa56d546
url: http://www.christianbenner.com/finemap_v1.4.1_x86_64.tgz
- url: http://www.christianbenner.com/finemap_v{{ version }}_x86_64.tgz
sha256: 3b1fc6eb3c2ccafd647b32e02d0244495cd0ade9ed7d474606c31ebf6e98b0c9

build:
binary_relocation: false
noarch: generic
number: '0'
number: 0
# skip osx since binary cannot be relinked b/c it was built without the -headerpad_max_install_names option
skip: True # [not linux64]
run_exports:
- {{ pin_subpackage('finemap', max_pin="x") }}
script:
- install -Dd ${PREFIX}/bin
- install -D -m 755 finemap_v1.4.1_x86_64 ${PREFIX}/bin/finemap
string: '0'
- mkdir -p ${PREFIX}/bin
- install -m 755 finemap_v{{ version }}_x86_64 ${PREFIX}/bin/finemap
missing_dso_whitelist:
- /lib64/libdl.so.2
- /lib64/libm.so.6
- $RPATH/libgomp.so.1
- /lib64/libgcc_s.so.1
- /lib64/libpthread.so.0
- /lib64/libc.so.6
- /lib64/ld-linux-x86-64.so.2

requirements:
build: []
host: []
run: []
host:
- {{ stdlib("c") }}
- libgomp
- libgcc
Copy link
Member

Choose a reason for hiding this comment

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

please use the compiler directive here.

Copy link
Contributor Author

@aryarm aryarm Nov 17, 2024

Choose a reason for hiding this comment

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

Hi @bgruening !

Is this what you're thinking?

Suggested change
- libgomp
- {{ compiler('cxx') }}
- libgomp

I actually had something like this in 8a0e784, but we decided to remove it in #51978 (comment), since I'm simply copying a binary and not compiling it. Shall I add it back?

Copy link
Member

Choose a reason for hiding this comment

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

Yes this is what I was thinking. If @martin-g is ok with the way you have it now let's keep it.

Adding libgomp and libgcc will be done by the complier directive and it's a bit more portable. But you eitherway skip everything but linux64. So 🤷

Copy link
Contributor Author

@aryarm aryarm Nov 18, 2024

Choose a reason for hiding this comment

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

Ok, thanks for explaining!

I would like to make it work on macos eventually, so maybe it's a good idea to go with the more portable option for better future proofing. Or I can add a comment that explains to do that in the future.

I'll wait to hear thoughts from @martin-g

Copy link
Contributor

Choose a reason for hiding this comment

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

I'll take a closer look later today!

Copy link
Contributor

Choose a reason for hiding this comment

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

Do you need anything in the requirements > build section if you don't build it from source ?

Copy link
Contributor Author

@aryarm aryarm Nov 20, 2024

Choose a reason for hiding this comment

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

I tried that locally. The tests still seem to pass when I remove the requirements > build section, but conda-bld will issue a bunch of warnings.

WARNING (finemap,bin/finemap): /lib64/libdl.so.2 not found in packages, sysroot(s) nor the missing_dso_whitelist... is this binary repackaging?
WARNING (finemap,bin/finemap): /lib64/libm.so.6 not found in packages, sysroot(s) nor the missing_dso_whitelist... is this binary repackaging?
WARNING (finemap,bin/finemap): $RPATH/libgomp.so.1 not found in packages, sysroot(s) nor the missing_dso_whitelist... is this binary repackaging?
WARNING (finemap,bin/finemap): /lib64/libgcc_s.so.1 not found in packages, sysroot(s) nor the missing_dso_whitelist... is this binary repackaging?
WARNING (finemap,bin/finemap): /lib64/libpthread.so.0 not found in packages, sysroot(s) nor the missing_dso_whitelist... is this binary repackaging?
WARNING (finemap,bin/finemap): /lib64/libc.so.6 not found in packages, sysroot(s) nor the missing_dso_whitelist... is this binary repackaging?
WARNING (finemap,bin/finemap): /lib64/ld-linux-x86-64.so.2 not found in packages, sysroot(s) nor the missing_dso_whitelist... is this binary repackaging?

Should I just ignore those by adding the DSOs to missing_dso_whitelist? I was concerned that adding a package to missing_dso_whitelist might prevent conda-bld from automatically updating the path to the DSO in the binary (using patchelf) - since I couldn't find much info about the exact function of missing_dso_whitelist

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't have any experience with this kind of problems but I think you need to move those deps to requirements > host

Copy link
Contributor Author

@aryarm aryarm Nov 20, 2024

Choose a reason for hiding this comment

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

That makes sense. From what I've read online, shared libraries like those are supposed to be placed in the host section to ensure portability.

But when I move those requirements into the host section, I still get the same warnings mentioned above. So I guess I'll add them to missing_dso_whitelist

Also please feel free to let me know if there's somewhere else where I should also try to ask these questions. I've only recently been trying to learn how to create conda recipes, so I'm not very familiar with all of the resources yet.

run:
- {{ stdlib("c") }}
- libgomp
- libgcc

test:
source_files:
- example
commands:
- test -f $PREFIX/bin/finemap
- finemap --help
- finemap --sss --in-files example/data
- finemap --cond --in-files example/data
- finemap --config --in-files example/data --rsids rs30,rs11

about:
home: http://www.christianbenner.com
license: Other
license: Custom Academic
license_url: http://www.christianbenner.com/license_finemap_v1.4.html
# use LICENSE file in downloaded source
license_file: LICENSE
summary: Program for identifying causal SNPs and their effect sizes and heritability
aryarm marked this conversation as resolved.
Show resolved Hide resolved
contributions
summary: >
Program for identifying causal SNPs and their effect sizes and heritability contributions

extra:
copy_test_source_files: true
final: true
skip-lints:
- should_use_compilers
- should_be_noarch_generic
- version_constraints_missing_whitespace
recipe-maintainers:
- aryarm
- danielnachun