Closed Bug 1234774 Opened 9 years ago Closed 6 years ago

[Aries][Build] Failed to build on Mac OS X, elf.h file not found

Categories

(Firefox OS Graveyard :: GonkIntegration, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: wcpan, Assigned: wcpan)

References

Details

Attachments

(3 files)

Same as Bug 1027682, I think this affects all devices.
Comment on attachment 8701377 [details] [review]
fix-elf-header

Shinano review -> Alex
Attachment #8701377 - Flags: review?(mwu) → review?(lissyx+mozillians)
That's for KK right? I had a side project of getting that to build on Mac, but I have not had time to work on that for quite some time now :(
Assignee: nobody → wpan
Blocks: 1194655
Component: General → GonkIntegration
Wei Cheng, would you mine check also the status of L build regarding that? I don't have a mac, the only one I have is at the office and obviously with christmas coming I won't be near that soon :)
Flags: needinfo?(wpan)
Comment on attachment 8701377 [details] [review]
fix-elf-header

looks good, thanks
Attachment #8701377 - Flags: review?(lissyx+mozillians) → review+
Right, after thinking about that, I also remember that several people reported the build to complete properly on OSX but the resulting boot image was not booting. As far as I know, the kernel itself is fine. Do you have something booting after that?
I think elf.h should be identical with external/elfutils/libelf/elf.h. Correct me if I am wrong?
If yes, could we just add a script to copy external/elfutils/libelf/elf.h to /usr/local/include/ ?(it will work for both L and KK)
(In reply to Alexandre LISSY :gerard-majax from comment #4)
> Wei Cheng, would you mine check also the status of L build regarding that? I
> don't have a mac, the only one I have is at the office and obviously with
> christmas coming I won't be near that soon :)

Ok, I'll try this on shinano-l too.

(In reply to Alexandre LISSY :gerard-majax from comment #6)
> Right, after thinking about that, I also remember that several people
> reported the build to complete properly on OSX but the resulting boot image
> was not booting. As far as I know, the kernel itself is fine. Do you have
> something booting after that?

I never dive into it yet, but I did notice that even if there are some errors occurred during building boot image, the building process still regards it as succeed.
(e.g.: (BSD-style)gnutar does not support --owner=0, stat options ... etc.)
Maybe this is the one of the reasons.

(In reply to Thomas Nguyen[:tnguyen][:thomas][:nguyen] from comment #7)
> I think elf.h should be identical with external/elfutils/libelf/elf.h.
> Correct me if I am wrong?
> If yes, could we just add a script to copy external/elfutils/libelf/elf.h to
> /usr/local/include/ ?(it will work for both L and KK)

I think this is slightly strange, that a "build" process makes a side effect to global file system.
(In reply to Thomas Nguyen[:tnguyen][:thomas][:nguyen] from comment #7)
> I think elf.h should be identical with external/elfutils/libelf/elf.h.
> Correct me if I am wrong?
See there're some differences of your import elf.h and external/elfutils/libelf/elf.h. Does it have any effect?
Thanks

> I think this is slightly strange, that a "build" process makes a side effect
> to global file system.
Agree. Thanks
Attached file aries-l fail log
aries-l build failed before I can test this patch.
Flags: needinfo?(wpan)
(In reply to Thomas Nguyen[:tnguyen][:thomas][:nguyen] from comment #9)
> See there're some differences of your import elf.h and
> external/elfutils/libelf/elf.h. Does it have any effect?
> Thanks

Their content are different, but both work for me.
I can't tell what the difference.
(In reply to Wei-Cheng Pan [:wcp] [:wcpan] [:legnaleurc] from comment #10)
> aries-l build failed before I can test this patch.

Looks like the version check in build/core/combo/HOST_darwin-x86.mk needs to be update as well, because I'm using 10.11.2
But I still hit bug 1194687, can't find the header.
If AOSP does not support that version, should we care about that asap ? Maybe not.
Finally got time to play again with that on the Mac that sits on my desktop. It's 10.10 though, but we will see. I am repo syncing for now :)
(In reply to Wei-Cheng Pan [:wcp] [:wcpan] [:legnaleurc] from comment #12)
> (In reply to Wei-Cheng Pan [:wcp] [:wcpan] [:legnaleurc] from comment #10)
> > aries-l build failed before I can test this patch.
> 
> Looks like the version check in build/core/combo/HOST_darwin-x86.mk needs to
> be update as well, because I'm using 10.11.2

I also hit that issue on 10.10 with KK port.
(In reply to Alexandre LISSY :gerard-majax from comment #15)
> I also hit that issue on 10.10 with KK port.

For KK port I just ust SDK 10.9 (MAC_SDK_VERSION='10.9' ./build.sh) and it works.
Not sure if we should keep chasing the SDK version or not.
Looks like AOSP supported kernel by Sony already solved it more nicely? https://github.com/mozilla-b2g/codeaurora_kernel_msm/blob/sony-aosp-l/Android.mk#L125
Wei-Cheng, would you mind verifying comment 17? Maybe it's incomplete/we are missing some of the repos, but that line really make me thinking it should work on L. And we could do something similar on KK which would feel less hacky
Flags: needinfo?(wpan)
I can confirm this works well.

The attached patch is a draft, I'm wondering if there is a better way to put these platform dependent flags into one file, like build/core/combo.
Flags: needinfo?(wpan)
Wei-Cheng, thanks! Can you confirm this is the only patch needed on a clean Z3c KK port tree to get a buildable system and booting kernel ?
Flags: needinfo?(wpan)
We still need the patch from bug 1234986 (either Thomas's patch or mine) to build a booting kernel.
Flags: needinfo?(wpan)
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: