limix / bgen

A BGEN file format reader.
MIT License
10 stars 2 forks source link

compiling without network access #16

Open alxsimon opened 6 months ago

alxsimon commented 6 months ago

Hi, I'm trying to package bgen (and then python cbgen) in guix. The trick is that guix does not permit network access during build so the cpmaddpackage commands do not work. I've noticed it also comes in the dependency almosthere.

So the idea is package every dependency independently, and use those libraries for compiling.

My question is this, how do you compile your projects with local libraries located on the system.

NB: I am not well versed in C compilation Thanks

horta commented 6 months ago

Hi @alxsimon ,

the cpmaddpackage commmands in https://github.com/limix/bgen/blob/main/CMakeLists.txt download those projects (zstd, zlib, almosthere etc.). To avoid it, one would need to copy it to bgen source tree (like it where files from the bgen project, and adjust the #includes). For example, copying zlib files to a src/zlib folder, and then including it like #include "zlib/zlib.h"and adding the zlib sources to the list of the command add_library().

I need to tackle that and other issues but I realistically will have time only in Juny onwards :/

alxsimon commented 6 months ago

Thanks for the pointers, I'll probably have another go at this at some point.