OK, I managed to figure out a few problems compiling the UIsim on Mc OS X.
1) In apps/plugin.h and apps/codecs/lib/codeclib.h, some prototypes need an "#undef" before
the prototype declaration. I've found this by chance, thanks to the following comment in codeclib.h:
/* on some platforms strcmp() seems to be a tricky define which
* breaks if we write down strcmp's prototype */
Here are the diffs:
Index: apps/plugin.h
===================================================================
--- apps/plugin.h (revision 29783)
+++ apps/plugin.h (working copy)
@@ -37,6 +37,9 @@
#include "string-extra.h"
#include "gcc_extensions.h"
+/* on some platforms strncpy() seems to be a tricky define which
+ * breaks if we write down strncpy's prototype */
+#undef strncpy
char* strncpy(char *, const char *, size_t);
void* plugin_get_buffer(size_t *buffer_size);
Index: apps/codecs/lib/codeclib.h
===================================================================
--- apps/codecs/lib/codeclib.h (revision 29783)
+++ apps/codecs/lib/codeclib.h (working copy)
@@ -53,6 +53,13 @@
void* codec_realloc(void* ptr, size_t size);
void codec_free(void* ptr);
+/* on some platforms the identifiers listed below seem to be tricky
+ * define which breaks if we write down the prototype */
+#undef memcpy
+#undef memset
+#undef memmove
+#undef strcpy
+#undef strcat
void *memcpy(void *dest, const void *src, size_t n);
void *memset(void *s, int c, size_t n);
int memcmp(const void *s1, const void *s2, size_t n);
With the new #undefs, bookmark.c compiles fine.
2) In makefile, "-z,defs" not recognized:
export GLOBAL_LDOPTS= -Wl,-z,defs
I had to remove the "-z,defs". Then linker seems to work fine.
3) Compile error (in apps/codecs/mp3_enc.c): "nested functions are disabled, use -fnested-functions to re-enable"
Added "-fnested-functions" to GCCOPTS in Makefile.
But now I'm stuck with a new error:
LD vorbis.codec
ld: -allow_stack_execute option can only be used when linking a main executable
Notice that this link step was reporting no error prior to the addition of the -fnested-functions.
I have grepped for "allow_stack_execute" in all source code but I haven't found it, hence I guess that the option is somehow automagically added as a consequence of the -fnested-functions.
Anyone has an idea ?
MaX.