ungoogled-software / ungoogled-chromium

Google Chromium, sans integration with Google
BSD 3-Clause "New" or "Revised" License
20.87k stars 848 forks source link

Update macOS support to version 55 #129

Closed Eloston closed 7 years ago

Eloston commented 8 years ago

Enough progress has been made that work on macOS can begin. I still don't have a macOS machine, so any help here is appreciated.

piningforthefnords commented 8 years ago

You can install OSX in virtualbox if you don't care so much about the legality of doing so, or I can provide you with a VM running on a laptop (though I can't guarantee I'll remember not to shut the lid), or will help with testing.

9Morello commented 8 years ago

Ok, lets do this.

Eloston commented 8 years ago

@piningforthefnords How's the performance and efficiency? I heard it's not as good as it is on VMware. If it's decent, I can try setting it up some time in the future if I really need to.

@9Morello Cool. A few things that will have to be done:

EDIT: I will update the GN flags and the extra_deps.ini. EDIT2: Done: 88d3962d4842e14e80c1bdde5fd8d655ac56c274. I've also updated the patches. You can try to see if this will build without any other changes.

9Morello commented 8 years ago

Got an error.

2016-11-30 00:08:43,686 - DEBUG: GN command: out/bootstrap_gn gen out/Release --args=use_sysroot=false safe_browsing_mode=0 enable_rlz=false is_clang=true treat_warnings_as_errors=false google_default_client_secret="" enable_hangout_services_extension=false enable_google_now=false enable_one_click_signin=false enable_widevine=true enable_nacl_nonsfi=false enable_nacl=false enable_remoting=false is_debug=false enable_webrtc=false clang_use_chrome_plugins=false icu_use_data_file=false use_ozone=false fatal_linker_warnings=false enable_mse_mpeg2ts_stream_parser=true ffmpeg_branding="ChromeOS" proprietary_codecs=true google_api_key="" remove_webcore_debug_symbols=true google_default_client_id="" fieldtrial_testing_like_official_build=true enable_hevc_demuxing=true enable_hotwording=false use_official_google_api_keys=false
ERROR at //chrome/browser/ui/BUILD.gn:629:9: Item not found
        "views/sync/one_click_signin_dialog_view.cc",
        ^-------------------------------------------
You were trying to remove "views/sync/one_click_signin_dialog_view.cc"
from the list but it wasn't there.
See //chrome/test/BUILD.gn:764:7: which caused the file to be included.
      "//chrome/browser/ui",
      ^--------------------
2016-11-30 00:08:57,982 - ERROR: gn gen returned non-zero exit code: 1

EDIT: seems like removing those lines from /chrome/browser/ui/BUILD.gn solved the problem. Lets see if this will bug something when building chromium later.

sources -= [
        "views/sync/one_click_signin_dialog_view.cc",
        "views/sync/one_click_signin_dialog_view.h",
    ]

Also, it seems it built libc++ flawlessly. I'm starting to build chromium now.

Eloston commented 8 years ago

Oh I pushed f3395de2fec67aa20c0c51ff2b353faa56ac327a before I saw you edit. Good thing it works now.

9Morello commented 8 years ago

Got an error.

[415/15424] LIBTOOL-STATIC obj/third_party/ffmpeg/libffmpeg_internal.a
FAILED: obj/third_party/ffmpeg/libffmpeg_internal.a 
rm -f obj/third_party/ffmpeg/libffmpeg_internal.a && TOOL_VERSION=1479358929 python ../../build/toolchain/mac/filter_libtool.py libtool -static  -o obj/third_party/ffmpeg/libffmpeg_internal.a 
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: no files specified
Usage: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool -static [-] file [...] [-filelist listfile[,dirname]] [-arch_only arch] [-sacLT] [-no_warning_for_no_symbols]
Usage: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool -dynamic [-] file [...] [-filelist listfile[,dirname]] [-arch_only arch] [-o output] [-install_name name] [-compatibility_version #] [-current_version #] [-seg1addr 0x#] [-segs_read_only_addr 0x#] [-segs_read_write_addr 0x#] [-seg_addr_table <filename>] [-seg_addr_table_filename <file_system_path>] [-all_load] [-noall_load]

EDIT: shouldn't the ffmpeg branding be Chromium instead of ChromeOS there?

DEBUG: GN command: out/bootstrap_gn gen out/Release --args=proprietary_codecs=true use_official_google_api_keys=false use_ozone=false remove_webcore_debug_symbols=true enable_hangout_services_extension=false enable_mse_mpeg2ts_stream_parser=true enable_one_click_signin=false fieldtrial_testing_like_official_build=true is_clang=true treat_warnings_as_errors=false google_api_key="" icu_use_data_file=false enable_rlz=false google_default_client_secret="" enable_google_now=false enable_remoting=false use_sysroot=false fatal_linker_warnings=false ffmpeg_branding="ChromeOS" safe_browsing_mode=0 clang_use_chrome_plugins=false enable_nacl_nonsfi=false enable_webrtc=false enable_hotwording=false is_debug=false google_default_client_id="" enable_nacl=false enable_hevc_demuxing=true enable_widevine=true

piningforthefnords commented 8 years ago

Same error on ffmpeg for me. Looks like it's looking for it in "ungoogled-chromium/build/sandbox/out/Release/obj/third_party/ffmpeg"; I built ffmpeg by hand and placed the files there. Rerunning build now; let's see what happens.

Eloston commented 8 years ago

Whoops 485c99ebc0dc799908c73744754d0c26b81be4b1. I forgot that ChromeOS only works on Linux platforms. It should be Chrome for everything else.

piningforthefnords commented 8 years ago

Got a new error - see https://gist.github.com/piningforthefnords/ace46e59e9368a0a4cfb3f1f14dfdc40

Eloston commented 8 years ago

Try this out 52f10858d2c702dd873dcce14b217087ac417def

9Morello commented 8 years ago

Got an error.

[13248/15668] OBJCXX obj/chrome/browse...i/one_click_signin_dialog_controller.o
FAILED: obj/chrome/browser/ui/ui/one_click_signin_dialog_controller.o 
../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/chrome/browser/ui/ui/one_click_signin_dialog_controller.o.d -DV8_DEPRECATION_WARNINGS -DENABLE_NOTIFICATIONS -DENABLE_PEPPER_CDMS -DENABLE_PLUGINS=1 -DENABLE_PDF=1 -DENABLE_PRINTING=1 -DENABLE_BASIC_PRINTING=1 -DENABLE_PRINT_PREVIEW=1 -DENABLE_SPELLCHECK=1 -DUSE_BROWSER_SPELLCHECKER=1 -DNO_TCMALLOC -DUSE_EXTERNAL_POPUP_MENU=1 -DDISABLE_NACL -DENABLE_EXTENSIONS=1 -DENABLE_TASK_MANAGER=1 -DENABLE_THEMES=1 -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_SESSION_SERVICE=1 -DENABLE_PLUGIN_INSTALLATION=1 -DENABLE_SUPERVISED_USERS=1 -DENABLE_SERVICE_DISCOVERY=1 -DUSE_PROPRIETARY_CODECS -DCHROMIUM_BUILD -DENABLE_MEDIA_ROUTER=1 -DCR_CLANG_REVISION=278861-1 -DCR_XCODE_VERSION=0731 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FORTIFY_SOURCE=2 -D__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORE=0 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DUSE_CUPS -DTOOLKIT_VIEWS=1 -DGOOGLE_PROTOBUF_NO_RTTI -DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER -DHAVE_PTHREAD -DENABLE_IPC_FUZZER -DSK_IGNORE_DW_GRAY_FIX -DSK_IGNORE_LINEONLY_AA_CONVEX_PATH_OPTS -DSK_SUPPORT_GPU=1 -DSK_BUILD_FOR_MAC -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DU_NOEXCEPT= -DU_STATIC_IMPLEMENTATION -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC -DV8_USE_EXTERNAL_STARTUP_DATA -DENABLE_WEBSOCKETS -DMESA_EGL_NO_X11_HEADERS -DLEVELDB_PLATFORM_CHROMIUM=1 -DFEATURE_ENABLE_SSL -DFEATURE_ENABLE_VOICEMAIL -DEXPAT_RELATIVE_PATH -DGTEST_RELATIVE_PATH -DNO_MAIN_THREAD_WRAPPING -DNO_SOUND_SYSTEM -DWEBRTC_CHROMIUM_BUILD -DWEBRTC_POSIX -DWEBRTC_MAC -DXML_STATIC -DSSL_USE_OPENSSL -DHAVE_OPENSSL_SSL_H -DFEATURE_ENABLE_SSL -DLOGGING=1 -DNO_MAIN_THREAD_WRAPPING -DI18N_ADDRESSINPUT_USE_BASICTYPES_OVERRIDE=1 -DI18N_ADDRESS_VALIDATION_DATA_URL=\"https://chromium-i18n.appspot.com/ssl-aggregate-address/\" -Igen/chrome/browser/ui -I../.. -Igen -I../../third_party/khronos -I../../gpu -I../../third_party/protobuf/src -Igen/protoc_out -I../../third_party/protobuf/src -I../../skia/config -I../../skia/ext -I../../third_party/skia/include/c -I../../third_party/skia/include/config -I../../third_party/skia/include/core -I../../third_party/skia/include/effects -I../../third_party/skia/include/images -I../../third_party/skia/include/lazy -I../../third_party/skia/include/pathops -I../../third_party/skia/include/pdf -I../../third_party/skia/include/pipe -I../../third_party/skia/include/ports -I../../third_party/skia/include/utils -I../../third_party/skia/include/gpu -I../../third_party/skia/src/gpu -Igen -I../../third_party/icu/source/common -I../../third_party/icu/source/i18n -Igen/ui/views/resources -Igen/chrome -Igen/chrome -Igen/chrome -Igen/chrome -Igen/chrome -Igen/chrome -Igen/chrome -Igen/chrome -Igen/chrome -Igen/chrome -Igen/chrome -Igen/chrome -Igen/chrome -Igen/chrome -Igen/chrome -I../../third_party/ced/src -Igen/components/strings -Igen/components/strings -Igen/components/strings -Igen/components/strings -I../../third_party/WebKit -Igen/third_party/WebKit -I../../v8/include -I../../v8/include -I../../third_party/boringssl/src/include -I../../third_party/mesa/src/include -Igen/ui/resources -Igen/ui/resources -I../../third_party/libwebm/source -I../../third_party/opus/src/include -I../../third_party/re2/src -Igen -Igen/extensions -Igen/extensions -Igen/extensions -Igen -Igen/extensions/strings -I../../third_party/google_toolbox_for_mac -I../../third_party/google_toolbox_for_mac/src -I../../third_party/google_toolbox_for_mac/src/AppKit -I../../third_party/google_toolbox_for_mac/src/DebugUtils -I../../third_party/google_toolbox_for_mac/src/Foundation -I../../third_party/cacheinvalidation/overrides -I../../third_party/cacheinvalidation/src -Igen/components -Igen/components -I../../third_party/zlib -I../../third_party/leveldatabase -I../../third_party/leveldatabase/src -I../../third_party/leveldatabase/src/include -I../../third_party/webrtc_overrides -I../../testing/gtest/include -I../../third_party -I../../third_party/webrtc_overrides -I../../third_party -I../../third_party/expat/files/lib -I../../third_party/jsoncpp/overrides/include -I../../third_party/jsoncpp/source/include -I../../third_party/libaddressinput/src/cpp/include -I../../third_party/libaddressinput/chromium/override -Igen/third_party/libaddressinput -Igen -fno-strict-aliasing -fstack-protector -fcolor-diagnostics -arch x86_64 -Wall -Wextra -Wpartial-availability -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-covered-switch-default -Wno-deprecated-register -Wno-unneeded-internal-declaration -Wno-inconsistent-missing-override -Wno-shift-negative-value -Wno-undefined-var-template -Wno-nonportable-include-path -Wno-address-of-packed-member -O2 -g0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -mmacosx-version-min=10.7 -fvisibility=hidden -Wheader-hygiene -Wstring-conversion -Wno-nonnull -Wexit-time-destructors -Wno-unused-function -fno-threadsafe-statics -fvisibility-inlines-hidden -std=c++11 -stdlib=libc++ -fobjc-call-cxx-cdtors -Wobjc-missing-property-synthesis -fno-rtti -fno-exceptions -include obj/chrome/browser/ui/ui/precompile.h-mm -c ../../chrome/browser/ui/cocoa/one_click_signin_dialog_controller.mm -o obj/chrome/browser/ui/ui/one_click_signin_dialog_controller.o
warning: unknown warning option '-Wno-address-of-packed-member' [-Wunknown-warning-option]
In file included from ../../chrome/browser/ui/cocoa/one_click_signin_dialog_controller.mm:5:
../../chrome/browser/ui/cocoa/one_click_signin_dialog_controller.h:30:28: error: no type named 'StartSyncCallback' in 'BrowserWindow'
      const BrowserWindow::StartSyncCallback& sync_callback,
            ~~~~~~~~~~~~~~~^
In file included from ../../chrome/browser/ui/cocoa/one_click_signin_dialog_controller.mm:11:
../../chrome/browser/ui/cocoa/one_click_signin_view_controller.h:46:18: error: no type named 'StartSyncCallback' in 'BrowserWindow'
  BrowserWindow::StartSyncCallback startSyncCallback_;
  ~~~~~~~~~~~~~~~^
../../chrome/browser/ui/cocoa/one_click_signin_view_controller.h:58:45: error: no type named 'StartSyncCallback' in 'BrowserWindow'
         syncCallback:(const BrowserWindow::StartSyncCallback&)syncCallback
                             ~~~~~~~~~~~~~~~^
../../chrome/browser/ui/cocoa/one_click_signin_dialog_controller.mm:15:26: error: no type named 'StartSyncCallback' in 'BrowserWindow'
    const BrowserWindow::StartSyncCallback& sync_callback,
          ~~~~~~~~~~~~~~~^
1 warning and 4 errors generated.

EDIT: this error seems similar to this one. Adding those lines to chrome_browser_ui.gypi didn't help.

piningforthefnords commented 8 years ago

New error here as well, see gist.

Eloston commented 8 years ago

@9Morello That looks like the same error that @piningforthefnords got earlier. Did you make sure you ran GN before you invoked the build command again? (i.e. generate_build_configuration())

piningforthefnords commented 8 years ago

@Eloston @9Morello - Last nights final commit fixed the StartSyncCallback error for me. Still having the issue with iridium::trace_url_request; haven't had much of a chance to dig into it today (I've spent today fighting with a completely different google product).

Eloston commented 8 years ago

@piningforthefnords Regarding your latest error: ecb9fb8883e83c01d1b47c1a4f756a227f17eb50

piningforthefnords commented 8 years ago

Build successful, using it now. There's a non-production/test DMG here with sha256 sum of ff82f965726e89110ec19f95382143fd25f2758ace231b03d1aa843d0c82bc78 if you want to throw it in a VM to see what happens. Build log is here.

I'm not sure if it's a bug or not, but the arguments it now runs with are different than what it had before (if memory serves), and very different than the ones used by generic Chromium. They're in the same gist as the build log.

Eloston commented 8 years ago

@piningforthefnords Well considering that I build with flags that are quite different from what standard Chromium uses, I'm not too surprised. From a brief glance, it looks like the following is happening:

Some of this reasoning could be slightly off but it seems to all be accounted for to me.

piningforthefnords commented 8 years ago

@Eloston @9Morello Thanks for the heads up on the args; I knew about the field trials one, but not how it worked with the other arguments. I was hoping one might be related to pinch to zoom #67 issue, even though it does seem to be present. And thanks for all the hard work with this! People appreciate having a safe browser.

9Morello commented 8 years ago

Just got it building too. I'll try a build from scratch just to check if everything is ok. @piningforthefnords thanks for contributing to OS X support. Having someone else to test the code really helps.

Eloston commented 8 years ago

@9Morello @piningforthefnords Good to hear. Thanks for helping out guys.

9Morello commented 8 years ago

@piningforthefnords Did it build the .dmg normally for you? Here, its hanging when trying to build the .dmg file. I didn't notice before because I tested the Chromium.app package directly.

[22358/22358] STAMP obj/chrome/chrome.stamp
2016-12-01 03:57:39,095 - INFO: Generating .dmg file...
mktemp -d /var/folders/jy/d01dhkjj3wq4k42p92kvd19m0000gn/T/tmpsd36qqyv/pkg-dmg.64502.XXXXXXXX
/var/folders/jy/d01dhkjj3wq4k42p92kvd19m0000gn/T/tmpsd36qqyv/pkg-dmg.64502.PBj9mzS9
mkdir /var/folders/jy/d01dhkjj3wq4k42p92kvd19m0000gn/T/tmpsd36qqyv/pkg-dmg.64502.PBj9mzS9/stage
rsync -aC --include \*.so --copy-unsafe-links /var/empty/ /var/folders/jy/d01dhkjj3wq4k42p92kvd19m0000gn/T/tmpsd36qqyv/pkg-dmg.64502.PBj9mzS9/stage
rsync -aC --include \*.so --copy-unsafe-links sandbox/out/Release/Chromium.app/ /var/folders/jy/d01dhkjj3wq4k42p92kvd19m0000gn/T/tmpsd36qqyv/pkg-dmg.64502.PBj9mzS9/stage/Chromium.app/
ln -s /Applications /var/folders/jy/d01dhkjj3wq4k42p92kvd19m0000gn/T/tmpsd36qqyv/pkg-dmg.64502.PBj9mzS9/stage/Drag\ to\ here\ to\ install
chmod -R a+rX,a-st,u+w,go-w /var/folders/jy/d01dhkjj3wq4k42p92kvd19m0000gn/T/tmpsd36qqyv/pkg-dmg.64502.PBj9mzS9/stage
hdiutil makehybrid -hfs -hfs-volume-name Chromium -hfs-openfolder /var/folders/jy/d01dhkjj3wq4k42p92kvd19m0000gn/T/tmpsd36qqyv/pkg-dmg.64502.PBj9mzS9/stage -ov /var/folders/jy/d01dhkjj3wq4k42p92kvd19m0000gn/T/tmpsd36qqyv/pkg-dmg.64502.PBj9mzS9/stage -o /var/folders/jy/d01dhkjj3wq4k42p92kvd19m0000gn/T/tmpsd36qqyv/pkg-dmg.64502.PBj9mzS9/hybrid.dmg
piningforthefnords commented 8 years ago

@9Morello It did create the package successfully for me. Have you tried attaching to it with dtruss to see what it's hanging on?

luckydonald commented 8 years ago

Is there a .zip file already ready to use?

Chrome 53 isn't able to access amazon.com any more. Warning ERR_CERTIFICATE_TRANSPARENCY_REQUIRED.

It seems because of https://sslmate.com/blog/post/ct_redaction_in_chrome_53 (https://bugs.chromium.org/p/chromium/issues/detail?id=664177) Edit: Amazon.com, Ebay.com, ...

pjv commented 8 years ago

@luckydonald It looks to me like devs here are working on a new build but it's not ready yet. In the mean time, you can get around the problem you are having by launching the current version from the terminal with a command like this (all one line):

/Applications/Chromium.app/Contents/MacOS/Chromium --force-fieldtrials=*EnforceCTForProblematicRoots/Disabled/ >/dev/null 2>&1 &

Eloston commented 8 years ago

@luckydonald You can use this build until I've updated to Chromium 55.

9Morello commented 8 years ago

@Eloston My problem was related to disk space. It builds the .dmg flawlessly now. Are we skipping 54? I thought you were going to wait for the new inox patches.

Eloston commented 8 years ago

@9Morello Yeah we are skipping 54. Usually I would wait for Iridium and Inox to update (especially since quite a few patches broke), but I didn't feel like waiting (and I have some time) so I'm spending it by updating them. Right now I'm about halfway through a Debian build and fixing stuff that comes up along the way.

Once I get the Debian build to work I'm going to repurpose this issue for updating to 55.

Eloston commented 8 years ago

@piningforthefnords @9Morello beb4b62aac08ffc99cc86b3fac8358d5ecc2db13 allows me to build a working version of 55 on Debian stretch. Could you guys try this out on macOS?

lenormf commented 8 years ago

Can we hope for a release?

Eloston commented 8 years ago

@lenormf Of 55? Yes. If you want a build of 54, you can get it from one of the comments made earlier. But there will be no release for 54.

lenormf commented 8 years ago

Nice, I've been on the lookout for new official packages to download in my scripts that update docker containers.

Tried building on debian:stretch, got an error:

2016-12-05 08:56:05,233 - INFO: Running gn command...
2016-12-05 08:56:05,233 - DEBUG: Appending resources/common/gn_flags
2016-12-05 08:56:05,234 - DEBUG: Appending resources/linux_static/gn_flags
2016-12-05 08:56:05,234 - DEBUG: GN command: out/bootstrap_gn gen out/Release --args=is_debug=false is_clang=true enable_hangout_services_extension=false treat_warnings_as_errors=false ffmpeg_branding="ChromeOS" enable_remoting=false use_gconf=false remove_webcore_debug_symbols=true clang_base_path="/usr/lib/llvm-3.9" enable_iterator_debugging=false fatal_linker_warnings=false enable_nacl_nonsfi=false google_api_key="" enable_hevc_demuxing=true google_default_client_secret="" enable_widevine=true enable_mse_mpeg2ts_stream_parser=true enable_hotwording=false gold_path="" icu_use_data_file=false use_gold=true enable_nacl=false use_official_google_api_keys=false clang_use_chrome_plugins=false enable_webrtc=false is_official_build=true use_sysroot=false fieldtrial_testing_like_official_build=true google_default_client_id="" enable_rlz_support=false safe_browsing_mode=0 enable_google_now=false proprietary_codecs=true symbol_level=0 use_gnome_keyring=false enable_one_click_signin=false use_ozone=false
ERROR at //printing/BUILD.gn:135:22: Script returned non-zero exit code.
      cups_version = exec_script("cups_config_helper.py",
                     ^----------
Current dir: /root/ungoogled-chromium/build/sandbox/out/Release/
Command: python -- /root/ungoogled-chromium/build/sandbox/printing/cups_config_helper.py --api-version 
Returned 1.
stderr:

Traceback (most recent call last):
  File "/root/ungoogled-chromium/build/sandbox/printing/cups_config_helper.py", line 106, in <module>
    sys.exit(main())
  File "/root/ungoogled-chromium/build/sandbox/printing/cups_config_helper.py", line 76, in main
    subprocess.call([cups_config, '--api-version'])
  File "/usr/lib/python2.7/subprocess.py", line 523, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/lib/python2.7/subprocess.py", line 711, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1343, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

See //BUILD.gn:264:7: which caused the file to be included.
      "//printing:printing_unittests",
      ^------------------------------
2016-12-05 08:56:05,552 - ERROR: gn gen returned non-zero exit code: 1

Apparently the cups_config isn't reachable in my docker container, and I couldn't find the package that provides it (it's not part of depot_tools either), so I just wrote a cups_config script that forwards everything to cups-config and it seems to have done it. Maybe this needs to be changed.

I had other errors due to some packages not being installed, it seems that the dependency install script has some blindspots (a lot). I'm not done installing all of them, I'll let you know if I run into more issues.

luckydonald commented 8 years ago

@Eloston https://github.com/Eloston/ungoogled-chromium/issues/129#issuecomment-264738968, also @pjv Thanks for that! Edit: Is working, am using it ATM.

9Morello commented 8 years ago

@Eloston

Applying patch ../patches/ungoogled-macos/fix-libcxx-archive-build-script.patch
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|# Modify libc++.a build script to make it build
|
|--- a/third_party/libc++-static/build.sh
|+++ b/third_party/libc++-static/build.sh
--------------------------
No file to patch.  Skipping patch.
2 out of 2 hunks ignored
Patch ../patches/ungoogled-macos/fix-libcxx-archive-build-script.patch does not apply (enforce with -f)
2016-12-05 12:37:22,231 - ERROR: Quilt returned non-zero exit code: 1

The third_party/libc++-static folder doesn't exist in v55 source. Perhaps Chromium doesn't use it anymore? I've copied the folder from the source of v54 in the meantime so I can test it while you make the changes in buildlib.

EDIT: got an error further in the building. Does v55 uses llvm3.9? Or could this be related to the libc++.a?

[6329/23922] SOLINK WidevineCdm/_platf...cific/mac_x64/libwidevinecdm.dylib.TOC
FAILED: WidevineCdm/_platform_specific/mac_x64/libwidevinecdm.dylib WidevineCdm/_platform_specific/mac_x64/libwidevinecdm.dylib.TOC 
if [ ! -e "WidevineCdm/_platform_specific/mac_x64/libwidevinecdm.dylib" -o ! -e "WidevineCdm/_platform_specific/mac_x64/libwidevinecdm.dylib.TOC" ] || otool -l "WidevineCdm/_platform_specific/mac_x64/libwidevinecdm.dylib" | grep -q LC_REEXPORT_DYLIB ; then TOOL_VERSION=1480633325 ../../build/toolchain/mac/linker_driver.py ../../third_party/llvm-build/Release+Asserts/bin/clang++ -shared -Wl,-exported_symbol,_PPP_GetInterface -Wl,-exported_symbol,_PPP_InitializeModule -Wl,-exported_symbol,_PPP_ShutdownModule -stdlib=libc++ -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -mmacosx-version-min=10.7 -Wl,-ObjC -o "WidevineCdm/_platform_specific/mac_x64/libwidevinecdm.dylib" -Wl,-filelist,"WidevineCdm/_platform_specific/mac_x64/libwidevinecdm.dylib.rsp" -framework ApplicationServices -framework AppKit -lbsm -framework CoreFoundation -framework IOKit -framework Security  && { otool -l "WidevineCdm/_platform_specific/mac_x64/libwidevinecdm.dylib" | grep LC_ID_DYLIB -A 5; nm -gP "WidevineCdm/_platform_specific/mac_x64/libwidevinecdm.dylib" | cut -f1-2 -d' ' | grep -v U$$; true; } > "WidevineCdm/_platform_specific/mac_x64/libwidevinecdm.dylib.TOC"; else TOOL_VERSION=1480633325 ../../build/toolchain/mac/linker_driver.py ../../third_party/llvm-build/Release+Asserts/bin/clang++ -shared -Wl,-exported_symbol,_PPP_GetInterface -Wl,-exported_symbol,_PPP_InitializeModule -Wl,-exported_symbol,_PPP_ShutdownModule -stdlib=libc++ -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -mmacosx-version-min=10.7 -Wl,-ObjC -o "WidevineCdm/_platform_specific/mac_x64/libwidevinecdm.dylib" -Wl,-filelist,"WidevineCdm/_platform_specific/mac_x64/libwidevinecdm.dylib.rsp" -framework ApplicationServices -framework AppKit -lbsm -framework CoreFoundation -framework IOKit -framework Security  && { otool -l "WidevineCdm/_platform_specific/mac_x64/libwidevinecdm.dylib" | grep LC_ID_DYLIB -A 5; nm -gP "WidevineCdm/_platform_specific/mac_x64/libwidevinecdm.dylib" | cut -f1-2 -d' ' | grep -v U$$; true; } > "WidevineCdm/_platform_specific/mac_x64/libwidevinecdm.dylib.tmp" && if ! cmp -s "WidevineCdm/_platform_specific/mac_x64/libwidevinecdm.dylib.tmp" "WidevineCdm/_platform_specific/mac_x64/libwidevinecdm.dylib.TOC"; then mv "WidevineCdm/_platform_specific/mac_x64/libwidevinecdm.dylib.tmp" "WidevineCdm/_platform_specific/mac_x64/libwidevinecdm.dylib.TOC" ; fi; fi
Undefined symbols for architecture x86_64:
  "_PPP_GetInterface", referenced from:
     -exported_symbol[s_list] command line option
  "_PPP_InitializeModule", referenced from:
     -exported_symbol[s_list] command line option
  "_PPP_ShutdownModule", referenced from:
     -exported_symbol[s_list] command line option
ld: symbol(s) not found for architecture x86_64
clang-3.9: error: linker command failed with exit code 1 (use -v to see invocation)
Traceback (most recent call last):
  File "../../build/toolchain/mac/linker_driver.py", line 222, in <module>
    Main(sys.argv)
  File "../../build/toolchain/mac/linker_driver.py", line 72, in Main
    subprocess.check_call(compiler_driver_args)
  File "/usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 541, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['../../third_party/llvm-build/Release+Asserts/bin/clang++', '-shared', '-Wl,-exported_symbol,_PPP_GetInterface', '-Wl,-exported_symbol,_PPP_InitializeModule', '-Wl,-exported_symbol,_PPP_ShutdownModule', '-stdlib=libc++', '-arch', 'x86_64', '-isysroot', '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk', '-mmacosx-version-min=10.7', '-Wl,-ObjC', '-o', 'WidevineCdm/_platform_specific/mac_x64/libwidevinecdm.dylib', '-Wl,-filelist,WidevineCdm/_platform_specific/mac_x64/libwidevinecdm.dylib.rsp', '-framework', 'ApplicationServices', '-framework', 'AppKit', '-lbsm', '-framework', 'CoreFoundation', '-framework', 'IOKit', '-framework', 'Security']' returned non-zero exit status 1
Eloston commented 8 years ago

@lenormf I've designated #133 for your issue. In the future, please create a new issue if the problem you're having is not related to the issue you're posting in. Thanks

@9Morello That's interesting. I noticed that 55 also removed some Windows wow_helper stuff that was there before. I guess it isn't needed anymore? Regarding your new error, I'm looking into it.

piningforthefnords commented 8 years ago

@Eloston Tried building; same error as @9Morello.

[7879/24388] SOLINK WidevineCdm/_platform_specific/mac_x64/libwidevinecdm.dylib WidevineCdm/_platform_specific/mac_x64/libwidevinecdm.dylib.TOC
FAILED: if [ ! -e "WidevineCdm/_platform_specific/mac_x64/libwidevinecdm.dylib" -o ! -e "WidevineCdm/_platform_specific/mac_x64/libwidevinecdm.dylib.TOC" ] || otool -l "WidevineCdm/_platform_specific/mac_x64/libwidevinecdm.dylib" | grep -q LC_REEXPORT_DYLIB ; then TOOL_VERSION=1480633325 ../../build/toolchain/mac/linker_driver.py ../../third_party/llvm-build/Release+Asserts/bin/clang++ -shared -Wl,-exported_symbol,_PPP_GetInterface -Wl,-exported_symbol,_PPP_InitializeModule -Wl,-exported_symbol,_PPP_ShutdownModule -stdlib=libc++ -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -mmacosx-version-min=10.7 -Wl,-ObjC -o "WidevineCdm/_platform_specific/mac_x64/libwidevinecdm.dylib" -Wl,-filelist,"WidevineCdm/_platform_specific/mac_x64/libwidevinecdm.dylib.rsp" -framework ApplicationServices -framework AppKit -lbsm -framework CoreFoundation -framework IOKit -framework Security  && { otool -l "WidevineCdm/_platform_specific/mac_x64/libwidevinecdm.dylib" | grep LC_ID_DYLIB -A 5; nm -gP "WidevineCdm/_platform_specific/mac_x64/libwidevinecdm.dylib" | cut -f1-2 -d' ' | grep -v U$$; true; } > "WidevineCdm/_platform_specific/mac_x64/libwidevinecdm.dylib.TOC"; else TOOL_VERSION=1480633325 ../../build/toolchain/mac/linker_driver.py ../../third_party/llvm-build/Release+Asserts/bin/clang++ -shared -Wl,-exported_symbol,_PPP_GetInterface -Wl,-exported_symbol,_PPP_InitializeModule -Wl,-exported_symbol,_PPP_ShutdownModule -stdlib=libc++ -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -mmacosx-version-min=10.7 -Wl,-ObjC -o "WidevineCdm/_platform_specific/mac_x64/libwidevinecdm.dylib" -Wl,-filelist,"WidevineCdm/_platform_specific/mac_x64/libwidevinecdm.dylib.rsp" -framework ApplicationServices -framework AppKit -lbsm -framework CoreFoundation -framework IOKit -framework Security  && { otool -l "WidevineCdm/_platform_specific/mac_x64/libwidevinecdm.dylib" | grep LC_ID_DYLIB -A 5; nm -gP "WidevineCdm/_platform_specific/mac_x64/libwidevinecdm.dylib" | cut -f1-2 -d' ' | grep -v U$$; true; } > "WidevineCdm/_platform_specific/mac_x64/libwidevinecdm.dylib.tmp" && if ! cmp -s "WidevineCdm/_platform_specific/mac_x64/libwidevinecdm.dylib.tmp" "WidevineCdm/_platform_specific/mac_x64/libwidevinecdm.dylib.TOC"; then mv "WidevineCdm/_platform_specific/mac_x64/libwidevinecdm.dylib.tmp" "WidevineCdm/_platform_specific/mac_x64/libwidevinecdm.dylib.TOC" ; fi; fi
Undefined symbols for architecture x86_64:
  "_PPP_GetInterface", referenced from:
     -exported_symbol[s_list] command line option
  "_PPP_InitializeModule", referenced from:
     -exported_symbol[s_list] command line option
  "_PPP_ShutdownModule", referenced from:
     -exported_symbol[s_list] command line option
ld: symbol(s) not found for architecture x86_64
clang-3.9: error: linker command failed with exit code 1 (use -v to see invocation)
Traceback (most recent call last):
  File "../../build/toolchain/mac/linker_driver.py", line 222, in <module>
    Main(sys.argv)
  File "../../build/toolchain/mac/linker_driver.py", line 72, in Main
    subprocess.check_call(compiler_driver_args)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 540, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['../../third_party/llvm-build/Release+Asserts/bin/clang++', '-shared', '-Wl,-exported_symbol,_PPP_GetInterface', '-Wl,-exported_symbol,_PPP_InitializeModule', '-Wl,-exported_symbol,_PPP_ShutdownModule', '-stdlib=libc++', '-arch', 'x86_64', '-isysroot', '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk', '-mmacosx-version-min=10.7', '-Wl,-ObjC', '-o', 'WidevineCdm/_platform_specific/mac_x64/libwidevinecdm.dylib', '-Wl,-filelist,WidevineCdm/_platform_specific/mac_x64/libwidevinecdm.dylib.rsp', '-framework', 'ApplicationServices', '-framework', 'AppKit', '-lbsm', '-framework', 'CoreFoundation', '-framework', 'IOKit', '-framework', 'Security']' returned non-zero exit status 1
[7879/24388] CXX obj/third_party/widevine/cdm/widevinecdmadapter/cdm_helpers.o
Eloston commented 8 years ago

I don't have any clue why this is happening. There doesn't seem to be any change in the invocation of the linker or compiler, and Googling this error brings up stuff related to NaCl, which has never been enabled before (and it doesn't seem related to this particular issue). If someone has an idea what changed in version 55, that will help.

9Morello commented 8 years ago

@Eloston should we try to build it on OS X without the Widevine flags?

Eloston commented 8 years ago

@9Morello Yeah we could try that.

EDIT: You can set enable_widevine=false in resources/macos/gn_flags

9Morello commented 8 years ago

Adding this flag is making it go further in the build process. Lets see what happens.

piningforthefnords commented 8 years ago

@Eloston @9Morello I set enable_widevine=false in gn_flags and it built. No crashes yet, but it seems slower than 54.x (or maybe it's just my imagination).

Edit: There's an issue with it doing something ugly with stored credentials. Don't run it outside of a VM if you let it store creds / aren't using a password manager.

9Morello commented 8 years ago

@piningforthefnords Are you talking about a message of Chromium asking to use stored credentials, or something like that?

I've been getting that since v51 I think, no problems yet.

I got the same impression. It feels less responsive than older versions (haven't tried browsing on it yet).

@Eloston it also built fine here. This version doesn't work with Widevine as expected, but there is a manifest.jsonfor it inside the package. Interesting... it wasn't there before (you had to create it manually or copy from Chrome to get Widevine support), even when compiled with Widevine support.

piningforthefnords commented 8 years ago

@9Morello Nope, it wasn't the stored credential warning (though it did do this, as expected), it rendered existing credentials unusable. Any credentials saved by a previous version were lost on the first run of 55, though any credentials added in 55 were saved and worked properly. When reverting to 54 the old credentials still didn't work.

The startup time is definitely much longer than before, and I'm agreeing with you that it does feel less responsive. I think most of that unresponsiveness is in UI stuff and not browsing/rendering HTML.

When I make it back home I'll see if I can figure out what it did to them.

9Morello commented 8 years ago

@piningforthefnords Wow, thats bizarre. I'm not running it on a VM, but I don't use a pw manager nor store credentials. I wonder if this is happening with vanilla Chromium too.

Eloston commented 8 years ago

@9Morello @piningforthefnords Well it's nice to hear that it builds now, but the problems you guys are having now seem pretty annoying. The performance regressions might by caused by the refactoring to reduce the amount of RAM and CPU consumed. But I don't really notice any regressions on my Linux system, so...

I'm wondering if there's a flag to specify whether to use the password manager on macOS. On Linux, disabling the use of GNOME Keyring will force Chromium to store passwords in its profile.

The fact that a manifest.json file appears is interesting... do you know if it was there with 54 or if it is created with 55 regardless of the widevine flag?

9Morello commented 8 years ago

@Eloston It wasn't there in 54. I think we were still using that flag when compiling it. On 55, it fails to build if enable_widevine is set as true, and I get the manifest.json file with it set as false.

Eloston commented 8 years ago

@9Morello Oh okay. That's really weird. What widevine binaries do you need to get widevine to work? Does macOS use a libwidevineadapter library file? Or is that only a Linux thing?

9Morello commented 8 years ago

Yes, it uses widevinecdmadapter.plugin and libwidevinecdm.dylib. I need both (plus the manifest file) to get Widevine to work.

Eloston commented 8 years ago

@9Morello Is the adapter normally built by Chromium? Do you just need to get the official libwidevinecdm.dylib or do you need both?

9Morello commented 8 years ago

@Eloston I think it downloads and/or builds both files during the build process. Before, the problem was that they weren't being added to the package (see this). Alternatively, the user could just copy them from Google Chrome (even from a different version).

Even with the files, it doesn't work if you build Chromium with enable_widevine=false. Haven't tested this using the latest widevine files from Chrome 55, though. I'll look into it later.

Eloston commented 7 years ago

@9Morello @piningforthefnords Could one of you upload binaries for version 55? I would like to upload them to the new release. Thanks.

Going to close this issue now since macOS support is pretty much done. I will open a new issue for building with Widevine support.