Giter Site home page Giter Site logo

Comments (14)

guicho271828 avatar guicho271828 commented on May 14, 2024

Hi could you tell me the version of libmagic you have installed?

from latplan.

rakhmanu avatar rakhmanu commented on May 14, 2024

Hi could you tell me the version of libmagic you have installed?
Hi @guicho271828 , yes

file-5.38
magic file from /etc/magic:/usr/share/misc/magic

Thank you very much,
Sincerely, Ulzhalgas Rakhman

from latplan.

guicho271828 avatar guicho271828 commented on May 14, 2024

hmm, seeing this line, there has been no change since the last 9 years, so it is not that it is breaking.
https://github.com/file/file/blame/FILE5_38/src/magic.h.in#L116
I wonder if /etc/magic actually contains the header file magic.h (that is the whole point of installing the header file)
and it is included in the CPATH.

from latplan.

rakhmanu avatar rakhmanu commented on May 14, 2024

@guicho271828, there is magic.h in /etc/, but not in /etc/magic (there is no magic folder). Also, there exists separate magicffi folder. Could you please let me know is there something wrong with directories?

Thank you for your help,
Sincerely, Ulzhalgas Rakhman

from latplan.

guicho271828 avatar guicho271828 commented on May 14, 2024

Have magic.h in the C compiler's include path, aka $CPATH.

from latplan.

rakhmanu avatar rakhmanu commented on May 14, 2024

@guicho271828 , thank you very much for your help.
That solved my problem. Sorry i forgot to close the issue.

Sincerely, Ulzhalgas Rakhman

from latplan.

vindarel avatar vindarel commented on May 14, 2024

Hi there, could you explain how you solved the issue? I am having this while trying to install magicffi with Quicklisp (note: there are no issue tracker in magicffi).

My system dependencies are:

  • libmagic-dev: 1:5.32-2ubuntu0.4
  • libc6-dev: 2.27-3ubuntu1.4
  • gcc: 4:7.4.0-1ubuntu2.3

and:

$ ls -lh /etc/magic*                             
-rw-r--r-- 1 root root 111 Feb 13  2018 /etc/magic
-rw-r--r-- 1 root root 111 Feb 13  2018 /etc/magic.mime

No /etc/magic directory. I can't see a magic.h file. There is one in /usr/include/magic.h, /usr/include/linux/magic.h and /usr/include/ImageMagick-6/magick/magic.h (and /gnu/store/gfapkk5c6hvl1d94m4sqnhn7f9l5gqyh-linux-libre-headers-5.4.20/include/linux/magic.h, but it shouldn't interfere with my installation).

$ echo $CPATH

So

Have magic.h in the C compiler's include path, aka $CPATH.

how do you do that? (anything else to do from a Common Lisp REPL?)

thank you

from latplan.

guicho271828 avatar guicho271828 commented on May 14, 2024

it seems the installation point varies among systems ... and I am not keen on searching the file from inside common lisp, because it could be brittle. Asking the users to modify and export CPATH would be a surefire way. Anotehr way is to include magic.h in magicffi but that has a danger of having an obsolete file that is different from original libmagic.

from latplan.

vindarel avatar vindarel commented on May 14, 2024

Asking the users to modify and export CPATH would be a surefire way.

I… would welcome an example.

searching the file from inside common lisp, because it could be brittle

I undesrtand. Maybe searching in a few locations? For example, in cl-readline, we search several files:

(define-foreign-library readline
  ;; On OSX we first search readline, installed by brew install readline
  ;; because native system version of readline is a symlink to libedit.
  ;; Some people on the internet advice to "fix" it by running:
  ;; brew link --force readline
  ;; but it is a bad idea, because this command may break some system utilities,
  ;; depending on libedit's internals.
  (:darwin (:or "/usr/local/opt/readline/lib/libreadline.dylib"
                "/opt/homebrew/opt/readline/lib/libreadline.dylib"
                "libreadline.dylib"))
  (:unix   (:or "libreadline.so.6.3"
                "libreadline.so.6"
                "libreadline.so.7"
                "libreadline.so.8"
                "libreadline.so"))
  (t       (:default "libreadline")))

thanks

from latplan.

vindarel avatar vindarel commented on May 14, 2024

editing grovel.lisp to the location of my magic.h did the trick:

(include "/etc/[…]/magic.h")

Best,

from latplan.

guicho271828 avatar guicho271828 commented on May 14, 2024

@vindarel yes, d-f-l has that feature which searches for several possible candidates, but the gloveller doesn't have it.

from latplan.

guicho271828 avatar guicho271828 commented on May 14, 2024

The important difference being whether it's searching for a shared object or a header file

from latplan.

guicho271828 avatar guicho271828 commented on May 14, 2024

I… would welcome an example.

Just export CPATH=/usr/include/linux sbcl

from latplan.

vindarel avatar vindarel commented on May 14, 2024

Thanks for that and the explanation <3

from latplan.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.