Closed Bug 1257793 Opened 4 years ago Closed 4 years ago

Build error : fontconfig/fontconfig.h not found

Categories

(Firefox Build System :: General, defect)

defect
Not set

Tracking

(b2g-master fixed)

RESOLVED FIXED
2.6 S10 - 3/25
Tracking Status
b2g-master --- fixed

People

(Reporter: kechen, Assigned: xeonchen)

References

Details

Attachments

(2 files)

Attached file make.log
When building B2G emulator-x86-l, I encountered an error.

configure:26348:35: fatal error: fontconfig/fontconfig.h: No such file or directory

The detailed log is in the attachment.
Flags: needinfo?(mh+mozilla)
also happened on nexusplayer-l
Blocks: 1245091
Attachment #8732093 - Attachment mime type: text/x-log → text/plain
Well, this is because the target set in default-gecko-config is i686-android-linux, and that is not a valid triplet for android-based systems. You were lucky that it worked until now because our checks in configure.in were broken.

IOW, this should be fixed in gonk-misc.

Target triplets have the form cpu-manufacturer-kernel, where the kernel part can be kernel-os.

On desktop linux, a typical triplet is i686-pc-linux or i686-pc-linux-gnu. cpu=i686, manufacturer=pc, kernel=linux, os=gnu.

On android, a typical triplet is arm-none-linux-android. cpu=arm, manufacturer=none (doesn't matter), kernel=linux, os=android

or arm-none-linux-androideabi (os=androideabi)

In your case, it's: i686-android-linux. cpu=i686, manufacturer=android, kernel=linux.

The manufacturer is simply ignored by most things. And if you look at toolchains, they have gcc prefixed with $cpu-$kernel-$os. Thus your toolchain prefix being .../x86_64-linux-android-

A proper triplet in your case would be i686-none-linux-android. i686-linux-android would actually work because we're actually lax. But i686-android-linux doesn't work anymore.
Flags: needinfo?(mh+mozilla)
Also note how "checking target system type..." in your log says "i686-android-linux-gnu" instead of "i686-android-linux". That's because your input (i686-android-linux) goes through config.sub, which canonicalizes the form for the kernel-os part to be complete: linux-gnu instead of linux. Which indicates a linux+glibc system, which is definitely not android. Note the syntax and config.sub come from autoconf. I'm not making things up.
Attached file fix incorrect target
Hi Michael,

Would you help to review this? I've tested on nexusplayer-l.
Assignee: nobody → xeonchen
Attachment #8733241 - Flags: review?(mwu)
Duplicate of this bug: 1258638
Attachment #8733241 - Flags: review?(mwu) → review+
Keywords: checkin-needed
https://github.com/mozilla-b2g/gonk-misc/commit/19150d320e6802ec211ccc5e74c254ae9992312d
Status: NEW → RESOLVED
Closed: 4 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → 2.6 S10 - 3/25
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.