Rockbox Development > Starting Development and Compiling
Problems Building UiSimulator on OS X
(1/1)
GenioDiabolico:
I just tried Rockbox for the first time yesterday on my Sansa Clip+. From exploring the forums, I'm interested in trying it with some of the bookmark patches currently being discussed here http://www.rockbox.org/tracker/task/11748
I downloaded source, got the dev environment set up for ARM. I can successfully do a full build for the Clip+ firmware. The problem is trying to do UiSimulator. I downloaded SDL code and built it from source and installed. OK there. However when I build simulator Clip+ (62 with S) I get this:
In file included from /Users/dave/Downloads/RockboxDev/rockbox/apps/bookmark.c:42:
/Users/dave/Downloads/RockboxDev/rockbox/apps/plugin.h:44: error: expected declaration specifiers or ‘...’ before numeric constant
/Users/dave/Downloads/RockboxDev/rockbox/apps/plugin.h:44: error: expected ‘)’ before ‘!=’ token
/Users/dave/Downloads/RockboxDev/rockbox/apps/plugin.h:44: error: expected ‘)’ before ‘?’ token
make: *** [/Users/dave/Downloads/RockboxDev/rockbox/buildui/apps/bookmark.o] Error 1
I can see in the headers there is some simulator specific comment about PLUGIN and setting NO_REDEFINES_PLEASE shortly before that. I'm also using built in gcc rather than the earm versions. The source says:
/* instruct simulator code to not redefine any symbols when compiling plugins.
(the PLUGIN macro is defined in apps/plugins/Makefile) */
#ifdef PLUGIN
#define NO_REDEFINES_PLEASE
#endif
but I don't see apps/plugins/Makefile or understand where it comes from. The actual line it is erroring on is
char* strncpy(char *, const char *, size_t);
By commenting out that, I can build past that. I get into similar errors in codeclib.h with the mem and str function declarations. I comment those out, and it builds all the way to the end when it errors at link with:
LD rockboxui
ld: unknown option: -z
collect2: ld returned 1 exit status
make: *** [/Users/dave/Downloads/RockboxDev/rockbox/buildui/rockboxui] Error 1
Does anyone have any ideas what is happening here? XCode is installed on this box . Do I need to munge paths to avoid conflicting with /usr/bin/ld or some crazy thing?
My environment:
OS X 10.6.5
gcc version 4.2.1 (Apple Inc. build 5664)
ld version: llvm version 2.7svn, Apple Build #2326-10SDL 1.2.4
GenioDiabolico:
A little more background. I did some research on this error, and found multiple OS projects that had build problems on OS X after the upgrade to Snow Leopard. I tried reverting my gcc from 4.2 to 4.0. That would change the text of error message emitted but the build would still fail on the same line with the strncpy declaration.
I saw references to other projects that could solve the build errors by changing the order of #include statements. I tried a lot of that, no dice. I don't really understand this error or what gcc finds objectionable, so had I had success it would have been dumb luck. I've pretty much hit my limit on this until/unless someone has some suggestions for solving it. I've shaved more yak than I wanted to without anything to show for it.
saratoga:
If you're not an OSX expert, its probably easier to just build in a linux VM like most Windows users do.
Navigation
[0] Message Index
Go to full version