Now, I am trying to build cefsimple through scon script by linking built dylib in my project.
Internally it runs install_name_tool command on cef lib which is failing with below error
- Code: Select all
Change install name for libEGL.dylib,
RUN: install_name_tool -id /Users/satishk2/workspace/cart/bora/build/package/CONAN/hcmac/Release/macos-xcode15.2-universal/cef_mac/124.0.6367.60/lib/libEGL.dylib /Users/satishk2/workspace/cart/bora/build/package/CONAN/hcmac/Release/macos-xcode15.2-universal/cef_mac/124.0.6367.60/lib/libEGL.dylib
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: changing install names or rpaths can't be redone for: /Users/satishk2/workspace/cart/bora/build/package/CONAN/hcmac/Release/macos-xcode15.2-universal/cef_mac/124.0.6367.60/lib/libEGL.dylib (for architecture arm64) because larger updated load commands do not fit (the program must be relinked, and you may need to use -headerpad or -headerpad_max_install_names)
I already tried ‘headerpad_max_install_names’ link flag with my scon script but still it is failing.
Do I need to rebuilt cef libraries with ‘headerpad_max_install_names’ flag?
Below is sample scon script that I am using to build cefsimple app.
- Code: Select all
import os
# Create the construction environment
env = Environment()
# Paths to CEF include and library directories
cef_include_path = os.path.join('cef', 'include')
cef_lib_path = os.path.join('cef', 'libs')
# Source files
sources = [
'cefsimple.cpp',
'simple_app.cpp',
'simple_handler.cpp'
]
# Compiler and linker flags
env.Append(CPPPATH=[cef_include_path])
env.Append(LIBPATH=[cef_lib_path])
env.Append(LIBS=['cef_dll_wrapper', 'cef'])
env.Append(FRAMEWORKS=[
'Cocoa', 'Carbon', 'CoreGraphics', 'CoreFoundation', 'CoreText', 'CoreServices',
'IOKit', 'AudioToolbox', 'SystemConfiguration', 'AppKit'
])
env.Append(LINKFLAGS=['-stdlib=libc++', '-Wl,-rpath,' + cef_lib_path, '-headerpad_max_install_names'])
# Build the executable
env.Program(target='cefsimple', source=sources)
I need to build cefsimple source in my project with scon script only. Am I building it in right way?