Closed
Bug 935776
Opened 11 years ago
Closed 11 years ago
Cant build Firefox OS (emulator kk and jb) on Mavericks
Categories
(Firefox OS Graveyard :: Emulator, defect)
Tracking
(tracking-b2g:backlog)
People
(Reporter: daleharvey, Assigned: vicamo)
References
Details
(Whiteboard: [ft:ril][p=3])
Attachments
(3 files, 5 obsolete files)
No description provided.
Reporter | ||
Updated•11 years ago
|
Summary: Cant build Firefox OS on Mavericks → Cant build Firefox OS (emulator) on Mavericks
Reporter | ||
Comment 1•11 years ago
|
||
Current fail is
Notice file: external/qemu/NOTICE -- out/host/darwin-x86/obj/NOTICE_FILES/src//lib/emulator-common.a.txt
Install: out/host/darwin-x86/bin/emulator
target Generated: emulator-arm <= external/qemu/qemu-monitor.hx
target Generated: emulator-arm <= external/qemu/qemu-options.hx
host C: emulator-arm <= external/qemu/audio/audio.c
In file included from /usr/local/Cellar/gcc-4.6/4.6.3/gcc/lib/gcc/x86_64-apple-darwin13.0.1/4.6.3/include/stdint.h:3:0,
from /Applications/XCode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk/usr/include/inttypes.h:255,
from external/qemu/qemu-common.h:31,
from external/qemu/hw/hw.h:5,
from external/qemu/audio/audio.c:25:
/usr/local/Cellar/gcc-4.6/4.6.3/gcc/lib/gcc/x86_64-apple-darwin13.0.1/4.6.3/include-fixed/stdint.h:27:32: fatal error: sys/_types/_int8_t.h: No such file or directory
compilation terminated.
make: *** [out/host/darwin-x86/obj/EXECUTABLES/emulator-arm_intermediates/audio/audio.o] Error 1
real 5m43.594s
user 2m22.696s
sys 0m42.468s
> Build failed! <
Build with |./build.sh -j1| for better messages
If all else fails, use |rm -rf objdir-gecko| to clobber gecko and |rm -rf out| to clobber everything else.
Reporter | ||
Comment 2•11 years ago
|
||
http://pastebin.mozilla.org/3689144 is my current error with a clean checkout and a passing bootstrap
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/__config:191:20: error: typedef redefinition with different types ('char16_t' vs 'uint16_t' (aka 'unsigned short'))
typedef __char16_t char16_t;
Comment 3•11 years ago
|
||
I get the same error building for nexus S, after upgrading to Mavericks and doing a clean re-installation of MacPorts.
Reporter | ||
Comment 4•11 years ago
|
||
This isnt as helpful for people building for a full device, however if you are a gecko dev and already have a flashed device you can do ./build.sh gecko && ./flash.sh gecko, which never used to work
Comment 5•11 years ago
|
||
(In reply to Dale Harvey (:daleharvey) from comment #4)
> This isnt as helpful for people building for a full device, however if you
> are a gecko dev and already have a flashed device you can do ./build.sh
> gecko && ./flash.sh gecko, which never used to work
This was very helpful, thanks!
Assignee | ||
Updated•11 years ago
|
Component: General → Emulator
Assignee | ||
Comment 6•11 years ago
|
||
Seems need several upstream commits to fix it:
https://android.googlesource.com/platform/external/qemu/+/ddcd022
https://android.googlesource.com/platform/external/qemu/+/08c1bde
https://android.googlesource.com/platform/build/+/abf72cf3f4cc189ec0129f855028c6a7be0c07bf
https://android.googlesource.com/platform/build/+/51f9bb02dab7d7207b6c1976160dfeb951d13be1
https://android.googlesource.com/platform/build/+/02eb37c267adff3528c9e88cdfdd59035ce934b8
After a few long nights finally got emulator working on Mavericks. http://i.imgur.com/OsafcLN.png :)
I'll put together some notes and share them here if anyone else is stuck. If you also got it
working would be nice to compare and see if my approach was less or more sound. I'd like to update
the guide on MDN so others can get it working.
Hello,I get the same error. Can you share the way to build emulator in Mavericks?
(In reply to Josh R from comment #7)
> After a few long nights finally got emulator working on Mavericks.
> http://i.imgur.com/OsafcLN.png :)
> I'll put together some notes and share them here if anyone else is stuck. If
> you also got it
> working would be nice to compare and see if my approach was less or more
> sound. I'd like to update
> the guide on MDN so others can get it working.
Reporter | ||
Updated•11 years ago
|
Assignee | ||
Comment 9•11 years ago
|
||
Append --enable-cxx when installing gcc-4.6 on Mac.
Assignee: nobody → vyang
Assignee | ||
Comment 10•11 years ago
|
||
Use g++-4.6 when possible
Assignee | ||
Comment 11•11 years ago
|
||
Looks like I don't have some time to fix this before 1.4 release. Sorry :(
Assignee: vyang → nobody
Comment 13•11 years ago
|
||
Vicamo, it looks like your patches are attempting to do in-tree what's described on the MDN page at [1], is that right? What are the next steps to get this landed? Are the patches ready for review?
[1] https://developer.mozilla.org/en-US/Firefox_OS/Building#clang_errors_when_building_with_Xcode_5_on_Mac
Assignee | ||
Comment 14•11 years ago
|
||
[Emulator-KitKat]
1) revert https://github.com/mozilla-b2g/platform_external_qemu/commits/5957279f5b5a75787bba8011acbac044a1db9e62
2) fix struct re-typedef in external/qemu/telephony/sim_card.c:248 . See https://github.com/mozilla-b2g/platform_external_qemu/commits/32e10f31793103ea7bf121182c8254317ec0e0ca
3) Somehow my 'tar' Mavericks 10.9.2 doesn't support "--owner=0 --group=0 --mode=go-w" and "--numeric-owner" should be only available in eXtract mode. This results an empty b2g-*.tar.gz and in turn an empty /system/b2g folder.
With the three things fixed, emulator-kk builds and runs.
Assignee | ||
Comment 15•11 years ago
|
||
A temporary work-around to Gecko "toolkit/mozapps/installer/packager.mk" for the tar arguments problem.
Assignee | ||
Comment 16•11 years ago
|
||
Emulator-jb builds and runs with the same fixes in comment 14 applied.
Assignee | ||
Comment 17•11 years ago
|
||
(In reply to Vicamo Yang [:vicamo][:vyang] from comment #14)
> 3) Somehow my 'tar' Mavericks 10.9.2 doesn't support "--owner=0 --group=0
> --mode=go-w" and "--numeric-owner" should be only available in eXtract mode.
> This results an empty b2g-*.tar.gz and in turn an empty /system/b2g folder.
It has been there since 2006. Got to compare with the build process of FXOS devices. Wonders why they're successful.
Assignee | ||
Comment 18•11 years ago
|
||
(In reply to Vicamo Yang [:vicamo][:vyang] from comment #17)
> (In reply to Vicamo Yang [:vicamo][:vyang] from comment #14)
> > 3) Somehow my 'tar' Mavericks 10.9.2 doesn't support "--owner=0 --group=0
> > --mode=go-w" and "--numeric-owner" should be only available in eXtract mode.
> > This results an empty b2g-*.tar.gz and in turn an empty /system/b2g folder.
>
> It has been there since 2006. Got to compare with the build process of FXOS
> devices. Wonders why they're successful.
Nexus-5 builds on Mavericks, but the generated b2g-30.0a1.en-US.android-arm.tar.gz is also empty. Will have a patch for this.
Assignee | ||
Comment 19•11 years ago
|
||
Comment on attachment 8372937 [details] [review]
Github PR for B2G
We don't need g++-4.6 for compiling emulator-jb, emulator-kk on Mavericks.
Attachment #8372937 -
Attachment is obsolete: true
Assignee | ||
Comment 20•11 years ago
|
||
Comment on attachment 8372943 [details] [review]
Github PR for build/
Neither is this.
Attachment #8372943 -
Attachment is obsolete: true
Assignee | ||
Comment 21•11 years ago
|
||
This is actually a regression in https://github.com/mozilla-b2g/platform_external_qemu/pull/20 .
Assignee: nobody → vyang
Assignee | ||
Comment 22•11 years ago
|
||
This reverts https://github.com/mozilla-b2g/platform_external_qemu/commit/5957279f5b5a75787bba8011acbac044a1db9e62 , which is no longer necessary after switching to SDL-1.2.15. See https://github.com/mozilla-b2g/platform_external_qemu/commit/c60b11434975c424e937fad75275840ef5ec3e81 .
Assignee | ||
Comment 23•11 years ago
|
||
Attachment #8391858 -
Attachment is obsolete: true
Assignee | ||
Comment 24•11 years ago
|
||
So far emulator-jb, emulator-kk, emulator-x86-jb builds & runs, I'm going to have one more test on emulator-x86-kk.
To verify above PR/patch:
1) clone B2G source code and configure it as emulator{,-x86}-{jb,kk},
$ ./config.sh emulator-jb
2) apply attachment 8393347 [details] [diff] [review] to gecko/
$ (cd gecko; wget -O - "https://bugzilla.mozilla.org/attachment.cgi?id=8393347" | patch -p1)
3) Apply the two pull requests to external/qemu:
$ cd external/qemu
$ git add remote vicamo git@github.com:vicamo/b2g_platform_external_qemu.git
$ git fetch vicamo
$ git merge vicamo/bugzilla/935776/ics_fix-type-redefined
$ git merge vicamo/bugzilla/935776/jb_revert-5957279
$ cd -
4) Build all:
$ nice -n 20 ./build.sh
Then go to dinner :) When you come back, you should find:
1) b2g-*.gz should be a 20+MB file:
$ ls -al objdir-gecko/dist/b2g-*.gz
-rw-r--r-- 1 vicamo staff 24781736 Mar 19 17:13 objdir-gecko/dist/b2g-31.0a1.en-US.linux-i686.tar.gz
2) /system/b2g should contain b2g executables, shared libraries:
$ ls -al out/target/product/generic_x86/system/b2g
-rwxr-xr-x 1 vicamo staff 177588 Mar 19 17:12 b2g
-rwxr-xr-x 1 vicamo staff 43366348 Mar 19 17:12 libxul.so
...
Assignee | ||
Comment 25•11 years ago
|
||
@schien, could you help verifying my work here?
Flags: needinfo?(schien)
Comment 26•11 years ago
|
||
I tried emulator-x86 and failed. Here is the log.
In file included from frameworks/base/tools/aapt/AaptAssets.cpp:5:
In file included from frameworks/base/tools/aapt/AaptAssets.h:10:
In file included from frameworks/base/include/utils/AssetManager.h:24:
In file included from frameworks/base/include/utils/AssetDir.h:24:
In file included from frameworks/base/include/utils/Vector.h:20:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/new:67:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/__config:226:20: error: typedef redefinition with different types ('char16_t' vs 'uint16_t' (aka 'unsigned short'))
typedef __char16_t char16_t;
^
frameworks/base/include/utils/Unicode.h:26:18: note: previous definition is here
typedef uint16_t char16_t;
^
In file included from frameworks/base/tools/aapt/AaptAssets.cpp:5:
In file included from frameworks/base/tools/aapt/AaptAssets.h:10:
In file included from frameworks/base/include/utils/AssetManager.h:24:
In file included from frameworks/base/include/utils/AssetDir.h:24:
In file included from frameworks/base/include/utils/Vector.h:20:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/new:67:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/__config:227:20: error: typedef redefinition with different types ('char32_t' vs 'uint32_t' (aka 'unsigned int'))
typedef __char32_t char32_t;
^
frameworks/base/include/utils/Unicode.h:25:18: note: previous definition is here
typedef uint32_t char32_t;
^
In file included from frameworks/base/tools/aapt/AaptAssets.cpp:5:
In file included from frameworks/base/tools/aapt/AaptAssets.h:10:
In file included from frameworks/base/include/utils/AssetManager.h:24:
In file included from frameworks/base/include/utils/AssetDir.h:24:
In file included from frameworks/base/include/utils/Vector.h:20:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/new:68:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/exception:81:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/type_traits:320:20: error: redefinition of 'std::__1::__is_integral<char16_t>'
template <> struct __is_integral<unsigned short> : public true_type {};
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/type_traits:316:20: note: previous definition is here
template <> struct __is_integral<char16_t> : public true_type {};
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/type_traits:322:20: error: redefinition of 'std::__1::__is_integral<char32_t>'
template <> struct __is_integral<unsigned int> : public true_type {};
^~~~~~~~~~~~~~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/type_traits:317:20: note: previous definition is here
template <> struct __is_integral<char32_t> : public true_type {};
^
frameworks/base/tools/aapt/AaptAssets.cpp:2199:38: warning: unused parameter 'bundle' [-Wunused-parameter]
AaptAssets::slurpResourceZip(Bundle* bundle, const char* filename)
^
1 warning and 4 errors generated.
Assignee | ||
Comment 27•11 years ago
|
||
(In reply to StevenLee[:slee] from comment #26)
> I tried emulator-x86 and failed. Here is the log.
> frameworks/base/include/utils/Unicode.h:26:18: note: previous definition is
> here
> typedef uint16_t char16_t;
> ^
You're not building emulator{,-x86}-{jb,kk}. You're building emulator-x86 and that's ICS.
Assignee | ||
Comment 28•11 years ago
|
||
(In reply to Vicamo Yang [:vicamo][:vyang] from comment #24)
> So far emulator-jb, emulator-kk, emulator-x86-jb builds & runs, I'm going to
> have one more test on emulator-x86-kk.
Emulator-x86-kk builds and runs as well. Besides, I can also access Gaia, and somehow that's not available on emulator-x86-jb.
Assignee | ||
Updated•11 years ago
|
Flags: needinfo?(schien) → needinfo?(slee)
Comment 29•11 years ago
|
||
/Volumes/ssd/emulator/prebuilts/gcc/darwin-x86/x86/i686-linux-android-4.7/bin/../lib/gcc/i686-linux-android/4.7/../../../../i686-linux-android/bin/ld: warning: hidden symbol 'vorbis_comment_clear' in /Volumes/ssd/emulator/objdir-gecko/toolkit/library/../../media/libtremor/lib/tremor_info.o is referenced by DSO /Vo
lumes/ssd/emulator/out/target/product/generic_x86/obj/lib/libstagefright.so
/Volumes/ssd/emulator/prebuilts/gcc/darwin-x86/x86/i686-linux-android-4.7/bin/../lib/gcc/i686-linux-android/4.7/../../../../i686-linux-android/bin/ld: warning: hidden symbol 'vorbis_info_clear' in /Volumes/ssd/emulator/objdir-gecko/toolkit/library/../../media/libtremor/lib/tremor_info.o is referenced by DSO /Volum
es/ssd/emulator/out/target/product/generic_x86/obj/lib/libstagefright.so
/Volumes/ssd/emulator/prebuilts/gcc/darwin-x86/x86/i686-linux-android-4.7/bin/../lib/gcc/i686-linux-android/4.7/../../../../i686-linux-android/bin/ld: warning: hidden symbol 'vorbis_info_init' in /Volumes/ssd/emulator/objdir-gecko/toolkit/library/../../media/libtremor/lib/tremor_info.o is referenced by DSO /Volume
s/ssd/emulator/out/target/product/generic_x86/obj/lib/libstagefright.so
/Volumes/ssd/emulator/prebuilts/gcc/darwin-x86/x86/i686-linux-android-4.7/bin/../lib/gcc/i686-linux-android/4.7/../../../../i686-linux-android/bin/ld: warning: hidden symbol 'vorbis_comment_init' in /Volumes/ssd/emulator/objdir-gecko/toolkit/library/../../media/libtremor/lib/tremor_info.o is referenced by DSO /Vol
umes/ssd/emulator/out/target/product/generic_x86/obj/lib/libstagefright.so
/Volumes/ssd/emulator/prebuilts/gcc/darwin-x86/x86/i686-linux-android-4.7/bin/../lib/gcc/i686-linux-android/4.7/../../../../i686-linux-android/bin/ld: warning: hidden symbol 'oggpack_readinit' in /Volumes/ssd/emulator/objdir-gecko/toolkit/library/../../media/libogg/ogg_bitwise.o is referenced by DSO /Volumes/ssd/e
mulator/out/target/product/generic_x86/obj/lib/libstagefright.so
/Volumes/ssd/emulator/prebuilts/gcc/darwin-x86/x86/i686-linux-android-4.7/bin/../lib/gcc/i686-linux-android/4.7/../../../../i686-linux-android/bin/ld: warning: hidden symbol 'oggpack_read' in /Volumes/ssd/emulator/objdir-gecko/toolkit/library/../../media/libogg/ogg_bitwise.o is referenced by DSO /Volumes/ssd/emula
tor/out/target/product/generic_x86/obj/lib/libstagefright.so
/Volumes/ssd/emulator/prebuilts/gcc/darwin-x86/x86/i686-linux-android-4.7/bin/../lib/gcc/i686-linux-android/4.7/../../../../i686-linux-android/bin/ld: warning: hidden symbol 'ashmem_create_region' in /Volumes/ssd/emulator/objdir-gecko/toolkit/library/../../gfx/skia/ashmem.o is referenced by DSO /Volumes/ssd/emulat
or/out/target/product/generic_x86/obj/lib/libbinder.so
/Volumes/ssd/emulator/prebuilts/gcc/darwin-x86/x86/i686-linux-android-4.7/bin/../lib/gcc/i686-linux-android/4.7/../../../../i686-linux-android/bin/ld: warning: hidden symbol 'ashmem_set_prot_region' in /Volumes/ssd/emulator/objdir-gecko/toolkit/library/../../gfx/skia/ashmem.o is referenced by DSO /Volumes/ssd/emul
ator/out/target/product/generic_x86/obj/lib/libbinder.so
/Volumes/ssd/emulator/gecko/modules/freetype2/src/gzip/ftgzip.c:308: error: undefined reference to 'inflateInit2_'
/Volumes/ssd/emulator/gecko/modules/freetype2/src/gzip/ftgzip.c:323: error: undefined reference to 'inflateEnd'
/Volumes/ssd/emulator/gecko/modules/freetype2/src/gzip/ftgzip.c:352: error: undefined reference to 'inflateReset'
/Volumes/ssd/emulator/gecko/modules/freetype2/src/gzip/ftgzip.c:426: error: undefined reference to 'inflate'
/Volumes/ssd/emulator/gecko/modules/freetype2/src/gzip/ftgzip.c:715: error: undefined reference to 'inflateInit2_'
/Volumes/ssd/emulator/gecko/modules/freetype2/src/gzip/ftgzip.c:719: error: undefined reference to 'inflate'
/Volumes/ssd/emulator/gecko/modules/freetype2/src/gzip/ftgzip.c:722: error: undefined reference to 'inflateEnd'
/Volumes/ssd/emulator/gecko/modules/freetype2/src/gzip/ftgzip.c:730: error: undefined reference to 'inflateEnd'
Flags: needinfo?(slee)
Comment 30•11 years ago
|
||
I delete the whole folder, clear ccache and re-run the steps in comment 24. x86-jb and x86-kk can build on my Mac.
Assignee | ||
Updated•11 years ago
|
Attachment #8393347 -
Flags: review?(mh+mozilla)
Attachment #8393347 -
Flags: review?(khuey)
Assignee | ||
Updated•11 years ago
|
Attachment #8393342 -
Flags: review?(htsai)
Assignee | ||
Updated•11 years ago
|
Attachment #8393344 -
Flags: review?(mwu)
Does Mavericks not have a GNU-compatible tar?
Assignee | ||
Comment 32•11 years ago
|
||
(In reply to Kyle Huey [:khuey] (khuey@mozilla.com) from comment #31)
> Does Mavericks not have a GNU-compatible tar?
http://day-to-day-stuff.blogspot.tw/2013/11/installing-gnutar-on-maverick.html
"Unfortunately Apple decided to remove /usr/bin/gnutar from Maverick (Mac OSX 10.9)."
I'm trying to build with gnu-tar from Homebrew.
Assignee | ||
Comment 33•11 years ago
|
||
(In reply to Vicamo Yang [:vicamo][:vyang] from comment #32)
> I'm trying to build with gnu-tar from Homebrew.
It's working. B2G archive is generated correctly. So, should I file an pull request to fix B2G Mac bootstrapping instead of fixing Gecko configure script?
(In reply to Vicamo Yang [:vicamo][:vyang] from comment #33)
> (In reply to Vicamo Yang [:vicamo][:vyang] from comment #32)
> > I'm trying to build with gnu-tar from Homebrew.
>
> It's working. B2G archive is generated correctly. So, should I file an pull
> request to fix B2G Mac bootstrapping instead of fixing Gecko configure
> script?
I think that would be better, yes. Thanks.
Assignee | ||
Comment 35•11 years ago
|
||
* don't prompt for gcc-4.6 and MacSDK10.6 on Mavericks
* prompt for gnu-tar if no compatible archiver is found
Attachment #8393347 -
Attachment is obsolete: true
Attachment #8393347 -
Flags: review?(mh+mozilla)
Attachment #8393347 -
Flags: review?(khuey)
Attachment #8397018 -
Flags: review?(mwu)
Comment 36•11 years ago
|
||
Hi Vicamo
I just tried to build on Mac OS X mavericks with emulator-x86-kk.
Then I got a error[1]...
[1] http://pastebin.mozilla.org/4733756
---
system/core/libutils/Printer.cpp: In member function ‘virtual void android::FdPrinter::printLine(const char*)’:
system/core/libutils/Printer.cpp:123: error: ‘dprintf’ was not declared in this scope
---
Did you know this error?
'n if you know about this, may I get your suggestion to build success..
regards
Flags: needinfo?(vyang)
Assignee | ||
Comment 37•11 years ago
|
||
(In reply to Yusuke Yamamoto from comment #36)
Can you do:
$ rm -rf out/host/darwin-x86/obj/STATIC_LIBRARIES/libutils_intermediates
$ ./build.sh showcommands libutils
This will show all the commands executed, so we may have a chance to know what happened to Printer.o.
Mine:
host C++: libutils <= system/core/libutils/Printer.cpp
prebuilts/misc/darwin-x86/ccache/ccache prebuilts/gcc/darwin-x86/host/i686-apple-darwin-4.2.1/bin/i686-apple-darwin11-g++ -I system/core/libutils -I out/host/darwin-x86/obj/STATIC_LIBRARIES/libutils_intermediates -I libnativehelper/include/nativehelper -isystem system/core/include -isystem hardware/libhardware/include -isystem hardware/libhardware_legacy/include -isystem hardware/ril/include -isystem libnativehelper/include -isystem frameworks/native/include -isystem frameworks/native/opengl/include -isystem frameworks/av/include -isystem frameworks/base/include -isystem external/skia/include -isystem tools/include -isystem out/host/darwin-x86/obj/include -c -fno-exceptions -Wno-multichar -m32 -isystem prebuilts/gcc/darwin-x86/host/i686-apple-darwin-4.2.1/lib/gcc/i686-apple-darwin11/4.2.1/include -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -mmacosx-version-min=10.8 -DMACOSX_DEPLOYMENT_TARGET=10.8 -fPIC -funwind-tables -include build/core/combo/include/arch/darwin-x86/AndroidConfig.h -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -O2 -g -fno-strict-aliasing -DNDEBUG -UDEBUG -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -Wsign-promo -DNDEBUG -UDEBUG -DLIBUTILS_NATIVE=1 -MD -MF out/host/darwin-x86/obj/STATIC_LIBRARIES/libutils_intermediates/Printer.d -o out/host/darwin-x86/obj/STATIC_LIBRARIES/libutils_intermediates/Printer.o system/core/libutils/Printer.cpp
So if you replace that "-c" with "-E" and "Printer.o" with "Printer.e", you should find:
2324 # 445 "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include/stdio.h" 3 4
2325 extern "C" {
2326 int dprintf(int, const char * , ...) __attribute__((__format__ (__printf__, 2, 3))) __attribute__((visibility("default")));
2327 int vdprintf(int, const char * , va_list) __attribute__((__format__ (__printf__, 2, 0))) __attribute__((visibility("default")));
2328 ssize_t getdelim(char ** , size_t * , int, FILE * ) __attribute__((visibility("default")));
2329 ssize_t getline(char ** , size_t * , FILE * ) __attribute__((visibility("default")));
2330 }
which defines symbol 'dprintf'.
Flags: needinfo?(vyang)
Comment 38•11 years ago
|
||
Thanks Vicamo
I tried that command.
It seems to be different with the mac os sdk version[1],[2].
I think, we have to use 10.6 SDK on Mac OS X.
Please correct me , if I'm wrong...
https://developer.mozilla.org/en-US/Firefox_OS/Firefox_OS_build_prerequisites#Making_the_Mac_OS_X_10.6_SDK_available
[2]
#1
me : prebuilts/gcc/darwin-x86/host/i686-apple-darwin-4.2.1/bin/i686-apple-darwin10-g++
you: prebuilts/gcc/darwin-x86/host/i686-apple-darwin-4.2.1/bin/i686-apple-darwin11-g++
#2
me : /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk -mmacosx-version-min=10.6 -DMACOSX_DEPLOYMENT_TARGET=10.6
you: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -mmacosx-version-min=10.8 -DMACOSX_DEPLOYMENT_TARGET=10.8
[1]
------
host C++: libutils <= system/core/libutils/Printer.cpp
prebuilts/misc/darwin-x86/ccache/ccache prebuilts/gcc/darwin-x86/host/i686-apple-darwin-4.2.1/bin/i686-apple-darwin10-g++ -I system/core/libutils -I out/host/darwin-x86/obj/STATIC_LIBRARIES/libutils_intermediates -I libnativehelper/include/nativehelper -isystem system/core/include -isystem hardware/libhardware/include -isystem hardware/libhardware_legacy/include -isystem hardware/ril/include -isystem libnativehelper/include -isystem frameworks/native/include -isystem frameworks/native/opengl/include -isystem frameworks/av/include -isystem frameworks/base/include -isystem external/skia/include -isystem tools/include -isystem out/host/darwin-x86/obj/include -c -fno-exceptions -Wno-multichar -m32 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk -mmacosx-version-min=10.6 -DMACOSX_DEPLOYMENT_TARGET=10.6 -fPIC -funwind-tables -include build/core/combo/include/arch/darwin-x86/AndroidConfig.h -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -O2 -g -fno-strict-aliasing -DNDEBUG -UDEBUG -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -Wsign-promo -DNDEBUG -UDEBUG -DLIBUTILS_NATIVE=1 -MD -MF out/host/darwin-x86/obj/STATIC_LIBRARIES/libutils_intermediates/Printer.d -o out/host/darwin-x86/obj/STATIC_LIBRARIES/libutils_intermediates/Printer.o system/core/libutils/Printer.cpp
-----
Updated•11 years ago
|
Flags: needinfo?(vyang)
Assignee | ||
Comment 39•11 years ago
|
||
(In reply to Yusuke Yamamoto from comment #38)
> Thanks Vicamo
> I tried that command.
>
> It seems to be different with the mac os sdk version[1],[2].
>
> I think, we have to use 10.6 SDK on Mac OS X.
> Please correct me , if I'm wrong...
> https://developer.mozilla.org/en-US/Firefox_OS/
> Firefox_OS_build_prerequisites#Making_the_Mac_OS_X_10.6_SDK_available
That's for emulator-ics only. For AOSP Master/KitKat branches, you need 10.8SDK or above.
http://source.android.com/source/initializing.html#master-branch
For JB/ICS, you can find similar requirements below.
Flags: needinfo?(vyang)
Assignee | ||
Comment 40•11 years ago
|
||
Andrew, do you have a list a appropriate reviewers, developers working on Mac? It's been almost three weeks since I requested r?.
Flags: needinfo?(overholt)
Comment 41•11 years ago
|
||
Comment on attachment 8393342 [details] [review]
Github PR for external/qemu, master branch
Good catch.
Attachment #8393342 -
Flags: review?(htsai) → review+
Assignee | ||
Comment 42•11 years ago
|
||
(In reply to Hsin-Yi Tsai [:hsinyi] from comment #41)
> Comment on attachment 8393342 [details] [review]
> Github PR for external/qemu, master branch
>
> Good catch.
Merged on Github:
https://github.com/mozilla-b2g/platform_external_qemu/commit/9b393a454feef2967ff164ee33fcad3905baedef
Comment 43•11 years ago
|
||
Comment on attachment 8393344 [details] [review]
Github PR for external/qemu, b2g-jellybean branch
I assume you actually meant to point to https://github.com/mozilla-b2g/platform_external_qemu/pull/66 .
Attachment #8393344 -
Flags: review?(mwu) → review+
Comment 44•11 years ago
|
||
Running through the testing steps locally on Mavericks.. code looks mostly good, just want to verify it :)
Updated•11 years ago
|
Attachment #8397018 -
Flags: review?(mwu) → review?(marshall)
Assignee | ||
Comment 45•11 years ago
|
||
Correct PR url. Thanks mwu!
@Marshall, I thought you've left Mozilla. In that reverted commit[1], you said you wanted to "fixed SDL compilation in Lion, and enabled SDL compilation in Mac OS X". Can't find related bug or steps to verify that. Do you still think it's still valid since the whole block was removed in AOSP JellyBean?
[1]: https://github.com/mozilla-b2g/platform_external_qemu/commit/5957279f5b5a75787bba8011acbac044a1db9e62
Attachment #8393344 -
Attachment is obsolete: true
Attachment #8403711 -
Flags: review+
Attachment #8403711 -
Flags: feedback?(marshall)
Comment 46•11 years ago
|
||
(In reply to Vicamo Yang [:vicamo][:vyang] from comment #45)
> @Marshall, I thought you've left Mozilla.
I did and now I'm back :)
> In that reverted commit[1], you
> said you wanted to "fixed SDL compilation in Lion, and enabled SDL
> compilation in Mac OS X". Can't find related bug or steps to verify that.
> Do you still think it's still valid since the whole block was removed in
> AOSP JellyBean?
I don't think a bug was ever filed for this.. :( In any case, I don't think the original patch is valid if the supporting code was removed in Jellybean.
On a side note, I'm a little confused because both 4.2.x and 4.3.x are considered Jellybean, but according to the AOSP build requirements[1]:
- AOSP 4.2.x requires OS X 10.6 w/ Xcode 4.2
- AOSP master (Jellybean 4.3, KitKat, and above?) requires OS X 10.8 w/ Xcode 4.5.2
Do you know if our b2g-jellybean branch is based on the 4.2.x branch or 4.3.x?
[1]: http://source.android.com/source/initializing.html#setting-up-a-mac-os-x-build-environment
Flags: needinfo?(overholt)
Comment 47•11 years ago
|
||
Comment on attachment 8403711 [details]
Github PR for external/qemu, b2g-jellybean branch : v2
Looks good to me. Also verified functionally -- the patch fixes the emulator-jb build for me in Mavericks (yay!)
One suggestion -- maybe we should verify which JB branch we are based on (4.2.x or 4.3.x) If it's 4.2.x, we might want to also get this verified by someone with OS X 10.7.
Attachment #8403711 -
Flags: feedback?(marshall) → feedback+
Flags: needinfo?(vyang)
Comment 48•11 years ago
|
||
Comment on attachment 8397018 [details] [review]
Github PR for B2G
Looks good, but there is currently a conflict with master you'll need to resolve before merging.
Attachment #8397018 -
Flags: review?(marshall) → review+
Assignee | ||
Comment 49•11 years ago
|
||
(In reply to Marshall Culpepper [:marshall_law] from comment #46)
> (In reply to Vicamo Yang [:vicamo][:vyang] from comment #45)
> On a side note, I'm a little confused because both 4.2.x and 4.3.x are
> considered Jellybean, but according to the AOSP build requirements[1]:
> - AOSP 4.2.x requires OS X 10.6 w/ Xcode 4.2
> - AOSP master (Jellybean 4.3, KitKat, and above?) requires OS X 10.8 w/
> Xcode 4.5.2
>
> Do you know if our b2g-jellybean branch is based on the 4.2.x branch or
> 4.3.x?
The b2g-jellybean branch here, like all other repositories, is based on 4.3_r2.1. Flatfish is based on 4.2. (See also bug 983013, Flatfish doesn't build on Mavericks)
Flags: needinfo?(vyang)
Assignee | ||
Comment 50•11 years ago
|
||
On Mavericks,
1) All emulator builds are of their ARM variants only.
2) No additional GCC/G++ installed.
3) Xcode 4.4.1 is the oldest available version on Mavericks.
| (ICS) | (JB-4.3) | (KK-4.4) | (JB-4.2)
| emu-ics | emu-jb | emu-kk | flatfish
------------+---------+----------+----------+----------
Xcode 4.4.1 | X[1] | O | O | O[2]
Xcode 4.5.2 | X[1] | O | O | O[2]
Xcode 4.6.3 | X[1] | O | O | O[2]
Xcode 5.0.2 | X[1] | O | O | X[3]
[1]: emulator-ics need 10.6 SDK where the oldest available Xcode (4.4.2) on Mavericks carries only 10.7 & 10.8, so emulator-ics just cannot get built on Mavericks.
[2]: need additional toolchain installed. See bug 983013 attachment 8391238 [details] [diff] [review], attachment 8391239 [details] and bug 994601.
[3]: don't have a successful solution yet. See bug 983013.
Assignee | ||
Comment 51•11 years ago
|
||
(In reply to Yusuke Yamamoto from comment #38)
Hi Yusuke San, please let me know if you still have any problem. :)
Flags: needinfo?(yu-yamamoto)
Comment 52•11 years ago
|
||
(In reply to Vicamo Yang [:vicamo][:vyang] from comment #51)
Hi Vicamo, actually, I still have other error( and I posted that to dev-b2g mailing list )...
I think it's a my mistake to set up my building environment.
My facing error is not able to include "stdio.h".
external/qemu/dma.h:13:19: error: stdio.h: No such file or directory
Also, I know this bug is still solved to get xcode command line tools.
https://developer.mozilla.org/en-US/docs/Developer_Guide/Build_Instructions/Mac_OS_X_Prerequisites#Troubleshooting
and, certainly, I can build simple helloworld written by C program with include "<stdio.h>".
So, now I'm little confusing why I can build simple C program code, but simulator-kk is not able to buid.
my build environment are
Mac OS X mavericks, Xcode 5.0.2( n' i got command line tools ), gcc version 4.6.3 (GCC), GNU Make 3.81
Flags: needinfo?(yu-yamamoto) → needinfo?(vyang)
Assignee | ||
Comment 53•11 years ago
|
||
(In reply to Yusuke Yamamoto from comment #52)
> (In reply to Vicamo Yang [:vicamo][:vyang] from comment #51)
> Hi Vicamo, actually, I still have other error( and I posted that to dev-b2g
> mailing list )...
>
> I think it's a my mistake to set up my building environment.
> My facing error is not able to include "stdio.h".
>
> external/qemu/dma.h:13:19: error: stdio.h: No such file or directory
>
> Also, I know this bug is still solved to get xcode command line tools.
> https://developer.mozilla.org/en-US/docs/Developer_Guide/Build_Instructions/
> Mac_OS_X_Prerequisites#Troubleshooting
The things here are NOT yet landed. They don't exist on the documentation yet. You don't need 10.6 SDK for emulator-{jb,kk}. Actually, please remove 10.6 SDK from your Xcode folder.
> and, certainly, I can build simple helloworld written by C program with
> include "<stdio.h>".
> So, now I'm little confusing why I can build simple C program code, but
> simulator-kk is not able to buid.
>
> my build environment are
> Mac OS X mavericks, Xcode 5.0.2( n' i got command line tools ), gcc version
> 4.6.3 (GCC), GNU Make 3.81
I repeat, the things you need to compile emulator-{jb,kk} on Mac OS X 10.9 Mavericks do NOT include GNU C Compiler at all. Here are a list of installed Homebrew components on my MBP:
$ brew list
autoconf byobu coreutils gnu-sed htop-osx libpng mpfr
openssl popt texinfo xz autoconf213 ccache gettext
gnu-tar libevent libtool newt osxfuse pwgen tmux
yasm automake cmake gmp gnupg libmpc mercurial
ntfs-3g pkg-config s-lang wget
Flags: needinfo?(vyang)
Comment 54•11 years ago
|
||
(In reply to Vicamo Yang [:vicamo][:vyang] from comment #53)
> yet. You don't need 10.6 SDK for emulator-{jb,kk}. Actually, please remove
> 10.6 SDK from your Xcode folder.
Sorry,it was lack of my writing, I still done to build "emulator-kk", to remove 10.6 sdk from Xcode folder, but I'm having that problem.
> I repeat, the things you need to compile emulator-{jb,kk} on Mac OS X 10.9
> Mavericks do NOT include GNU C Compiler at all. Here are a list of
I removed GNU C compiler, removed out/ directory on B2G, and reboot my MBP, then I try to build again, but my MBP says same error...
> installed Homebrew components on my MBP:
> $ brew list
> autoconf byobu coreutils gnu-sed htop-osx libpng mpfr
> openssl popt texinfo xz autoconf213 ccache gettext
> gnu-tar libevent libtool newt osxfuse pwgen tmux
> yasm automake cmake gmp gnupg libmpc mercurial
> ntfs-3g pkg-config s-lang wget
There are my components
$ brew list
autoconf213 findutils gmp libmpc pkg-config sqlite
ccache gawk gmp4 libmpc08 pngcrush terminal-notifier
cloog-ppl015 gdbm gnu-sed mercurial ppl011 xz
cmake gettext gnupg mpfr python yasm
coreutils git libffi mpfr2 readline
cpanminus glib libidl openssl repo
It's Sorry for you about my asking with many time...
Flags: needinfo?(vyang)
Assignee | ||
Comment 55•11 years ago
|
||
(In reply to Yusuke Yamamoto from comment #54)
We're having some offline diagnosis. For others also interested in Firefox OS development on Mac, especially on Mavericks, please don't hesitate to throw up the problems you encountered in the process. I'm going to ask some more people to verify these PRs and, if all successfully, merge them recently.
Flags: needinfo?(vyang)
Assignee | ||
Updated•11 years ago
|
Whiteboard: [ft:ril][p=3]
Target Milestone: --- → 1.4 S6 (25apr)
Comment 56•11 years ago
|
||
Thanks to you, Vicamo! I finally get an emulator up and running on my Mac after the upgrade to Maverick four months ago.
Comment 57•11 years ago
|
||
This is the first time that emulator runs on my mac laptop. Thank you, Vicamo.
Updated•11 years ago
|
blocking-b2g: --- → backlog
Assignee | ||
Comment 58•11 years ago
|
||
Assignee | ||
Comment 59•11 years ago
|
||
Assignee | ||
Comment 60•11 years ago
|
||
Assignee | ||
Comment 61•11 years ago
|
||
Assignee | ||
Comment 62•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 63•11 years ago
|
||
Just got a mail from Yusuke san saying that he has a successful emulator build on Mac, too.
Comment 64•11 years ago
|
||
Could the documentation be updated to reflect those changes?
I'm also trying to make the emulator work on Mac OS and I'm still experiencing the same problems noted by some comments here.
Updated•11 years ago
|
Flags: needinfo?(vyang)
Assignee | ||
Comment 65•11 years ago
|
||
Hi Ahmed, I've updated some bits on https://developer.mozilla.org/en-US/Firefox_OS/Firefox_OS_build_prerequisites . Can you give some feedbacks? Does it work for you?
Flags: needinfo?(vyang) → needinfo?(akachkach)
Summary: Cant build Firefox OS (emulator) on Mavericks → Cant build Firefox OS (emulator kk and jb) on Mavericks
Comment 66•11 years ago
|
||
Yes, it's way clearer now (especially the part about the ICS emulator not working on Mac OS 10.9). Thanks Vicamo!
Maybe you could also put a note here:
https://developer.mozilla.org/en-US/Firefox_OS/Preparing_for_your_first_B2G_build#Configuring_the_B2G_build_for_an_emulator
(saying that people on Mac OS 10.9+ should probably build emulator-kk or emulator-jb instead)
Flags: needinfo?(akachkach)
Assignee | ||
Comment 67•11 years ago
|
||
(In reply to Ahmed Kachkach [:akachkach] from comment #66)
> Yes, it's way clearer now (especially the part about the ICS emulator not
> working on Mac OS 10.9). Thanks Vicamo!
>
> Maybe you could also put a note here:
>
> https://developer.mozilla.org/en-US/Firefox_OS/
> Preparing_for_your_first_B2G_build#Configuring_the_B2G_build_for_an_emulator
>
> (saying that people on Mac OS 10.9+ should probably build emulator-kk or
> emulator-jb instead)
Done. :)
Updated•10 years ago
|
blocking-b2g: backlog → ---
tracking-b2g:
--- → backlog
You need to log in
before you can comment on or make changes to this bug.
Description
•