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:

Welcome to the Rockbox Technical Forums!

+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Starting Development and Compiling
| | |-+  Cygwin - unable to compile simulators
« previous next »
  • Print
Pages: [1]

Author Topic: Cygwin - unable to compile simulators  (Read 5769 times)

Offline pondlife

  • Developer
  • Member
  • *
  • Posts: 248
Cygwin - unable to compile simulators
« on: August 25, 2010, 06:26:25 AM »
I've not built a sim for a while, but whilst I can build targets ok, an attempt to build an H300 sim gives me:

Code: [Select]
...
CC apps/plugins/plugin_crt0.c
LD chessclock.rock
/home/Steve/rockbox/buildsim/apps/plugins/plugin_crt0.o: In function `atexit':
/home/Steve/rockbox/apps/plugins/plugin_crt0.c:41: multiple definition of `_atexit'
/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-mingw32/lib/dllcrt2.o:dllcrt1.c:(.text+0x140): first defined here
collect2: ld returned 1 exit status
make: *** [/home/Steve/rockbox/buildsim/apps/plugins/chessclock.rock] Error 1

I've re-run rockboxdev.sh, done a make veryclean (and reconfigured), but no joy. Anyone else see this, or have a clue? (I see Rasher's sim was built, so assume it's my problem!)

pondlife
Logged

Offline dreamlayers

  • Developer
  • Member
  • *
  • Posts: 425
  • Boris Gjenero
    • My Blog
Re: Cygwin - unable to compile simulators
« Reply #1 on: August 25, 2010, 03:00:57 PM »
I tried to reproduce this by compiling a 32GB 5G iPod simulator in Cygwin, and I ran into a different error:
Code: [Select]
CC apps/alarm_menu.c
In file included from /usr/include/string.h:11,
                 from /home/Boris/Rockbox/rockbox/apps/alarm_menu.c:28:
/usr/include/sys/reent.h:185: error: parse error before "_READ_WRITE_RETURN_TYPE"
/usr/include/sys/reent.h:187: error: parse error before '(' token
That problem is fixed if I move the "#include <string.h>" to just below <stdbool.h>, above the Rockbox specific includes.  A similar sort of thing happens in apps/language.c:
Code: [Select]
CC apps/language.c:
In file included from /usr/include/string.h:11,
                 from /home/Boris/Rockbox/rockbox/apps/language.c:27:
/usr/include/sys/reent.h:185: error: parse error before '(' token
/usr/include/sys/reent.h:186: error: field `_EXFNPTR' declared as a function
There are a lot of errors after that, but I think the first error is the one that matters.  Moving "#include "string.h"" to be the first include fixes that.  Is Rockbox even supposed to be using system libc here though?  Then again, another error:
Code: [Select]
CC apps/main.c
In file included from /usr/include/time.h:11,
                 from /home/Boris/Rockbox/rockbox/firmware/export/rtc.h:27,
                 from /home/Boris/Rockbox/rockbox/apps/main.c:28:
/usr/include/sys/reent.h:185: error: parse error before "_READ_WRITE_RETURN_TYPE

Again there seems to be some conflict between system includes and Rockbox includes.  I don't feel like continuing what I've been doing to try to get through the compile, and I instead installed the gcc4 Cygwin package, resulting in installation of gcc 4.3.4-3.  I reverted the changes, made above, reconfigured, ran "make veryclean" and I again ran into similar errors:
Code: [Select]
CC apps/alarm_menu.c
In file included from /usr/include/string.h:11,
                 from /home/Boris/Rockbox/rockbox/apps/alarm_menu.c:28:
/usr/include/sys/reent.h:185: error: expected specifier-qualifier-list before ‘_READ_WRITE_RETURN_TYPE’
/usr/include/sys/reent.h:597: error: expected ‘)’ before ‘(’ token
Logged

Offline Lear

  • Developer
  • Member
  • *
  • Posts: 533
Re: Cygwin - unable to compile simulators
« Reply #2 on: August 25, 2010, 03:23:55 PM »
Quote from: pondlife on August 25, 2010, 06:26:25 AM
I've re-run rockboxdev.sh, done a make veryclean (and reconfigured), but no joy. Anyone else see this, or have a clue? (I see Rasher's sim was built, so assume it's my problem!)

I see it too. Maybe Rasher crosscompiles them on Linux, and avoids the problem that way? Anyway, looks like a link error introduced in r27873. When making a -shared library on Cygwin, it includes a module that defines atexit too. Probably should prefix atexit in the sim...
Logged

Offline funman

  • Developer
  • Member
  • *
  • Posts: 645
Re: Cygwin - unable to compile simulators
« Reply #3 on: August 25, 2010, 03:52:56 PM »
given that exit() and atexit() are standard funcs i think they should be renamed too.
Logged
a wise man said: "a wise man said"

Offline mc2739

  • Developer
  • Member
  • *
  • Posts: 262
Re: Cygwin - unable to compile simulators
« Reply #4 on: August 25, 2010, 06:02:19 PM »
Quote from: Lear on August 25, 2010, 03:23:55 PM
Maybe Rasher crosscompiles them on Linux, and avoids the problem that way?

If you look closely at the simulators currently on Rasher's site, you will notice that they are incomplete.  The first indication is that there is no rockbox-info.txt.  Also, there are no .rock files at all.
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Starting Development and Compiling
| | |-+  Cygwin - unable to compile simulators
 

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

Page created in 0.091 seconds with 15 queries.