Git Product home page Git Product logo

Comments (3)

bsansouci avatar bsansouci commented on August 29, 2024

Hey @jdeisenberg thanks for opening this issue. This looks very similar to Schmavery/reprocessing#72

Could you show me cat node_modules/sdl2/sdl2.pc and cat node_modules/sdl2/bsconfig.json?

This is because we kinda generate the same linking flags for all versions of linux, disregarding what the ./configure generated inside the sdl2.pc (which contains exactly the right flags for your distro).
See https://github.com/bsansouci/SDL-mirror/blob/129e47282cc72b7d51246b18a4da48d919799092/postinstall.js#L135.

So eh... the real fix would be to regex parse the sdl2.pc file and generate a more correct bsconfig than this ^.

from reprocessing-example.

jdeisenberg avatar jdeisenberg commented on August 29, 2024
> cat node_modules/sdl2/sdl2.pc
# sdl pkg-config source file

prefix=/home/david/reasonlab/reprocessing-example/node_modules/sdl2
exec_prefix=${prefix}
libdir=/home/david/reasonlab/reprocessing-example/node_modules/sdl2
includedir=${prefix}/include

Name: sdl2
Description: Simple DirectMedia Layer is a cross-platform multimedia library designed to provide low level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL, and 2D video framebuffer.
Version: 2.0.5
Requires:
Conflicts:
Libs: -L${libdir} -Wl,-rpath,${libdir} -Wl,--enable-new-dtags -lSDL2 
Libs.private: -lSDL2   -Wl,--no-undefined -lm -ldl -lpthread -lrt
Cflags: -I${includedir}/SDL2   -D_REENTRANT

> cat node_modules/sdl2/bsconfig.json
{
  "name": "sdl2",
  "sources": "fake_src",
  "c-linker-flags": ["-lasound", "-lm", "-ldl", "-lpthread", "-lrt"],
  "static-libraries": ["libSDL2.a"],
  "allowed-build-kinds": ["bytecode", "native"],
  "refmt": 3,
}

from reprocessing-example.

Schmavery avatar Schmavery commented on August 29, 2024

@jdeisenberg I think this is similar to the fix here: bsansouci/SDL-mirror#2 by @zploskey (which was the solution to the issue ben mentioned) , where we had some unnecessary dependencies specified.
By looking at a couple of pkg-configs including yours, it seems like nothing actually requires -lasound to be statically linked anymore and we can remove this flag. Feel free to try removing -lasound from your sdl2 bsconfig.json and see if that helps it build.

from reprocessing-example.

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.