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
| | |-+  Problems Building UiSimulator on OS X
« previous next »
  • Print
Pages: [1]

Author Topic: Problems Building UiSimulator on OS X  (Read 2864 times)

Offline GenioDiabolico

  • Member
  • *
  • Posts: 2
Problems Building UiSimulator on OS X
« on: November 13, 2010, 08:35:41 AM »
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
Logged

Offline GenioDiabolico

  • Member
  • *
  • Posts: 2
Re: Problems Building UiSimulator on OS X
« Reply #1 on: November 15, 2010, 01:02:16 PM »
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.
Logged

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 8974
Re: Problems Building UiSimulator on OS X
« Reply #2 on: November 15, 2010, 01:05:03 PM »
If you're not an OSX expert, its probably easier to just build in a linux VM like most Windows users do.
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Starting Development and Compiling
| | |-+  Problems Building UiSimulator on OS X
 

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

Page created in 0.063 seconds with 15 queries.