Doubts with ZMusic installation
Moderator: GZDoom Developers
Forum rules
Contrary to popular belief, we are not all-knowing-all-seeing magical beings!
If you want help you're going to have to provide lots of info. Like what is your hardware, what is your operating system, what version of GZDoom/LZDoom/whatever you're using, what mods you're loading, how you're loading it, what you've already tried for fixing the problem, and anything else that is even remotely relevant to the problem.
We can't magically figure out what it is if you're going to be vague, and if we feel like you're just wasting our time with guessing games we will act like that's what you're really doing and won't help you.
Contrary to popular belief, we are not all-knowing-all-seeing magical beings!
If you want help you're going to have to provide lots of info. Like what is your hardware, what is your operating system, what version of GZDoom/LZDoom/whatever you're using, what mods you're loading, how you're loading it, what you've already tried for fixing the problem, and anything else that is even remotely relevant to the problem.
We can't magically figure out what it is if you're going to be vague, and if we feel like you're just wasting our time with guessing games we will act like that's what you're really doing and won't help you.
Doubts with ZMusic installation
Built Zmusic for Linux by following steps in the Github page.
But then I had several doubts regarding precisely the post-building stuff.
First, by doing "make install" it only copies libzmusic.so*, and not the actual synthesizers! (Timidity, Fluidsynth, OPL, GME, etc).
So how does ZMusic actually read the syntheziser stuff?
Say, if I built ZMusic in $HOME/zmusic_build, then do I need to keep this directory permanently here in order for supposedly installed ZMusic to work?
Second, in order to build GZDoom, one needs to specify both ZMusic libzmusic.so library, *and* the header file. The thing is, it's most likely a not so obvious/intuitive step; the header file, located in source code directory, is not copied to ZMusic build directory, nor anywhere else with "make install" neither.
Shouldn't Github page mention something like "copy ZMusic header file from source code directory to build GZDoom"? Or update the wiki page, of course...
Thanks beforehand.
But then I had several doubts regarding precisely the post-building stuff.
First, by doing "make install" it only copies libzmusic.so*, and not the actual synthesizers! (Timidity, Fluidsynth, OPL, GME, etc).
So how does ZMusic actually read the syntheziser stuff?
Say, if I built ZMusic in $HOME/zmusic_build, then do I need to keep this directory permanently here in order for supposedly installed ZMusic to work?
Second, in order to build GZDoom, one needs to specify both ZMusic libzmusic.so library, *and* the header file. The thing is, it's most likely a not so obvious/intuitive step; the header file, located in source code directory, is not copied to ZMusic build directory, nor anywhere else with "make install" neither.
Shouldn't Github page mention something like "copy ZMusic header file from source code directory to build GZDoom"? Or update the wiki page, of course...
Thanks beforehand.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49225
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Doubts with ZMusic installation
ZMusic includes all the synths, there are no external other files. Aside from libADL they are all heavily modified anyway. None of the original sources was really well equipped to interact properly with an outside MIDI sequencer so in their native form they are pretty much unusable.
Re: Doubts with ZMusic installation
Do you mean that libzmusic.so.1.1.0 kind of "self-contains" all the synthesizers actually?
Then what are all the .a files inside their respective directory in the "thirdparty" directory?
What's the purpose of libzmusiclite.so?
What about the second mentioned inquiry, about ZMusic header thing not being intuitive?
Thanks.
Then what are all the .a files inside their respective directory in the "thirdparty" directory?
What's the purpose of libzmusiclite.so?
What about the second mentioned inquiry, about ZMusic header thing not being intuitive?
Thanks.
- Chris
- Posts: 2969
- Joined: Thu Jul 17, 2003 12:07 am
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
Re: Doubts with ZMusic installation
They're static libraries linked into the shared library.sacarias wrote:Then what are all the .a files inside their respective directory in the "thirdparty" directory?
It excludes some of the synths to allow it to be used with a more permissive license.sacarias wrote:What's the purpose of libzmusiclite.so?
You can install ZMusic, and GZDoom should find it normally. If you don't want it hanging out in /usr/local, you can set a different install prefix by passing -DCMAKE_INSTALL_PREFIX=... to cmake for both ZMusic and GZDoom, and GZDoom will still find it regardless of where you put it. That's what I do:sacarias wrote:What about the second mentioned inquiry, about ZMusic header thing not being intuitive?
Code: Select all
cd ~/projects/zmusic/build
cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/.local -DCMAKE_BUILD_TYPE=Release
make
make install # installs in ~/.local, no need for root/sudo
[...]
cd ~/projects/gzdoom/build
cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/.local -DCMAKE_BUILD_TYPE=Release
make
Re: Doubts with ZMusic installation
Then probably mr Graf misunderstood what I tried to post, or I was not able to explain myself (hope the later...)
So ZMusic is composed of both libzmusic.so.1.1.0 library (or libzmusiclite), *and* the .a static libraries which are the synthesizers.
What I tried to mention in OP is, I had already tried "make install"; perhaps I forgot to mention I also tried -DCMAKE_INSTALL_PREFIX cmake flag. Anyway, for my case, "make install" only "installed" (copied) libzmusic.so and its symlinks, *not* the .a libraries at all, much less the headers!
This was my problem since the beginning.
I even tried making a test: deleting the entire "thirdparty" directory, which holds all .a libraries. GZDoom still worked normally!?
Didn't make sense...
Could you perhaps still help a bit? Maybe I did something wrong?
Thanks again.
So ZMusic is composed of both libzmusic.so.1.1.0 library (or libzmusiclite), *and* the .a static libraries which are the synthesizers.
What I tried to mention in OP is, I had already tried "make install"; perhaps I forgot to mention I also tried -DCMAKE_INSTALL_PREFIX cmake flag. Anyway, for my case, "make install" only "installed" (copied) libzmusic.so and its symlinks, *not* the .a libraries at all, much less the headers!
This was my problem since the beginning.
I even tried making a test: deleting the entire "thirdparty" directory, which holds all .a libraries. GZDoom still worked normally!?
Didn't make sense...
Could you perhaps still help a bit? Maybe I did something wrong?
Thanks again.
- Chris
- Posts: 2969
- Joined: Thu Jul 17, 2003 12:07 am
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
Re: Doubts with ZMusic installation
Yes, because the .a files are static libraries, which are included in the final shared library. It's like wondering why installing gzdoom only installs/copies the gzdoom executable and not the am_map.cpp.o, bbannouncer.cpp.o, etc files. You can think of a static library as an archive of .o object files, and when you link an executable or shared library with a static library, the contained object files are made part of the link and become part of the resulting executable or shared library.sacarias wrote:Then probably mr Graf misunderstood what I tried to post, or I was not able to explain myself (hope the later...)
So ZMusic is composed of both libzmusic.so.1.1.0 library (or libzmusiclite), *and* the .a static libraries which are the synthesizers.
What I tried to mention in OP is, I had already tried "make install"; perhaps I forgot to mention I also tried -DCMAKE_INSTALL_PREFIX cmake flag. Anyway, for my case, "make install" only "installed" (copied) libzmusic.so and its symlinks, *not* the .a libraries at all, much less the headers!
An app using ZMusic, like GZDoom, also shouldn't be using all the headers ZMusic has; only the public headers that define the public types and functions are needed, as they're the only things guaranteed to be stable as the library updates, which are the ones that get installed.
Re: Doubts with ZMusic installation
Well, I kind of knew about the .cpp.o files, but because I thought they were "part of the source code"; needed only at compilation/build time, and not needed for GZDoom to just run.
So the .a static libraries are just the same case then? So libzmusic.so.1.1.0 library certainly kind of "self-contains" all the synthesizers?
Regarding headers, well, if using current release at Github page, there's actually just *one* .h header file (zmusic.h) inside "include" directory, IIRC.
No matter what directory I used for -DCMAKE_INSTALL_PREFIX cmake flag; the header never got copied...
Also, wouldn't it be good idea to at least mention "make install" in the indications at the ZMusic Github page? There are many novice people like me...
Thanks again.
So the .a static libraries are just the same case then? So libzmusic.so.1.1.0 library certainly kind of "self-contains" all the synthesizers?
Regarding headers, well, if using current release at Github page, there's actually just *one* .h header file (zmusic.h) inside "include" directory, IIRC.
No matter what directory I used for -DCMAKE_INSTALL_PREFIX cmake flag; the header never got copied...
Also, wouldn't it be good idea to at least mention "make install" in the indications at the ZMusic Github page? There are many novice people like me...
Thanks again.
Re: Doubts with ZMusic installation
Ok, I think it was my bad.
Can no longer remember what I did that time, so tried testing again the building process, installing only the minimal required (no -dev packages). In the end, you were right: "make install" really copies the libraries and the header file, and not copying the .a static libraries.
Though while running cmake I saw some output lines that got my attention:
So I reviewed this
https://zdoom.org/wiki/Compile_GZDoom_o ... pendencies
the parts of "statically compiled" and "possibly static".
Did a forum search and found this
viewtopic.php?f=4&t=54853
I remember once when compiling GZDoom there were messages like "Using internal ** library".
So, final doubts, if someone could still help a bit, are
--Is it better to use "internal statically compiled" libraries whenever possible over distro's own shipped ones?
(The thing is that some needed GZDoom dependencies pull zlib-dev package anyway...)
--So libzmusic.so.1.1.0 library certainly kind of "self-contains" all the synthesizers?
Thanks.
Can no longer remember what I did that time, so tried testing again the building process, installing only the minimal required (no -dev packages). In the end, you were right: "make install" really copies the libraries and the header file, and not copying the .a static libraries.
Though while running cmake I saw some output lines that got my attention:
Code: Select all
Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
** ZLib library located, compressed file formats will be supported
Could NOT find ALSA (missing: ALSA_LIBRARY ALSA_INCLUDE_DIR)
https://zdoom.org/wiki/Compile_GZDoom_o ... pendencies
the parts of "statically compiled" and "possibly static".
Did a forum search and found this
viewtopic.php?f=4&t=54853
I remember once when compiling GZDoom there were messages like "Using internal ** library".
So, final doubts, if someone could still help a bit, are
--Is it better to use "internal statically compiled" libraries whenever possible over distro's own shipped ones?
(The thing is that some needed GZDoom dependencies pull zlib-dev package anyway...)
--So libzmusic.so.1.1.0 library certainly kind of "self-contains" all the synthesizers?
Thanks.
Re: Doubts with ZMusic installation
Solved on Discord.
Was some days ago, but forgot to post here.
Was some days ago, but forgot to post here.