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:

Rockbox Ports are now being developed for various digital audio players!

+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Starting Development and Compiling
| | |-+  Cygwin sim build library confusion
« previous next »
  • Print
Pages: [1]

Author Topic: Cygwin sim build library confusion  (Read 3121 times)

Offline pondlife

  • Developer
  • Member
  • *
  • Posts: 248
Cygwin sim build library confusion
« on: January 26, 2012, 05:17:24 AM »
It's been a long while since I did a build, but I thought I'd get myself set up again (after the git migration, which went fine). 

However, attempting a Cygwin build of the H300 sim fails to link..
Code: [Select]
LD rockboxui.exe
/usr/i686-pc-mingw32/sys-root/mingw/lib/libmsvcrt.a(dcvos00710.o):(.text+0x0): multiple definition of `_sqrt'
/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../libm.a(t-d001675.o):(.text+0x0): first defined here
collect2: ld returned 1 exit status
/home/Steve/rockbox/uisimulator/uisimulator.make:34: recipe for target /home/Steve/rockbox/buildsim/rockboxui.exe' failed

I've done all the obvious (make veryclean, re-installed Cygwin) but no joy... any suggestions (not involving a VM)?

pondlife
Logged

Offline dreamlayers

  • Developer
  • Member
  • *
  • Posts: 425
  • Boris Gjenero
    • My Blog
Re: Cygwin sim build library confusion
« Reply #1 on: January 27, 2012, 02:07:46 PM »
The obvious problem here is that it is trying to link with both the Microsoft C library at /usr/i686-pc-mingw32/sys-root/mingw/lib/libmsvcrt.a and Cygwin libm at /usr/lib/libm.a. I'm able to build successfully using i686-pc-mingw32-gcc 4.5.2 with: CROSS_COMPILE=i686-pc-mingw32- ../tools/configure
Logged

Offline pondlife

  • Developer
  • Member
  • *
  • Posts: 248
Re: Cygwin sim build library confusion
« Reply #2 on: January 31, 2012, 03:19:15 AM »
Thanks - I didn't have that compiler installed:

../tools/configure: line 3651: i686-pc-mingw32-cpp: command not found

This was fixed by re-running Cygwin setup to add the packages:
   mingw-gcc-core (I already had gcc-mingw-core!)
   mingw-binutils

I can then run your configure command with no errors, then make clean and make, but compiling fails with:

Code: [Select]
CC uisimulator/common/io.c
/home/Steve/rockbox/uisimulator/common/io.c:39:21: fatal error: windows.h: No such file or directory
compilation terminated.
/home/Steve/rockbox/uisimulator/uisimulator.make:38: recipe for target `/home/Steve/rockbox/buildsim/uisimulator/common/
io.o' failed
make: *** [/home/Steve/rockbox/buildsim/uisimulator/common/io.o] Error 1

The only windows.h I have is in \cygwin\usr\include\w32api, nothing down in \cygwin\usr\i686-pc-mingw32\sys-root\mingw\include.

Any idea what I'm doing wrong?

p.s. I don't think make reconf is taking the CROSS_COMPILE prefix into account, but that's one for the future.

pondlife
Logged

Offline dreamlayers

  • Developer
  • Member
  • *
  • Posts: 425
  • Boris Gjenero
    • My Blog
Re: Cygwin sim build library confusion
« Reply #3 on: January 31, 2012, 08:57:56 AM »
It seems you need mingw-runtime. For that compiler, there is also mingw-w32api and mingw-pthreads.

Yes, I can confirm that make reconf ignores CROSS_COMPILE.
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Starting Development and Compiling
| | |-+  Cygwin sim build library confusion
 

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

Page created in 0.064 seconds with 15 queries.