make_distrib fails - MacOS 13.4.1 / XCode 14.0

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

make_distrib fails - MacOS 13.4.1 / XCode 14.0

Postby logicp » Thu Jun 29, 2023 9:57 am

Build release target: 5672
MacOS: 13.4.1 (Ventura)
XCode: 14.0

Building is successful, but the `make_distrib` script fails on `get_exported_symbols` with `Opaque pointers are only supported in -opaque-pointers mode (Producer: 'LLVM17.0.0git' Reader: 'LLVM APPLE_1_1400.0.29.102_0')`

Steps:
1. Run `automate-git.py`
Code: Select all
#!/bin/bash
 
#ProdSettings
export GN_DEFINES='proprietary_codecs=true ffmpeg_branding="Chrome" is_official_build=true'
 
export GN_ARGUMENTS='--ide=vs2019 --sln=cef --filters=//cef/*'
python ../automate/automate-git.py --download-dir=${HOME}/code/chromium_git --depot-tools-dir=${HOME}/code/depot_tools --no-distrib --no-build --with-pgo-profiles --branch=5672 --force-config --force-clean --x64-build


2.Update gclient vars to checkout pgo profiles:
- edit `~/code/chromium_git/chromium/.gclient`, and modify custom_vars:
Code: Select all
...
"custom_vars": {
      "checkout_pgo_profiles": True,
    },
...


3. Run hooks to checkout pgo profiles: `gclient runhooks`

4. Create projects from `code/chromium_git/chromium/src/cef/`:
Code: Select all
export GN_DEFINES="proprietary_codecs=true ffmpeg_branding="Chrome" is_official_build=true"
./cef_create_projects.sh


5. Build release:
Code: Select all
cd ~/code/chromium_git/chromium/src
ninja -C out/Release_GN_x64 cef


6. Make distribution (THIS FAILS):
Code: Select all
cd /path/to/chromium/src/cef/tools
export CEF_ARCHIVE_FORMAT=tar.bz2
./make_distrib.sh --ninja-build --x64-build


Output is as follows:
Code: Select all
/Users/embucksh/code/chromium_git/chromium/src/cef/include/wrapper/cef_closure_task.h:55: warning: explicit link request to 'include' could not be resolved
/Users/embucksh/code/chromium_git/chromium/src/cef/include/wrapper/cef_closure_task.h:56: warning: explicit link request to 'include' could not be resolved
/Users/embucksh/code/chromium_git/chromium/src/cef/include/wrapper/cef_library_loader.h:68: warning: explicit link request to 'include' could not be resolved
/Users/embucksh/code/chromium_git/chromium/src/cef/include/wrapper/cef_library_loader.h:83: warning: explicit link request to 'include' could not be resolved
/Users/embucksh/code/chromium_git/chromium/src/cef/include/wrapper/cef_library_loader.h:84: warning: explicit link request to 'include' could not be resolved
/Users/embucksh/code/chromium_git/chromium/src/cef/include/base/cef_callback_helpers.h:98: warning: Unsupported xml/html tag <typename> found
Creating /Users/embucksh/code/chromium_git/chromium/src/cef/binary_distrib/cef_binary_113.3.5+g0b33855+chromium-113.0.5672.129_docs directory.
Removing /Users/embucksh/code/chromium_git/chromium/src/cef/binary_distrib/cef_binary_113.3.5+g0b33855+chromium-113.0.5672.129_docs directory.
Transferring /Users/embucksh/code/chromium_git/chromium/src/cef/docs directory.
Creating /Users/embucksh/code/chromium_git/chromium/src/cef/binary_distrib/cef_binary_113.3.5+g0b33855+chromium-113.0.5672.129_macosx64/Debug directory.
Finding exported symbols...
Traceback (most recent call last):
  File "make_distrib.py", line 1071, in <module>
    os.path.join(dst_dir, 'cef_sandbox.a'))
  File "make_distrib.py", line 383, in combine_libs
    for symbol in get_exported_symbols(os.path.join(build_dir, libs[0])):
  File "make_distrib.py", line 337, in get_exported_symbols
    raise Exception('ERROR: nm failed: %s' % result['err'])
Exception: ERROR: nm failed: /Users/embucksh/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/nm: error: /Users/embucksh/code/chromium_git/chromium/src/out/Debug_GN_x64/obj/cef/libcef_sandbox.a(sandbox_mac.o): Opaque pointers are only supported in -opaque-pointers mode (Producer: 'LLVM17.0.0git' Reader: 'LLVM APPLE_1_1400.0.29.102_0')


Questions
1. Is this a bug?
2. Would building with `-opaque-pointers` be a viable solution? And, if so;
3. How can we pass additional `cflags` to GN when running `create_projects.sh`? (if that is indeed the resolution)

Thanks!
logicp
Techie
 
Posts: 18
Joined: Sat Sep 14, 2019 9:46 am

Re: make_distrib fails - MacOS 13.4.1 / XCode 14.0

Postby magreenblatt » Wed Jul 05, 2023 3:52 am

Your failure appears to be with "Debug_GN_x64/obj/cef/libcef_sandbox.a". This file should not be used with is_official_build=true (details here).

I suggest that you follow the AutomatedBuildSetup instructions to avoid issues.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: make_distrib fails - MacOS 13.4.1 / XCode 14.0

Postby logicp » Wed Jul 12, 2023 8:19 am

magreenblatt wrote:Your failure appears to be with "Debug_GN_x64/obj/cef/libcef_sandbox.a". This file should not be used with is_official_build=true (details here).

I suggest that you follow the AutomatedBuildSetup instructions to avoid issues.


Thank you for following up!
I have tried using the automated build setup example, both in modifying my own process, as well as running it directly without changes, but it also leads to an issue with the `make_distrib` (though it no longer complains of the opaque pointer).

Is this a separate issue? Should I create a new post?

Here is the output I am encountering:

Code: Select all
-------- Running "libtool -static -o "/Users/embucksh/code/chromium_git/chromium/src/cef/binary_distrib/cef_binary_113.3.5+g0b33855+chromium-113.0.5672.129_macosx64/Debug/cef_sandbox.a" "/Users/embucksh/code/chromium_git/chromium/src/cef/binary_distrib/cef_binary_113.3.5+g0b33855+chromium-113.0.5672.129_macosx64/Debug/cef_sandbox.o"" in "/Users/embucksh/code/chromium_git/chromium/src/cef/tools"...
Verifying exported symbols...
Verifying imported (undefined) symbols...
Creating /Users/embucksh/code/chromium_git/chromium/src/cef/binary_distrib/cef_binary_113.3.5+g0b33855+chromium-113.0.5672.129_macosx64/Release directory.
Finding exported symbols...
Traceback (most recent call last):
  File "/Users/embucksh/code/chromium_git/chromium/src/cef/tools/make_distrib.py", line 1070, in <module>
    combine_libs(platform, src_dir, sandbox_libs,
  File "/Users/embucksh/code/chromium_git/chromium/src/cef/tools/make_distrib.py", line 383, in combine_libs
    for symbol in get_exported_symbols(os.path.join(build_dir, libs[0])):
  File "/Users/embucksh/code/chromium_git/chromium/src/cef/tools/make_distrib.py", line 337, in get_exported_symbols
    raise Exception('ERROR: nm failed: %s' % result['err'])
Exception: ERROR: nm failed: nm: error: /Users/embucksh/code/chromium_git/chromium/src/out/Release_GN_x64/obj/cef/libcef_sandbox.a(sandbox_mac.o): Unknown attribute kind (86) (Producer: 'LLVM17.0.0git' Reader: 'LLVM APPLE_1_1403.0.22.14.1_0')


Thanks again
logicp
Techie
 
Posts: 18
Joined: Sat Sep 14, 2019 9:46 am

Re: make_distrib fails - MacOS 13.4.1 / XCode 14.0

Postby magreenblatt » Wed Jul 12, 2023 8:30 am

Can you try Xcode 4.1 or 4.2?

There is likely still something wrong with your build process, as you are using the wrong directory to generate cef_sandbox. See https://bitbucket.org/chromiumembedded/ ... ndowsmacos
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: make_distrib fails - MacOS 13.4.1 / XCode 14.0

Postby logicp » Wed Jul 12, 2023 3:52 pm

magreenblatt wrote:Can you try Xcode 4.1 or 4.2?

There is likely still something wrong with your build process, as you are using the wrong directory to generate cef_sandbox. See https://bitbucket.org/chromiumembedded/ ... ndowsmacos


XCode 14.1or 14.2? Yes, I could do that!

I was going to try once more to try and do the most vanilla build possible, based on your `AutomatedBuildSetup.md` instructions for MacOS. Am I correct in assuming that, if I follow these instructions, I do NOT need to build the sandbox separately?

I have a `code` directory in my home with the `depot_tools` subdir fully populated, an `automate` subdir with `automate-git.py`, and an empty `chromium_git` subdir:
Code: Select all
embucksh@vdi-mac code % pwd
/Users/embucksh/code

embucksh@vdi-mac code % find .
.
./automate
./automate/automate-git.py
./depot_tools/...<many files>...
./chromium_git


My automate command looks like this:
Code: Select all
python3 automate-git.py --download-dir=/Users/embucksh/code/chromium_git --branch=5672 --minimal-distrib --client-distrib --force-clean --x64-build --with-pgo-profiles
logicp
Techie
 
Posts: 18
Joined: Sat Sep 14, 2019 9:46 am

Re: make_distrib fails - MacOS 13.4.1 / XCode 14.0

Postby magreenblatt » Wed Jul 12, 2023 4:07 pm

Am I correct in assuming that, if I follow these instructions, I do NOT need to build the sandbox separately?

Yes
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: make_distrib fails - MacOS 13.4.1 / XCode 14.0

Postby logicp » Thu Jul 20, 2023 8:46 am

magreenblatt wrote:
Am I correct in assuming that, if I follow these instructions, I do NOT need to build the sandbox separately?

Yes


The automated build was a success, but I had to do a manual build since we need H264 support / `proprietary_codecs=true`.

For the manual process, I followed:
https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding.md#markdown-header-manual-downloading and
https://bitbucket.org/chromiumembedded/cef/wiki/MasterBuildQuickStart.md#markdown-header-mac-os-x-setup

The manual process seemed to work fine, resulting in compilations of Debug and Release, but the `make_distrib` failed again with the following:

Code: Select all
./make_distrib.sh --ninja-build
........
........
Transferring /Users/embucksh/code/chromium_git/chromium/src/cef/include/capi/views/cef_window_capi.h file.
Transferring /Users/embucksh/code/chromium_git/chromium/src/cef/include/capi/views/cef_window_delegate_capi.h file.
Traceback (most recent call last):
  File "/Users/embucksh/code/chromium_git/chromium/src/cef/tools/make_distrib.py", line 744, in <module>
    raise Exception('Missing generated header file: %s' % include)
Exception: Missing generated header file: cef_command_ids.h


Could it be related to my automate/project flags? These were them:
Code: Select all
python3 automate-git.py --download-dir=/Users/embucksh/code/chromium_git --branch=5672 --no-distrib --no-build --force-clean --x64-build --with-pgo-profiles

Code: Select all
export GN_DEFINES='proprietary_codecs=true ffmpeg_branding="Chrome" is_official_build=true'
logicp
Techie
 
Posts: 18
Joined: Sat Sep 14, 2019 9:46 am

Re: make_distrib fails - MacOS 13.4.1 / XCode 14.0

Postby magreenblatt » Thu Jul 20, 2023 9:15 am

The manual process seemed to work fine, resulting in compilations of Debug and Release

Did the builds succeed without errors?
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: make_distrib fails - MacOS 13.4.1 / XCode 14.0

Postby logicp » Thu Jul 20, 2023 10:25 am

magreenblatt wrote:
The manual process seemed to work fine, resulting in compilations of Debug and Release

Did the builds succeed without errors?


Yes, sir, both built successfully and cefsimple works as expected
logicp
Techie
 
Posts: 18
Joined: Sat Sep 14, 2019 9:46 am

Re: make_distrib fails - MacOS 13.4.1 / XCode 14.0

Postby magreenblatt » Thu Jul 20, 2023 10:33 am

I don’t think you need to do a manual build. You can run the automated build with the additional GN_DEFINES arguments necessary to enable proprietary codecs.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Next

Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 202 guests