libxmp / libxmp

Libxmp is a library that renders module files to PCM data.
314 stars 70 forks source link

Documentation about building libxmp-lite #137

Open mmontag opened 5 years ago

mmontag commented 5 years ago

I'm trying to build libxmp-lite static/shared library (not an executable) with Emscripten and my understanding of GNU Make is not good enough to prevail. I am very confused.

Can you provide some documentation about how to build libxmp-lite static/shared library (compatible with Emscripten)?

To target Emscripten LLVM bitcode, you are supposed to invoke ./configure and make with Emscripten prefix: emconfigure ./configure and emmake make (this sets emcc as the C compiler, among other things). This requirement seems to break things when I try building libxmp-lite in various ways.

cmatsuoka commented 5 years ago

Hi Matt,

Try the following parameters:

$ emconfigure ./configure --enable-static --disable-shared $ emmake make

Here it resulted in:

... CC src/loaders/s3m_load.o CC src/loaders/it_load.o AR lib/libxmp-lite.a /usr/bin/llvm-ar: creating lib/libxmp-lite.a /usr/share/emscripten/emranlib lib/libxmp-lite.a

I don't know much about emscripten so I didn't really test the resulting library to see if it works, but please let me know if you have more problems.

On Thu, 7 Feb 2019 at 10:21, Claudio Matsuoka cmatsuoka@gmail.com wrote:

Hi Matt,

I check that and report back ASAP.

On Thu, 7 Feb 2019 at 07:48, Matt Montag notifications@github.com wrote:

I'm trying to build libxmp-lite static/shared library (not an executable) with Emscripten and my understanding of GNU Make is not good enough to prevail. I am very confused.

Can you provide some documentation about how to build libxmp-lite static/shared library (compatible with Emscripten)?

To target Emscripten LLVM bitcode, you are supposed to invoke ./configure and make with Emscripten prefix: emconfigure ./configure and emmake make and this seems to break things when I try building libxmp-lite in various ways.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/cmatsuoka/libxmp/issues/137, or mute the thread https://github.com/notifications/unsubscribe-auth/AATXqwJ9x0wB0WsKczMh4cDmcv7mJn12ks5vK_ZhgaJpZM4am7J- .

mmontag commented 5 years ago

Quick question, where do I run these commands?

mmontag commented 5 years ago

(bump) :)

cmatsuoka commented 5 years ago

Oh oops, sorry, I think the other email slipped under my radar. These are simply directories used by the source tree, you can't really run those.

You may want to have a look at this: https://github.com/wothke/libxmp-4.4.1 (It's an emscripten port of an older version of libxmp).

Best regards, Claudio

On Fri, 1 Mar 2019 at 22:49, Matt Montag notifications@github.com wrote:

(bump) :)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/cmatsuoka/libxmp/issues/137#issuecomment-468869299, or mute the thread https://github.com/notifications/unsubscribe-auth/AATXqwe2jOXp9yJhDEGTprTdXS70JoVAks5vSdi_gaJpZM4am7J- .

mmontag commented 5 years ago

I've partially documented my experience here: https://github.com/mmontag/chip-player-js/#subproject-libxmp-lite