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

RESOLVED WONTFIX

Status

Firefox OS
GonkIntegration
RESOLVED WONTFIX
3 years ago
4 months ago

People

(Reporter: wcpan, Assigned: wcpan)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments)

Same as Bug 1027682, I think this affects all devices.

Comment 2

3 years ago
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
Created attachment 8701734 [details]
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)
Created attachment 8710350 [details] [diff] [review]
0001-add-compile-flag.patch

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)

Comment 22

4 months ago
Firefox OS is not being worked on
Status: NEW → RESOLVED
Last Resolved: 4 months ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.