You are here

trouble installing in conda env

1 post / 0 new
khusmann's picture
Offline
Joined: 08/11/2019 - 19:19
trouble installing in conda env

Hi all,

I'm trying to get openmx to compile in a conda env (using getopenmx.R), and am getting the following compile error.

It appears it's because the conda version of zstd is later than openmx is expecting, and is using deprecated features. I poked around a little, and it looks like openmx might bundle its own copy of zstd, which it should be compiling against instead, but is instead trying to use the conda one. Any help on fixing this would be appreciated! (error messages below)

Thanks,
Kyle

x86_64-conda_cos6-linux-gnu-cc -I"/storage/work/project/.snakemake/conda/1a1dd139/lib/R/include" -DNDEBUG  -I"/storage/work/project/.snakemake
/conda/1a1dd139/lib/R/library/Rcpp/include" -I"/storage/work/project/.snakemake/conda/1a1dd139/lib/R/library/RcppEigen/include" -I"/storage/work/project/.snakemake/conda/1a1dd139/lib/R/library/StanHeaders/include" -I"/storage/work/project/.snakemake/conda/1a1dd139/lib/R/library/BH/include" -I"/storage/work/project/.snakemake/conda/1a1dd139/lib/R/library/rpf/include" -DNDEBUG -D_FORTIFY_SOURCE=2 -O2  -I/storage/work/project/.snakemake/con
da/1a1dd139/include -Wl,-rpath-link,/storage/work/project/.snakemake/conda/1a1dd139/lib  -I. -Iinclude -Iinclude/zstd-1.1.0 -Iinclude/zstd-1.1.0/common -Iinc
lude/zstd-1.1.0/compress -Iinclude/zstd-1.1.0/decompress -D SQLITE_ENABLE_COLUMN_METADATA -D SQLITE_ENABLE_STAT4 -D SQLITE_MAX_EXPR_DEPTH=10000 -D SQLITE_USE_URI=1  -fpic  
-march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -I/storage/work/project/.snakemake/conda/
1a1dd139/include -fdebug-prefix-map=/home/conda/feedstock_root/build_artifacts/r-base_1563986847878/work=/usr/local/src/conda/r-base-3.5.1 -fdebug-prefix-map=/storage/work/project/.snakemake/conda/1a1dd139=/usr/local/src/conda-prefix  -c zbuff_compress.c -o zbuff_compress.o
zbuff_compress.c: In function 'ZBUFF_createCCtx':
zbuff_compress.c:84:5: warning: 'ZBUFF_createCCtx_advanced' is deprecated: use ZSTD_createCStream_advanced [-Wdeprecated-declarations]
     return ZBUFF_createCCtx_advanced(defaultCustomMem);
     ^~~~~~
In file included from zbuff_compress.c:19:0:
/storage/work/project/.snakemake/conda/1a1dd139/include/zbuff.h:194:65: note: declared here
 ZBUFF_DEPRECATED("use ZSTD_createCStream_advanced") ZBUFF_CCtx* ZBUFF_createCCtx_advanced(ZSTD_customMem customMem);
                                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~
zbuff_compress.c: In function 'ZBUFF_createCCtx_advanced':
zbuff_compress.c:97:71: error: invalid application of 'sizeof' to incomplete type 'ZBUFF_CCtx {aka struct ZSTD_CCtx_s}'
     zbc = (ZBUFF_CCtx*)customMem.customAlloc(customMem.opaque, sizeof(ZBUFF_CCtx));
                                                                       ^~~~~~~~~~
zbuff_compress.c:99:27: error: invalid application of 'sizeof' to incomplete type 'ZBUFF_CCtx {aka struct ZSTD_CCtx_s}'
     memset(zbc, 0, sizeof(ZBUFF_CCtx));
                           ^~~~~~~~~~
zbuff_compress.c:100:16: error: dereferencing pointer to incomplete type 'ZBUFF_CCtx {aka struct ZSTD_CCtx_s}'
     memcpy(&zbc->customMem, &customMem, sizeof(ZSTD_customMem));
                ^~
zbuff_compress.c:102:5: warning: 'ZBUFF_freeCCtx' is deprecated: use ZSTD_freeCStream [-Wdeprecated-declarations]
     if (zbc->zc == NULL) { ZBUFF_freeCCtx(zbc); return NULL; }
     ^~
In file included from zbuff_compress.c:19:0:
/storage/work/project/.snakemake/conda/1a1dd139/include/zbuff.h:72:56: note: declared here
 ZBUFF_DEPRECATED("use ZSTD_freeCStream")   size_t      ZBUFF_freeCCtx(ZBUFF_CCtx* cctx);
                                                        ^~~~~~~~~~~~~~
In file included from zbuff_compress.c:17:0:
zbuff_compress.c: In function 'ZBUFF_compressInit_advanced':
zbuff_compress.c:131:30: error: 'ZSTD_BLOCKSIZE_ABSOLUTEMAX' undeclared (first use in this function); did you mean 'ZSTD_BLOCKSIZELOG_MAX'?
         zbc->blockSize = MIN(ZSTD_BLOCKSIZE_ABSOLUTEMAX, neededInBuffSize);
                              ^
include/zstd-1.1.0/common/zstd_internal.h:47:20: note: in definition of macro 'MIN'
 #define MIN(a,b) ((a)<(b) ? (a) : (b))
                    ^
zbuff_compress.c:131:30: note: each undeclared identifier is reported only once for each function it appears in
         zbc->blockSize = MIN(ZSTD_BLOCKSIZE_ABSOLUTEMAX, neededInBuffSize);
                              ^
include/zstd-1.1.0/common/zstd_internal.h:47:20: note: in definition of macro 'MIN'
 #define MIN(a,b) ((a)<(b) ? (a) : (b))
                    ^
zbuff_compress.c: In function 'ZBUFF_compressInitDictionary':
zbuff_compress.c:157:5: warning: 'ZBUFF_compressInit_advanced' is deprecated: use ZSTD_initDStream_usingDict [-Wdeprecated-declarations]
     return ZBUFF_compressInit_advanced(zbc, dict, dictSize, params, 0);
     ^~~~~~
zbuff_compress.c:119:8: note: declared here
 size_t ZBUFF_compressInit_advanced(ZBUFF_CCtx* zbc,
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~
zbuff_compress.c: In function 'ZBUFF_compressInit':
zbuff_compress.c:162:5: warning: 'ZBUFF_compressInitDictionary' is deprecated: use ZSTD_initCStream_usingDict [-Wdeprecated-declarations]
     return ZBUFF_compressInitDictionary(zbc, NULL, 0, compressionLevel);
     ^~~~~~
zbuff_compress.c:154:8: note: declared here
 size_t ZBUFF_compressInitDictionary(ZBUFF_CCtx* zbc, const void* dict, size_t dictSize, int compressionLevel)
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
zbuff_compress.c: In function 'ZBUFF_recommendedCInSize':
zbuff_compress.c:318:49: error: 'ZSTD_BLOCKSIZE_ABSOLUTEMAX' undeclared (first use in this function); did you mean 'ZSTD_BLOCKSIZELOG_MAX'?
 size_t ZBUFF_recommendedCInSize(void)  { return ZSTD_BLOCKSIZE_ABSOLUTEMAX; }
                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~
                                                 ZSTD_BLOCKSIZELOG_MAX
zbuff_compress.c: In function 'ZBUFF_recommendedCOutSize':
zbuff_compress.c:319:68: error: 'ZSTD_BLOCKSIZE_ABSOLUTEMAX' undeclared (first use in this function); did you mean 'ZSTD_BLOCKSIZELOG_MAX'?
 size_t ZBUFF_recommendedCOutSize(void) { return ZSTD_compressBound(ZSTD_BLOCKSIZE_ABSOLUTEMAX) + ZSTD_blockHeaderSize + ZBUFF_endFrameSize; }
                                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~
                                                                    ZSTD_BLOCKSIZELOG_MAX
make: *** [/storage/work/project/.snakemake/conda/1a1dd139/lib/R/etc/Makeconf:160: zbuff_compress.o] Error 1
ERROR: compilation failed for package ‘OpenMx’
* removing ‘/storage/work/project/.snakemake/conda/1a1dd139/lib/R/library/OpenMx’
* restoring previous ‘/storage/work/project/.snakemake/conda/1a1dd139/lib/R/library/OpenMx’