Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Thank You for your continued support and contributions!

+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Starting Development and Compiling
| | |-+  UIsimulator error on make install
« previous next »
  • Print
Pages: [1]

Author Topic: UIsimulator error on make install  (Read 3890 times)

Offline HornetMaX

  • Member
  • *
  • Posts: 27
UIsimulator error on make install
« on: April 23, 2011, 07:49:18 PM »
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: [Select]
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
Seems OK, but as soon as I do "make fullinstall" I get:
Code: [Select]
Installing a full setup in your '' dir
ERROR: No PREFIX given
make: *** [fullinstall] Error 255
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: [Select]
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
:o ???


« Last Edit: April 23, 2011, 08:01:58 PM by HornetMaX »
Logged

Offline HornetMaX

  • Member
  • *
  • Posts: 27
Re: UIsimulator error on make install
« Reply #1 on: April 25, 2011, 05:24:07 PM »
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: [Select]
/* on some platforms strcmp() seems to be a tricky define which
 * breaks if we write down strcmp's prototype */
Here are the diffs:
Code: [Select]
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);
Code: [Select]
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:
Code: [Select]
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:
Code: [Select]
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.


Logged

Offline HornetMaX

  • Member
  • *
  • Posts: 27
Re: UIsimulator error on make install
« Reply #2 on: May 09, 2011, 01:11:26 PM »
Up  ;D

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

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

MaX.
Logged

Offline bluebrother

  • Developer
  • Member
  • *
  • Posts: 3421
  • creature
Re: UIsimulator error on make install
« Reply #3 on: May 09, 2011, 01:36:52 PM »
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.
Logged
Rockbox Utility development binaries (updated infrequently) · How to ask questions the smart way · We do not estimate timeframes.

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 8974
Re: UIsimulator error on make install
« Reply #4 on: May 09, 2011, 02:55:31 PM »
In the mean time you could use a VM like Windows users do. 
Logged

Offline HornetMaX

  • Member
  • *
  • Posts: 27
Re: UIsimulator error on make install
« Reply #5 on: May 09, 2011, 04:19:03 PM »
Quote from: saratoga on May 09, 2011, 02:55:31 PM
In the mean time you could use a VM like Windows users do. 
Unless I'm wrong, there's no such a thing as Vmware player (free) for Mac OS.
The Mac thingy (fusion) is not free (30 days trial).

Quote from: bluebrother on May 09, 2011, 01:36:52 PM
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.
Thanks anyway. Don't worry too much, as in a few weeks I'll be back at home where I have a PC, so I'll go down the VMware path for sure.
I was just curious as the firmware builds fine and the error with the UIsim seemed minor at first glance (just use -fnested-functions) but turned out to be way too much for my limited knowledge of all this stuff.
A few references I've googled around, if it can help:
http://www.opensubscriber.com/message/libtool@gnu.org/6894760.html
http://www.mail-archive.com/libtool@gnu.org/msg09524.html

In case I really have some extra-spare time, I may take a look at virtualbox (http://www.virtualbox.org/).

MaX.
Logged

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 8974
Re: UIsimulator error on make install
« Reply #6 on: May 09, 2011, 04:38:34 PM »
Quote from: HornetMaX on May 09, 2011, 04:19:03 PM
Quote from: saratoga on May 09, 2011, 02:55:31 PM
In the mean time you could use a VM like Windows users do. 
Unless I'm wrong, there's no such a thing as Vmware player (free) for Mac OS.

http://www.virtualbox.org/

Use the virtualbox image linked on the wiki. 
Logged

Offline HornetMaX

  • Member
  • *
  • Posts: 27
Re: UIsimulator error on make install
« Reply #7 on: May 10, 2011, 12:24:03 PM »
Quote from: saratoga on May 09, 2011, 04:38:34 PM
Quote from: HornetMaX on May 09, 2011, 04:19:03 PM
Quote from: saratoga on May 09, 2011, 02:55:31 PM
In the mean time you could use a VM like Windows users do. 
Unless I'm wrong, there's no such a thing as Vmware player (free) for Mac OS.

http://www.virtualbox.org/

Use the virtualbox image linked on the wiki. 
Gosh, I skipped that line in the wiki.
Tried vitualbox with the provided image, everything compiles fine.
Now I have just to sort out a 'sgared dir" error and then I'm fine :)

MaX.
Logged

Offline hobby16

  • Member
  • *
  • Posts: 4
Re: UIsimulator error on make install
« Reply #8 on: May 25, 2011, 03:46:46 PM »
Hi all,
I also have a problem with uisimulator, nearly same as HornetMaX so I keep it in this topic.
My configs are MINGW with Win7 and I  can compile (after much hassle) a Sansa Clip simulator with
../tools/configure
make
make fullinstall

The file generated is sim/rockockui.exe and I have all the pseudo-firmware files in sim/simdisk/.rockbox
I can launch it with Windows, can see the Sansa Clip screen and can browse the list of test mp3 files I dropped in sim/simdisk

Now the problem : when I try to play a mp3 files or launch a plugin (eg Reversi), I get the error messages

failed to load /.rockbox/codecs/mpa.codec
lc_open(/.rockbox/codecs/mpa.codec): Le module spÚcifiÚ est introuvable.
failed to load /.rockbox/rocks/games/reversi.rock
lc_open(/.rockbox/rocks/games/reversi.rock): Le module spÚcifiÚ est introuvable

I don't undertand the problem since all the codecs or pluggins are generated in the right path sim/simdisk/.rockbox. It's as if the simulator doesn't get its root path right!
Anyone can help, me please ?
Logged

Offline bluebrother

  • Developer
  • Member
  • *
  • Posts: 3421
  • creature
Re: UIsimulator error on make install
« Reply #9 on: May 25, 2011, 05:01:30 PM »
It would be helpful to have the error messages in english.
Logged
Rockbox Utility development binaries (updated infrequently) · How to ask questions the smart way · We do not estimate timeframes.

Offline hobby16

  • Member
  • *
  • Posts: 4
Re: UIsimulator error on make install
« Reply #10 on: May 25, 2011, 05:34:53 PM »
I don't know how to generate a target in English but the message is something like

failed to load /.rockbox/codecs/mpa.codec
lc_open(/.rockbox/codecs/mpa.codec): can't find module mpa.codec
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Starting Development and Compiling
| | |-+  UIsimulator error on make install
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.085 seconds with 14 queries.