Giter Site home page Giter Site logo

Comments (6)

zhushenwudi avatar zhushenwudi commented on June 1, 2024 1

Successfully, I uninstalled flac and rebuilt flac-bindings. Unfortunately, this is an production env bug that can only be corrected in the next version, thx bro

from node-flac-bindings.

melchor629 avatar melchor629 commented on June 1, 2024

Hello! I think you should rebuild flac-bindings with npm rebuild flac-bindings. In latest libflac version (1.4) they changed the number of the shared library:

flac changelog

(see https://xiph.org/flac/changelog.html)

Hope with the recompile is enough to have it working again :)

Lore: This is a common practice in the C/C++ libraries, to have a "binary version" in the name of the shared library. If between versions the API compatibility is broken, the number is incremented.

from node-flac-bindings.

zhushenwudi avatar zhushenwudi commented on June 1, 2024

I delete /node_module/flac_bindings/build folder, and use npm rebuild flac-bindings to re-generate build folder. But I didn't find any node files in build/Release, so I used the make command to try to compile, but he reported a mistake

[  3%] Building CXX object CMakeFiles/flac-bindings.dir/src/mappings/frame.cpp.o
/Users/hoshizora-rin/Documents/important/electron/LoveLiveMusicPlayer/node_modules/flac-bindings/src/mappings/frame.cpp:107:13: error: cannot cast from type 'const union (unnamed union at /opt/homebrew/Cellar/flac/1.4.2/include/FLAC/format.h:295:2)' to pointer type 'int32_t *' (aka 'int *')
            (int32_t*) subframe.data.verbatim.data,
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make[2]: *** [CMakeFiles/flac-bindings.dir/src/mappings/frame.cpp.o] Error 1
make[1]: *** [CMakeFiles/flac-bindings.dir/all] Error 2
make: *** [all] Error 2

ps. I also wrote a prebuild script because I couldn't compile it before, and placed the node file from github in the built/release folder so that I could use it.

from node-flac-bindings.

melchor629 avatar melchor629 commented on June 1, 2024

Mmm I see. I've been looking for the commit I made to make the library work with libflac 1.4 and just in the place where it failed, there is a breaking change (f52cc88). I see here two options:

  1. Somehow downgrade your installation of libflac to any of the 1.3 versions
  2. Remove your installation of libflac and let my package download the code of a known working version for you (it will take more time to compile but it should work).

Note that I do not have experience with M1/M2 Macs so there is maybe any other issue I didn't know. Let me know if something else does not work.

I would recommend you the second option because it will bundle libflac with your app, so you won't need to copy the library manually for distribution.

from node-flac-bindings.

zhushenwudi avatar zhushenwudi commented on June 1, 2024

You mean, I need uninstall flac in my computer environment variable?

from node-flac-bindings.

melchor629 avatar melchor629 commented on June 1, 2024

If you don't have a way to install flac 1.3, then try uninstalling flac installed on your computer. At least temporarily, just to see if compiles fine.

The build script tries to use already installed flac before trying to download and compile flac (because it is faster to use something already compiled). But in this case it seems that is causing you trouble :/

from node-flac-bindings.

Related Issues (20)

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.