Author Topic: Problems building fpu.h?  (Read 2379 times)

Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3499
  • Developer
    • View Profile
    • PaulsCode.Com
Problems building fpu.h?
« on: September 20, 2012, 10:45:56 PM »
Is anyone having problems building jni/core/src/r4300/fpu.h?  I tried setting up the project on my netbook to do some work (since my main development PC is still in storage), but I get the following compiler error:

Code: [Select]
Compile arm    : core <= cop1_d.c
In file included from jni/core/src/r4300/cop1_d.c:30:0:
jni/core/src/r4300/fpu.h: In function 'set_rounding':
jni/core/src/r4300/fpu.h:51:16: error: 'FE_TONEAREST' undeclared (first use in this function)
jni/core/src/r4300/fpu.h:51:16: note: each undeclared identifier is reported only once for each function it appears in
jni/core/src/r4300/fpu.h:54:16: error: 'FE_TOWARDZERO' undeclared (first use in this function)
jni/core/src/r4300/fpu.h:57:16: error: 'FE_UPWARD' undeclared (first use in this function)
jni/core/src/r4300/fpu.h:60:16: error: 'FE_DOWNWARD' undeclared (first use in this function)
make: *** [obj/local/armeabi/objs/core/src/r4300/cop1_d.o] Error 1

Since I know those FE_* are definitely defined in fenv.h (checked Android source to be sure), I'm confused what could be causing this error.  I'll keep digging, but just wanted to see how prevalent this problem is.
Device: Samsung Galaxy Nexus i515
CPU: TI OMAP4460, 1.2 GHz (dual core, ARM Cortex-A9)
GPU: PowerVR SGX540, 307 MHz
RAM: 1 GB
Resolution: 720 x 1280
Rom: omni-4.4.4-20141014-toro-FML KitKat 4.4.4, rooted

Device: Eee PC 1015PEM
CPU: Intel Atom N550, 1.5 GHz (dual core, x86)
GPU: Intel GMA 3150, 200 MHz (dual core)
RAM: 2GB
Resolution: 1024 x 600
Rom: android-x86-4.3-20130725 Jelly Bean 4.3, rooted

Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3499
  • Developer
    • View Profile
    • PaulsCode.Com
Re: Problems building fpu.h?
« Reply #1 on: September 21, 2012, 11:10:17 AM »
I've determined that the problem only happens for the latest commit (after the massive folder reorganization that simplified code into a single project now that the RAM Full of Zeros bug is fixed).  The commit right before it builds fine.  Since the code for fpu.h hasn't changed at all, the problem must be in a setting in the build environment or something.

I've also determined that I get the same error whether I build from the command line or from Eclipse.

Could I get some folks who have built the project before, to try building the latest commit, and let me know if you get this same compiler error?  Thanks in advance!
Device: Samsung Galaxy Nexus i515
CPU: TI OMAP4460, 1.2 GHz (dual core, ARM Cortex-A9)
GPU: PowerVR SGX540, 307 MHz
RAM: 1 GB
Resolution: 720 x 1280
Rom: omni-4.4.4-20141014-toro-FML KitKat 4.4.4, rooted

Device: Eee PC 1015PEM
CPU: Intel Atom N550, 1.5 GHz (dual core, x86)
GPU: Intel GMA 3150, 200 MHz (dual core)
RAM: 2GB
Resolution: 1024 x 600
Rom: android-x86-4.3-20130725 Jelly Bean 4.3, rooted

Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3499
  • Developer
    • View Profile
    • PaulsCode.Com
Re: Problems building fpu.h?
« Reply #2 on: September 24, 2012, 01:01:36 PM »
cry0 solved this in commit ac71f08.

Turns out that for some reason, gcc 4.6 doesnt include the usr/include directory.  Adding the following line to Android.mk for the core, fixes the problem.

Code: [Select]
LOCAL_C_INCLUDES += $(SYSROOT)/usr/include/
Device: Samsung Galaxy Nexus i515
CPU: TI OMAP4460, 1.2 GHz (dual core, ARM Cortex-A9)
GPU: PowerVR SGX540, 307 MHz
RAM: 1 GB
Resolution: 720 x 1280
Rom: omni-4.4.4-20141014-toro-FML KitKat 4.4.4, rooted

Device: Eee PC 1015PEM
CPU: Intel Atom N550, 1.5 GHz (dual core, x86)
GPU: Intel GMA 3150, 200 MHz (dual core)
RAM: 2GB
Resolution: 1024 x 600
Rom: android-x86-4.3-20130725 Jelly Bean 4.3, rooted