I want to use QtCharts in Qt6, i have installed the module, after that i have added the module in CMakeLists.txt, but iam receiving error (Qt6CoreMacros.cmake:559: error: Target "4-DonutChartExample" links to target "Qt6::Charts" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing? )
my CMakeLists.txt
cmake_minimum_required(VERSION 3.5)
project(4-DonutChartExample VERSION 0.1 LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Widget Charts)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets)
set(PROJECT_SOURCES
main.cpp
widget.cpp
widget.h
widget.ui
)
if(${QT_VERSION_MAJOR} GREATER_EQUAL 6)
qt_add_executable(4-DonutChartExample
MANUAL_FINALIZATION
${PROJECT_SOURCES}
)
# Define target properties for Android with Qt 6 as:
# set_property(TARGET 4-DonutChartExample APPEND PROPERTY QT_ANDROID_PACKAGE_SOURCE_DIR
# ${CMAKE_CURRENT_SOURCE_DIR}/android)
# For more information, see https://doc.qt.io/qt-6/qt-add-executable.html#target-creation
else()
if(ANDROID)
add_library(4-DonutChartExample SHARED
${PROJECT_SOURCES}
)
# Define properties for Android with Qt 5 after find_package() calls as:
# set(ANDROID_PACKAGE_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/android")
else()
add_executable(4-DonutChartExample
${PROJECT_SOURCES}
)
endif()
endif()
target_link_libraries(4-DonutChartExample PRIVATE Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::Charts)
set_target_properties(4-DonutChartExample PROPERTIES
MACOSX_BUNDLE_GUI_IDENTIFIER my.example.com
MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION}
MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
MACOSX_BUNDLE TRUE
WIN32_EXECUTABLE TRUE
)
if(QT_VERSION_MAJOR EQUAL 6)
qt_finalize_executable(4-DonutChartExample)
endif()
Related
I'm working with Yocto "Gatesgarth" on a custom board based on i.MX6ULL.
I'm facing some problems in generating the extensible SDK (eSDK).
The generation of normal SDK it's accomplished correctly.
Below some details.
Details of system:
Board based on NXP i.MX6ULL
Yocto version "Gatesgarth 3.2.4 (May 2021)"
BB_VERSION = "1.48.0",
NATIVELSBSTRING = "ubuntu-18.04"
DISTRO_VERSION = "5.10-gatesgarth"
meta-qt5 is present
Build environment based on Docker Container
Environment Variable:
File: conf/local.conf
SDKMACHINE ?= 'x86_64'
File: test-image-mx6ull.bb
inherit core-image
inherit populate_sdk_qt5
inherit populate_sdk_ext
SDK_EXT_TYPE = "minimal"
SDK_INCLUDE_TOOLCHAIN = "1"
SDK_INCLUDE_PKGDATA = "0"
SDK_INCLUDE_NATIVESDK = "1"
The command executed is :
bitbake test-image-mx6ull -c populate_sdk_ext
Output:
ERROR: test-image-mx6ull-1.0-r0 do_populate_sdk_ext: Error executing a python function in exec_python_func() autogenerated:
The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_python_func() autogenerated', lineno: 2, function: <module>
0001:
*** 0002:do_populate_sdk_ext(d)
0003:
File: '/yocto/sources/poky/meta/classes/populate_sdk_ext.bbclass', lineno: 720, function: do_populate_sdk_ext
0716: bb.fatal('The extensible SDK can currently only be built for the same architecture as the machine being built on - SDK_ARCH is set to %s (likely via setting
SDKMACHINE) which is different from the architecture of the build machine (%s). Unable to continue.' % (d.getVar('SDK_ARCH'), d.getVar('BUILD_ARCH')))
0717:
0718: d.setVar('SDK_INSTALL_TARGETS', get_sdk_install_targets(d))
0719: if d.getVar('SDK_INCLUDE_BUILDTOOLS') == '1':
*** 0720: buildtools_fn = get_current_buildtools(d)
0721: else:
0722: buildtools_fn = None
0723: d.setVar('SDK_REQUIRED_UTILITIES', get_sdk_required_utilities(buildtools_fn, d))
0724: d.setVar('SDK_BUILDTOOLS_INSTALLER', buildtools_fn)
File: '/yocto/sources/poky/meta/classes/populate_sdk_ext.bbclass', lineno: 556, function: get_current_buildtools
0552: import glob
0553: btfiles = glob.glob(os.path.join(d.getVar('SDK_DEPLOY'), '*-buildtools-nativesdk-standalone-*.sh'))
0554: btfiles.sort(key=os.path.getctime)
0555: print("MY-DEBUG - btfiles = {} - SDK_DEPLOY = {}".format(btfiles, d.getVar('SDK_DEPLOY')))
*** 0556: return os.path.basename(btfiles[-1])
0557:
0558:def get_sdk_required_utilities(buildtools_fn, d):
0559: """Find required utilities that aren't provided by the buildtools"""
0560: sanity_required_utilities = (d.getVar('SANITY_REQUIRED_UTILITIES') or '').split()
Exception: IndexError: list index out of range
DEBUG: Python function do_populate_sdk_ext finished
MY-DEBUG - btfiles = [] - SDK_DEPLOY = /yocto/build-mX6ull/tmp/deploy/sdk
Question:
In line 553 the array btfiles should be filled,
but the array is empty and the line 556 generate the exception.
I have no idea of whats is wrong, what I have forget and what Yocto environment variables are needed to setup to do a correctly work.
hope you are doing good
i had similar issue where i couldnt populate esdk,
its all in GLIBC version..
kindly update your GLIBC version
In my case i had to update GLIBC version to 2.33 in "yocto-uninative.inc" file. It worked for me!!!
New to Linux and CMake ,I'm trying to build a model (SCHISM) with CMake and I have an error about the netCDF libraries...
The path is :
This netCDF 4.7.3 has been built with the following features:
--cc -> /usr/bin/cc
--cflags -> -I/usr/include -I/usr/include/hdf5/serial
--libs -> -L/usr/lib/x86_64-linux-gnu -L/usr/lib/x86_64-linux-gnu/hdf5/serial -lnetcdf
--static -> -lhdf5_hl -lhdf5 -lpthread -lsz -lz -ldl -lm -lcurl
--has-fortran -> yes
--fc -> gfortran
--fflags -> -I/usr/include
--flibs -> -L/usr/lib/x86_64-linux-gnu -lnetcdff -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -lnetcdf -lnetcdf -ldl -lm
So I set the path like this in my script TEST:
set(NetCDF_FORTRAN_DIR "/usr/lib/" CACHE PATH "Path to NetCDF Fortran library")
set(NetCDF_C_DIR "/usr/lib/" CACHE PATH "Path to NetCDF C library")
Then I did the command : $ cmake -C TEST
And I obtained this error:
### Configuring NetCDF
-- NetCDF include file /usr/include/netcdf.inc will be searched for define values
CMake Error at /home/christelle/Model/schism/cmake/modules/FindNetCDF.cmake:264 (message):
Can not locate NetCDF C library
Call Stack (most recent call first):
CMakeLists.txt:129 (find_package)
CMake Warning at /home/christelle/Model/schism/cmake/modules/FindNetCDF.cmake:268 (message):
********
Can not locate separate NetCDF Fortran library (netcdff) in your NetCDF
Installation.
For older versions of NetCDF the fortran library was not separate
(everything was in the netcdf library) and this is not a problem.
If you experience a lot of linker errors for symbols starting with 'nf_' ,
lack of netcdff is a likely cause.
Call Stack (most recent call first):
CMakeLists.txt:129 (find_package)
CMake Error at /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146 (message):
Could NOT find NetCDF (missing: NetCDF_LIBRARIES)
Call Stack (most recent call first):
/usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:393 (_FPHSA_FAILURE_MESSAGE)
/home/christelle/Model/schism/cmake/modules/FindNetCDF.cmake:336 (find_package_handle_standard_args)
CMakeLists.txt:129 (find_package)
-- Configuring incomplete, errors occurred!
See also "/home/christelle/Model/schism/build/CMakeFiles/CMakeOutput.log".
What am I doing wrong?
Could you help me please?
Here is the script for FindNetCDF.cmake:
# -*- mode: cmake -*-
#
# MSTK NetCDF Find Module
# Shamelessly stolen from Amanzi open source code https://software.lanl.gov/ascem/trac
#
# Usage:
# Control the search through NetCDF_DIR or setting environment variable
# NetCDF_ROOT to the NetCDF installation prefix.
#
# This module does not search default paths!
#
# Following variables are set:
# NetCDF_FOUND (BOOL) Flag indicating if NetCDF was found
# NetCDF_INCLUDE_DIR (PATH) Path to the NetCDF include file
# NetCDF_INCLUDE_DIRS (LIST) List of all required include files
# NetCDF_LIBRARY_DIR (PATH) Path to the NetCDF library
# NetCDF_LIBRARY (FILE) NetCDF library
# NetCDF_LIBRARIES (LIST) List of all required NetCDF libraries
#
# Additional variables set
# NetCDF_C_LIBRARY_DIR (PATH) Path to the NetCDF C library
# NetCDF_C_LIBRARY (FILE) NetCDF C library
# NetCDF_CXX_LIBRARY (FILE) NetCDF C++ library
# NetCDF_LARGE_DIMS (BOOL) Checks the header files for size of
# NC_MAX_DIMS, NC_MAX_VARS and NC_MAX_VARS_DIMS
# Returns TRUE if
# NC_MAX_DIMS >= 655363
# NC_MAX_VARS >= 524288
# NC_MAX_VAR_DIMS >= 8
#
# #############################################################################
# Standard CMake modules see CMAKE_ROOT/Modules
include(FindPackageHandleStandardArgs)
# MSTK CMake functions see <root>/cmake/modules for source
#include(PrintVariable)
#include(AddPackageDependency)
if ( NetCDF_LIBRARIES AND NetCDF_INCLUDE_DIRS )
# Do nothing. Variables are set. No need to search again
else(NetCDF_LIBRARIES AND NetCDF_INCLUDE_DIRS)
# Cache variables
if(NetCDF_DIR)
set(NetCDF_DIR "${NetCDF_DIR}" CACHE PATH "Path to search for NetCDF include and library files")
endif()
if(NetCDF_INCLUDE_DIR)
set(NetCDF_INCLUDE_DIR "${NetCDF_INCLUDE_DIR}" CACHE PATH "Path to search for NetCDF include files")
endif()
if(NetCDF_LIBRARY_DIR)
set(NetCDF_LIBRARY_DIR "${NetCDF_LIBRARY_DIR}" CACHE PATH "Path to search for NetCDF library files")
endif()
# Search for include files
# Search order preference:
# (1) NetCDF_INCLUDE_DIR - check existence of path AND if the include files exist
# (2) NetCDF_DIR/<include>
# (3) Default CMake paths See cmake --html-help=out.html file for more information.
#
set(netcdf_inc_names "netcdf.inc")
if (NetCDF_INCLUDE_DIR)
if (EXISTS "${NetCDF_INCLUDE_DIR}")
find_path(cdf_test_include_path
NAMES ${netcdf_inc_names}
HINTS ${NetCDF_INCLUDE_DIR}
NO_DEFAULT_PATH)
if(NOT cdf_test_include_path)
message(SEND_ERROR "Can not locate ${netcdf_inc_names} in ${NetCDF_INCLUDE_DIR}")
endif()
set(NetCDF_INCLUDE_DIR "${cdf_test_include_path}")
else()
message(SEND_ERROR "NetCDF_INCLUDE_DIR=${NetCDF_INCLUDE_DIR} does not exist")
set(NetCDF_INCLUDE_DIR "NetCDF_INCLUDE_DIR-NOTFOUND")
endif()
else()
set(netcdf_inc_suffixes "include")
if(NetCDF_DIR)
if (EXISTS "${NetCDF_DIR}" )
find_path(NetCDF_INCLUDE_DIR
NAMES ${netcdf_inc_names}
HINTS ${NetCDF_DIR}
PATH_SUFFIXES ${netcdf_inc_suffixes}
NO_DEFAULT_PATH)
else()
message(SEND_ERROR "NetCDF_DIR=${NetCDF_DIR} does not exist")
set(NetCDF_INCLUDE_DIR "NetCDF_INCLUDE_DIR-NOTFOUND")
endif()
elseif(NetCDF_FORTRAN_DIR)
if (EXISTS "${NetCDF_FORTRAN_DIR}" )
find_path(NetCDF_INCLUDE_DIR
NAMES ${netcdf_inc_names}
HINTS ${NetCDF_FORTRAN_DIR}
PATH_SUFFIXES ${netcdf_inc_suffixes}
NO_DEFAULT_PATH)
else()
message(SEND_ERROR "NetCDF_FORTRAN_DIR=${NetCDF_FORTRAN_DIR} does not exist")
set(NetCDF_INCLUDE_DIR "NetCDF_INCLUDE_DIR-NOTFOUND")
endif()
else()
find_path(NetCDF_INCLUDE_DIR
NAMES ${netcdf_inc_names}
PATH_SUFFIXES ${netcdf_inc_suffixes})
endif()
endif()
if ( NOT NetCDF_INCLUDE_DIR )
message(SEND_ERROR "Can not locate NetCDF include directory")
endif()
# Large dimension check here
if ( NetCDF_INCLUDE_DIR )
set(netcdf_h "${NetCDF_INCLUDE_DIR}/netcdf.inc" )
message(STATUS "NetCDF include file ${netcdf_h} will be searched for define values")
file(STRINGS "${netcdf_h}" netcdf_max_dims_string REGEX "^#define NC_MAX_DIMS")
string(REGEX REPLACE "[^0-9]" "" netcdf_max_dims "${netcdf_max_dims_string}")
file(STRINGS "${netcdf_h}" netcdf_max_vars_string REGEX "^#define NC_MAX_VARS")
string(REGEX REPLACE "[^0-9]" "" netcdf_max_vars "${netcdf_max_vars_string}")
file(STRINGS "${netcdf_h}" netcdf_max_var_dims_string REGEX "^#define NC_MAX_VAR_DIMS")
string(REGEX REPLACE "[^0-9]" "" netcdf_max_var_dims "${netcdf_max_var_dims_string}")
#if (
# ( (netcdf_max_dims EQUAL 65536) OR (netcdf_max_dims GREATER 65536) ) AND
# ( (netcdf_max_vars EQUAL 524288) OR (netcdf_max_vars GREATER 524288) ) AND
# ( (netcdf_max_var_dims EQUAL 8) OR (netcdf_max_var_dims GREATER 8) )
# )
# set(NetCDF_LARGE_DIMS TRUE)
#else()
# message(WARNING "The NetCDF found in ${NetCDF_DIR} does not have the correct NC_MAX_DIMS, NC_MAX_VARS and NC_MAX_VAR_DIMS\n"
# "It may not be compatible with other TPL libraries such MOAB and ExodusII\n" )
# set(NetCDF_LARGE_DIMS FALSE)
#endif()
endif()
# Search for libraries
# Search order preference:
# (1) NetCDF_LIBRARY_DIR - check existence of path AND if the include files exist
# (2) NetCDF_DIR/<lib,Lib>
# (3) Default CMake paths See cmake --html-help=out.html file for more information.
#
if (NetCDF_LIBRARY_DIR)
if (EXISTS "${NetCDF_LIBRARY_DIR}")
if (NOT EXISTS "${NetCDF_C_LIBRARY_DIR}")
set(NetCDF_C_LIBRARY_DIR "${NetCDF_LIBRARY_DIR}")
endif()
find_library(NetCDF_C_LIBRARY
NAMES netcdf
HINTS ${NetCDF_C_LIBRARY_DIR}
NO_DEFAULT_PATH)
find_library(NetCDF_Fortran_LIBRARY
NAMES netcdff
HINTS ${NetCDF_FORTRAN_LIBRARY_DIR}
NO_DEFAULT_PATH)
else()
message(SEND_ERROR "NetCDF_LIBRARY_DIR=${NetCDF_LIBRARY_DIR} does not exist")
set(NetCDF_LIBRARY "NetCDF_C_LIBRARY-NOTFOUND")
# set(NetCDF_LIBRARY "NetCDF_CXX_LIBRARY-NOTFOUND")
endif()
else()
if(NetCDF_DIR)
if (EXISTS "${NetCDF_DIR}" )
find_library(NetCDF_C_LIBRARY
NAMES netcdf
HINTS ${NetCDF_DIR}
PATH_SUFFIXES "lib" "Lib"
NO_DEFAULT_PATH)
find_library(NetCDF_Fortran_LIBRARY
NAMES netcdff
HINTS ${NetCDF_DIR}
PATH_SUFFIXES "lib" "Lib"
NO_DEFAULT_PATH)
# find_library(NetCDF_CXX_LIBRARY
# NAMES netcdf_c++
# HINTS ${NetCDF_DIR}
# PATH_SUFFIXES "lib" "Lib"
# NO_DEFAULT_PATH)
else()
message(SEND_ERROR "NetCDF_DIR=${NetCDF_DIR} does not exist")
set(NetCDF_LIBRARY "NetCDF_C_LIBRARY-NOTFOUND")
set(NetCDF_LIBRARY "NetCDF_FORTRAN_LIBRARY-NOTFOUND")
endif()
else()
if(NetCDF_C_DIR)
if (EXISTS "${NetCDF_C_DIR}")
find_library(NetCDF_C_LIBRARY
NAMES netcdf
HINTS ${NetCDF_C_DIR}
PATH_SUFFIXES "lib" "Lib"
NO_DEFAULT_PATH)
else()
message(SEND_ERROR "NetCDF_C_DIR=${NetCDF_C_DIR} does not exist")
set(NetCDF_LIBRARY "NetCDF_C_LIBRARY-NOTFOUND")
endif()
endif()
if(NetCDF_FORTRAN_DIR)
if (EXISTS "${NetCDF_FORTRAN_DIR}")
find_library(NetCDF_Fortran_LIBRARY
NAMES netcdff
HINTS ${NetCDF_FORTRAN_DIR}
PATH_SUFFIXES "lib" "Lib"
NO_DEFAULT_PATH)
else()
message(SEND_ERROR "NetCDF_FORTRAN_DIR=${NetCDF_FORTRAN_DIR} does not exist")
set(NetCDF_LIBRARY "NetCDF_FORTRAN_LIBRARY-NOTFOUND")
endif()
endif()
# find_library(NetCDF_C_LIBRARY
# NAMES netcdf
# PATH_SUFFIXES ${netcdf_lib_suffixes})
# find_library(NetCDF_Fortran_LIBRARY
# NAMES netcdff
# PATH_SUFFIXES ${netcdf_lib_suffixes})
# endif()
endif()
endif()
if ( NOT NetCDF_C_LIBRARY )
message(SEND_ERROR "Can not locate NetCDF C library")
endif()
if ( NOT NetCDF_Fortran_LIBRARY )
message(WARNING "\n********\nCan not locate separate NetCDF Fortran library (netcdff) in your NetCDF Installation. \nFor older versions of NetCDF the fortran library was not separate (everything was in the netcdf library) and this is not a problem. \nIf you experience a lot of linker errors for symbols starting with 'nf_' , lack of netcdff is a likely cause.")
endif()
# if ( NOT NetCDF_CXX_LIBRARY )
# message(SEND_ERROR "Can not locate NetCDF CXX library")
# endif()
# Define the LIBRARIES and INCLUDE_DORS
set(NetCDF_INCLUDE_DIRS ${NetCDF_INCLUDE_DIR})
set(NetCDF_LIBRARIES ${NetCDF_C_LIBRARY} ${NetCDF_Fortran_LIBRARY})
# Need to find the NetCDF config script to check for HDF5
if ( NetCDF_DIR OR NetCDF_BIN_DIR )
find_program(netcdf_config nc-config
HINTS ${NetCDF_DIR} ${NetCDF_BIN_DIR}
PATH_SUFFIXES bin Bin
DOC "NetCDF configuration script")
if (netcdf_config AND (NOT (${CMAKE_SYSTEM_NAME} MATCHES "Windows")))
message(STATUS "Found NetCDF configuration script: ${netcdf_config}")
execute_process(COMMAND "${netcdf_config}" "--has-hdf5"
RESULT_VARIABLE _ret_code
OUTPUT_VARIABLE _stdout
ERROR_VARIABLE _stderr
)
string(REGEX REPLACE "[\n\r ]" "" _hdf5_answer ${_stdout})
message(STATUS "${netcdf_config} --has-hdf5 returned '${_hdf5_answer}'")
string(COMPARE EQUAL "${_hdf5_answer}" "yes" _has_hdf5)
if (${_has_hdf5} )
set(NetCDF_NEEDS_HDF5 True)
else()
message(STATUS "NetCDF does not require HDF5")
endif()
execute_process(COMMAND "${netcdf_config}" "--version"
RESULT_VARIABLE _ret_code
OUTPUT_VARIABLE _stdout
ERROR_VARIABLE _stderr
)
string(REGEX REPLACE "[\n\r ]" "" _netcdf_version ${_stdout})
string(REGEX REPLACE "netCDF" "" _netcdf_version ${_netcdf_version})
message(STATUS "netcdf version: ${_netcdf_version}")
if(${_netcdf_version} VERSION_GREATER "4")
set( NETCDF_4 TRUE)
message(STATUS "support nc4:${NETCDF_4}")
endif()
else()
if (NOT DEFINED NetCDF_NEEDS_HDF5)
message(SEND_ERROR "netcdf_config not available, NetCDF_NEEDS_HDF5 must be set manually")
endif()
endif()
endif()
if(NetCDF_NEEDS_HDF5)
message(STATUS "NetCDF requires HDF5")
#add_package_dependency(NetCDF DEPENDS_ON HDF5)
endif()
endif(NetCDF_LIBRARIES AND NetCDF_INCLUDE_DIRS )
# Send useful message if everything is found
find_package_handle_standard_args(NetCDF DEFAULT_MSG
NetCDF_LIBRARIES
NetCDF_INCLUDE_DIRS)
# find_package)handle)standard_args should set NetCDF_FOUND but it does not!
if ( NetCDF_LIBRARIES AND NetCDF_INCLUDE_DIRS)
set(NetCDF_FOUND TRUE)
else()
set(NetCDF_FOUND FALSE)
endif()
mark_as_advanced(
NetCDF_INCLUDE_DIR
NetCDF_INCLUDE_DIRS
NetCDF_C_LIBRARY
NetCDF_CXX_LIBRARY
NetCDF_LIBRARIES
NetCDF_LIBRARY_DIR
)
Thanks
everything good? I'm doing working on a personal project that aims to use the content_shell as a minimal browser, just for viewing sites on terminals and some other options I'm adding. For this I am using the content shell I built it in Ubuntu 16.04 with the following flags ng:
is_debug = false
is_java_debug = false
is_official_build = true
target_cpu = "x86"
symbol_level = 0
remove_webcore_debug_symbols = true
enable_nacl = false
is_component_build = true
He generated all of these files:
AHEM____.TTF
angledata
args.gn
brotli
build.ninja
build.ninja.d
character_data_generator
clang_newlib_x64
content_shell
content_shell.log
content_shell.pak
fonts.conf
font_service.service
GardinerModBug.ttf
GardinerModCat.ttf
gen
genmacro
genmodule
genperf
genstring
genversion
glibc_x64
icudtl.dat
irt_x64
libaccessibility.so
libaccessibility.so.TOC
libanimation.so
libanimation.so.TOC
libaura_extra.so
libaura_extra.so.TOC
libaura.so
libaura.so.TOC
libbase_i18n.so
libbase_i18n.so.TOC
libbase.so
libbase.so.TOC
libbindings.so
libbindings.so.TOC
libblink_android_mojo_bindings_shared.so
libblink_android_mojo_bindings_shared.so.TOC
libblink_common.so
libblink_common.so.TOC
libblink_controller.so
libblink_controller.so.TOC
libblink_core.so
libblink_core.so.TOC
libblink_deprecated_test_plugin.so
libblink_modules.so
libblink_modules.so.TOC
libblink_mojo_bindings_shared.so
libblink_mojo_bindings_shared.so.TOC
libblink_offscreen_canvas_mojo_bindings_shared.so
libblink_offscreen_canvas_mojo_bindings_shared.so.TOC
libblink_platform.so
libblink_platform.so.TOC
libblink_test_plugin.so
libbluetooth.so
libbluetooth.so.TOC
libboringssl.so
libboringssl.so.TOC
libcapture_base.so
libcapture_base.so.TOC
libcapture_lib.so
libcapture_lib.so.TOC
libcc_animation.so
libcc_animation.so.TOC
libcc_base.so
libcc_base.so.TOC
libcc_blink.so
libcc_blink.so.TOC
libcc_debug.so
libcc_debug.so.TOC
libcc_ipc.so
libcc_ipc.so.TOC
libcc_paint.so
libcc_paint.so.TOC
libcc.so
libcc.so.TOC
libcdm_manager.so
libcdm_manager.so.TOC
libchromium_sqlite3.so
libchromium_sqlite3.so.TOC
libcodec.so
libcodec.so.TOC
libcolor_space.so
libcolor_space.so.TOC
libcompositor.so
libcompositor.so.TOC
libcontent_common_mojo_bindings_shared.so
libcontent_common_mojo_bindings_shared.so.TOC
libcontent_public_common_mojo_bindings_shared.so
libcontent_public_common_mojo_bindings_shared.so.TOC
libcontent.so
libcontent.so.TOC
libcrcrypto.so
libcrcrypto.so.TOC
libc++.so
libc++.so.TOC
libdbus.so
libdbus.so.TOC
libdevice_base.so
libdevice_base.so.TOC
libdevice_event_log.so
libdevice_event_log.so.TOC
libdevice_gamepad.so
libdevice_gamepad.so.TOC
libdevices.so
libdevices.so.TOC
libdevice_vr_mojo_bindings_blink.so
libdevice_vr_mojo_bindings_blink.so.TOC
libdevice_vr_mojo_bindings_shared.so
libdevice_vr_mojo_bindings_shared.so.TOC
libdevice_vr_mojo_bindings.so
libdevice_vr_mojo_bindings.so.TOC
libdiscardable_memory_client.so
libdiscardable_memory_client.so.TOC
libdiscardable_memory_common.so
libdiscardable_memory_common.so.TOC
libdiscardable_memory_service.so
libdiscardable_memory_service.so.TOC
libdisplay.so
libdisplay.so.TOC
libdisplay_types.so
libdisplay_types.so.TOC
libdisplay_util.so
libdisplay_util.so.TOC
libEGL.so
libEGL.so.TOC
libembedder.so
libembedder.so.TOC
libevents_base.so
libevents_base.so.TOC
libevents_devices_x11.so
libevents_devices_x11.so.TOC
libevents_ozone_layout.so
libevents_ozone_layout.so.TOC
libevents.so
libevents.so.TOC
libevents_x.so
libevents_x.so.TOC
libffmpeg.so
libffmpeg.so.TOC
libfingerprint.so
libfingerprint.so.TOC
libfreetype.so.6
libfreetype.so.6.TOC
libgeolocation.so
libgeolocation.so.TOC
libgeometry_skia.so
libgeometry_skia.so.TOC
libgeometry.so
libgeometry.so.TOC
libgesture_detection.so
libgesture_detection.so.TOC
libgfx_ipc_color.so
libgfx_ipc_color.so.TOC
libgfx_ipc_geometry.so
libgfx_ipc_geometry.so.TOC
libgfx_ipc_skia.so
libgfx_ipc_skia.so.TOC
libgfx_ipc.so
libgfx_ipc.so.TOC
libgfx.so
libgfx.so.TOC
libgfx_switches.so
libgfx_switches.so.TOC
libgfx_x11.so
libgfx_x11.so.TOC
libgin.so
libgin.so.TOC
libgles2_c_lib.so
libgles2_c_lib.so.TOC
libgles2_implementation.so
libgles2_implementation.so.TOC
libgles2_utils.so
libgles2_utils.so.TOC
libGLESv2.so
libGLESv2.so.TOC
libgl_init.so
libgl_init.so.TOC
libgl_in_process_context.so
libgl_in_process_context.so.TOC
libgl_wrapper.so
libgl_wrapper.so.TOC
libgpu.so
libgpu.so.TOC
libhost.so
libhost.so.TOC
libicui18n.so
libicui18n.so.TOC
libicuuc.so
libicuuc.so.TOC
libinterfaces_shared.so
libinterfaces_shared.so.TOC
libipc_mojom_shared.so
libipc_mojom_shared.so.TOC
libipc_mojom.so
libipc_mojom.so.TOC
libipc.so
libipc.so.TOC
libjs.so
libjs.so.TOC
libkeycodes_x11.so
libkeycodes_x11.so.TOC
libkeyed_service_content.so
libkeyed_service_content.so.TOC
libkeyed_service_core.so
libkeyed_service_core.so.TOC
libmedia_blink.so
libmedia_blink.so.TOC
libmedia_gpu.so
libmedia_gpu.so.TOC
libmedia_mojo_services.so
libmedia_mojo_services.so.TOC
libmedia.so
libmedia.so.TOC
libmetrics_cpp.so
libmetrics_cpp.so.TOC
libmidi.so
libmidi.so.TOC
libmirclient.so.9
libmirclient.so.9.TOC
libmojo_common_lib.so
libmojo_common_lib.so.TOC
libmojo_ime_lib.so
libmojo_ime_lib.so.TOC
libmojo_public_system_cpp.so
libmojo_public_system_cpp.so.TOC
libmojo_public_system.so
libmojo_public_system.so.TOC
libmojo_system_impl.so
libmojo_system_impl.so.TOC
libnative_theme.so
libnative_theme.so.TOC
libnet.so
libnet.so.TOC
libnet_with_v8.so
libnet_with_v8.so.TOC
libosmesa.so
libplatform.so
libplatform.so.TOC
libppapi_host.so
libppapi_host.so.TOC
libppapi_proxy.so
libppapi_proxy.so.TOC
libppapi_shared.so
libppapi_shared.so.TOC
libprefs.so
libprefs.so.TOC
libprinting.so
libprinting.so.TOC
libprotobuf_lite.so
libprotobuf_lite.so.TOC
librange.so
librange.so.TOC
libresource_coordinator_cpp.so
libresource_coordinator_cpp.so.TOC
libresource_coordinator_public_interfaces_internal_shared.so
libresource_coordinator_public_interfaces_internal_shared.so.TOC
libsandbox_services.so
libsandbox_services.so.TOC
libseccomp_bpf.so
libseccomp_bpf.so.TOC
libsensors.so
libsensors.so.TOC
libservice_manager_cpp.so
libservice_manager_cpp.so.TOC
libservice_manager_cpp_types.so
libservice_manager_cpp_types.so.TOC
libservice_manager_mojom_blink.so
libservice_manager_mojom_blink.so.TOC
libservice_manager_mojom_constants_blink.so
libservice_manager_mojom_constants_blink.so.TOC
libservice_manager_mojom_constants_shared.so
libservice_manager_mojom_constants_shared.so.TOC
libservice_manager_mojom_constants.so
libservice_manager_mojom_constants.so.TOC
libservice_manager_mojom_shared.so
libservice_manager_mojom_shared.so.TOC
libservice_manager_mojom.so
libservice_manager_mojom.so.TOC
libservice.so
libservice.so.TOC
libshared_memory_support.so
libshared_memory_support.so.TOC
libshell_dialogs.so
libshell_dialogs.so.TOC
libskia.so
libskia.so.TOC
libsnapshot.so
libsnapshot.so.TOC
libsql.so
libsql.so.TOC
libstartup_tracing.so
libstartup_tracing.so.TOC
libstorage_browser.so
libstorage_browser.so.TOC
libstorage_common.so
libstorage_common.so.TOC
libstub_window.so
libstub_window.so.TOC
libsuid_sandbox_client.so
libsuid_sandbox_client.so.TOC
libsurface.so
libsurface.so.TOC
libtest_runner.so
libtest_runner.so.TOC
libtracing.so
libtracing.so.TOC
libui_base_ime.so
libui_base_ime.so.TOC
libui_base.so
libui_base.so.TOC
libui_base_x.so
libui_base_x.so.TOC
libui_data_pack.so
libui_data_pack.so.TOC
libui_touch_selection.so
libui_touch_selection.so.TOC
libui_views_mus_lib.so
libui_views_mus_lib.so.TOC
liburl_ipc.so
liburl_ipc.so.TOC
liburl.so
liburl.so.TOC
libuser_prefs.so
libuser_prefs.so.TOC
libv8_libbase.so
libv8_libbase.so.TOC
libv8_libplatform.so
libv8_libplatform.so.TOC
libv8.so
libv8.so.TOC
libviews.so
libviews.so.TOC
libviz_common.so
libviz_common.so.TOC
libviz_resource_format.so
libviz_resource_format.so.TOC
libVkLayer_core_validation.so
libVkLayer_core_validation.so.TOC
libVkLayer_object_tracker.so
libVkLayer_object_tracker.so.TOC
libVkLayer_parameter_validation.so
libVkLayer_parameter_validation.so.TOC
libVkLayer_swapchain.so
libVkLayer_swapchain.so.TOC
libVkLayer_threading.so
libVkLayer_threading.so.TOC
libVkLayer_unique_objects.so
libVkLayer_unique_objects.so.TOC
libweb_dialogs.so
libweb_dialogs.so.TOC
libwebview.so
libwebview.so.TOC
libwm_public.so
libwm_public.so.TOC
libwm.so
libwm.so.TOC
libwtf.so
libwtf.so.TOC
libx11_events_platform.so
libx11_events_platform.so.TOC
libx11_window.so
libx11_window.so.TOC
locales
mksnapshot
mus_app_resources_100.pak
mus_app_resources_200.pak
mus_app_resources_strings.pak
nacl_bootstrap_x64
natives_blob.bin
newlib_pnacl
newlib_pnacl_nonsfi
obj
protoc
proto_zero_plugin
pyproto
re2c
resources
shell_resources.pak
snapshot_blob.bin
swiftshader
test_ime_driver.service
toolchain.ninja
transport_security_state_generator
ui
ui_resources_100_percent.pak
ui.service
ui_test.pak
v8_build_config.json
v8_context_snapshot.bin
v8_context_snapshot_generator
views_mus_resources.pak
yasm
How do I make all these files with the same structure as the official Chromium? I removed the folders I do not need and the files add up to about 1.7 GB I want to share with others my project. I have already researched and am looking here in the group something about this but I have not yet found, which one or which command should I use to reduce the number of files, I know it is not identical however Electron uses the content_shell and the file structure is similar to of Chromium:
Electron file structure
Do I have to build it again? If so, which flags should I use?
Thanks everyone for your attention :-)
You need to set is_component_build = false when invoking gn to generate ninja build files.
This is because when is_component_build is set to true, the build will generate a shared object for each component target to improve compile time (faster incremental builds), whereas when set to false it will produce static libs for each component and bundle them into a huge shared object to speed up the application at runtime (among other reasons).
Even if you need to build it on Linux, it might be helpful to have a look at Checking out and Building Chromium for Windows # Faster builds and this answer.
I wish to generate a lot of --enable-*/--disable-* options by something like:
COMPONENTS([a b c], [yes])
where the second argument is the default value of the automatic enable_* variable. My first attempt was to write an AC_ARG_ENABLE(...) within an m4_foreach_w, but so far, I'm only getting the first component to appear in the ./configure --help output.
If I add hand-written AC_ARG_ENABLEs, they work as usual.
Regardless, the --enable-*/--disable-* options work as they should, just the help text is missing.
Here's the full code to reproduce the problem:
AC_INIT([foo], 1.0)
AM_INIT_AUTOMAKE([foreign])
AC_DEFUN([COMPONENTS],
[
m4_foreach_w([component], [$1], [
AS_ECHO(["Processing [component] component with default enable=$2"])
AC_ARG_ENABLE([component],
[AS_HELP_STRING([--enable-[]component], [component] component)],
,
[enable_[]AS_TR_SH([component])=$2]
)
])
AC_ARG_ENABLE([x],
[AS_HELP_STRING([--enable-[]x], [component x])],
,
[enable_[]AS_TR_SH([x])=$2]
)
AC_ARG_ENABLE([y],
[AS_HELP_STRING([--enable-[]y], [component y])],
,
[enable_[]AS_TR_SH([y])=$2]
)
])
COMPONENTS([a b c], [yes])
for var in a b c x y; do
echo -n "\$enable_$var="
eval echo "\$enable_$var"
done
AC_CONFIG_FILES(Makefile)
AC_OUTPUT
And an empty Makefile.am. To verify that the options work:
$ ./configure --disable-a --disable-b --disable-d --disable-x
configure: WARNING: unrecognized options: --disable-d
...
Processing component a with default enable=yes
Processing component b with default enable=yes
Processing component c with default enable=yes
$enable_a=no
$enable_b=no
$enable_c=yes
$enable_x=no
$enable_y=yes
After I poked around in autoconf sources, I figured out this has to do with the m4_divert_once call in the implementation of AC_ARG_ENABLE:
# AC_ARG_ENABLE(FEATURE, HELP-STRING, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
# ------------------------------------------------------------------------
AC_DEFUN([AC_ARG_ENABLE],
[AC_PROVIDE_IFELSE([AC_PRESERVE_HELP_ORDER],
[],
[m4_divert_once([HELP_ENABLE], [[
Optional Features:
--disable-option-checking ignore unrecognized --enable/--with options
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]]])])dnl
m4_divert_once([HELP_ENABLE], [$2])dnl
_AC_ENABLE_IF([enable], [$1], [$3], [$4])dnl
])# AC_ARG_ENABLE
# m4_divert_once(DIVERSION-NAME, CONTENT)
# ---------------------------------------
# Output CONTENT into DIVERSION-NAME once, if not already there.
# An end of line is appended for free to CONTENT.
m4_define([m4_divert_once],
[m4_expand_once([m4_divert_text([$1], [$2])])])
I'm guessing that the HELP-STRING argument is remembered in it's unexpanded form, so it is added just once for all components. Manually expanding the AC_HELP_STRING does what I want:
AC_DEFUN([COMPONENTS],
[
m4_foreach_w([comp], [$1], [
AS_ECHO(["Processing component 'comp' with default enable=$2"])
AC_ARG_ENABLE([comp],
m4_expand([AS_HELP_STRING([--enable-comp], enable component comp)]),
,
[enable_[]AS_TR_SH([comp])=$2]
)
])
])
COMPONENTS([a b c x y], [yes])
I couldn't find a way to properly quote components so that it appears as a string, after being used as the loop variable in m4_foreach_w, so I just renamed it to spare me the trouble.
I've already checked dozens of web pages and configurations about this.
I'm desperate because I really need to use this feature and soon.
These are my settings:
Language: C++
Libraries: OpenSceneGraph (OSG) v3.2.0
OS: Xubuntu 14.04 (on a VMWare Player virtual machine)
I am compiling an example from the book "OpenSceneGraph 3.0 - Beginner's Guide", pages 297-299, regarding the use of Text on OSG, which requires an additional plug-in, freetype (http://www.freetype.org/), which is installed.
The example compiles correctly.
I think I have all the required include files and libraries.
The problem comes in the link phase. It always gives me this error:
/usr/bin/ld: CMakeFiles/osg_demos.dir/osg_demos.cpp.o: undefined reference to symbol '_ZN7osgText12readFontFileERKSsPKN5osgDB7OptionsE'
//usr/lib/libosgText.so.99: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [osg_demos] Error 1
make[1]: *** [CMakeFiles/osg_demos.dir/all] Error 2
make: *** [all] Error 2
I checked that I have the files:
"/usr/lib/libosgText.so.99" which is a link to the actual lib file:
"libosgText.so.3.2.0".
"/usr/lib/osgPlugins-3.2.0/osgdb_freetype.so"
the external dependency of the osgText library.
I ran out of ideas. :(
Can someone help me?
My question stops here, but in case you want to check my files, please find them below.
The code responsible for this problem:
osgText::Text* createText( const osg::Vec3& pos,
const std::string& content, float size ) {
osg::ref_ptr<osgText::Font> g_font = osgText::readFontFile("arial.ttf");
osg::ref_ptr<osgText::Text> text = new osgText::Text;
text->setFont( g_font.get() );
text->setCharacterSize( size );
text->setAxisAlignment( osgText::TextBase::XY_PLANE );
text->setPosition( pos );
text->setText( content );
return text.release();
}
These are the Include files that I am using which are specific to osgText operations, apart from all the others that I already need on my project:
#include <osg/Camera>
#include <osgText/TextBase>
#include <osgText/Font>
#include <osgText/Text>
This is my "CMakeLists.txt" file:
cmake_minimum_required( VERSION 2.6 )
project( OSG_DEMOS )
find_package( OpenThreads )
find_package( osg )
find_package( osgDB )
find_package( osgGA )
find_package( osgUtil )
find_package( osgViewer )
find_package( osgText ) # Needed for demo: writeText()
find_package( osgShadow ) # Needed for demo: writeText()
find_package( osgParticle ) # Needed for demo: writeText()
find_package( osgFX ) # Needed for demo: writeText()
find_package(PCL 1.6 COMPONENTS)
set(CMAKE_CXX_FLAGS "-g -Wno-deprecated")
macro( config_project PROJNAME LIBNAME )
include_directories( ${${LIBNAME}_INCLUDE_DIR} )
target_link_libraries( ${PROJNAME} ${${LIBNAME}_LIBRARIES} )
endmacro()
add_executable(osg_demos osg_demos.cpp)
config_project(osg_demos OPENTHREADS )
config_project(osg_demos OSG )
config_project(osg_demos OSGDB )
config_project(osg_demos OSGGA )
config_project(osg_demos OSGUTIL )
config_project(osg_demos OSGVIEWER )
config_project(osg_demos osgText )
config_project(osg_demos osgShadow )
config_project(osg_demos osgParticle )
config_project(osg_demos osgFX )
The problem was on the "CMakeLists.txt" file.
Apparently, the config_project macro requires all uppercase letters. I don't exactly understand why.
To make the project link correctly, I switched to uppercase the reference to library name on the last four lines of that file, like:
config_project(osg_demos OSGTEXT )
instead of:
config_project(osg_demos osgText )
What a nightmare just because of this...