Closed Bug 674910 Opened 13 years ago Closed 13 years ago

NDK r5 builds require libstdc++, which is not available on Android 2.0 and 2.1

Categories

(Firefox Build System :: General, defect)

ARM
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME
mozilla8

People

(Reporter: glandium, Assigned: glandium)

References

Details

Attachments

(1 file, 1 obsolete file)

NDK r5 defaults to dynamically link against libstdc++, so the new builds depend on the system libstdc++, which is not available on Android 2.0 and 2.1 devices.
Attachment #549134 - Flags: review?(blassey.bugs)
Comment on attachment 549134 [details] [diff] [review]
Statically link against libstdc++ on Android

Review of attachment 549134 [details] [diff] [review]:
-----------------------------------------------------------------
Attachment #549134 - Flags: review?(blassey.bugs) → review+
tracking-fennec: --- → 8+
http://hg.mozilla.org/mozilla-central/rev/ac0fe0533586
Assignee: nobody → mh+mozilla
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla8
Just hit this error on m-i, and was unable to find this bug via searching for the error message.

For the record (& to make this bug more discoverable via search), the build error that this hits is:
> configure: error: Couldn't find path to stlport in the android ndk
(In reply to comment #4)
> Just hit this error on m-i, and was unable to find this bug via searching
> for the error message.
> 
> For the record (& to make this bug more discoverable via search), the build
> error that this hits is:
> > configure: error: Couldn't find path to stlport in the android ndk

I don't think that's this bug
ah, nevermind -- mfinkle / stechz pointed me here, but I'll assume it's not for now.  FWIW, the log in question is:
http://tinderbox.mozilla.org/showlog.cgi?log=Mozilla-Inbound/1311887577.1311888461.32007.gz
(This is the last I'll mention it here, unless it's determined in IRC to actually be this bug.)
(In reply to comment #6)
> ah, nevermind -- mfinkle / stechz pointed me here, but I'll assume it's not
> for now.  FWIW, the log in question is:
> http://tinderbox.mozilla.org/showlog.cgi?log=Mozilla-Inbound/1311887577.
> 1311888461.32007.gz
> (This is the last I'll mention it here, unless it's determined in IRC to
> actually be this bug.)

That looks like a misconfigured slave.
Does Android NDK really support -static-libstdc++ option?

http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1311933128.1311935465.20128.gz&fulltext=1
arm-linux-androideabi-g++: unrecognized option '-static-libstdc++'
You're right, today's nightly still depends on libstdc++... My local build had worked, though, but I'm wondering if I was building with gcc 4.6...
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
It looks like -static-libstdc++ is an option that was only added to gcc 4.5 :( So I must have built with gcc 4.6...
I'm afraid the only way to fix this is to remove libstdc++.so from the ndk...
(In reply to comment #11)
> I'm afraid the only way to fix this is to remove libstdc++.so from the ndk...

Or to copy libstdc++.a in a directory we control (e.g. dist/lib)
This effectively copies the .so file from the SDK if and only if libxul.so depends on libstdc++.so. Once stripped, the file is less than 6K. I'm actually unsure this actually works. I don't know if android adds the ABI directory in the library search path. We might have to slightly modify the linker for that. I tested a build on android 2.3, and it keeps using the system libstdc++.so, which is already loaded in memory. I don't know if this actually works on android 2.1.
Attachment #551459 - Flags: review?(blassey.bugs)
Attachment #549134 - Attachment is obsolete: true
Attachment #551459 - Flags: review?(blassey.bugs) → review+
So, it looks like the information about libstdc++.so being missing on android < 2.2 is erroneous. It is at least present on two different 2.1 devices, and in the 2.1 sdk emulator image. I guess this bug can be marked as invalid. However, I will still land the non-packager.mk bits. I'll file a separate bug.
Status: REOPENED → RESOLVED
Closed: 13 years ago13 years ago
Resolution: --- → WORKSFORME
tracking-fennec: 8+ → ---
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: