PCL make not generating kinfu_large_scale - point-cloud-library

This is being built on a Nvidia Jetson TK1 (armv7). I have installed Cuda v6.5, OpenNi v1 & v2, and SensorKinect. I have the following options set via ccmake prior to the build:
BUILD_CUDA
BUILD_GPU
BUILD_apps
BUILD_examples
CUDA_HOST_COMPILER: /usr/bin/cc
CUDA_TOOLKIT_ROOT_DIR: /usr/local/cuda-6.5
Here is the output of make:
$ make
-- Using CPU native flags for SSE optimization: -march=native
-- -- GCC > 4.3 found, enabling -Wabi
-- Found OpenMP
-- Eigen found (include: /usr/include/eigen3, version: 3.2.0)
-- FLANN found (include: /usr/include, lib: optimized;/usr/lib/arm-linux-gnueabihf/libflann_cpp.so;debug;/usr/lib/arm-linux-gnueabihf/libflann_cpp.so)
-- OpenNI found (include: /usr/include/ni, lib: /usr/lib/libOpenNI.so)
-- OpenNI 2 found (include: /usr/include/openni2, lib: /usr/lib/libOpenNI2.so, redist: )
-- checking for module 'metslib'
-- package 'metslib' not found
-- QHULL found (include: /usr/include, lib: optimized;/usr/lib/arm-linux-gnueabihf/libqhull.so;debug;/usr/lib/arm-linux-gnueabihf/libqhull.so)
-- VTK_MAJOR_VERSION 5, rendering backend: OpenGL
-- VTK found (include: /usr/include/vtk-5.8;/usr/include, lib: /usr/lib/;/usr/lib)
-- Could NOT find PCAP (missing: PCAP_LIBRARIES PCAP_INCLUDE_DIRS)
-- Boost version: 1.54.0
-- Found the following Boost libraries:
-- system
-- filesystem
-- thread
-- date_time
-- iostreams
-- chrono
-- Found Glew: /usr/lib/arm-linux-gnueabihf/libGLEW.so
-- PCL_EXAMPLES_SUBDIRS /home/ubuntu/pcl/examples/stereo/;/home/ubuntu/pcl/examples/segmentation/;/home/ubuntu/pcl/examples/features/;/home/ubuntu/pcl/examples/outofcore/;/home/ubuntu/pcl/examples/filters/;/home/ubuntu/pcl/examples/keypoints/;/home/ubuntu/pcl/examples/geometry/;/home/ubuntu/pcl/examples/surface/;/home/ubuntu/pcl/examples/common/
-- DOXYGEN_FOUND
-- HTML_HELP_COMPILER
-- Found CPack generators: DEB
-- The following subsystems will be built:
-- common
-- ml
-- octree
-- kdtree
-- search
-- sample_consensus
-- filters
-- io
-- 2d
-- features
-- registration
-- tracking
-- geometry
-- visualization
-- segmentation
-- people
-- surface
-- recognition
-- stereo
-- keypoints
-- outofcore
-- examples
-- tools
-- apps
not building:
|_ 3d_rec_framework: No reason
|_ in_hand_scanner: Qt4 is required for the in_hand_scanner app!
|_ point_cloud_editor: Qt4 was not found.
|_ cloud_composer: Qt4 was not found.
|_ optronic_viewer: Qt was not found.
|_ modeler: Qt4 was not found.
-- The following subsystems will not be built:
-- simulation: Disabled by default.
-- global_tests: No reason
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ubuntu/pcl/build
[ 4%] Built target pcl_common
[ 5%] Built target pcl_ml
[ 5%] Built target pcl_octree
[ 5%] Built target pcl_kdtree
[ 6%] Built target pcl_search
[ 9%] Built target pcl_sample_consensus
[ 16%] Built target pcl_filters
[ 16%] Built target pcl_io_ply
[ 26%] Built target pcl_io
[ 27%] Built target pcl_convert_pcd_ascii_binary
[ 27%] Built target pcl_converter
[ 27%] Built target pcl_hdl_grabber
[ 28%] Built target pcl_openni_grabber_depth_example
[ 28%] Built target pcl_openni_grabber_example
[ 28%] Built target pcl_openni_pcd_recorder
[ 28%] Built target pcl_pcd_convert_NaN_nan
[ 28%] Built target pcl_pcd_introduce_nan
[ 28%] Built target pcl_ply2obj
[ 29%] Built target pcl_ply2ply
[ 29%] Built target pcl_ply2raw
[ 29%] Built target pcl_plyheader
[ 29%] Built target pcl_2d
[ 36%] Built target pcl_features
[ 44%] Built target pcl_registration
[ 45%] Built target pcl_tracking
[ 49%] Built target pcl_visualization
[ 49%] Built target pcl_hdl_viewer_simple
[ 49%] Built target pcl_image_grabber_saver
[ 49%] Built target pcl_image_grabber_viewer
[ 50%] Built target pcl_oni_viewer
[ 50%] Built target pcl_openni2_viewer
[ 50%] Built target pcl_openni_image
[ 50%] Built target pcl_openni_viewer
[ 50%] Built target pcl_pcd_grabber_viewer
[ 51%] Built target pcl_pcd_image_viewer
[ 51%] Built target pcl_timed_trigger_test
[ 52%] Built target pcl_viewer
[ 52%] Built target pcl_vlp_viewer
[ 57%] Built target pcl_segmentation
[ 57%] Built target pcl_people
[ 57%] Built target pcl_ground_based_rgbd_people_detector
[ 62%] Built target pcl_surface
[ 66%] Built target pcl_recognition
[ 67%] Built target pcl_stereo
[ 69%] Built target pcl_keypoints
[ 69%] Built target pcl_outofcore
[ 70%] Built target pcl_outofcore_print
[ 70%] Built target pcl_outofcore_process
[ 71%] Built target pcl_example_stereo_baseline
[ 72%] Built target pcl_example_cpc_segmentation
[ 72%] Built target pcl_example_extract_clusters_normals
[ 72%] Built target pcl_example_lccp_segmentation
[ 72%] Built target pcl_example_region_growing
[ 72%] Built target pcl_example_supervoxels
[ 72%] Built target pcl_example_difference_of_normals
[ 73%] Built target pcl_example_fast_point_feature_histograms
[ 74%] Built target pcl_example_normal_estimation
[ 74%] Built target pcl_example_point_feature_histograms
[ 75%] Built target pcl_example_principal_curvatures_estimation
[ 75%] Built target pcl_example_rift_estimation
[ 76%] Built target pcl_example_shape_contexts
[ 76%] Built target pcl_example_spin_images
[ 76%] Built target pcl_example_outofcore
[ 76%] Built target pcl_example_outofcore_with_lod
[ 76%] Built target pcl_example_extract_indices
[ 76%] Built target pcl_example_remove_nan_from_point_cloud
[ 76%] Built target pcl_example_get_keypoints_indices
[ 76%] Built target pcl_example_sift_keypoint_estimation
[ 76%] Built target pcl_example_sift_normal_keypoint_estimation
[ 76%] Built target pcl_example_sift_z_keypoint_estimation
[ 76%] Built target pcl_example_half_edge_mesh
[ 76%] Built target pcl_example_check_if_point_is_valid
[ 76%] Built target pcl_example_copy_point_cloud
[ 76%] Built target pcl_example_get_max_min_coordinates
[ 76%] Built target pcl_example_organized_point_cloud
[ 76%] Built target pcl_example_scope_time
[ 76%] Built target pcl_add_gaussian_noise
[ 77%] Built target pcl_boundary_estimation
[ 77%] Built target pcl_cluster_extraction
[ 77%] Built target pcl_compute_cloud_error
[ 77%] Built target pcl_compute_hausdorff
[ 77%] Built target pcl_compute_hull
[ 77%] Built target pcl_concatenate_points_pcd
[ 77%] Built target pcl_crf_segmentation
[ 77%] Built target pcl_crop_to_hull
[ 78%] Built target pcl_demean_cloud
[ 78%] Built target pcl_elch
[ 78%] Built target pcl_extract_feature
[ 78%] Built target pcl_fast_bilateral_filter
[ 78%] Built target pcl_fpfh_estimation
[ 78%] Built target pcl_generate
[ 78%] Built target pcl_gp3_surface
[ 78%] Built target pcl_grid_min
[ 79%] Built target pcl_icp
[ 79%] Built target pcl_icp2d
[ 79%] Built target pcl_linemod_detection
[ 80%] Built target pcl_local_max
[ 80%] Built target pcl_lum
[ 80%] Built target pcl_marching_cubes_reconstruction
[ 80%] Built target pcl_match_linemod_template
[ 80%] Built target pcl_mesh2pcd
[ 81%] Built target pcl_mesh_sampling
[ 81%] Built target pcl_mls_smoothing
[ 82%] Built target pcl_morph
[ 82%] Built target pcl_ndt2d
[ 82%] Built target pcl_ndt3d
[ 83%] Built target pcl_normal_estimation
[ 83%] Built target pcl_obj2pcd
[ 83%] Built target pcl_obj2ply
[ 83%] Built target pcl_obj2vtk
[ 83%] Built target pcl_obj_rec_ransac_accepted_hypotheses
[ 84%] Built target pcl_obj_rec_ransac_hash_table
[ 84%] Built target pcl_obj_rec_ransac_model_opps
[ 84%] Built target pcl_obj_rec_ransac_orr_octree
[ 84%] Built target pcl_obj_rec_ransac_orr_octree_zprojection
[ 85%] Built target pcl_obj_rec_ransac_result
[ 85%] Built target pcl_obj_rec_ransac_scene_opps
[ 85%] Built target pcl_octree_viewer
[ 85%] Built target pcl_oni2pcd
[ 85%] Built target pcl_openni_save_image
[ 86%] Built target pcl_organized_pcd_to_png
[ 86%] Built target pcl_outlier_removal
[ 86%] Built target pcl_passthrough_filter
[ 86%] Built target pcl_pcd2ply
[ 87%] Built target pcl_pcd2png
[ 87%] Built target pcl_pcd2vtk
[ 87%] Built target pcl_pcd_change_viewpoint
[ 88%] Built target pcl_pclzf2pcd
[ 88%] Built target pcl_plane_projection
[ 88%] Built target pcl_ply2pcd
[ 88%] Built target pcl_ply2vtk
[ 88%] Built target pcl_png2pcd
[ 89%] Built target pcl_poisson_reconstruction
[ 89%] Built target pcl_progressive_morphological_filter
[ 89%] Built target pcl_radius_filter
[ 89%] Built target pcl_registration_visualizer
[ 89%] Built target pcl_sac_segmentation_plane
[ 89%] Built target pcl_spin_estimation
[ 89%] Built target pcl_tiff2pcd
[ 89%] Built target pcl_train_linemod_template
[ 89%] Built target pcl_train_unary_classifier
[ 90%] Built target pcl_transform_from_viewpoint
[ 90%] Built target pcl_transform_point_cloud
[ 90%] Built target pcl_unary_classifier_segment
[ 90%] Built target pcl_uniform_sampling
[ 90%] Built target pcl_vfh_estimation
[ 90%] Built target pcl_virtual_scanner
[ 90%] Built target pcl_voxel_grid
[ 91%] Built target pcl_voxel_grid_occlusion_estimation
[ 91%] Built target pcl_vtk2obj
[ 91%] Built target pcl_vtk2pcd
[ 91%] Built target pcl_vtk2ply
[ 92%] Built target pcl_xyz2pcd
[ 92%] Built target pcl_apps
[ 92%] Built target pcl_convolve
[ 92%] Built target pcl_dinast_grabber
[ 92%] Built target pcl_face_trainer
[ 93%] Built target pcl_feature_matching
[ 93%] Built target pcl_fs_face_detector
[ 94%] Built target pcl_grabcut_2d
[ 94%] Built target pcl_multiscale_feature_persistence_example
[ 94%] Built target pcl_ni_agast
[ 95%] Built target pcl_ni_brisk
[ 95%] Built target pcl_ni_linemod
[ 95%] Built target pcl_ni_susan
[ 95%] Built target pcl_ni_trajkovic
[ 95%] Built target pcl_nn_classification_example
[ 95%] Built target pcl_openni_3d_concave_hull
[ 95%] Built target pcl_openni_3d_convex_hull
[ 95%] Built target pcl_openni_boundary_estimation
[ 96%] Built target pcl_openni_change_viewer
[ 96%] Built target pcl_openni_face_detector
[ 96%] Built target pcl_openni_fast_mesh
[ 96%] Built target pcl_openni_feature_persistence
[ 96%] Built target pcl_openni_ii_normal_estimation
[ 96%] Built target pcl_openni_klt
[ 97%] Built target pcl_openni_mls_smoothing
[ 97%] Built target pcl_openni_mobile_server
[ 97%] Built target pcl_openni_octree_compression
[ 97%] Built target pcl_openni_organized_compression
[ 97%] Built target pcl_openni_organized_edge_detection
[ 98%] Built target pcl_openni_organized_multi_plane_segmentation
[ 98%] Built target pcl_openni_planar_convex_hull
[ 98%] Built target pcl_openni_planar_segmentation
[ 99%] Built target pcl_openni_shift_to_depth_conversion
[ 99%] Built target pcl_openni_tracking
[ 99%] Built target pcl_openni_uniform_sampling
[ 99%] Built target pcl_openni_voxel_grid
[ 99%] Built target pcl_pcd_organized_edge_detection
[ 99%] Built target pcl_pcd_organized_multi_plane_segmentation
[ 99%] Built target pcl_pcd_select_object_plane
[ 99%] Built target pcl_ppf_object_recognition
[ 99%] Built target pcl_pyramid_surface_matching
[ 99%] Built target pcl_statistical_multiscale_interest_region_extraction_example
[ 99%] Built target pcl_stereo_ground_segmentation
[ 99%] Built target pcl_surfel_smoothing_test
[100%] Built target pcl_test_search_speed
What's missing? Can kinfu_large_scale compile for armv7?

I'm building on a Jetson TK1 which is capped at CUDA 6.5 and I've come to the conclusion that kinfu requires > 6.5
Regardless, I found a much better software which is RTAB-Map

Related

add sdk c++ headers into swift package manager project

I have a c++ project that i want to add to a swift package manager project
the c++ project references headers such as #include <string> this header resides in
iossdk/usr/include/c++/v1
how do i get the swift package manager to include those headers ?
let package = Package(
name: "LibProject",
platforms: [.iOS(.v13)],
products: [
.library(
name: "LibProject",
targets: ["LibModule1", "LibModule2Framework"]),
],
dependencies: [
],
targets: [
.target(
name: "LibModule1",
path: "Sources/LibModule1"),
.target(
name: "LibModule2Framework",
path: "Sources/LibModule2Framework",
publicHeadersPath: ".",
cxxSettings: [
.headerSearchPath("usr/include/c++/v1"),
]
),
.testTarget(
name: "LibModuleTests",
dependencies: ["LibModuleTests"]),
],
cLanguageStandard: .c17,
cxxLanguageStandard: .gnucxx17
)```

Swift Package Manager: commit in project's sub-dependency doesn't appear in package code

I have a project which uses a dependency (Lib), which contains a sub-dependency (Utilities). I have just updated this sub-dependency, adding some code, but I can't see it from my project.
Here is the dependency declared in my project:
The Package in Lib, with the dependency to Utilities:
// swift-tools-version: 5.6
import PackageDescription
let package = Package(
name: "Lib",
defaultLocalization: "en",
platforms: [
.iOS("12.1")
],
products: [
.library(name: "Lib",
targets: ["Lib"])
],
dependencies: [
.package(url: "git#bitbucket.org:__UTILITIES__.git", branch: "development")
],
targets: [
.target(name: "Lib",
dependencies: [
.product(name: "Utilities",
package: "__UTILITIES__")
],
path: "code"
]
)
__UTILITIES__ is the utilities repo
I have committed and pushed the new code in Utilities's repo, on development branch. However, whatever I try (either resetting package caches, or updating to latest package versions), I never actually get my latest code from my project.
Am I missing something?
Thank you for your help

Swift Package Manager - binaryTarget with .zip file fails to validate

I tried different approaches to add a binaryTarget to a Swift package - 2 of them worked out fine (Target1 and Target2 in the example), but third approach (Target3) that should also work according to documentation does not validate: unsupported extension for binary target 'Target3'; valid extensions are: xcframework
For not bloating the repo too much with every binary release I would prefer the zip approach here... - Anyone got it working with a binaryTarget and a .zip file in path: added to the Package repository, or any hints what I'm doing wrong here?
(Xcode 12.4, t3.zip containing only the .xcframework at root level)
// swift-tools-version:5.3
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
name: "StackoverflowExamplePackage",
platforms: [
.iOS(.v9)
],
products: [
.library(
name: "Lib1",
targets: ["Target1"]),
.library(
name: "Lib2",
targets: ["Target2", "Target3"]),
],
dependencies: [
// .package(url: /* package url */, from: "1.0.0"),
],
targets: [
.binaryTarget(
name: "Target1",
url: "https://myurl.example.com/t1-xcframework.zip",
checksum: "777ddd6381e2201b7eb778b72f373f77e1190fd9dc9503f703e37c86d3b89674"
),
.binaryTarget(name: "Target2", path: "./Binaries/t2.xcframework"),
.binaryTarget(name: "Target3", path: "./Binaries/t3.zip"),
]
)
Zip archive support for local binary targets in SPM was merged last year in October and has been finally released along with Xcode 13.3.

swiftpm use binaryTarget got an error 'no such module' when archive

I'm trying to refactor the project using swiftpm and everything works fine, both in the emulator and on my iPhone device. But when I archive the project, I get an error 'no such module 'SFS2XAPIIOS''.
Here's the code of my Package.swift:
// swift-tools-version:5.3
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
name: "BaseIM",
platforms: [
.iOS(.v11)
],
products: [
.library(name: "BaseIM", targets: ["BaseIM"]),
.library(name: "SFS2XAPIIOSX", targets: ["SFS2XAPIIOS"])
],
dependencies: [
.package(name: "BaseTools", url: "http://192.168.1.28:8888/kevin/basetools.git", .branch("master")),
.package(name: "BaseClass", url: "http://192.168.1.28:8888/kevin/baseclass.git", .branch("master")),
.package(name: "MediaKit", url: "http://192.168.1.28:8888/kevin/mediakit.git", .branch("master")),
.package(name: "Realm", url: "https://github.com/realm/realm-cocoa", .upToNextMajor(from: "10.1.4"))
],
targets: [
.target(
name: "BaseIM",
dependencies: [
"SFS2XAPIIOSX", "BaseTools", "BaseClass", "MediaKit",
.product(name: "RealmSwift", package: "Realm")
]
),
.target(
name: "SFS2XAPIIOSX",
dependencies: [
"SFS2XAPIIOS"
],
path: "SFS2XAPIIOS",
cSettings: [
.headerSearchPath("Header.h")
]
),
.binaryTarget(name: "SFS2XAPIIOS", path: "SFS2XAPIIOS/SFS2XAPIIOS.xcframework"),
.testTarget(
name: "BaseIMTests",
dependencies: ["BaseIM"]),
]
)

kaa example too big to fit esp8266

I'm experimenting with the kaa IoT platform on an ESP8266 and have followed this guide. I've set up a new build environment in an Lubuntu virtual box and the build appears to run ok however it complains of a lack of code space (see below).
It seems that the ESP8266 can't handle encryption so I made sure that was turned off in the cmake file using "-DWITH_ENCRYPTION=OFF" but that does not help. Weirdly, the build still seems to mention encryption so perhaps I've not disabled it properly.
I don't understand why it mentions "Built target mbedtls" when I've specified the target as esp8266.
Anyway, here's the build output in case anyone can help me :-)
martin#martin-VirtualBox:/media/sf_martin/kaaSDKs/esp8266-sample/build$ make clean
martin#martin-VirtualBox:/media/sf_martin/kaaSDKs/esp8266-sample/build$ make
-- Toolchain path: /opt/Espressif/crosstool-NG/builds/xtensa-lx106-elf
-- Default SDK location will be used: /opt/Espressif/esp-rtos-sdk
==================================
BUILD_TYPE = MinSizeRel
KAA_PLATFORM = esp8266
KAA_MAX_LOG_LEVEL = 3
==================================
BOOTSTRAP ENABLED
PROFILE ENABLED
USER EXTENSION ENABLED
KAA WILL BE INSTALLED TO /usr/local
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- Could NOT find cppcheck
-- Configuring done
-- Generating done
-- Build files have been written to: /media/sf_martin/kaaSDKs/esp8266-sample/build
[ 1%] Building C object libs/kaa/tools/kaa_encryption/rsa_key_gen/mbedtls/CMakeFiles/mbedtls.dir/aes.c.obj
[ 2%] Building C object libs/kaa/tools/kaa_encryption/rsa_key_gen/mbedtls/CMakeFiles/mbedtls.dir/asn1parse.c.obj
[ 3%] Building C object libs/kaa/tools/kaa_encryption/rsa_key_gen/mbedtls/CMakeFiles/mbedtls.dir/asn1write.c.obj
[ 5%] Building C object libs/kaa/tools/kaa_encryption/rsa_key_gen/mbedtls/CMakeFiles/mbedtls.dir/bignum.c.obj
[ 6%] Building C object libs/kaa/tools/kaa_encryption/rsa_key_gen/mbedtls/CMakeFiles/mbedtls.dir/ctr_drbg.c.obj
[ 7%] Building C object libs/kaa/tools/kaa_encryption/rsa_key_gen/mbedtls/CMakeFiles/mbedtls.dir/entropy.c.obj
[ 8%] Building C object libs/kaa/tools/kaa_encryption/rsa_key_gen/mbedtls/CMakeFiles/mbedtls.dir/entropy_poll.c.obj
[ 10%] Building C object libs/kaa/tools/kaa_encryption/rsa_key_gen/mbedtls/CMakeFiles/mbedtls.dir/md.c.obj
[ 11%] Building C object libs/kaa/tools/kaa_encryption/rsa_key_gen/mbedtls/CMakeFiles/mbedtls.dir/md_wrap.c.obj
[ 12%] Building C object libs/kaa/tools/kaa_encryption/rsa_key_gen/mbedtls/CMakeFiles/mbedtls.dir/oid.c.obj
[ 13%] Building C object libs/kaa/tools/kaa_encryption/rsa_key_gen/mbedtls/CMakeFiles/mbedtls.dir/pk.c.obj
[ 15%] Building C object libs/kaa/tools/kaa_encryption/rsa_key_gen/mbedtls/CMakeFiles/mbedtls.dir/pkwrite.c.obj
[ 16%] Building C object libs/kaa/tools/kaa_encryption/rsa_key_gen/mbedtls/CMakeFiles/mbedtls.dir/pem.c.obj
[ 17%] Building C object libs/kaa/tools/kaa_encryption/rsa_key_gen/mbedtls/CMakeFiles/mbedtls.dir/pk_wrap.c.obj
[ 18%] Building C object libs/kaa/tools/kaa_encryption/rsa_key_gen/mbedtls/CMakeFiles/mbedtls.dir/rsa.c.obj
[ 20%] Building C object libs/kaa/tools/kaa_encryption/rsa_key_gen/mbedtls/CMakeFiles/mbedtls.dir/sha256.c.obj
[ 21%] Building C object libs/kaa/tools/kaa_encryption/rsa_key_gen/mbedtls/CMakeFiles/mbedtls.dir/pkparse.c.obj
[ 22%] Building C object libs/kaa/tools/kaa_encryption/rsa_key_gen/mbedtls/CMakeFiles/mbedtls.dir/sha1.c.obj
[ 23%] Building C object libs/kaa/tools/kaa_encryption/rsa_key_gen/mbedtls/CMakeFiles/mbedtls.dir/base64.c.obj
[ 25%] Linking C static library libmbedtls.a
[ 25%] Built target mbedtls
[ 26%] Creating directories for 'kaa_rsa_keygen'
[ 27%] No download step for 'kaa_rsa_keygen'
[ 28%] No patch step for 'kaa_rsa_keygen'
[ 30%] No update step for 'kaa_rsa_keygen'
[ 31%] Performing configure step for 'kaa_rsa_keygen'
-- Configuring done
-- Generating done
-- Build files have been written to: /media/sf_martin/kaaSDKs/esp8266-sample/build/libs/kaa/kaa_keys
[ 32%] Performing build step for 'kaa_rsa_keygen'
[ 83%] Built target mbedtls
[ 91%] Built target rsa_keygen
[100%] Built target generate_rsa_keys
[ 33%] Generating RSA headers
[ 35%] Completed 'kaa_rsa_keygen'
[ 35%] Built target kaa_rsa_keygen
[ 36%] Building C object libs/kaa/CMakeFiles/extension_profile.dir/src/extensions/profile/kaa_profile.c.obj
/media/sf_martin/kaaSDKs/esp8266-sample/libs/kaa/src/extensions/profile/kaa_profile.c: In function 'kaa_profile_manager_is_profile_set':
/media/sf_martin/kaaSDKs/esp8266-sample/libs/kaa/src/extensions/profile/kaa_profile.c:195:64: warning: unused parameter 'self' [-Wunused-parameter]
bool kaa_profile_manager_is_profile_set(kaa_profile_manager_t *self)
^
/media/sf_martin/kaaSDKs/esp8266-sample/libs/kaa/src/extensions/profile/kaa_profile.c: In function 'kaa_profile_manager_update_profile':
/media/sf_martin/kaaSDKs/esp8266-sample/libs/kaa/src/extensions/profile/kaa_profile.c:394:71: warning: unused parameter 'self' [-Wunused-parameter]
kaa_error_t kaa_profile_manager_update_profile(kaa_profile_manager_t *self, kaa_profile_t *profile_body)
^
/media/sf_martin/kaaSDKs/esp8266-sample/libs/kaa/src/extensions/profile/kaa_profile.c:394:92: warning: unused parameter 'profile_body' [-Wunused-parameter]
kaa_error_t kaa_profile_manager_update_profile(kaa_profile_manager_t *self, kaa_profile_t *profile_body)
^
[ 37%] Linking C static library libextension_profile.a
[ 37%] Built target extension_profile
Scanning dependencies of target kaac
[ 38%] Building C object libs/kaa/CMakeFiles/kaac.dir/src/kaa/platform-impl/esp8266/logger.c.obj
[ 40%] Building C object libs/kaa/CMakeFiles/kaac.dir/src/kaa/platform-impl/esp8266/kaa_client.c.obj
[ 41%] Building C object libs/kaa/CMakeFiles/kaac.dir/src/kaa/platform-impl/esp8266/configuration_persistence.c.obj
[ 42%] Building C object libs/kaa/CMakeFiles/kaac.dir/src/kaa/platform-impl/esp8266/status.c.obj
[ 43%] Building C object libs/kaa/CMakeFiles/kaac.dir/src/kaa/platform-impl/esp8266/tcp_utils.c.obj
[ 45%] Building C object libs/kaa/CMakeFiles/kaac.dir/src/kaa/platform-impl/esp8266/time.c.obj
[ 46%] Building C object libs/kaa/CMakeFiles/kaac.dir/src/kaa/platform-impl/esp8266/exit.c.obj
[ 47%] Building C object libs/kaa/CMakeFiles/kaac.dir/src/kaa/platform-impl/esp8266/snprintf.c.obj
[ 48%] Building C object libs/kaa/CMakeFiles/kaac.dir/src/kaa/platform-impl/common/sha.c.obj
[ 50%] Building C object libs/kaa/CMakeFiles/kaac.dir/src/kaa/platform-impl/common/kaa_failover_strategy.c.obj
[ 51%] Building C object libs/kaa/CMakeFiles/kaac.dir/src/kaa/platform-impl/common/ext_log_storage_memory.c.obj
[ 52%] Building C object libs/kaa/CMakeFiles/kaac.dir/src/kaa/platform-impl/common/ext_log_upload_strategies.c.obj
[ 53%] Building C object libs/kaa/CMakeFiles/kaac.dir/src/kaa/platform-impl/common/key_utils.c.obj
[ 55%] Building C object libs/kaa/CMakeFiles/kaac.dir/src/kaa/platform-impl/common/kaa_tcp_channel.c.obj
[ 56%] Building C object libs/kaa/CMakeFiles/kaac.dir/src/kaa/kaa_protocols/kaa_tcp/kaatcp_parser.c.obj
[ 57%] Building C object libs/kaa/CMakeFiles/kaac.dir/src/kaa/kaa_protocols/kaa_tcp/kaatcp_request.c.obj
[ 58%] Building C object libs/kaa/CMakeFiles/kaac.dir/src/kaa/avro_src/io.c.obj
[ 60%] Building C object libs/kaa/CMakeFiles/kaac.dir/src/kaa/avro_src/encoding_binary.c.obj
[ 61%] Building C object libs/kaa/CMakeFiles/kaac.dir/src/kaa/collections/kaa_list.c.obj
[ 62%] Building C object libs/kaa/CMakeFiles/kaac.dir/src/kaa/utilities/kaa_aes_rsa.c.obj
[ 63%] Building C object libs/kaa/CMakeFiles/kaac.dir/src/kaa/utilities/kaa_log.c.obj
[ 65%] Building C object libs/kaa/CMakeFiles/kaac.dir/src/kaa/utilities/kaa_mem.c.obj
[ 66%] Building C object libs/kaa/CMakeFiles/kaac.dir/src/kaa/utilities/kaa_buffer.c.obj
[ 67%] Building C object libs/kaa/CMakeFiles/kaac.dir/src/kaa/kaa_platform_utils.c.obj
[ 68%] Building C object libs/kaa/CMakeFiles/kaac.dir/src/kaa/kaa_platform_protocol.c.obj
[ 70%] Building C object libs/kaa/CMakeFiles/kaac.dir/src/kaa/kaa_channel_manager.c.obj
[ 71%] Building C object libs/kaa/CMakeFiles/kaac.dir/src/kaa/kaa_common_schema.c.obj
[ 72%] Building C object libs/kaa/CMakeFiles/kaac.dir/src/kaa/kaa_status.c.obj
[ 73%] Building C object libs/kaa/CMakeFiles/kaac.dir/src/kaa/kaa.c.obj
[ 75%] Building C object libs/kaa/CMakeFiles/kaac.dir/src/kaa/kaa_extension.c.obj
[ 76%] Building C object libs/kaa/CMakeFiles/kaac.dir/src/kaa/platform-impl/common/kaa_htonll.c.obj
[ 77%] Building C object libs/kaa/CMakeFiles/kaac.dir/src/kaa/gen/kaa_profile_gen.c.obj
/media/sf_martin/kaaSDKs/esp8266-sample/libs/kaa/src/kaa/gen/kaa_profile_gen.c: In function 'kaa_profile_empty_data_deserialize':
/media/sf_martin/kaaSDKs/esp8266-sample/libs/kaa/src/kaa/gen/kaa_profile_gen.c:47:76: warning: unused parameter 'reader' [-Wunused-parameter]
kaa_profile_empty_data_t *kaa_profile_empty_data_deserialize(avro_reader_t reader)
^
[ 78%] Building C object libs/kaa/CMakeFiles/kaac.dir/src/kaa/gen/kaa_logging_gen.c.obj
/media/sf_martin/kaaSDKs/esp8266-sample/libs/kaa/src/kaa/gen/kaa_logging_gen.c: In function 'kaa_logging_empty_data_deserialize':
/media/sf_martin/kaaSDKs/esp8266-sample/libs/kaa/src/kaa/gen/kaa_logging_gen.c:47:76: warning: unused parameter 'reader' [-Wunused-parameter]
kaa_logging_empty_data_t *kaa_logging_empty_data_deserialize(avro_reader_t reader)
^
[ 80%] Building C object libs/kaa/CMakeFiles/kaac.dir/src/kaa/gen/kaa_configuration_gen.c.obj
/media/sf_martin/kaaSDKs/esp8266-sample/libs/kaa/src/kaa/gen/kaa_configuration_gen.c: In function 'kaa_configuration_empty_data_deserialize':
/media/sf_martin/kaaSDKs/esp8266-sample/libs/kaa/src/kaa/gen/kaa_configuration_gen.c:47:88: warning: unused parameter 'reader' [-Wunused-parameter]
kaa_configuration_empty_data_t *kaa_configuration_empty_data_deserialize(avro_reader_t reader)
^
[ 81%] Building C object libs/kaa/CMakeFiles/kaac.dir/src/kaa/gen/kaa_notification_gen.c.obj
/media/sf_martin/kaaSDKs/esp8266-sample/libs/kaa/src/kaa/gen/kaa_notification_gen.c: In function 'kaa_notification_empty_data_deserialize':
/media/sf_martin/kaaSDKs/esp8266-sample/libs/kaa/src/kaa/gen/kaa_notification_gen.c:47:86: warning: unused parameter 'reader' [-Wunused-parameter]
kaa_notification_empty_data_t *kaa_notification_empty_data_deserialize(avro_reader_t reader)
^
[ 82%] Building C object libs/kaa/CMakeFiles/kaac.dir/src/kaa/gen/kaa_chat.c.obj
[ 83%] Building C object libs/kaa/CMakeFiles/kaac.dir/src/kaa/gen/kaa_chat_definitions.c.obj
[ 85%] Linking C static library libkaac.a
[ 85%] Built target kaac
[ 86%] Building C object libs/kaa/CMakeFiles/extension_user.dir/src/extensions/user/kaa_user.c.obj
[ 87%] Linking C static library libextension_user.a
[ 87%] Built target extension_user
[ 88%] Building C object libs/kaa/CMakeFiles/extension_bootstrap.dir/src/extensions/bootstrap/kaa_bootstrap_manager.c.obj
[ 90%] Linking C static library libextension_bootstrap.a
[ 90%] Built target extension_bootstrap
[ 91%] Building C object CMakeFiles/kaa_demo_s.dir/user/user_main.c.obj
[ 92%] Building C object CMakeFiles/kaa_demo_s.dir/driver/uart.c.obj
[ 93%] Building C object CMakeFiles/kaa_demo_s.dir/src/kaa_demo.c.obj
[ 95%] Linking C static library libkaa_demo_s.a
[ 95%] Built target kaa_demo_s
Scanning dependencies of target kaa_demo
[ 96%] Building C object CMakeFiles/kaa_demo.dir/blank.c.obj
[ 97%] Linking C executable kaa_demo
/opt/Espressif/crosstool-NG/builds/xtensa-lx106-elf/lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: kaa_demo section `.text' will not fit in region `iram1_0_seg'
/opt/Espressif/crosstool-NG/builds/xtensa-lx106-elf/lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: region `iram1_0_seg' overflowed by 24817 bytes
collect2: error: ld returned 1 exit status
CMakeFiles/kaa_demo.dir/build.make:122: recipe for target 'kaa_demo' failed
make[2]: *** [kaa_demo] Error 1
CMakeFiles/Makefile2:107: recipe for target 'CMakeFiles/kaa_demo.dir/all' failed
make[1]: *** [CMakeFiles/kaa_demo.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
martin#martin-VirtualBox:/media/sf_martin/kaaSDKs/esp8266-sample/build$
I had the exact same problem when first building the sample app with a custom SDK according to the tutorial you referenced.
First of, the Built target mbedtls refers to the build targets specified by the make file, not your target platform. As you can see in the beginning, the KAA_PLATFORM = esp8266 shows the correct value. Later on, make compiles the correct files as well (for example: [ 38%] Building C object libs/kaa/CMakeFiles/kaac.dir/src/kaa/platform-impl/esp8266/logger.c.obj). This should be fine.
Encryption is disabled in your build. Otherwise it would print ENCRYPTION ENABLED below USER EXTENSION ENABLED.
Here are a couple of possible solutions:
1. Adjust the linker file
One problem for me was that the linker file eagle.app.v6.ld (which should be in the folder ld in your project's root) had to be adjusted so that some parts of the code are moved from RAM to ROM.
I use the linker file from the Kaa sample app and refer to that in the following explanation.
In the section .text : ALIGN(4), find the line containing:
*( .literal .text .literal.* .text.* .stub .gnu.warning .gnu.linkonce.literal.* .gnu.linkonce.t.*.literal .gnu.linkonce.t.*)
Remove the sections .literal.* .text.* from there and move them to .irom0.text : ALIGN(4) by adding the following line after _irom0_text_start = ABSOLUTE(.);:
*(.literal.* .text.*)
Now all sections starting with .literal.and .text. are located in the ROM. This is sort of brute force because regardless of the *.a module (as defined by the lines below that in the section .irom0.text : ALIGN(4)), all sections of this type are moved to ROM. It might have some complications which I did not yet experience. There is definitely room to optimize the linker mapping.
For me this saved a huge amount of memory in RAM and the program compiled, linked and ran correctly.
2. Minimize extensions
When configuring the build with cmake, you can pass different arguments to cmake to turn extensions on or off (e.g. -DWITH_EXTENSION_PROFILE=OFF to turn off profiles).
In your case, the following extensions seem to be enabled:
BOOTSTRAP ENABLED
PROFILE ENABLED
USER EXTENSION ENABLED
In my experience, some extensions are just to big to be compiled into the final image. I successfully included the Configuration and Logging extensions. Adding any other extensions has lead to an overflow of the RAM.
Make sure to enable only those extensions which are really needed by your endpoint SDK. If it still fails, try to turn all extensions off and enable them step-by-step to see which ones fail.
Informational: See which parts of your code get mapped to which section (RAM or ROM)
The following command prints out a list to the file listing.txt detailing which code is mapped to which section. It might help finding out which parts of the code use the most memory in RAM and ROM. (replace name_of_your_image with the actual name of the image generated by the make command)
xtensa-lx106-elf-objdump -x name_of_your_image > listing.txt

Resources