Closed Bug 684139 Opened 14 years ago Closed 14 years ago

Build failure for Fennec on Mac OS X android-5 because of missing ntohl symbol

Categories

(Firefox Build System :: General, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)

References

Details

Attachments

(2 obsolete files)

I get this build error when I try to build Fennec on my mac: /Users/ehsanakhgari/Downloads/android-ndk-r6/toolchains/arm-linux-androideabi-4.4.3/prebuilt/darwin-x86/bin/arm-linux-androideabi-g++ -o nsPNGDecoder.o -c -fvisibility=hidden -DMOZ_PNG_WRITE -DMOZ_PNG_READ -DMOZILLA_INTERNAL_API -D_IMPL_NS_COM -DEXPORT_XPT_API -DEXPORT_XPTC_API -D_IMPL_NS_GFX -D_IMPL_NS_WIDGET -DIMPL_XREAPI -DIMPL_NS_NET -DIMPL_THEBES -DSTATIC_EXPORTABLE_JS_API -DOSTYPE=\"Linux\" -DOSARCH=Linux -I/Users/ehsanakhgari/moz/tmp/modules/libpr0n/src/ -I/Users/ehsanakhgari/moz/tmp/modules/libpr0n/decoders -I. -I../../../dist/include -I../../../dist/include/nsprpub -I/Users/ehsanakhgari/moz/tmp/obj-android/dist/include/nspr -I/Users/ehsanakhgari/moz/tmp/obj-android/dist/include/nss -fPIC -I/Users/ehsanakhgari/Downloads/android-ndk-r6/platforms/android-5/arch-arm/usr/include -I/Users/ehsanakhgari/Downloads/android-ndk-r6/sources/cxx-stl/stlport/stlport -fno-rtti -fno-exceptions -Wall -Wpointer-arith -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wno-invalid-offsetof -Wno-variadic-macros -Werror=return-type -pedantic -Wno-long-long -mandroid -I/Users/ehsanakhgari/Downloads/android-ndk-r6/platforms/android-5/arch-arm/usr/include -fno-short-enums -fno-exceptions -fno-strict-aliasing -std=gnu++0x -march=armv7-a -mthumb -mfpu=vfp -mfloat-abi=softfp -ffunction-sections -fdata-sections -pipe -DDEBUG -D_DEBUG -DTRACING -g -I/Users/ehsanakhgari/Downloads/android-ndk-r6/platforms/android-5/arch-arm/usr/include -I/Users/ehsanakhgari/Downloads/android-ndk-r6/sources/cxx-stl/stlport/stlport -DMOZILLA_CLIENT -include ../../../mozilla-config.h -MD -MF .deps/nsPNGDecoder.pp /Users/ehsanakhgari/moz/tmp/modules/libpr0n/decoders/nsPNGDecoder.cpp In file included from /Users/ehsanakhgari/moz/tmp/modules/libpr0n/decoders/nsPNGDecoder.cpp:44: /Users/ehsanakhgari/moz/tmp/modules/libpr0n/decoders/nsPNGDecoder.h: In member function 'bool mozilla::imagelib::nsPNGDecoder::HasValidInfo() const': /Users/ehsanakhgari/moz/tmp/modules/libpr0n/decoders/nsPNGDecoder.h:78: warning: 'png_info_struct::valid' is deprecated (declared at ../../../dist/include/png.h:657) /Users/ehsanakhgari/moz/tmp/modules/libpr0n/decoders/nsPNGDecoder.h:78: warning: 'png_info_struct::valid' is deprecated (declared at ../../../dist/include/png.h:657) /Users/ehsanakhgari/moz/tmp/modules/libpr0n/decoders/nsPNGDecoder.h: In member function 'PRInt32 mozilla::imagelib::nsPNGDecoder::GetPixelDepth() const': /Users/ehsanakhgari/moz/tmp/modules/libpr0n/decoders/nsPNGDecoder.h:87: warning: 'png_info_struct::pixel_depth' is deprecated (declared at ../../../dist/include/png.h:682) /Users/ehsanakhgari/moz/tmp/modules/libpr0n/decoders/nsPNGDecoder.h:87: warning: 'png_info_struct::pixel_depth' is deprecated (declared at ../../../dist/include/png.h:682) /Users/ehsanakhgari/moz/tmp/modules/libpr0n/decoders/nsPNGDecoder.cpp: In static member function 'static void mozilla::imagelib::nsPNGDecoder::row_callback(png_struct*, png_byte*, png_uint_32, int)': /Users/ehsanakhgari/moz/tmp/modules/libpr0n/decoders/nsPNGDecoder.cpp:758: error: 'ntohl' was not declared in this scope make: *** [nsPNGDecoder.o] Error 1 It seems to be caused by the fact that on my SDK, it's sys/endian.h which defines ntohl, but that header is not included in nsprinet.h. I have a patch which I think would fix this problem. I'm building with it right now.
Attached patch Patch (v1) (obsolete) — Splinter Review
Attachment #557747 - Flags: review?(khuey)
(In reply to Ehsan Akhgari [:ehsan] from comment #1) > Created attachment 557747 [details] [diff] [review] > Patch (v1) I tested this patch on a Linux host and it built fine.
Comment on attachment 557747 [details] [diff] [review] Patch (v1) I'm being picky today because I just woke up :-P First, the NSPR changes need to go in a separate bug and get reviewed by an NSPR peer. NSPR's configure likely needs the same changes ... Second, the proper way to use AC_TRY_COMPILE here is AC_TRY_COMPILE([includes],[function body],[action-if-compiled],[action-if-not-compiled]). You should also use AC_CACHE_CHECK here. I suggest cribbing from http://mxr.mozilla.org/mozilla-central/source/configure.in#821 Finally, HAVE_USEFUL_SYS_ENDIAN_H is a really bad name. How about NTOHL_IN_SYS_ENDIAN_H or something similarly descriptive?
Attachment #557747 - Flags: review?(khuey) → review-
Attached patch Patch (v2) (obsolete) — Splinter Review
Ted, if you want, I can put the nspr part into its own bug, though if you can review all of this in one go that would be great!
Attachment #557747 - Attachment is obsolete: true
Attachment #557834 - Flags: review?(ted.mielczarek)
Blocks: 684254
I have another solution in bug 684254.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → WONTFIX
Attachment #557834 - Attachment is obsolete: true
Attachment #557834 - Flags: review?(ted.mielczarek)
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: