Musepack Forums

Musepack Forums (https://forum.musepack.net/index.php)
-   MPC for UNIX (https://forum.musepack.net/forumdisplay.php?f=9)
-   -   Problem Compiling BMP Plugin on Ubuntu (https://forum.musepack.net/showthread.php?t=178)

Exekutor 27 April 2005 06:21 pm

Problem Compiling BMP Plugin on Ubuntu
 
I've compiled and installed libmusepack-1.1.1 without any errors.

The configuration process for bmp-musepack-1.1.2 was ok, but when compilig, gives the error:

Code:

libmpc.cpp:37: error: parse error before `*' token
libmpc.cpp:61: error: parse error before `*' token
libmpc.cpp:70: error: type specifier omitted for parameter `BOOL'
libmpc.cpp:70: error: parse error before `)' token
libmpc.cpp: In function `void setup_reader(...)':
libmpc.cpp:72: error: `data' undeclared (first use this function)
libmpc.cpp:72: error: (Each undeclared identifier is reported only once for
  each function it appears in.)
libmpc.cpp:72: error: `input' undeclared (first use this function)
libmpc.cpp:73: error: `seekable' undeclared (first use this function)
libmpc.cpp:78: error: `reader' undeclared (first use this function)
libmpc.cpp:80: error: `seek_impl' undeclared (first use this function)
libmpc.cpp:83: error: `canseek_impl' undeclared (first use this function)
make[2]: *** [libmpc.lo] Error 1
make[2]: Leaving directory `/home/cristobal/musepack/bmp-musepack-1.1.2/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/cristobal/musepack/bmp-musepack-1.1.2/src'
make: *** [all-recursive] Error 1

Maybe the version of the pluguin (i'm using the 1.1.2) requires the same version of libmusepack (i'm using the 1.1.1), but on the download page those are available only.

Or maybe a dependency problem?.

Lefungus 27 April 2005 06:43 pm

Use the search button, someone already asked about that a few months ago.

Shy 27 April 2005 07:11 pm

Due to questions like this being repeated, an entry is added to the General FAQ on the site.

piman 30 April 2005 02:20 am

This is not a repeat problem, as far as I can tell. Certainly the FAQ entry you mentioned does not tell people how to fix it! It is due to a change in libmusepack 1.1.1. The 'BOOL' type was changed to 'mpc_bool_t' between 1.1 and 1.1.1. This change was not documented, was API-incompatible, and happened in a minor revision. In short, it was stupid.

See, for example, https://www.sacredchao.net/quodlibet/ticket/55, where I had to fix the same bug in PyMusepack.

Please, when you change your library, document it and bump the SONAME and version number appropriately. If you don't, no one will use it, and I'll have to fork it to have it in Debian properly.

Lefungus 30 April 2005 01:48 pm

You are talking about two things.

- Exekutor has exactly the issue described in the FAQ, meaning he forgot to specify where to install libmusepack, and so bmp-musepack can't compile properly. I don't know yet how to make bmp configure script more robust, so meanwhile, the solution is to use "configure --prefix=..." when the default path isn't appropriate.
Note that he only installed libmusepack-1.1.1, the latest version.

- The API change wasn't properly documented, and the version number should have been bumped to 1.2. Ok, this is entirely my fault, I won't repeat this error twice. Jumping at my throat with an angry report won't make it better though. For the next release, be sure I'll put up a "release candidate" before, for you or any people to check out and iron out bugs like these.

piman 01 May 2005 02:47 am

Quote:

Originally Posted by Lefungus
- Exekutor has exactly the issue described in the FAQ, meaning he forgot to specify where to install libmusepack, and so bmp-musepack can't compile properly. I don't know yet how to make bmp configure script more robust, so meanwhile, the solution is to use "configure --prefix=..." when the default path isn't appropriate.
Note that he only installed libmusepack-1.1.1, the latest version.

Sure. He installed libmusepack-1.1.1 -- with mpc_bool_t -- and tried to compile bmp-musepack 1.1.2 -- with BOOL, as the error clearly shows. This is related to the type change, nothing to do with the prefix. Anyone who downloads bmp-musepack and libmusepack from the canonical download links on the musepack.net sidebar is *not* going to be able to compile bmp-musepack, and that FAQ entry is not going to tell them how.

Quote:

Originally Posted by Lefungus
- The API change wasn't properly documented, and the version number should have been bumped to 1.2. Ok, this is entirely my fault, I won't repeat this error twice. Jumping at my throat with an angry report won't make it better though. For the next release, be sure I'll put up a "release candidate" before, for you or any people to check out and iron out bugs like these.

My report was not angry, but it was factual, and the problem is incredibly frustrating. Not bumping the version is stupid. We all do stupid things periodically, it doesn't make them less stupid. And if you don't bump the version, I do have to maintain a fork for Debian, where policy demands (rightly) I bump versions.

Lefungus 01 May 2005 11:16 am

Blah, I was wrong for bmp too, for some reason, it was compiling fine on my comp while it shouldn't.
I'm currently fixing the whole mess, sorry for the occasionated trouble.

crazee_canuck 05 May 2005 11:36 pm

Quote:

Originally Posted by piman
This is not a repeat problem, as far as I can tell. Certainly the FAQ entry you mentioned does not tell people how to fix it! It is due to a change in libmusepack 1.1.1. The 'BOOL' type was changed to 'mpc_bool_t' between 1.1 and 1.1.1. This change was not documented, was API-incompatible, and happened in a minor revision. In short, it was stupid.

See, for example, https://www.sacredchao.net/quodlibet/ticket/55, where I had to fix the same bug in PyMusepack.

Please, when you change your library, document it and bump the SONAME and version number appropriately. If you don't, no one will use it, and I'll have to fork it to have it in Debian properly.

Thank you, because of your post I was able to compile bmp-musepack. :)


To the original poster, if you haven't fixed it yet, the following patch let you compile bmp-musepack:


Code:

--- bmp-musepack-1.1.2.orig/src/libmpc.cpp
+++ bmp-musepack-1.1.2/src/libmpc.cpp
@@ -33,7 +33,7 @@
    return vfs_fread(ptr, 1, size, d->file);
 }

-BOOL
+mpc_bool_t
 seek_impl(void *data, int offset)
 {
    reader_data *d = (reader_data *) data;
@@ -57,7 +57,7 @@
    return d->size;
 }

-BOOL
+mpc_bool_t
 canseek_impl(void *data)
 {
    reader_data *d = (reader_data *) data;
@@ -67,7 +67,7 @@

 void
 setup_reader(mpc_reader * reader, reader_data * data, VFSFile * input,
-                BOOL seekable)
+                mpc_bool_t seekable)
 {
    data->file = input;
    data->seekable = seekable;

Such a simple fix, and I've been playing with it for the last hour thinking it was something screwed with my libraries....*sigh*

BTW:

Quote:

My report was not angry, but it was factual, and the problem is incredibly frustrating. Not bumping the version is stupid. We all do stupid things periodically, it doesn't make them less stupid. And if you don't bump the version, I do have to maintain a fork for Debian, where policy demands (rightly) I bump versions.
I don't think that is an angry report at all. For a non-coder such as myself, I needed a kick in the rear to know how to fix it...and piman helped me (and hopefully the OP) fix it.

Cheers.

Lefungus 06 May 2005 01:22 pm

Yes, the fix is actually quite simple, when you're aware of it :)
I'll post new versions for the lib, and xmms/bmp plugins today or tomorrow now.


All times are GMT. The time now is 06:52 pm.

Powered by vBulletin® Version 3.8.11 Beta 2
Copyright ©2000 - 2020, vBulletin Solutions Inc.