2

When executing a script I get the following error:

Unhandled SIMPLE-ERROR in thread #<SB-THREAD:THREAD "main thread" RUNNING {1003A70003}>: The assertion (COMMON-LISP:= (MAGICFFI::MAGIC-VERSION) MAGICFFI::+MAGIC-VERSION+)
failed with (MAGICFFI::MAGIC-VERSION) = 533.

I asked the author of the script about it, here is what he answered me:

This is an error from libmagic (called from FFI). It is complaining that
the version of your header files are inconsistent with your shared
library. So you have an issue that your shell environment (e.g. bash) is
mixing up the system environment (some library in /usr/lib,
/usr/include) and the miniconda environment.

Please review your CPATH, LD_LIBRARY_PATH, ~/.bashrc, ~/.bash_profile,
~/.profile .

I have inspected these variables, only CPATH and .bashrc contain "pathes":

CPATH:

 /g100_work/PROJECTS/spack/v0.16/install/0.16.2/linux-centos8-skylake_avx512/gcc-8.3.1/anaconda3-2020.07-l2bohj4adsd6r2oweeytdzrgqmjl64lt/bin/conda' 'shell.bash'

.bashrc:

 /g100_work/PROJECTS/spack/v0.16/install/0.16.2/linux-centos8-skylake_avx512/gcc-8.3.1/anaconda3-2020.07-l2bohj4adsd6r2oweeytdzrgqmjl64lt/etc/profile.d/conda.sh

 /g100_work/PROJECTS/spack/v0.16/install/0.16.2/linux-centos8-skylake_avx512/gcc-8.3.1/anaconda3-2020.07-l2bohj4adsd6r2oweeytdzrgqmjl64lt/bin:$PATH

I am really new to solving these kinds of bugs... So, may I ask if you have any clue about what's wrong ? or what else should I do ?

Thank you

Rainer Joswig
  • 136,269
  • 10
  • 221
  • 346
RandomFellow
  • 317
  • 1
  • 9
  • 1
    If you've installed everything correctly, it seems like the author of the script would be the best source for help. If you want to get help here, you should probably at least give more information about this script. I'm not sure if this helps, but it looks like magicffi hasn't been maintained for several years; there is an [open pull request](https://github.com/dochang/magicffi/pull/7) which says that _"the system doesn't load in the recent linux"_ and mentions _"mismatch between the header file and the shared library."_ – ad absurdum Jul 23 '22 at 09:25
  • 1
    The pull request hasn't been merged, but [the author of the pull request has forked magicffi](https://github.com/guicho271828/magicffi) with the changes. Maybe you can use the forked version or otherwise get some assistance there. – ad absurdum Jul 23 '22 at 09:26
  • I would like to use the forked version, but I don't know how to integrate it in my project. I installed libmagic with conda, MAGICFFI is another library and their README only indicates to clone the repository for the installation. But in the repository, I don't see any installation file – RandomFellow Jul 26 '22 at 06:04
  • Per the instructions on Github, you would need to make sure that libmagic-dev, libc6-dev, and gcc are installed on your system; then you would need to install CFFI and CL-PPCRE (these are Common Lisp packages that can be installed using Quicklisp). Then you should [create a ~/common-lisp directory](https://asdf.common-lisp.dev/asdf/Configuring-ASDF-to-find-your-systems.html) and clone the Github repo into that. After that you should be able to load magicffi by following the instructions at Github. – ad absurdum Jul 26 '22 at 06:41

0 Answers0