Rockbox Development > Starting Development and Compiling

UIsimulator error on make install

(1/3) > >>

HornetMaX:
Hi all,
I'm trying to compile RB and its UIsim on a Mac (OS X 10.6.7). I think I've followed the instructions pretty well, since:

- I can build the firmware (for a clip+), with "make" + "make fullzip". I haven't tested the firmware I've built but I have no reason to doubt about it.

- I can build the UIsimulator with a "make" (in a separate dir with respect to the one I have used for the firmware).
The make process ends with:

--- Code: ---CC apps/plugins/lua/rocklua.c
CC apps/plugins/lua/luadir.c
GEN actions.lua
GEN buttons.lua
GEN rocklib_aux.c
CC rocklib_aux.c
LD lua.rock
Creating rockbox-info.txt
--- End code ---
Seems OK, but as soon as I do "make fullinstall" I get:

--- Code: ---Installing a full setup in your '' dir
ERROR: No PREFIX given
make: *** [fullinstall] Error 255

--- End code ---
Same for a "make install". I don't see the expected "rockboxui" executable neither (not sure if it is created by the "make install/fullinstall").

Any idea what's wrong ?

MaX.

EDIT:
Even stranger ... I tried a make clean (in UIsim dir) and a new "../tools/configure" followed by a new "make" and now I get a compile error:

--- Code: ---Generating dependencies
CC firmware/common/config.c
PP features.txt
CC lang_core.c
CC apps/action.c
BMP2RB osx_dummy.bmp
CC BUILDSIM/apps/bitmaps/mono/osx_dummy.c
BMP2RB rockboxlogo.128x42x1.bmp
CC BUILDSIM/apps/bitmaps/native/rockboxlogo.128x42x1.c
BMP2RB usblogo.104x27x1.bmp
CC BUILDSIM/apps/bitmaps/native/usblogo.104x27x1.c
BMP2RB default_icons.6x8x1.bmp
CC BUILDSIM/apps/bitmaps/native/default_icons.6x8x1.c
CC apps/alarm_menu.c
CC apps/abrepeat.c
CONVBDF fonts/08-Schumacher-Clean.bdf
CC apps/bookmark.c
In file included from /Users/MaX/Desktop/BUILDROCKBOX/v3_8_1/apps/bookmark.c:42:
/Users/MaX/Desktop/BUILDROCKBOX/v3_8_1/apps/plugin.h:40: error: expected declaration specifiers or ‘...’ before numeric constant
/Users/MaX/Desktop/BUILDROCKBOX/v3_8_1/apps/plugin.h:40: error: expected ‘)’ before ‘!=’ token
/Users/MaX/Desktop/BUILDROCKBOX/v3_8_1/apps/plugin.h:40: error: expected ‘)’ before ‘?’ token
make: *** [/Users/MaX/Desktop/BUILDROCKBOX/v3_8_1/BUILDSIM/apps/bookmark.o] Error 1

--- End code ---
:o ???


HornetMaX:
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:

--- Code: ---/* on some platforms strcmp() seems to be a tricky define which
 * breaks if we write down strcmp's prototype */
--- End code ---
Here are the diffs:

--- Code: ---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);

--- End code ---

--- Code: ---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);

--- End code ---
With the new #undefs, bookmark.c compiles fine.

2) In makefile, "-z,defs" not recognized:

--- Code: ---export GLOBAL_LDOPTS= -Wl,-z,defs
--- End code ---
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:

--- Code: ---LD vorbis.codec
ld: -allow_stack_execute option can only be used when linking a main executable

--- End code ---
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.


HornetMaX:
Up  ;D

Anybody knowing this -fnested-funtions and -allow_stack_execution stuff ?

Firmware builds fine, but I can't build the UIsim  ???

MaX.

bluebrother:
I wanted to look into this since it came up but haven't found the time to do so (and I'm unlikely to find the time the next couple of days). Most Rockbox developers are working on Linux so I'm not surprised at all the sim doesn't build on OS X.

saratoga:
In the mean time you could use a VM like Windows users do. 

Navigation

[0] Message Index

[#] Next page

Go to full version