can't build segmapper

Hi @smauq,
I encounter the same problem as #106 . I compiled and pip installed the newest TF, version 1.10.
(segmappyenv) tuan@tuan:~/segmap_ws$ pip show tensorflow
Name: tensorflow
Version: 1.10.0
Summary: TensorFlow is an open source machine learning framework for everyone.
Home-page: https://www.tensorflow.org/
Author: Google Inc.
Author-email<EMAIL_ADDRESS>License: Apache 2.0
Location: /home/tuan/segmappyenv/lib/python2.7/site-packages
Requires: setuptools, astor, tensorboard, enum34, gast, keras-preprocessing, six, keras-applications, wheel, absl-py, backports.weakref, termcolor, protobuf, numpy, grpcio, mock
Required-by:
(segmappyenv) tuan@tuan:~/segmap_ws$

But I can't build segmapper. The error stays the same
__________________________________________________________________________________________________________________
Errors     << segmapper:make /home/tuan/segmap_ws/logs/segmapper/build.make.002.log
/home/tuan/segmap_ws/devel/lib/libtf_graph_executor.so: undefined reference to `tensorflow::ReadBinaryProto(tensorflow::Env*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, google::protobuf::MessageLite*)'
/home/tuan/segmap_ws/devel/lib/libtf_graph_executor.so: undefined reference to `tensorflow::internal::CheckOpMessageBuilder::NewString[abi:cxx11]()'
collect2: error: ld returned 1 exit status
make[2]: *** [/home/tuan/segmap_ws/devel/lib/segmapper/segmapper_node] Error 1
make[1]: *** [CMakeFiles/segmapper_node.dir/all] Error 2
make: *** [all] Error 2
cd /home/tuan/segmap_ws/build/segmapper; catkin build --get-env segmapper | catkin env -si  /usr/bin/make --jobserver-fds=6,7 -j; cd -
..................................................................................................................
Failed     << segmapper:make                     [ Exited with code 2 ]
Failed    <<< segmapper                          [ 3.4 seconds ]
[build] Summary: 21 of 22 packages succeeded.
[build]   Ignored:   9 packages were skipped or are blacklisted.
[build]   Warnings:  4 packages succeeded with warnings.
[build]   Abandoned: None.
[build]   Failed:    1 packages failed.
[build] Runtime: 7.2 seconds total.
(segmappyenv) tuan@tuan:~/segmap_ws$

What should I do next? Thank you for your help!

Did you also try the parameters he used when compiling tensorflow? E.g.
bazel build --config=opt --define framework_shared_object=true tensorflow:libtensorflow_cc.so

And also if that doesn't work, maybe also try version 1.9. Here's an issue discussing the same problem https://github.com/tensorflow/tensorflow/issues/14632

Yes, I did use that command.
However, AFAIK, since I did a pip install from .whl file, there is no need to use libtensorflow_cc.so for linker, right? Please correct me if I'm wrong.
I will try version 1.9.
Thank you for your help!

No, you don't need it to be linked. But the necessary .so files should be included in the python package. Another solution that should definitely work then is the following. Not linking against the pip install but building exactly with the above parameters and then setting the cmake variables to link against the bazel compiled version when doing catkin build tensorflow_ros_cpp.

Thank you for your help.
I followed the instructions in tensorflow_ros_cpp and was able to compile everything.
But when I try roslaunch segmapper kitti_localization.launch, I have another issue:
(segmappyenv) tuan@tuan:~/segmap_ws$ roslaunch segmapper kitti_localization.launch
... logging to /home/tuan/.ros/log/4aea169c-b6b3-11e8-94ee-6045cb30088c/roslaunch-tuan-9440.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://tuan:42377/

SUMMARY
========

PARAMETERS
 * /SegMapper/Benchmarker/enable_live_output: False
 * /SegMapper/Benchmarker/results_directory: /tmp/segmap_bench...
 * /SegMapper/Benchmarker/save_statistics_only: False
 * /SegMapper/LaserSlamWorker/assembled_cloud_sub_topic: /velodyne_points
 * /SegMapper/LaserSlamWorker/create_filtered_map: True
 * /SegMapper/LaserSlamWorker/distant_map_pub_topic: distant_map
 * /SegMapper/LaserSlamWorker/full_map_pub_topic: full_map
 * /SegMapper/LaserSlamWorker/local_map_pub_topic: local_map
 * /SegMapper/LaserSlamWorker/map_publication_rate_hz: 3
 * /SegMapper/LaserSlamWorker/odom_frame: world
 * /SegMapper/LaserSlamWorker/odometry_trajectory_pub_topic: odometry_trajectory
 * /SegMapper/LaserSlamWorker/publish_distant_map: False
 * /SegMapper/LaserSlamWorker/publish_full_map: False
 * /SegMapper/LaserSlamWorker/publish_local_map: True
 * /SegMapper/LaserSlamWorker/sensor_frame: velodyne
 * /SegMapper/LaserSlamWorker/trajectory_pub_topic: trajectory
 * /SegMapper/LaserSlamWorker/use_odometry_information: True
 * /SegMapper/OnlineEstimator/LaserTrack/add_m_estimator_on_icp: False
 * /SegMapper/OnlineEstimator/LaserTrack/add_m_estimator_on_odom: False
 * /SegMapper/OnlineEstimator/LaserTrack/force_priors: False
 * /SegMapper/OnlineEstimator/LaserTrack/icp_noise_model: [0.5, 0.05, 0.05,...
 * /SegMapper/OnlineEstimator/LaserTrack/nscan_in_sub_map: 5
 * /SegMapper/OnlineEstimator/LaserTrack/nscan_to_match: 3
 * /SegMapper/OnlineEstimator/LaserTrack/odometry_noise_model: [0.5, 0.5, 0.5, 0...
 * /SegMapper/OnlineEstimator/LaserTrack/save_icp_results: False
 * /SegMapper/OnlineEstimator/LaserTrack/use_icp_factors: False
 * /SegMapper/OnlineEstimator/LaserTrack/use_odom_factors: True
 * /SegMapper/OnlineEstimator/add_m_estimator_on_loop_closures: True
 * /SegMapper/OnlineEstimator/do_icp_step_on_loop_closures: False
 * /SegMapper/OnlineEstimator/loop_closure_noise_model: [0.0005, 0.0005, ...
 * /SegMapper/OnlineEstimator/loop_closures_sub_maps_radius: 3
 * /SegMapper/SegMatchWorker/SegMatch/Classifier/apply_hard_threshold_on_feature_distance: True
 * /SegMapper/SegMatchWorker/SegMatch/Classifier/enable_two_stage_retrieval: True
 * /SegMapper/SegMatchWorker/SegMatch/Classifier/feature_distance_threshold: 0.01
 * /SegMapper/SegMatchWorker/SegMatch/Classifier/knn_feature_dim: 7
 * /SegMapper/SegMatchWorker/SegMatch/Classifier/max_eigen_features_values: [2493.5, 186681.0...
 * /SegMapper/SegMatchWorker/SegMatch/Classifier/n_nearest_neighbours: 120
 * /SegMapper/SegMatchWorker/SegMatch/Classifier/normalize_eigen_for_hard_threshold: False
 * /SegMapper/SegMatchWorker/SegMatch/Classifier/normalize_eigen_for_knn: False
 * /SegMapper/SegMatchWorker/SegMatch/Classifier/threshold_to_accept_match: 0.6
 * /SegMapper/SegMatchWorker/SegMatch/Descriptors/descriptor_types: ['EigenvalueBased']
 * /SegMapper/SegMatchWorker/SegMatch/GeometricConsistency/max_consistency_distance_for_caching: 3.0
 * /SegMapper/SegMatchWorker/SegMatch/GeometricConsistency/min_cluster_size: 6
 * /SegMapper/SegMatchWorker/SegMatch/GeometricConsistency/recognizer_type: Incremental
 * /SegMapper/SegMatchWorker/SegMatch/GeometricConsistency/resolution: 0.4
 * /SegMapper/SegMatchWorker/SegMatch/LocalMap/max_vertical_distance_m: 999.0
 * /SegMapper/SegMatchWorker/SegMatch/LocalMap/min_points_per_voxel: 1
 * /SegMapper/SegMatchWorker/SegMatch/LocalMap/min_vertical_distance_m: -999.0
 * /SegMapper/SegMatchWorker/SegMatch/LocalMap/neighbors_provider_type: KdTree
 * /SegMapper/SegMatchWorker/SegMatch/LocalMap/radius_m: 50
 * /SegMapper/SegMatchWorker/SegMatch/LocalMap/voxel_size_m: 0.1
 * /SegMapper/SegMatchWorker/SegMatch/Segmenters/max_cluster_size: 15000
 * /SegMapper/SegMatchWorker/SegMatch/Segmenters/min_cluster_size: 100
 * /SegMapper/SegMatchWorker/SegMatch/Segmenters/radius_for_growing: 0.2
 * /SegMapper/SegMatchWorker/SegMatch/Segmenters/segmenter_type: IncrementalEuclid...
 * /SegMapper/SegMatchWorker/SegMatch/boundary_radius_m: 999.0
 * /SegMapper/SegMatchWorker/SegMatch/centroid_distance_threshold_m: 2
 * /SegMapper/SegMatchWorker/SegMatch/check_pose_lies_below_segments: False
 * /SegMapper/SegMatchWorker/SegMatch/filter_boundary_segments: True
 * /SegMapper/SegMatchWorker/SegMatch/filter_duplicate_segments: True
 * /SegMapper/SegMatchWorker/SegMatch/min_time_between_segment_for_matches_s: 0
 * /SegMapper/SegMatchWorker/SegMatch/segmentation_height_above_m: 999.0
 * /SegMapper/SegMatchWorker/SegMatch/segmentation_height_below_m: 999.0
 * /SegMapper/SegMatchWorker/SegMatch/segmentation_radius_m: 50.0
 * /SegMapper/SegMatchWorker/align_target_map_on_first_loop_closure: False
 * /SegMapper/SegMatchWorker/close_loops: False
 * /SegMapper/SegMatchWorker/distance_between_segmentations_m: 0.0
 * /SegMapper/SegMatchWorker/distance_to_lower_target_cloud_for_viz_m: 25.0
 * /SegMapper/SegMatchWorker/export_segments_and_matches: False
 * /SegMapper/SegMatchWorker/line_scale_loop_closures: 5.0
 * /SegMapper/SegMatchWorker/line_scale_matches: 0.4
 * /SegMapper/SegMatchWorker/localize: True
 * /SegMapper/SegMatchWorker/publish_predicted_segment_matches: False
 * /SegMapper/SegMatchWorker/ratio_of_points_to_keep_when_publishing: 1.0
 * /SegMapper/SegMatchWorker/target_cloud_filename: /home/tuan/bags/d...
 * /SegMapper/clear_local_map_after_loop_closure: False
 * /SegMapper/number_of_robots: 1
 * /SegMapper/publish_world_to_odom: True
 * /SegMapper/robot_prefix: na
 * /SegMapper/tf_publication_rate_hz: 10
 * /SegMapper/world_frame: map
 * /rosdistro: kinetic
 * /rosversion: 1.12.13
 * /segmapper/icp_configuration_file: /home/tuan/segmap...
 * /segmapper/icp_input_filters_file: /home/tuan/segmap...
 * /use_sim_time: True

NODES
  /
    player (rosbag/play)
    segmapper (segmapper/segmapper_node)
    visualizer (rviz/rviz)

auto-starting new master
process[master]: started with pid [9452]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to 4aea169c-b6b3-11e8-94ee-6045cb30088c
process[rosout-1]: started with pid [9465]
started core service [/rosout]
process[visualizer-2]: started with pid [9489]
process[player-3]: started with pid [9490]
process[segmapper-4]: started with pid [9491]
[ INFO] [1536774181.240618118]: Opening /home/tuan/bags/2011_10_03_drive_27.bag

Waiting 0.2 seconds after advertising topics...[ INFO] [1536774181.328468764]: rviz version 1.12.16
[ INFO] [1536774181.328523692]: compiled against Qt version 5.5.1
[ INFO] [1536774181.328535561]: compiled against OGRE version 1.9.0 (Ghadamon)
 done.

Hit space to toggle paused, or 's' to step.
[segmapper-4] process has died [pid 9491, exit code -11, cmd /home/tuan/segmap_ws/devel/lib/segmapper/segmapper_node __name:=segmapper __log:=/home/tuan/.ros/log/4aea169c-b6b3-11e8-94ee-6045cb30088c/segmapper-4.log].
log file: /home/tuan/.ros/log/4aea169c-b6b3-11e8-94ee-6045cb30088c/segmapper-4*.log

I inspect the log file and found the problem was
[rosmaster.master][INFO] 2018-09-12 19:43:24,413: -PUB [/move_base_simple/goal] /visualizer http://tuan:34639/
[rosmaster.threadpool][ERROR] 2018-09-12 19:43:24,415: Traceback (most recent call last):
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosmaster/threadpool.py", line 218, in run
    result = cmd(*args)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosmaster/master_api.py", line 210, in publisher_update_task
    ret = xmlrpcapi(api).publisherUpdate('/master', topic, pub_uris)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1243, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1602, in __request
    verbose=self.__verbose
  File "/usr/lib/python2.7/xmlrpclib.py", line 1283, in request
    return self.single_request(host, handler, request_body, verbose)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1316, in single_request
    return self.parse_response(response)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1493, in parse_response
    return u.close()
  File "/usr/lib/python2.7/xmlrpclib.py", line 800, in close
    raise Fault(**self._stack[0])
Fault: <Fault -1: 'publisherUpdate: unknown method name'>

which points to this. I have no idea why this happens.
Thank you for your patience!

No worries. Mind sharing what flsgs you used? It would be a good addition to the FAQ.
As for the error. That just means the worker thread died, not an issue with ros, but some error occured that doesn't output an error message. First things would be do you have the bag and localization maps downloaded?

@smauq Certainly, though I am not sure what flags you mean. Do you mean the flags when I compiled tensorflow?
For the second question, I was able to install segmappy and downloaded all the files using segmappy_download_datasets.
tuan@tuan:~/.segmap/kitti$ ls
drive27_target_map.pcd  kitti_localization.rviz  kitti_loop_closure.rviz

I put the 2 bags file in a different folder and change the path accordingly in the launch files.

@tuandle The cmake flags you used for tensorflow_ros_cpp.
Mind posting the modified launch file and the paths to where you have moved the files? For example I see in the config that it's looking for the pcd map in folder /SegMapper/SegMatchWorker/target_cloud_filename: /home/tuan/bags/d..., but what you posted above shows the map is in ~/.segmap/kitti/drive27_target_map.pcd.

@smauq
My cmake flags are as follows:
(segmappyenv) tuan@tuan:~/segmappyenv$ catkin build tensorflow_ros_cpp --cmake-args -DFORCE_TF_PIP_SEARCH="OFF" -DFORCE_TF_BAZEL_SEARCH="ON" -DTF_BAZEL_LIBRARY="/home/tuan/tensorflow/bazel-bin/tensorflow/libtensorflow_cc.so" -DTF_BAZEL_SRC_DIR="/home/tuan/tensorflow"

The kitti_localization.launch is as follows:
<?xml version="1.0" encoding="utf-8"?>

<launch>

  <arg name="respawn_value" default="false" /> <!-- boolean: true, false -->

  <!-- Bag file path -->
  <arg name="bag_file" value="/home/tuan/bags/2011_10_03_drive_27.bag"/>

  <!-- Rviz visualization config file path -->
  <arg name="rviz_config_file" value="$(env HOME)/.segmap/kitti/kitti_localization.rviz"/>

  <!-- ROS parameters -->
  <rosparam>use_sim_time: true</rosparam>

  <rosparam command="load" file="$(find segmapper)/launch/kitti/kitti_localization.yaml"/>

  <!-- Target cloud -->
  <arg name="target_cloud" value="/home/tuan/bags/drive27_target_map.pcd"/>
  <rosparam param="/SegMapper/SegMatchWorker/target_cloud_filename" subst_value="True">$(arg target_cloud)</rosparam>

  <!-- Callgrind profiling option -->
  <arg name="enable_callgrind" default="true" />
  <arg name="play_rate" value="0.005" if="$(arg enable_callgrind)"/>
  <arg name="play_rate" value="1" unless="$(arg enable_callgrind)"/>

  <!-- rviz node -->
  <node name="visualizer" pkg="rviz" type="rviz" output="screen" respawn="$(arg respawn_value)" args="-d $(arg rviz_config_file)" />

  <!-- rosbag player node -->
  <node name="player" pkg="rosbag" type="play" output="screen" args=" -r $(arg play_rate) -s 333 --clock --pause $(arg bag_file)"/>

  <!-- segmapper node -->
  <include file="$(find segmapper)/launch/segmapper.launch">
    <arg name="icp_configuration_file" value="$(find segmapper)/launch/kitti/icp_dynamic_outdoor.yaml"/>
    <arg name="icp_input_filters_file" value="$(find segmapper)/launch/kitti/input_filters_outdoor.yaml"/>
    <arg name="enable_callgrind" value="$(arg enable_callgrind)"/>
  </include>

</launch>

I did copy the .pcd file to my bags folder.
tuan@tuan:~/bags$ ls | grep .pcd
drive27_target_map.pcd

Ok, seems to be a segmentation fault. I would suggest you switch to this branch https://github.com/ethz-asl/segmap/tree/post-fixes and compile in debug mode, e.g.
catkin config --cmake-args -DCMAKE_BUILD_TYPE=Debug

Afterwards, in the kitti_localization file remove these lines 1 and 2. You can start rviz and play the bag file separately.
Then go and change this line change value="" to gdb -ex run --args. Now when you run the launch file it should stop at the point where it segmentation faults. You can type in gdb "l" to see surrounding code lines or "bt" to see the backtrace. If you post those it would be helpful to figure out what is causing the issue.
p.s. For the localization mode you need to wait a bit while the localization map is being built and when it appears in rviz, then you can actually start playing the bag.

@smauq Thank you for your instructions. I followed them and these are results from gdb:
ROS_MASTER_URI=http://localhost:11311

process[segmapper-1]: started with pid [16513]
GNU gdb (GDB) 7.7
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /home/tuan/segmap_ws/devel/lib/segmapper/segmapper_node...done.
Starting program: /home/tuan/segmap_ws/devel/lib/segmapper/segmapper_node __name:=segmapper __log:=/home/tuan/.ros/log/410b38cc-b807-11e8-b0b5-6045cb30088c/segmapper-1.log
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[New Thread 0x7fff5e0a7700 (LWP 16607)]
[New Thread 0x7fff5d8a6700 (LWP 16608)]
[New Thread 0x7fff5b0a5700 (LWP 16609)]
[New Thread 0x7fff588a4700 (LWP 16610)]
[New Thread 0x7fff560a3700 (LWP 16611)]
[New Thread 0x7fff538a2700 (LWP 16612)]
[New Thread 0x7fff510a1700 (LWP 16613)]

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff230de27 in gtsam::noiseModel::Constrained::Constrained(Eigen::Matrix<double, -1, 1, 0, -1, 1> const&, Eigen::Matrix<double, -1, 1, 0, -1, 1> const&) () from /home/tuan/segmap_ws/devel/lib/libgtsam.so.4

Output of (gdb) l:
(gdb) l
1	#include <thread>
2
3	#include <ros/ros.h>
4
5	#include "segmapper/segmapper.hpp"
6
7	int main(int argc, char **argv) {
8	  ros::init(argc, argv, "SegMapper");
9	  ros::NodeHandle node_handle("~");
10
(gdb)
11	  SegMapper mapper(node_handle);
12
13	  std::thread publish_map_thread(&SegMapper::publishMapThread, &mapper);
14	  std::thread publish_tf_thread(&SegMapper::publishTfThread, &mapper);
15	  std::thread segmatch_thread(&SegMapper::segMatchThread, &mapper);
16
17	  try {
18	    ros::spin();
19	  }
20	  catch (const std::exception& e) {
(gdb)
21	    ROS_ERROR_STREAM("Exception: " << e.what());
22	    return 1;
23	  }
24	  catch (...) {
25	    ROS_ERROR_STREAM("Unknown Exception");
26	    return 1;
27	  }
28
29	  publish_map_thread.join();
30	  publish_tf_thread.join();
(gdb)
31	  segmatch_thread.join();
32
33	  return 0;
34	}
(gdb)
Line number 35 out of range; /home/tuan/segmap_ws/src/segmap/segmapper/src/segmapper_node.cpp has 34 lines.

Output of (gdb) backtrace:
(gdb) bt
#0  0x00007ffff230de27 in gtsam::noiseModel::Constrained::Constrained(Eigen::Matrix<double, -1, 1, 0, -1, 1> const&, Eigen::Matrix<double, -1, 1, 0, -1, 1> const&) () from /home/tuan/segmap_ws/devel/lib/libgtsam.so.4
#1  0x00007ffff230de8e in gtsam::noiseModel::Constrained::MixedSigmas(Eigen::Matrix<double, -1, 1, 0, -1, 1> const&, Eigen::Matrix<double, -1, 1, 0, -1, 1> const&) () from /home/tuan/segmap_ws/devel/lib/libgtsam.so.4
#2  0x00007ffff230e0e3 in gtsam::noiseModel::Diagonal::Sigmas(Eigen::Matrix<double, -1, 1, 0, -1, 1> const&, bool)
    () from /home/tuan/segmap_ws/devel/lib/libgtsam.so.4
#3  0x00007ffff21fa225 in _GLOBAL__sub_I_lago.cpp () from /home/tuan/segmap_ws/devel/lib/libgtsam.so.4
#4  0x00007ffff7de76ba in ?? () from /lib64/ld-linux-x86-64.so.2
#5  0x00007ffff7de77cb in ?? () from /lib64/ld-linux-x86-64.so.2
#6  0x00007ffff7dd7c6a in ?? () from /lib64/ld-linux-x86-64.so.2
#7  0x0000000000000003 in ?? ()
#8  0x00007fffffffd814 in ?? ()
#9  0x00007fffffffd84c in ?? ()
#10 0x00007fffffffd85e in ?? ()
#11 0x0000000000000000 in ?? ()

@smauq any progress on debugging this problem?
I have successfully installed and run your demos on another laptop. I used TF version 1.8 on the second laptop though.
But looking as gdb output it says that I have a problem with libgtsam on my first laptop. Could I do anything to help you debug this?

Not sure, seems like gtsam basically crashes, the code of which we haven't modified. Can you give more details on your system setup on which it doesn't work (OS, CPU model, amount of RAM, gcc version, if it's any specific platform/server etc.)?
What you could try to do is go into src/gtsam_catkin. If you type git status you should see something like HEAD detached at ecf6a04.  This should bring you to the newest version of gtsam and if the error was related to this it might fix it. Will think of more things in the mean time.

@smauq Certainly, here is my system info of my personal laptop, on which segmap crashes:
tuan@tuan:~$ sudo lshw -short
H/W path         Device     Class          Description
======================================================
                            system         GL502VSK
/0                          bus            GL502VSK
/0/0                        memory         64KiB BIOS
/0/8                        memory         32GiB System Memory
/0/8/0                      memory         16GiB SODIMM Synchronous 2400 MHz (0,4 ns)
/0/8/1                      memory         [empty]
/0/8/2                      memory         16GiB SODIMM Synchronous 2400 MHz (0,4 ns)
/0/8/3                      memory         [empty]
/0/e                        memory         256KiB L1 cache
/0/f                        memory         1MiB L2 cache
/0/10                       memory         6MiB L3 cache
/0/11                       processor      Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz

tuan@tuan:~$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 16.04.4 LTS
Release:	16.04
Codename:	xenial

tuan@tuan:~$ gcc --version
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

After switching to master branch for gtsam_catkin, I did a catkin clean and recompiled everything but the error about libgtsam is still the same.
tuan@tuan:~/segmap_ws/src/gtsam_catkin$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working directory clean

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff23065b7 in gtsam::noiseModel::Constrained::Constrained(Eigen::Matrix<double, -1, 1, 0, -1, 1> const&, Eigen::Matrix<double, -1, 1, 0, -1, 1> const&) () from /home/tuan/segmap_ws/devel/lib/libgtsam.so.4
(gdb) bt
#0  0x00007ffff23065b7 in gtsam::noiseModel::Constrained::Constrained(Eigen::Matrix<double, -1, 1, 0, -1, 1> const&, Eigen::Matrix<double, -1, 1, 0, -1, 1> const&) () from /home/tuan/segmap_ws/devel/lib/libgtsam.so.4
#1  0x00007ffff230661e in gtsam::noiseModel::Constrained::MixedSigmas(Eigen::Matrix<double, -1, 1, 0, -1, 1> const&, Eigen::Matrix<double, -1, 1, 0, -1, 1> const&) () from /home/tuan/segmap_ws/devel/lib/libgtsam.so.4
#2  0x00007ffff2306873 in gtsam::noiseModel::Diagonal::Sigmas(Eigen::Matrix<double, -1, 1, 0, -1, 1> const&, bool) () from /home/tuan/segmap_ws/devel/lib/libgtsam.so.4
#3  0x00007ffff21f2d45 in _GLOBAL__sub_I_lago.cpp () from /home/tuan/segmap_ws/devel/lib/libgtsam.so.4
#4  0x00007ffff7de76ba in ?? () from /lib64/ld-linux-x86-64.so.2
#5  0x00007ffff7de77cb in ?? () from /lib64/ld-linux-x86-64.so.2
#6  0x00007ffff7dd7c6a in ?? () from /lib64/ld-linux-x86-64.so.2
#7  0x0000000000000003 in ?? ()
#8  0x00007fffffffd8a0 in ?? ()
#9  0x00007fffffffd8d8 in ?? ()
#10 0x00007fffffffd8ea in ?? ()
#11 0x0000000000000000 in ?? ()

Nothing jumps out about the system config.
Let's figure out if the the error in gtsam can be more specific. You'll need to change Release to Debug on this line https://github.com/ethz-asl/gtsam_catkin/blob/master/CMakeLists.txt#L17 and then also change gtsam and gtsam_unstable to gtsamDebug and gtsam_unstableDebug on this line https://github.com/ethz-asl/gtsam_catkin/blob/master/CMakeLists.txt#L43. This should then compile the entire gtsam in debug mode and we'll see more specifically where the error is.

@smauq I made changes as you suggested. Here is the output out gdb backtrace:
segmapper_node: /usr/include/eigen3/Eigen/src/Core/Assign_MKL.h:134: static void Eigen::internal::Assignment<DstXprType, Eigen::CwiseUnaryOp<Eigen::internal::scalar_square_op<double>, SrcXprNested>, Eigen::internal::assign_op<double, double>, Eigen::internal::Dense2Dense, typename Eigen::internal::enable_if<Eigen::internal::vml_assign_traits<Dst, Src>::EnableVml>::type>::run(DstXprType&, const SrcXprType&, const Eigen::internal::assign_op<double, double>&) [with DstXprType = Eigen::Matrix<double, -1, 1>; SrcXprNested = const Eigen::ArrayWrapper<Eigen::Matrix<double, -1, 1> >; Eigen::internal::Assignment<DstXprType, Eigen::CwiseUnaryOp<Eigen::internal::scalar_square_op<double>, SrcXprNested>, Eigen::internal::assign_op<double, double>, Eigen::internal::Dense2Dense, typename Eigen::internal::enable_if<Eigen::internal::vml_assign_traits<Dst, Src>::EnableVml>::type>::SrcXprType = Eigen::CwiseUnaryOp<Eigen::internal::scalar_square_op<double>, const Eigen::ArrayWrapper<Eigen::Matrix<double, -1, 1> > >]: Assertion `dst.rows() == src.rows() && dst.cols() == src.cols()' failed.

Program received signal SIGABRT, Aborted.
0x00007fffae29f428 in raise () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) bt
#0  0x00007fffae29f428 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007fffae2a102a in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2  0x00007fffae297bd7 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#3  0x00007fffae297c82 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
#4  0x00007ffff1c70f00 in Eigen::internal::Assignment<Eigen::Matrix<double, -1, 1, 0, -1, 1>, Eigen::CwiseUnaryOp<Eigen::internal::scalar_square_op<double>, Eigen::ArrayWrapper<Eigen::Matrix<double, -1, 1, 0, -1, 1> > const>, Eigen::internal::assign_op<double, double>, Eigen::internal::Dense2Dense, void>::run (dst=..., src=...)
    at /usr/include/eigen3/Eigen/src/Core/Assign_MKL.h:134
#5  0x00007ffff1c6f99e in Eigen::internal::call_assignment_no_alias<Eigen::Matrix<double, -1, 1, 0, -1, 1>, Eigen::CwiseUnaryOp<Eigen::internal::scalar_square_op<double>, Eigen::ArrayWrapper<Eigen::Matrix<double, -1, 1, 0, -1, 1> > const>, Eigen::internal::assign_op<double, double> > (dst=..., src=..., func=...)
    at /usr/include/eigen3/Eigen/src/Core/AssignEvaluator.h:819
#6  0x00007ffff1c6dfda in Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 1, 0, -1, 1> >::_set_noalias<Eigen::CwiseUnaryOp<Eigen::internal::scalar_square_op<double>, Eigen::ArrayWrapper<Eigen::Matrix<double, -1, 1, 0, -1, 1> > const> > (this=0xc10290, other=...) at /usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h:728
#7  0x00007ffff1c6bb61 in Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 1, 0, -1, 1> >::_init1<Eigen::CwiseUnaryOp<Eigen::internal::scalar_square_op<double>, Eigen::ArrayWrapper<Eigen::Matrix<double, -1, 1, 0, -1, 1> > const>, Eigen::CwiseUnaryOp<Eigen::internal::scalar_square_op<double>, Eigen::ArrayWrapper<Eigen::Matrix<double, -1, 1, 0, -1, 1> > const> > (this=0xc10290, other=...) at /usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h:812
#8  0x00007ffff1c69745 in Eigen::Matrix<double, -1, 1, 0, -1, 1>::Matrix<Eigen::CwiseUnaryOp<Eigen::internal::scalar_square_op<double>, Eigen::ArrayWrapper<Eigen::Matrix<double, -1, 1, 0, -1, 1> > const> > (this=0xc10290, x=...)
    at /usr/include/eigen3/Eigen/src/Core/Matrix.h:296
#9  0x00007ffff1c62c88 in gtsam::noiseModel::Diagonal::Diagonal (this=0xc10240, sigmas=...)
    at /home/tuan/segmap_ws/build/gtsam_catkin/gtsam_src-prefix/src/gtsam_src/gtsam/linear/NoiseModel.cpp:248
#10 0x00007ffff1c634ee in gtsam::noiseModel::Constrained::Constrained (this=0xc10240, mu=..., sigmas=...)
    at /home/tuan/segmap_ws/build/gtsam_catkin/gtsam_src-prefix/src/gtsam_src/gtsam/linear/NoiseModel.cpp:334
#11 0x00007ffff1c635a5 in gtsam::noiseModel::Constrained::MixedSigmas (mu=..., sigmas=...)
    at /home/tuan/segmap_ws/build/gtsam_catkin/gtsam_src-prefix/src/gtsam_src/gtsam/linear/NoiseModel.cpp:341
#12 0x00007ffff1c00d40 in gtsam::noiseModel::Constrained::MixedSigmas (sigmas=...)
    at /home/tuan/segmap_ws/build/gtsam_catkin/gtsam_src-prefix/src/gtsam_src/gtsam/linear/NoiseModel.h:419
#13 0x00007ffff1c62f51 in gtsam::noiseModel::Diagonal::Sigmas (sigmas=..., smart=true)
    at /home/tuan/segmap_ws/build/gtsam_catkin/gtsam_src-prefix/src/gtsam_src/gtsam/linear/NoiseModel.cpp:271
#14 0x00007ffff1dd868e in __static_initialization_and_destruction_0 (__initialize_p=1, __priority=65535)
    at /home/tuan/segmap_ws/build/gtsam_catkin/gtsam_src-prefix/src/gtsam_src/gtsam/slam/lago.cpp:37
#15 0x00007ffff1dd896c in _GLOBAL__sub_I_lago.cpp(void) ()
    at /home/tuan/segmap_ws/build/gtsam_catkin/gtsam_src-prefix/src/gtsam_src/gtsam/slam/lago.cpp:399
#16 0x00007ffff7de76ba in ?? () from /lib64/ld-linux-x86-64.so.2
#17 0x00007ffff7de77cb in ?? () from /lib64/ld-linux-x86-64.so.2
#18 0x00007ffff7dd7c6a in ?? () from /lib64/ld-linux-x86-64.so.2
#19 0x0000000000000003 in ?? ()
#20 0x00007fffffffd8c0 in ?? ()
#21 0x00007fffffffd8f8 in ?? ()
#22 0x00007fffffffd90a in ?? ()
#23 0x0000000000000000 in ?? ()

Ok I think I found the issue now. Seems very likely to have been a bug in eigen3 that was fixed by this commit https://bitbucket.org/eigen/eigen/commits/d144ceb83119af2ddc5b829727b5eee83b239a6a.
Options would be:

Disable MKL support (either by uninstalling mkl or through a flag)
Pull the master version of Eigen and do a system install with that (not highly recommended as it might cause confusion with the one installed from apt)
Download eigen through eigen_catkin. Set this flag to "OFF" https://github.com/ethz-asl/eigen_catkin/blob/master/use-system-installation-of-eigen.cmake. (Try to compile now and see if it works, very likely not, but it's worth testing.) Afterwards change the source repo to https://bitbucket.org/eigen/eigen/get/7eb9a67422ff.zip here https://github.com/ethz-asl/eigen_catkin/blob/master/CMakeLists.txt#L88 (i.e. pull the master branch of eigen). And also remove this line with the patch command https://github.com/ethz-asl/eigen_catkin/blob/master/CMakeLists.txt#L89

I would start with the last option and afterwards see how option one would be possible if that doesn't work out.

@smauq I followed option 3, e.g set OFF to USE_SYSTEM_EIGEN, change the link to eigen. I didn't disable MKL though. I was able to get segmapper loaded target map :)

However, another segfault appears with Eigen again
Reelimintated: 4  Relinearized: 2  Cliques: 4
*** stack smashing detected ***: /home/tuan/segmap_ws/devel/lib/segmapper/segmapper_node terminated

Program received signal SIGABRT, Aborted.
0x00007fffa9dc9428 in raise () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) bt
#0  0x00007fffa9dc9428 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007fffa9dcb02a in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2  0x00007fffa9e0b7ea in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#3  0x00007fffa9ead15c in __fortify_fail () from /lib/x86_64-linux-gnu/libc.so.6
#4  0x00007fffa9ead100 in __stack_chk_fail () from /lib/x86_64-linux-gnu/libc.so.6
#5  0x00007fffed91f159 in Eigen::DenseBase<Eigen::CwiseUnaryOp<Eigen::internal::scalar_abs_op<double>, Eigen::CwiseBinaryOp<Eigen::internal::scalar_difference_op<double, double>, Eigen::Matrix<double, -1, 1, 0, -1, 1> const, Eigen::Matrix<double, -1, 1, 0, -1, 1> const> const> >::redux<Eigen::internal::scalar_max_op<double, double> > (
    this=0x7fffffff8c70, func=...) at /home/tuan/segmap_ws/devel/include/eigen3/Eigen/src/Core/Redux.h:417
#6  0x00007fffed91dd87 in Eigen::DenseBase<Eigen::CwiseUnaryOp<Eigen::internal::scalar_abs_op<double>, Eigen::CwiseBinaryOp<Eigen::internal::scalar_difference_op<double, double>, Eigen::Matrix<double, -1, 1, 0, -1, 1> const, Eigen::Matrix<double, -1, 1, 0, -1, 1> const> const> >::maxCoeff (this=0x7fffffff8c70)
    at /home/tuan/segmap_ws/devel/include/eigen3/Eigen/src/Core/Redux.h:436
#7  0x00007fffed91bc27 in Eigen::internal::lpNorm_selector<Eigen::CwiseBinaryOp<Eigen::internal::scalar_difference_op<double, double>, Eigen::Matrix<double, -1, 1, 0, -1, 1> const, Eigen::Matrix<double, -1, 1, 0, -1, 1> const>, -1>::run (m=...) at /home/tuan/segmap_ws/devel/include/eigen3/Eigen/src/Core/Dot.h:244
#8  0x00007fffed919964 in Eigen::MatrixBase<Eigen::CwiseBinaryOp<Eigen::internal::scalar_difference_op<double, double>, Eigen::Matrix<double, -1, 1, 0, -1, 1> const, Eigen::Matrix<double, -1, 1, 0, -1, 1> const> >::lpNorm<-1> (
    this=0x7fffffff8f10) at /home/tuan/segmap_ws/devel/include/eigen3/Eigen/src/Core/Dot.h:269
#9  0x00007fffed917384 in gtsam::internal::optimizeWildfireNode<gtsam::ISAM2Clique> (clique=..., threshold=0.001,
    changed=..., replaced=..., delta=..., count=@0x7fffffff9278: 4)
    at /home/tuan/segmap_ws/build/gtsam_catkin/gtsam_src-prefix/src/gtsam_src/gtsam/nonlinear/ISAM2-inl.h:225
#10 0x00007fffed914f2d in gtsam::optimizeWildfireNonRecursive<gtsam::ISAM2Clique> (root=..., threshold=0.001,
    keys=..., delta=...)
    at /home/tuan/segmap_ws/build/gtsam_catkin/gtsam_src-prefix/src/gtsam_src/gtsam/nonlinear/ISAM2-inl.h:277
#11 0x00007fffed912e8a in gtsam::ISAM2::Impl::UpdateGaussNewtonDelta (roots=..., replacedKeys=..., delta=...,
    wildfireThreshold=0.001)
    at /home/tuan/segmap_ws/build/gtsam_catkin/gtsam_src-prefix/src/gtsam_src/gtsam/nonlinear/ISAM2-impl.cpp:292
#12 0x00007fffed92d472 in gtsam::ISAM2::updateDelta (this=0x15a0900, forceFullSolve=false)
    at /home/tuan/segmap_ws/build/gtsam_catkin/gtsam_src-prefix/src/gtsam_src/gtsam/nonlinear/ISAM2.cpp:972
#13 0x00007fffed9299c7 in gtsam::ISAM2::update (this=0x15a0900, newFactors=..., newTheta=...,
    removeFactorIndices=..., constrainedKeys=..., noRelinKeys=..., extraReelimKeys=..., force_relinearize=false)
    at /home/tuan/segmap_ws/build/gtsam_catkin/gtsam_src-prefix/src/gtsam_src/gtsam/nonlinear/ISAM2.cpp:544
#14 0x00007ffff0e043c5 in laser_slam::IncrementalEstimator::estimate (this=0x15a08a0, new_factors=...,
    new_values=..., timestamp_ns=310854000)
    at /home/tuan/segmap_ws/src/laser_slam/laser_slam/src/incremental_estimator.cpp:158
#15 0x00007ffff3a7c251 in laser_slam_ros::LaserSlamWorker::scanCallback (this=0x15a3150, cloud_msg_in=...)
    at /home/tuan/segmap_ws/src/laser_slam/laser_slam_ros/src/laser_slam_worker.cpp:169
#16 0x00007ffff3ad9432 in boost::_mfi::mf1<void, laser_slam_ros::LaserSlamWorker, sensor_msgs::PointCloud2_<std::allocator<void> > const&>::operator() (this=0x15b3310, p=0x15a3150, a1=...)
    at /usr/include/boost/bind/mem_fn_template.hpp:165
#17 0x00007ffff3ad1f02 in boost::_bi::list2<boost::_bi::value<laser_slam_ros::LaserSlamWorker*>, boost::arg<1> >::operator()<boost::_mfi::mf1<void, laser_slam_ros::LaserSlamWorker, sensor_msgs::PointCloud2_<std::allocator<void> > ---Type <return> to continue, or q <return> to quit---
const&>, boost::_bi::list1<sensor_msgs::PointCloud2_<std::allocator<void> > const&> > (this=0x15b3320, f=...,
    a=...) at /usr/include/boost/bind/bind.hpp:313
#18 0x00007ffff3ac90bd in boost::_bi::bind_t<void, boost::_mfi::mf1<void, laser_slam_ros::LaserSlamWorker, sensor_msgs::PointCloud2_<std::allocator<void> > const&>, boost::_bi::list2<boost::_bi::value<laser_slam_ros::LaserSlamWorker*>, boost::arg<1> > >::operator()<sensor_msgs::PointCloud2_<std::allocator<void> > const&> (this=0x15b3310,
    a1=...) at /usr/include/boost/bind/bind.hpp:905
#19 0x00007ffff3abfb4d in boost::detail::function::void_function_obj_invoker1<boost::_bi::bind_t<void, boost::_mfi::mf1<void, laser_slam_ros::LaserSlamWorker, sensor_msgs::PointCloud2_<std::allocator<void> > const&>, boost::_bi::list2<boost::_bi::value<laser_slam_ros::LaserSlamWorker*>, boost::arg<1> > >, void, sensor_msgs::PointCloud2_<std::allocator<void> > const&>::invoke (function_obj_ptr=..., a0=...)
    at /usr/include/boost/function/function_template.hpp:159
#20 0x00007ffff3afa323 in boost::function1<void, sensor_msgs::PointCloud2_<std::allocator<void> > const&>::operator() (this=0x15b3308, a0=...) at /usr/include/boost/function/function_template.hpp:773
#21 0x00007ffff3af7719 in ros::SubscriptionCallbackHelperT<sensor_msgs::PointCloud2_<std::allocator<void> > const&, void>::call (this=0x15b3300, params=...) at /opt/ros/kinetic/include/ros/subscription_callback_helper.h:144
#22 0x00007fffc541ae2d in ros::SubscriptionQueue::call() () from /opt/ros/kinetic/lib/libroscpp.so
#23 0x00007fffc53c06f8 in ros::CallbackQueue::callOneCB(ros::CallbackQueue::TLS*) ()
   from /opt/ros/kinetic/lib/libroscpp.so
#24 0x00007fffc53c20fb in ros::CallbackQueue::callAvailable(ros::WallDuration) ()
   from /opt/ros/kinetic/lib/libroscpp.so
#25 0x00007fffc541eef9 in ros::SingleThreadedSpinner::spin(ros::CallbackQueue*) ()
   from /opt/ros/kinetic/lib/libroscpp.so
#26 0x00007fffc5403edb in ros::spin() () from /opt/ros/kinetic/lib/libroscpp.so
#27 0x00000000005a8728 in main (argc=1, argv=0x7fffffffce08)
    at /home/tuan/segmap_ws/src/segmap/segmapper/src/segmapper_node.cpp:18

Since this error has nothing to do with MKL so I guess I don't have to disable it. I will give it a try anyway.

If you try disabling MKL revert back to the original versions of Eigen and maybe also gtsam. To avoid having errors from new untested features.

I am so sorry for giving a comment here,please forgive me.My ubuntu version is 16.04 too.How can I compile everything before catkin build segmapper?In this way(Custom compilation of Tensorflow using Bazel)?

@14212094 no worries. The command is:
(segmappyenv) tuan@tuan:~/segmap_ws$ catkin build tensorflow_ros_cpp --cmake-args -DFORCE_TF_PIP_SEARCH="OFF" -DFORCE_TF_BAZEL_SEARCH="ON" -DTF_BAZEL_LIBRARY="/home/tuan/tensorflow/bazel-bin/tensorflow/libtensorflow_cc.so" -DTF_BAZEL_SRC_DIR="/home/tuan/tensorflow"

You need to substitute your path. You can refer to this for more flags.

Thank you！！Did you use this command:
bazel build --config=opt --define framework_shared_object=true tensorflow:libtensorflow_cc.so
before pip installing from .whl?

@14212094 yes, I used that command to build the C++ library.

@tuandle Thanks! there are something that i am not clear.According to tensorflow_ros_cpp,it says that "it is no need to continue with the guide building or installing the pip package".Did you skip these two steps?

@14212094 yes, I did skip them.

@tuandle OK! After the bazel build,I diretly catkin build the tensorflow_ros_cpp --cmake-args.....It built really quickly.It skipped 30 targets and built 1 in A few seconds(I think it is unusual).Is this normal?When i try to build segmapper,it still can't build it.I think i may lose some steps which leads to the wrong build of tensorflow_ros_cpp.Please correct me and tell me some details about the steps before catkin build segmapper if it is convenient!Thank you so much~

@14212094 what is your output of catkin build tensorflow_ros_cpp --cmake-args -DFORCE_TF_PIP_SEARCH="OFF" -DFORCE_TF_BAZEL_SEARCH="ON" -DTF_BAZEL_LIBRARY="/home/tuan/tensorflow/bazel-bin/tensorflow/libtensorflow_cc.so" -DTF_BAZEL_SRC_DIR="/home/tuan/tensorflow" ?
Are you sure that you substitute the correct paths?

I thank I may lose the step of installing tensorflow gpu，Did you install tensorflow gpu under virtualenv segmappyenv through pip install

I am a newer to segmap, my problem may naive.My understanding is that you used this command:
(bazel build --config=opt --define framework_shared_object=true tensorflow:libtensorflow_cc.so) to build C++ library,and then install tensorflow-gpu 1.8 under (segmappyenv) .Lastly,using this command:(catkin build tensorflow_ros_cpp --cmake-args -DFORCE_TF_PIP_SEARCH="OFF" -DFORCE_TF_BAZEL_SEARCH="ON" -DTF_BAZEL_LIBRARY="/home/tuan/tensorflow/bazel-bin/tensorflow/libtensorflow_cc.so" -DTF_BAZEL_SRC_DIR="/home/tuan/tensorflow") to compile everything and successfully built tensorflow_ros_cpp and segmapper.Please correct me if I am wrong~
Thank you for your help!

I am a newer to segmap, my problem may naive.My understanding is that you used this command:
(bazel build --config=opt --define framework_shared_object=true tensorflow:libtensorflow_cc.so) to build C++ library,and then install tensorflow-gpu 1.8 under (segmappyenv) .Lastly,using this command:(catkin build tensorflow_ros_cpp --cmake-args -DFORCE_TF_PIP_SEARCH="OFF" -DFORCE_TF_BAZEL_SEARCH="ON" -DTF_BAZEL_LIBRARY="/home/tuan/tensorflow/bazel-bin/tensorflow/libtensorflow_cc.so" -DTF_BAZEL_SRC_DIR="/home/tuan/tensorflow") to compile everything and successfully built tensorflow_ros_cpp and segmapper.Please correct me if I am wrong~
Thank you for your help!

@14212094 No worries and yes, that's all I did.

@14212094 can you copy and paste the error when building segmap ?

@tuandle Ok!
Errors     << tf_graph_executor:make /home/liwenyi/segmap_ws/logs/tf_graph_executor/build.make.000.log
In file included from /home/liwenyi/tensorflow/tensorflow/core/platform/tensor_coding.h:22:0,
from /home/liwenyi/tensorflow/tensorflow/core/framework/resource_handle.h:19,
from /home/liwenyi/tensorflow/tensorflow/core/framework/allocator.h:24,
from /home/liwenyi/tensorflow/tensorflow/core/framework/tensor.h:20,
from /home/liwenyi/tensorflow/tensorflow/core/public/session.h:24,
from /home/liwenyi/segmap_ws/src/segmap/tf_graph_executor/src/tf_graph_executor.cpp:8:
/home/liwenyi/tensorflow/tensorflow/core/lib/core/stringpiece.h:29:38: fatal error: absl/strings                     /string_view.h: 没有那个文件或目录
compilation terminated.
make[2]: *** [CMakeFiles/tf_graph_executor.dir/src/tf_graph_executor.cpp.o] Error 1
make[1]: *** [CMakeFiles/tf_graph_executor.dir/all] Error 2
make: *** [all] Error 2
The tensorflow pagkage was cloned from github.com.How can i find this (absl/strings/string_view.h)？

@14212094 it seems the problem is with the TF version you are using. The problem was mentioned here #22240. I think you should checkout the branch r1.8 and rebuild everything.

I am sorry for writing here. I followed segmap/readme.md and this issue108 to compile segmapper.
In short I have the following setup:
Ubuntu 16.04 tf-gpu-1.8.0 Python 3.5.2 Compiler GCC 5.4 Bazel 0.10.0 cuDNN 7 CUDA 9 GPU Drivers 390
I used this command for tensorflow:
bazel build --config=opt --config=cuda --define framework_shared_object=false tensorflow:libtensorflow_cc.so
and installed using:
pip install tensorflow-gpu==1.8.0 # not from wheel
I built the packages using:
catkin build tensorflow_ros_cpp --cmake-args -DFORCE_TF_PIP_SEARCH="OFF" -DFORCE_TF_BAZEL_SEARCH="ON" -DTF_BAZEL_LIBRARY="/home/mr/tensorflow/bazel-bin/tensorflow/libtensorflow_cc.so" -DTF_BAZEL_SRC_DIR="/home/mr/tensorflow" -DTF_PYTHON_VERSION="Python 3.5" -DTF_PIP_PATH="$HOME/segmappyenv/lib/python<PYTHON_VERSION>/site-packages/tensorflow" -DTF_PIP_EXECUTABLE="$HOME/segmappyenv/bin/pip" -DTF_PYTHON_LIBRARY="/usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0"
catkin build segmapper --cmake-args -DFORCE_TF_PIP_SEARCH="OFF" -DFORCE_TF_BAZEL_SEARCH="ON" -DTF_BAZEL_LIBRARY="/home/mr/tensorflow/bazel-bin/tensorflow/libtensorflow_cc.so" -DTF_BAZEL_SRC_DIR="/home/mr/tensorflow" -DTF_PYTHON_VERSION="Python 3.5" -DTF_PIP_PATH="$HOME/segmappyenv/lib/python<PYTHON_VERSION>/site-packages/tensorflow" -DTF_PIP_EXECUTABLE="$HOME/segmappyenv/bin/pip" -DTF_PYTHON_LIBRARY="/usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0"
But during the compilation got these errors:
Failed     << glog_catkin:make                   [ Exited with code 2 ]
Failed    <<< glog_catkin                        [ 4.1 seconds ]
Abandoned <<< eigen_checks                       [ Unrelated job failed ]
Abandoned <<< libpointmatcher_ros                [ Unrelated job failed ]
Abandoned <<< minkindr                           [ Unrelated job failed ]
Abandoned <<< minkindr_gtsam                     [ Unrelated job failed ]
Abandoned <<< mincurves                          [ Unrelated job failed ]
Abandoned <<< laser_slam                         [ Unrelated job failed ]
Abandoned <<< laser_slam_ros                     [ Unrelated job failed ]
Abandoned <<< tf_graph_executor                  [ Unrelated job failed ]
Abandoned <<< segmatch                           [ Unrelated job failed ]
Abandoned <<< segmatch_ros                       [ Unrelated job failed ]
Abandoned <<< segmapper                          [ Unrelated job failed ]
Can you help ?

@smauq
Hello, I encounter the same question with @tuandle . I built the package in a virtualenv, I used Ubuntu16.04+cuda9.0+cudnn7.0+bazel 0.10.0 and built tensorflow-r1.8 from source. When I compiled the segmap_ws package in the same virtualenv , I encounter error when I use  "$ catkin build segmapper"

Errors     << segmapper:make /home/james/segmap_ws/logs/segmapper/build.make.006.log
/home/james/segmap_ws/devel/lib/libtf_graph_executor.so: undefined reference to tensorflow::ReadBinaryProto(tensorflow::Env*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, google::protobuf::MessageLite*)' /home/james/segmap_ws/devel/lib/libtf_graph_executor.so: undefined reference to tensorflow::internal::CheckOpMessageBuilder::NewStringabi:cxx11'
collect2: error: ld returned 1 exit status
make[2]: *** [/home/james/segmap_ws/devel/lib/segmapper/segmapper_node] Error 1
make[1]: *** [CMakeFiles/segmapper_node.dir/all] Error 2
make: *** [all] Error 2
cd /home/james/segmap_ws/build/segmapper; catkin build --get-env segmapper | catkin env -si  /usr/bin/make --jobserver-fds=6,7 -j; cd -
...............................................................................
Failed     << segmapper:make                     [ Exited with code 2 ]
Failed    <<< segmapper                          [ 3.5 seconds ]
[build] Summary: 21 of 22 packages succeeded.
[build]   Ignored:   9 packages were skipped or are blacklisted.
[build]   Warnings:  4 packages succeeded with warnings.
[build]   Abandoned: None.
[build]   Failed:    1 packages failed.
[build] Runtime: 13.0 seconds total.
I've seen your solution above,but I do not clearly understand .Could you please tell me how to deal with the problem?
Thank you very much

@tuandle Hi, I have the same linking problem as you did . I used Ubuntu16.04+cuda9.0+cudnn7.0+bazel 0.15.0 and built tensorflow-r1.10 from source. I encountered error when I use "$ catkin build segmapper". Could you please give more details on how to solve this problem? Thanks in advance!!

Hi @smauq @tuandle thanks for your sharing! I successfully compiled segmpper under the instruction of your comments in Ubuntu16.04 with TF1,8 and CUDA9.0. However, I also encountered the segment fault with eigen lib just as the same as @tuandle . I debug the code by change the configuration of work space as Debug , adding gdb -ex run --args in the launch file and following option 3,( e.g set OFF to USE_SYSTEM_EIGEN, change the link to eigen master branch, remove the patch). The fault was thrown off as:
 (segmappyenv) lee@lee-XPS-15-9550:~/segmap_ws$ roslaunch segmapper kitti_loop_closure_debug.launch
... logging to /home/lee/.ros/log/a4868456-be69-11e9-9c48-441ca8e3ae23/roslaunch-lee-XPS-15-9550-5640.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://lee-XPS-15-9550:41699/

SUMMARY
========

PARAMETERS
 * /LaserMapper/bag_file: /home/lee/.segmap...
 * /SegMapper/Benchmarker/enable_live_output: False
 * /SegMapper/Benchmarker/results_directory: /tmp/segmap_bench...
 * /SegMapper/Benchmarker/save_statistics_only: False
 * /SegMapper/LaserSlamWorker/assembled_cloud_sub_topic: /velodyne_points
 * /SegMapper/LaserSlamWorker/create_filtered_map: True
 * /SegMapper/LaserSlamWorker/distant_map_pub_topic: distant_map
 * /SegMapper/LaserSlamWorker/full_map_pub_topic: full_map
 * /SegMapper/LaserSlamWorker/local_map_pub_topic: local_map
 * /SegMapper/LaserSlamWorker/map_publication_rate_hz: 3
 * /SegMapper/LaserSlamWorker/odom_frame: world
 * /SegMapper/LaserSlamWorker/odometry_trajectory_pub_topic: odometry_trajectory
 * /SegMapper/LaserSlamWorker/publish_distant_map: False
 * /SegMapper/LaserSlamWorker/publish_full_map: False
 * /SegMapper/LaserSlamWorker/publish_local_map: True
 * /SegMapper/LaserSlamWorker/sensor_frame: velodyne
 * /SegMapper/LaserSlamWorker/trajectory_pub_topic: trajectory
 * /SegMapper/LaserSlamWorker/use_odometry_information: True
 * /SegMapper/OnlineEstimator/LaserTrack/add_m_estimator_on_icp: False
 * /SegMapper/OnlineEstimator/LaserTrack/add_m_estimator_on_odom: False
 * /SegMapper/OnlineEstimator/LaserTrack/force_priors: False
 * /SegMapper/OnlineEstimator/LaserTrack/icp_noise_model: [0.5, 0.05, 0.05,...
 * /SegMapper/OnlineEstimator/LaserTrack/nscan_in_sub_map: 5
 * /SegMapper/OnlineEstimator/LaserTrack/nscan_to_match: 3
 * /SegMapper/OnlineEstimator/LaserTrack/odometry_noise_model: [0.5, 0.5, 0.5, 0...
 * /SegMapper/OnlineEstimator/LaserTrack/save_icp_results: False
 * /SegMapper/OnlineEstimator/LaserTrack/use_icp_factors: True
 * /SegMapper/OnlineEstimator/LaserTrack/use_odom_factors: True
 * /SegMapper/OnlineEstimator/add_m_estimator_on_loop_closures: True
 * /SegMapper/OnlineEstimator/do_icp_step_on_loop_closures: False
 * /SegMapper/OnlineEstimator/loop_closure_noise_model: [0.0005, 0.0005, ...
 * /SegMapper/OnlineEstimator/loop_closures_sub_maps_radius: 3
 * /SegMapper/SegMatchWorker/SegMatch/Classifier/apply_hard_threshold_on_feature_distance: True
 * /SegMapper/SegMatchWorker/SegMatch/Classifier/enable_two_stage_retrieval: True
 * /SegMapper/SegMatchWorker/SegMatch/Classifier/feature_distance_threshold: 0.01
 * /SegMapper/SegMatchWorker/SegMatch/Classifier/knn_feature_dim: 7
 * /SegMapper/SegMatchWorker/SegMatch/Classifier/max_eigen_features_values: [2493.5, 186681.0...
 * /SegMapper/SegMatchWorker/SegMatch/Classifier/n_nearest_neighbours: 120
 * /SegMapper/SegMatchWorker/SegMatch/Classifier/normalize_eigen_for_hard_threshold: True
 * /SegMapper/SegMatchWorker/SegMatch/Classifier/normalize_eigen_for_knn: False
 * /SegMapper/SegMatchWorker/SegMatch/Classifier/threshold_to_accept_match: 0.6
 * /SegMapper/SegMatchWorker/SegMatch/Descriptors/descriptor_types: ['EigenvalueBased']
 * /SegMapper/SegMatchWorker/SegMatch/GeometricConsistency/max_consistency_distance_for_caching: 3.0
 * /SegMapper/SegMatchWorker/SegMatch/GeometricConsistency/min_cluster_size: 6
 * /SegMapper/SegMatchWorker/SegMatch/GeometricConsistency/recognizer_type: Incremental
 * /SegMapper/SegMatchWorker/SegMatch/GeometricConsistency/resolution: 0.4
 * /SegMapper/SegMatchWorker/SegMatch/LocalMap/max_vertical_distance_m: 999.0
 * /SegMapper/SegMatchWorker/SegMatch/LocalMap/min_points_per_voxel: 1
 * /SegMapper/SegMatchWorker/SegMatch/LocalMap/min_vertical_distance_m: -999.0
 * /SegMapper/SegMatchWorker/SegMatch/LocalMap/neighbors_provider_type: KdTree
 * /SegMapper/SegMatchWorker/SegMatch/LocalMap/radius_m: 50
 * /SegMapper/SegMatchWorker/SegMatch/LocalMap/voxel_size_m: 0.1
 * /SegMapper/SegMatchWorker/SegMatch/Segmenters/max_cluster_size: 15000
 * /SegMapper/SegMatchWorker/SegMatch/Segmenters/min_cluster_size: 100
 * /SegMapper/SegMatchWorker/SegMatch/Segmenters/radius_for_growing: 0.2
 * /SegMapper/SegMatchWorker/SegMatch/Segmenters/segmenter_type: IncrementalEuclid...
 * /SegMapper/SegMatchWorker/SegMatch/boundary_radius_m: 999.0
 * /SegMapper/SegMatchWorker/SegMatch/centroid_distance_threshold_m: 2.5
 * /SegMapper/SegMatchWorker/SegMatch/check_pose_lies_below_segments: False
 * /SegMapper/SegMatchWorker/SegMatch/filter_boundary_segments: True
 * /SegMapper/SegMatchWorker/SegMatch/filter_duplicate_segments: True
 * /SegMapper/SegMatchWorker/SegMatch/min_time_between_segment_for_matches_s: 60
 * /SegMapper/SegMatchWorker/align_target_map_on_first_loop_closure: False
 * /SegMapper/SegMatchWorker/close_loops: True
 * /SegMapper/SegMatchWorker/distance_between_segmentations_m: 0.0
 * /SegMapper/SegMatchWorker/distance_to_lower_target_cloud_for_viz_m: 15.0
 * /SegMapper/SegMatchWorker/export_segments_and_matches: False
 * /SegMapper/SegMatchWorker/line_scale_loop_closures: 5.0
 * /SegMapper/SegMatchWorker/line_scale_matches: 0.5
 * /SegMapper/SegMatchWorker/localize: False
 * /SegMapper/SegMatchWorker/publish_predicted_segment_matches: False
 * /SegMapper/SegMatchWorker/ratio_of_points_to_keep_when_publishing: 1.0
 * /SegMapper/clear_local_map_after_loop_closure: False
 * /SegMapper/number_of_robots: 1
 * /SegMapper/publish_world_to_odom: True
 * /SegMapper/robot_prefix: na
 * /SegMapper/tf_publication_rate_hz: 10
 * /SegMapper/world_frame: map
 * /rosdistro: kinetic
 * /rosversion: 1.12.14
 * /segmapper/icp_configuration_file: /home/lee/segmap_...
 * /segmapper/icp_input_filters_file: /home/lee/segmap_...
 * /use_sim_time: True

NODES
  /
    segmapper (segmapper/segmapper_node)
    visualizer (rviz/rviz)

auto-starting new master
process[master]: started with pid [5650]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to a4868456-be69-11e9-9c48-441ca8e3ae23
process[rosout-1]: started with pid [5663]
started core service [/rosout]
process[visualizer-2]: started with pid [5687]
process[segmapper-3]: started with pid [5688]
GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /home/lee/segmap_ws/devel/lib/segmapper/segmapper_node...[ INFO] [1565769656.321547658]: rviz version 1.12.17
[ INFO] [1565769656.321587837]: compiled against Qt version 5.5.1
[ INFO] [1565769656.321598683]: compiled against OGRE version 1.9.0 (Ghadamon)
done.
[ INFO] [1565769656.891955334]: Stereo is NOT SUPPORTED
[ INFO] [1565769656.892026226]: OpenGl version: 4.6 (GLSL 4.6).
0x1487320 void QWindowPrivate::setTopLevelScreen(QScreen*, bool) ( QScreen(0x893540) ): Attempt to set a screen on a child window.
0x1477200 void QWindowPrivate::setTopLevelScreen(QScreen*, bool) ( QScreen(0x893540) ): Attempt to set a screen on a child window.
0x1479bf0 void QWindowPrivate::setTopLevelScreen(QScreen*, bool) ( QScreen(0x893540) ): Attempt to set a screen on a child window.
0x1486970 void QWindowPrivate::setTopLevelScreen(QScreen*, bool) ( QScreen(0x893540) ): Attempt to set a screen on a child window.
Starting program: /home/lee/segmap_ws/devel/lib/segmapper/segmapper_node __name:=segmapper __log:=/home/lee/.ros/log/a4868456-be69-11e9-9c48-441ca8e3ae23/segmapper-3.log
[tcsetpgrp failed in terminal_inferior: 对设备不适当的 ioctl 操作]
[tcsetpgrp failed in terminal_inferior: 对设备不适当的 ioctl 操作]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[tcsetpgrp failed in terminal_inferior: 对设备不适当的 ioctl 操作]
[New Thread 0x7fff889ed700 (LWP 5859)]
[New Thread 0x7fff83fff700 (LWP 5860)]
[New Thread 0x7fff837fe700 (LWP 5861)]
[New Thread 0x7fff82ffd700 (LWP 5873)]
WARNING: Logging before InitGoogleLogging() is written to STDERR
I0814 16:02:00.525790  5794 segmatch.cpp:23] Do not forget to initialize SegMatch.
I0814 16:02:00.593253  5794 laser_track.cpp:16] Loading ICP configurations from: /home/lee/segmap_ws/src/segmap/segmapper/launch/kitti/icp_dynamic_outdoor.yaml
I0814 16:02:00.599375  5794 laser_track.cpp:26] Loading ICP input filters from: /home/lee/segmap_ws/src/segmap/segmapper/launch/kitti/input_filters_outdoor.yaml
I0814 16:02:00.601919  5794 incremental_estimator.cpp:31] Creating loop closure noise model with cauchy.
I0814 16:02:00.602021  5794 incremental_estimator.cpp:54] Loading ICP configurations from: /home/lee/segmap_ws/src/segmap/segmapper/launch/kitti/icp_dynamic_outdoor.yaml
[ INFO] [1565769720.607272736]: Number of laser_slam workers: 1
I0814 16:02:00.608141  5794 segmapper.cpp:86] Robot 0 subscribes to /velodyne_points world and velodyne
I0814 16:02:00.608188  5794 segmapper.cpp:89] Robot 0 publishes to trajectory and local_map
[New Thread 0x7fff827fc700 (LWP 6001)]
[New Thread 0x7fff81ffb700 (LWP 6029)]
I0814 16:02:00.713829  6029 segmapper.cpp:121] publishing local maps
[New Thread 0x7fff817fa700 (LWP 6030)]
[New Thread 0x7fff80ff9700 (LWP 6031)]
[ WARN] [1565769770.322090513,<PHONE_NUMBER>.465850308]: [SegMapper] Timeout while waiting between world and velodyne.
I0814 16:02:50.423069  6029 segmapper.cpp:121] publishing local maps
I0814 16:02:50.423118  6029 segmapper.cpp:121] publishing local maps
[New Thread 0x7fff63fff700 (LWP 6055)]
[New Thread 0x7fff637fe700 (LWP 6056)]
[New Thread 0x7fff62ffd700 (LWP 6057)]
I0814 16:02:50.765403  6029 segmapper.cpp:121] publishing local maps
I0814 16:02:51.098009  6029 segmapper.cpp:121] publishing local maps
I0814 16:02:51.430085  6029 segmapper.cpp:121] publishing local maps
I0814 16:02:51.768396  6029 segmapper.cpp:121] publishing local maps
I0814 16:02:52.100013  6029 segmapper.cpp:121] publishing local maps
I0814 16:02:52.423727  6029 segmapper.cpp:121] publishing local maps
I0814 16:02:52.756546  6029 segmapper.cpp:121] publishing local maps
I0814 16:02:53.098218  6029 segmapper.cpp:121] publishing local maps
I0814 16:02:53.434726  6029 segmapper.cpp:121] publishing local maps
I0814 16:02:53.758296  6029 segmapper.cpp:121] publishing local maps
I0814 16:02:54.090392  6029 segmapper.cpp:121] publishing local maps
I0814 16:02:54.425179  6029 segmapper.cpp:121] publishing local maps
I0814 16:02:54.765620  6029 segmapper.cpp:121] publishing local maps
I0814 16:02:55.102035  6029 segmapper.cpp:121] publishing local maps
I0814 16:02:55.423818  6029 segmapper.cpp:121] publishing local maps
I0814 16:02:55.758056  6029 segmapper.cpp:121] publishing local maps
I0814 16:02:56.090567  6029 segmapper.cpp:121] publishing local maps
I0814 16:02:56.433516  6029 segmapper.cpp:121] publishing local maps
I0814 16:02:56.771297  6029 segmapper.cpp:121] publishing local maps
I0814 16:02:57.091809  6029 segmapper.cpp:121] publishing local maps
I0814 16:02:57.423559  6029 segmapper.cpp:121] publishing local maps
I0814 16:02:57.766336  6029 segmapper.cpp:121] publishing local maps
I0814 16:02:58.100080  6029 segmapper.cpp:121] publishing local maps
I0814 16:02:58.437070  6029 segmapper.cpp:121] publishing local maps
I0814 16:02:58.758193  6029 segmapper.cpp:121] publishing local maps
I0814 16:02:59.092109  6029 segmapper.cpp:121] publishing local maps
I0814 16:02:59.423753  6029 segmapper.cpp:121] publishing local maps
I0814 16:02:59.757546  6029 segmapper.cpp:121] publishing local maps
I0814 16:03:00.103891  6029 segmapper.cpp:121] publishing local maps
I0814 16:03:00.424468  6029 segmapper.cpp:121] publishing local maps
I0814 16:03:00.757823  6029 segmapper.cpp:121] publishing local maps
I0814 16:03:01.090870  6029 segmapper.cpp:121] publishing local maps
I0814 16:03:01.433143  6029 segmapper.cpp:121] publishing local maps
I0814 16:03:01.757112  6029 segmapper.cpp:121] publishing local maps
I0814 16:03:02.092766  6029 segmapper.cpp:121] publishing local maps

Thread 1 "segmapper_node" received signal SIGSEGV, Segmentation fault.
0x00007ffff5e09de8 in Eigen::numext::abs<float> (x=@0x1ffffd2002754: <error reading variable>) at /home/lee/segmap_ws/devel/include/eigen3/Eigen/src/Core/MathFunctions.h:1263

The error occurred in Eigen source code

(gdb) l
1288	}
1289
1290	template <> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE
1291	double abs(const std::complex<double>& x) {
1292	  return ::hypot(x.real(), x.imag());
1293	}
1294	#endif
1295
1296	template<typename T>
1297	EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE
(gdb)
1298	T exp(const T &x) {
1299	  EIGEN_USING_STD_MATH(exp);
1300	  return exp(x);
1301	}
1302
1303	#if defined(__SYCL_DEVICE_ONLY__)
1304	SYCL_SPECIALIZE_FLOATING_TYPES_UNARY(exp, exp)
1305	#endif // defined(__SYCL_DEVICE_ONLY__)
1306
1307	#if defined(EIGEN_GPUCC)
(gdb)
1308	template<> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE
1309	float exp(const float &x) { return ::expf(x); }
1310
1311	template<> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE
1312	double exp(const double &x) { return ::exp(x); }
1313
1314	template<> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE
1315	std::complex<float> exp(const std::complex<float>& x) {
1316	  float com = ::expf(x.real());
1317	  float res_real = com * ::cosf(x.imag());
(gdb)
1318	  float res_imag = com * ::sinf(x.imag());
1319	  return std::complex<float>(res_real, res_imag);
1320	}
1321
1322	template<> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE
1323	std::complex<double> exp(const std::complex<double>& x) {
1324	  double com = ::exp(x.real());
1325	  double res_real = com * ::cos(x.imag());
1326	  double res_imag = com * ::sin(x.imag());
1327	  return std::complex<double>(res_real, res_imag);

The  backtrace also points to Eigen library:

(gdb) bt
#0  0x00007ffff5e09de8 in Eigen::numext::abs<float> (x=@0x1ffffd2002754: <error reading variable>)
    at /home/lee/segmap_ws/devel/include/eigen3/Eigen/src/Core/MathFunctions.h:1263
#1  Eigen::internal::scalar_abs_op<float>::operator() (this=0x7fffffff9940, a=@0x1ffffd2002754: <error reading variable>)
    at /home/lee/segmap_ws/devel/include/eigen3/Eigen/src/Core/functors/UnaryFunctors.h:44
#2  0x00007ffff44385ad in Eigen::internal::unary_evaluator<Eigen::CwiseUnaryOp<Eigen::internal::scalar_score_coeff_op<float>, Eigen::Block<Eigen::Matrix<float, -1, -1, 0, -1, -1>, -1, -1, false> const>, Eigen::internal::IndexBased, float>::coeff (this=0x7fffffff9940, row=0, col=1) at /usr/local/include/eigen3/Eigen/src/Core/CoreEvaluators.h:543
#3  0x00007ffff44297af in Eigen::internal::visitor_evaluator<Eigen::CwiseUnaryOp<Eigen::internal::scalar_score_coeff_op<float>, Eigen::Block<Eigen::Matrix<float, -1, -1, 0, -1, -1>, -1, -1, false> const> >::coeff (this=0x7fffffff9940, row=0, col=1) at /usr/local/include/eigen3/Eigen/src/Core/Visitor.h:79
#4  0x00007ffff44168ad in Eigen::internal::visitor_impl<Eigen::internal::max_coeff_visitor<Eigen::CwiseUnaryOp<Eigen::internal::scalar_score_coeff_op<float>, Eigen::Block<Eigen::Matrix<float, -1, -1, 0, -1, -1>, -1, -1, false> const> >, Eigen::internal::visitor_evaluator<Eigen::CwiseUnaryOp<Eigen::internal::scalar_score_coeff_op<float>, Eigen::Block<Eigen::Matrix<float, -1, -1, 0, -1, -1>, -1, -1, false> const> >, -1>::run (mat=..., visitor=...) at /usr/local/include/eigen3/Eigen/src/Core/Visitor.h:54
#5  0x00007ffff4406fcd in Eigen::DenseBase<Eigen::CwiseUnaryOp<Eigen::internal::scalar_score_coeff_op<float>, Eigen::Block<Eigen::Matrix<float, -1, -1, 0, -1, -1>, -1, -1, false> const> >::visit<Eigen::internal::max_coeff_visitor<Eigen::CwiseUnaryOp<Eigen::internal::scalar_score_coeff_op<float>, Eigen::Block<Eigen::Matrix<float, -1, -1, 0, -1, -1>, -1, -1, false> const> > > (this=0x7fffffff9b40, visitor=...) at /usr/local/include/eigen3/Eigen/src/Core/Visitor.h:116
#6  0x00007ffff43fa80a in Eigen::DenseBase<Eigen::CwiseUnaryOp<Eigen::internal::scalar_score_coeff_op<float>, Eigen::Block<Eigen::Matrix<float, -1, -1, 0, -1, -1>, -1, -1, false> const> >::maxCoeff<long> (this=0x7fffffff9b40, rowPtr=0x7fffffff9a18, colPtr=0x7fffffff9a20) at /usr/local/include/eigen3/Eigen/src/Core/Visitor.h:247
#7  0x00007ffff43ee7a5 in Eigen::FullPivHouseholderQR<Eigen::Matrix<float, -1, -1, 0, -1, -1> >::computeInPlace (this=0x7fffffff9ec0)
    at /usr/local/include/eigen3/Eigen/src/QR/FullPivHouseholderQR.h:490
#8  0x00007ffff43e0600 in Eigen::FullPivHouseholderQR<Eigen::Matrix<float, -1, -1, 0, -1, -1> >::compute<Eigen::Matrix<float, -1, -1, 0, -1, -1> > (this=0x7fffffff9ec0,
    matrix=...) at /usr/local/include/eigen3/Eigen/src/QR/FullPivHouseholderQR.h:452
#9  0x00007ffff43d5e05 in Eigen::FullPivHouseholderQR<Eigen::Matrix<float, -1, -1, 0, -1, -1> >::FullPivHouseholderQR<Eigen::Matrix<float, -1, -1, 0, -1, -1> > (
    this=0x7fffffff9ec0, matrix=...) at /usr/local/include/eigen3/Eigen/src/QR/FullPivHouseholderQR.h:136
#10 0x00007ffff43cc9e0 in Eigen::MatrixBase<Eigen::Matrix<float, -1, -1, 0, -1, -1> >::fullPivHouseholderQr (this=0x7fffffff9d80)
    at /usr/local/include/eigen3/Eigen/src/QR/FullPivHouseholderQR.h:671
#11 0x00007ffff439d471 in DataPointsFiltersImpl<float>::SurfaceNormalDataPointsFilter::inPlaceFilter (this=0x1539040, cloud=...)
    at /home/lee/segmap_ws/src/libpointmatcher/pointmatcher/DataPointsFiltersImpl.cpp:555
#12 0x00007ffff431ff57 in PointMatcher<float>::DataPointsFilters::apply (this=0x152a8d8, cloud=...)
    at /home/lee/segmap_ws/src/libpointmatcher/pointmatcher/DataPointsFilter.cpp:122
#13 0x00007ffff4dea6e8 in laser_slam::LaserTrack::processPoseAndLaserScan (this=0x152a630, pose=..., in_scan=..., newFactors=0x7fffffffa9e0, newValues=0x7fffffffaa20,
    is_prior=0x7fffffffa9b9) at /home/lee/segmap_ws/src/laser_slam/laser_slam/src/laser_track.cpp:146
#14 0x00007ffff7aadc68 in laser_slam_ros::LaserSlamWorker::scanCallback (this=0x152aa30, cloud_msg_in=...)
    at /home/lee/segmap_ws/src/laser_slam/laser_slam_ros/src/laser_slam_worker.cpp:134
#15 0x00007ffff7b0b1f8 in boost::_mfi::mf1<void, laser_slam_ros::LaserSlamWorker, sensor_msgs::PointCloud2_<std::allocator<void> > const&>::operator() (this=0x1533f40,
    p=0x152aa30, a1=...) at /usr/include/boost/bind/mem_fn_template.hpp:165
#16 0x00007ffff7b03c94 in boost::_bi::list2<boost::_bi::value<laser_slam_ros::LaserSlamWorker*>, boost::arg<1> >::operator()<boost::_mfi::mf1<void, laser_slam_ros::LaserSlamWorker, sensor_msgs::PointCloud2_<std::allocator<void> > const&>, boost::_bi::list1<sensor_msgs::PointCloud2_<std::allocator<void> > const&> > (this=0x1533f50, f=..., a=...)
    at /usr/include/boost/bind/bind.hpp:313
#17 0x00007ffff7afae35 in boost::_bi::bind_t<void, boost::_mfi::mf1<void, laser_slam_ros::LaserSlamWorker, sensor_msgs::PointCloud2_<std::allocator<void> > const&>, boost::_bi::list2<boost::_bi::value<laser_slam_ros::LaserSlamWorker*>, boost::arg<1> > >::operator()<sensor_msgs::PointCloud2_<std::allocator<void> > const&> (this=0x1533f40, a1=...)
    at /usr/include/boost/bind/bind.hpp:905
#18 0x00007ffff7af187f in boost::detail::function::void_function_obj_invoker1<boost::_bi::bind_t<void, boost::_mfi::mf1<void, laser_slam_ros::LaserSlamWorker, sensor_msgs::PointCloud2_<std::allocator<void> > const&>, boost::_bi::list2<boost::_bi::value<laser_slam_ros::LaserSlamWorker*>, boost::arg<1> > >, void, sensor_msgs::PointCloud2_<std::allocator<void> > const&>::invoke (function_obj_ptr=..., a0=...) at /usr/include/boost/function/function_template.hpp:159
#19 0x00007ffff7b2c09b in boost::function1<void, sensor_msgs::PointCloud2_<std::allocator<void> > const&>::operator() (this=0x1533f38, a0=...)
    at /usr/include/boost/function/function_template.hpp:773
#20 0x00007ffff7b294f3 in ros::SubscriptionCallbackHelperT<sensor_msgs::PointCloud2_<std::allocator<void> > const&, void>::call (this=0x1533f30, params=...)
    at /opt/ros/kinetic/include/ros/subscription_callback_helper.h:144
#21 0x00007fffd4545d8d in ros::SubscriptionQueue::call() () from /opt/ros/kinetic/lib/libroscpp.so
#22 0x00007fffd44eb838 in ros::CallbackQueue::callOneCB(ros::CallbackQueue::TLS*) () from /opt/ros/kinetic/lib/libroscpp.so
#23 0x00007fffd44ed23b in ros::CallbackQueue::callAvailable(ros::WallDuration) () from /opt/ros/kinetic/lib/libroscpp.so
#24 0x00007fffd4549e39 in ros::SingleThreadedSpinner::spin(ros::CallbackQueue*) () from /opt/ros/kinetic/lib/libroscpp.so
#25 0x00007fffd452ee9b in ros::spin() () from /opt/ros/kinetic/lib/libroscpp.so
#26 0x00000000005a7727 in main (argc=1, argv=0x7fffffffd4e8) at /home/lee/segmap_ws/src/segmap/segmapper/src/segmapper_node.cpp:18

It seems option 3 cannot solve the issue. I'd like to have a try with option 1. Could you please explain more detail on how to disable MKL? I see tensorflow and eigen lib used in this project supported by MKL. Which one should I disable and rebuild? Looking forward to your reply!

Anybody there? Is this project still under the construction? It seems like there is no one solving issues and discussing problems.
I read the code roughly, and found the problem occurred when declare a dynamic matrix and assign it, such as:

switch (it->datatype)
							{
								case PF::INT8: { view(dim, ptId) = T(*reinterpret_cast<const int8_t*>(fPtr)); fPtr += 1; break;}
								case PF::UINT8: { view(dim, ptId) = T(*reinterpret_cast<const uint8_t*>(fPtr)); fPtr += 1; break;}
								case PF::INT16: { view(dim, ptId) = T(*reinterpret_cast<const int16_t*>(fPtr)); fPtr += 2; break;}
								case PF::UINT16: { view(dim, ptId) = T(*reinterpret_cast<const uint16_t*>(fPtr)); fPtr += 2; break;}
								case PF::INT32: { view(dim, ptId) = T(*reinterpret_cast<const int32_t*>(fPtr)); fPtr += 4; break;}
								case PF::UINT32: { view(dim, ptId) = T(*reinterpret_cast<const uint32_t*>(fPtr)); fPtr += 4; break;}
								case PF::FLOAT32: { view(dim, ptId) = T(*reinterpret_cast<const float*>(fPtr)); fPtr += 4; break;}
								case PF::FLOAT64: {view(dim, ptId) = T(*reinterpret_cast<const double*>(fPtr)); fPtr += 8; break;}
								default: abort();
							}

But as far as I know, if the declaration of a dynamic matrix with known size, just like what the code write:
View view(
					 (it->name == "normal_x") ? cloud.getDescriptorRowViewByName("normals", 0) :
					((it->name == "normal_y") ? cloud.getDescriptorRowViewByName("normals", 1) :
					((it->name == "normal_z") ? cloud.getDescriptorRowViewByName("normals", 2) :
					((isFeature[fieldId]) ? cloud.getFeatureViewByName(it->name) :
					cloud.getDescriptorViewByName(it->name))))
				);

the assignment of the matrix should be legal. Is this the problem of the version of Eigen?

My issue was solved by using Eigen 3.2.10. At the same time, the same version of Eigen should be used in libnano, libpointmatcher and other packages.

@smauq @tuandle @LiShuaixin  sry to bother you,i really confused  about how to install it.Could you please tell me how to install segmatch but not segmap?i dont have a nivid GPU,i cant find there no segmatch branch,and i install it forked by others years ago,but compile failed with laser_slam.someone tell to choose fix/pointers branch,but i cannot find it.thanks a lot

I am sorry for writing here. I followed segmap/readme.md and this issue108 to compile segmapper.
In short I have the following setup:
Ubuntu 16.04 tf-gpu-1.8.0 Python 3.5.2 Compiler GCC 5.4 Bazel 0.10.0 cuDNN 7 CUDA 9 GPU Drivers 390
I used this command for tensorflow:
bazel build --config=opt --config=cuda --define framework_shared_object=false tensorflow:libtensorflow_cc.so
and installed using:
pip install tensorflow-gpu==1.8.0 # not from wheel
I built the packages using:
catkin build tensorflow_ros_cpp --cmake-args -DFORCE_TF_PIP_SEARCH="OFF" -DFORCE_TF_BAZEL_SEARCH="ON" -DTF_BAZEL_LIBRARY="/home/mr/tensorflow/bazel-bin/tensorflow/libtensorflow_cc.so" -DTF_BAZEL_SRC_DIR="/home/mr/tensorflow" -DTF_PYTHON_VERSION="Python 3.5" -DTF_PIP_PATH="$HOME/segmappyenv/lib/python<PYTHON_VERSION>/site-packages/tensorflow" -DTF_PIP_EXECUTABLE="$HOME/segmappyenv/bin/pip" -DTF_PYTHON_LIBRARY="/usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0"
catkin build segmapper --cmake-args -DFORCE_TF_PIP_SEARCH="OFF" -DFORCE_TF_BAZEL_SEARCH="ON" -DTF_BAZEL_LIBRARY="/home/mr/tensorflow/bazel-bin/tensorflow/libtensorflow_cc.so" -DTF_BAZEL_SRC_DIR="/home/mr/tensorflow" -DTF_PYTHON_VERSION="Python 3.5" -DTF_PIP_PATH="$HOME/segmappyenv/lib/python<PYTHON_VERSION>/site-packages/tensorflow" -DTF_PIP_EXECUTABLE="$HOME/segmappyenv/bin/pip" -DTF_PYTHON_LIBRARY="/usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0"
But during the compilation got these errors:
Failed << glog_catkin:make [ Exited with code 2 ]
Failed <<< glog_catkin [ 4.1 seconds ]
Abandoned <<< eigen_checks [ Unrelated job failed ]
Abandoned <<< libpointmatcher_ros [ Unrelated job failed ]
Abandoned <<< minkindr [ Unrelated job failed ]
Abandoned <<< minkindr_gtsam [ Unrelated job failed ]
Abandoned <<< mincurves [ Unrelated job failed ]
Abandoned <<< laser_slam [ Unrelated job failed ]
Abandoned <<< laser_slam_ros [ Unrelated job failed ]
Abandoned <<< tf_graph_executor [ Unrelated job failed ]
Abandoned <<< segmatch [ Unrelated job failed ]
Abandoned <<< segmatch_ros [ Unrelated job failed ]
Abandoned <<< segmapper [ Unrelated job failed ]
Can you help ?

Did you solve that problem?

Thanks for your time knowing about my problems and please give me some help about how to solve it.
I was trying to compile segmap package. The environment is Ubuntu16.04 + cuda9.0 + cudnn7.0 + nccl 2.2. I set up tensorflow 1.8.0 by running whl file, which is by compliing form source.
bazel build --config=opt --config=cuda  --cxxopt="-D_GLIBCXX_USE_CXX11_ABI=0" --define framework_shared_object=true
//tensorflow/tools/pip_package:build_pip_package
//tensorflow:libtensorflow_cc.so
//tensorflow:libtensorflow_framework.so
//tensorflow:install_headers
I followed up tutorial to build the tensorflow_ros_cpp first and I got its done, then i got stuck by compiling segmapper.
Here is my code and reported error.
catkin build tensorflow_ros_cpp --cmake-args -DFORCE_TF_PIP_SEARCH="ON" -DFORCE_TF_BAZEL_SEARCH="ON" -DFORCE_TF_CATKIN_SEARCH="ON" -DTF_BAZEL_LIBRARY="/home/haotian/tensorflow/tensorflow-1.8.0/bazel-bin/tensorflow/libtensorflow_cc.so" -DTF_BAZEL_SRC_DIR="/home/haotian/tensorflow/tensorflow-1.8.0" -DTF_PYTHON_VERSION="2.7.15" -DTF_PIP_PATH="$HOME/segmappyenv/lib/python2.7/site-packages/tensorflow" -DTF_PYTHON_LIBRARY="/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0"
catkin build segmapper --cmake-args -DFORCE_TF_PIP_SEARCH="ON" -DFORCE_TF_BAZEL_SEARCH="ON" -DFORCE_TF_CATKIN_SEARCH="ON" -DTF_BAZEL_LIBRARY="/home/haotian/tensorflow/tensorflow-1.8.0/bazel-bin/tensorflow/libtensorflow_cc.so" -DTF_BAZEL_SRC_DIR="/home/haotian/tensorflow/tensorflow-1.8.0" -DTF_PYTHON_VERSION="2.7.15" -DTF_PIP_PATH="$HOME/segmappyenv/lib/python2.7/site-packages/tensorflow" -DTF_PYTHON_LIBRARY="/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0"
reported error
/usr/bin/ld: warning: libiomp5.so, needed by /home/haotian/segmap_ws/devel/lib/libtensorflow_cc.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libmklml_intel.so, needed by /home/haotian/segmap_ws/devel/lib/libtensorflow_cc.so, not found (try using -rpath or -rpath-link)
/home/haotian/segmap_ws/devel/lib/libtensorflow_cc.so: undefined reference to dnnLayoutGetMemorySize_F32' /home/haotian/segmap_ws/devel/lib/libtensorflow_cc.so: undefined reference to omp_in_parallel@VERSION'
/home/haotian/segmap_ws/devel/lib/libtensorflow_cc.so: undefined reference to GOMP_barrier@VERSION' /home/haotian/segmap_ws/devel/lib/libtensorflow_cc.so: undefined reference to dnnLayoutCompare_F32'
/home/haotian/segmap_ws/devel/lib/libtensorflow_cc.so: undefined reference to omp_get_max_threads@VERSION' /home/haotian/segmap_ws/devel/lib/libtensorflow_cc.so: undefined reference to dnnConversionCreate_F32'
/home/haotian/segmap_ws/devel/lib/libtensorflow_cc.so: undefined reference to omp_get_num_threads@VERSION' /home/haotian/segmap_ws/devel/lib/libtensorflow_cc.so: undefined reference to dnnLayoutCreateFromPrimitive_F32'
/home/haotian/segmap_ws/devel/lib/libtensorflow_cc.so: undefined reference to dnnLayoutDeserialize_F32' /home/haotian/segmap_ws/devel/lib/libtensorflow_cc.so: undefined reference to dnnConversionExecute_F32'
/home/haotian/segmap_ws/devel/lib/libtensorflow_cc.so: undefined reference to cblas_sgemm_batch' /home/haotian/segmap_ws/devel/lib/libtensorflow_cc.so: undefined reference to MKL_Domatcopy'
/home/haotian/segmap_ws/devel/lib/libtensorflow_cc.so: undefined reference to dnnLayoutCreate_F32' /home/haotian/segmap_ws/devel/lib/libtensorflow_cc.so: undefined reference to MKL_Comatcopy'
/home/haotian/segmap_ws/devel/lib/libtensorflow_cc.so: undefined reference to dnnLayoutSerializationBufferSize_F32' /home/haotian/segmap_ws/devel/lib/libtensorflow_cc.so: undefined reference to cblas_cgemm_batch'
/home/haotian/segmap_ws/devel/lib/libtensorflow_cc.so: undefined reference to GOMP_parallel@VERSION' /home/haotian/segmap_ws/devel/lib/libtensorflow_cc.so: undefined reference to MKL_Somatcopy'
/home/haotian/segmap_ws/devel/lib/libtensorflow_cc.so: undefined reference to dnnLayoutDelete_F32' /home/haotian/segmap_ws/devel/lib/libtensorflow_cc.so: undefined reference to dnnConvolutionCreateBackwardBias_F32'
/home/haotian/segmap_ws/devel/lib/libtensorflow_cc.so: undefined reference to dnnDelete_F32' /home/haotian/segmap_ws/devel/lib/libtensorflow_cc.so: undefined reference to cblas_zgemm_batch'
/home/haotian/segmap_ws/devel/lib/libtensorflow_cc.so: undefined reference to dnnExecute_F32' /home/haotian/segmap_ws/devel/lib/libtf_graph_executor.so: undefined reference to tensorflow::ReadBinaryProto(tensorflow::Env*, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, google::protobuf::MessageLite*)'
/home/haotian/segmap_ws/devel/lib/libtensorflow_cc.so: undefined reference to cblas_dgemm_batch' /home/haotian/segmap_ws/devel/lib/libtensorflow_cc.so: undefined reference to omp_get_thread_num@VERSION'
/home/haotian/segmap_ws/devel/lib/libtensorflow_cc.so: undefined reference to MKL_Zomatcopy' /home/haotian/segmap_ws/devel/lib/libtensorflow_cc.so: undefined reference to dnnLayoutSerialize_F32'
/home/haotian/segmap_ws/devel/lib/libtf_graph_executor.so: undefined reference to `tensorflow::internal::CheckOpMessageBuilder::NewStringabi:cxx11'
collect2: error: ld returned 1 exit status
make[2]: *** [/home/haotian/segmap_ws/devel/lib/segmapper/segmapper_node] Error 1
make[1]: *** [CMakeFiles/segmapper_node.dir/all] Error 2
make: *** [all] Error 2
cd /home/haotian/segmap_ws/build/segmapper; catkin build --get-env segmapper | catkin env -si  /usr/bin/make --jobserver-fds=6,7 -j; cd -
...........................................................................................................................................................................................................
Failed     << segmapper:make                     [ Exited with code 2 ]
Failed    <<< segmapper                          [ 59.1 seconds ]
[build] Summary: 21 of 22 packages succeeded.
[build]   Ignored:   9 packages were skipped or are blacklisted.
[build]   Warnings:  12 packages succeeded with warnings.
[build]   Abandoned: None.
[build]   Failed:    1 packages failed.
[build] Runtime: 37 minutes and 34.7 seconds total.
Please give me some guidance to slove this problem. Thank you so much.

@smauq
@LiShuaixin

Hi @smauq, I encounter the same problem as #106 . I compiled and pip installed the newest TF, version 1.10.
(segmappyenv) tuan@tuan:~/segmap_ws$ pip show tensorflow
Name: tensorflow
Version: 1.10.0
Summary: TensorFlow is an open source machine learning framework for everyone.
Home-page: https://www.tensorflow.org/
Author: Google Inc.
Author-email<EMAIL_ADDRESS>License: Apache 2.0
Location: /home/tuan/segmappyenv/lib/python2.7/site-packages
Requires: setuptools, astor, tensorboard, enum34, gast, keras-preprocessing, six, keras-applications, wheel, absl-py, backports.weakref, termcolor, protobuf, numpy, grpcio, mock
Required-by:
(segmappyenv) tuan@tuan:~/segmap_ws$

But I can't build segmapper. The error stays the same
__________________________________________________________________________________________________________________
Errors     << segmapper:make /home/tuan/segmap_ws/logs/segmapper/build.make.002.log
/home/tuan/segmap_ws/devel/lib/libtf_graph_executor.so: undefined reference to `tensorflow::ReadBinaryProto(tensorflow::Env*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, google::protobuf::MessageLite*)'
/home/tuan/segmap_ws/devel/lib/libtf_graph_executor.so: undefined reference to `tensorflow::internal::CheckOpMessageBuilder::NewString[abi:cxx11]()'
collect2: error: ld returned 1 exit status
make[2]: *** [/home/tuan/segmap_ws/devel/lib/segmapper/segmapper_node] Error 1
make[1]: *** [CMakeFiles/segmapper_node.dir/all] Error 2
make: *** [all] Error 2
cd /home/tuan/segmap_ws/build/segmapper; catkin build --get-env segmapper | catkin env -si  /usr/bin/make --jobserver-fds=6,7 -j; cd -
..................................................................................................................
Failed     << segmapper:make                     [ Exited with code 2 ]
Failed    <<< segmapper                          [ 3.4 seconds ]
[build] Summary: 21 of 22 packages succeeded.
[build]   Ignored:   9 packages were skipped or are blacklisted.
[build]   Warnings:  4 packages succeeded with warnings.
[build]   Abandoned: None.
[build]   Failed:    1 packages failed.
[build] Runtime: 7.2 seconds total.
(segmappyenv) tuan@tuan:~/segmap_ws$

What should I do next? Thank you for your help!

hi,Could you please tell me more about how to solve it because I encountered the same problem,thanks!


Hierarchical PArtition Keys are not supported in current latest version of the SDK v3.31.2

[Am I using the SDK correctly?]

Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

ID: 9ba057b3-d2d0-8c8b-4cef-3e9ef584b845
Version Independent ID: 0322072a-214e-960d-74c2-29435d8f055e
Content: Hierarchical partition keys in Azure Cosmos DB (preview)
Content Source: articles/cosmos-db/hierarchical-partition-keys.md
Service: cosmos-db
GitHub Login: @seesharprun
Microsoft Alias: sidandrews

Hi @pdhimate ,
Thanks for sharing this feedback. May I know if the .NET SDK version used in this case is v3, 31.2?

Hi @pdhimate ,
Thanks for sharing this feedback. May I know if the .NET SDK version used in this case is v3, 31.2?

Yes

@pdhimate, you must use the latest version of the SDK with a preview flag. I realize this may be different than the way other .NET packages are managed.
As of today, that version is 3.31.1-preview.
Each version of the SDK has a stable and preview variant. The preview variant has preview features enabled. The latest version (3.31.2) has a later version number, but it does not include all functionality on the preview track.
So, please use the latest version with a preview flag to take advantage of this feature.
#please-close

#assign:seesharprun

Here's another example to help you get started @phimate,
I tested with a free NoSQL account created using: https://cosmos.azure.com/try/.
dotnet new console
dotnet add package Microsoft.Azure.Cosmos --version 3.31.1-preview
dotnet build

using Microsoft.Azure.Cosmos;

CosmosClient client = new ("<connection-string>");

Database database = await client.CreateDatabaseIfNotExistsAsync("demodatabase");

List<string> partitionKeyPaths = new() {
    "/tenantId",
    "/submitted/year",
    "/submitted/month"
};

ContainerProperties containerProperties = new (
    id: "examplecontainer",
    partitionKeyPaths
);

ThroughputProperties throughputProperties = ThroughputProperties.CreateManualThroughput(400);

Container container = await database.CreateContainerIfNotExistsAsync(
    containerProperties,
    throughputProperties
);

var item = new {
    id = "first-tenant-2a93e48b0",
    submitted = new {
        year = 2022,
        month = 11
    }
};

await container.UpsertItemAsync(item);

You can see the partition keys in the Data Explorer:

Thank you. Is there an ETA on GA for this?

No, this feature is still in preview and does not have an anticipated release date.


Create release process for Bicep

Benefit/Result/Outcome
So that any team member can create a release for the Bicep code.
Description
The current release process does not include the Bicep code. We want to add Bicep to the release process.

The release process is being documented as part of #234

Acceptance Criteria

A documented release process exists describing how to create a release that includes Bicep. (Should be consolidated with the Terraform release documentation created with #234.
Any team member can create a release (maintainers)

Closed as part of #481


Checklist:

[x] Referenced all related issues in the PR body (e.g. "Closes #xyz")
[x] Updated overrideVersionCode or baseVersionCode as needed for all multisrc extensions
[x] Added the isNsfw = true flag in build.gradle when appropriate
[x] Have not changed source names
[x] Have tested the modifications by compiling and running the extension through Android Studio

Does this close #1422 ?

Does this close #1422 ?

YES, idk why this issue didn't appear when i searched (???????) but now it shows up just fine
cloudflare agents are trolling me

Are you still busy

Apakah kamu masih sibuk

May I request an extension

@Start38 Please don't mention other sources that have nothing to do with the source the issue/pull request is about. This is the second time you've done this.


How to assert queue?

I'm not sure what you mean?

I think what you're looking for is the "passive" flag in https://docs.rs/lapin/latest/lapin/options/struct.QueueDeclareOptions.html


Facund/touch swipe

Add swipe on touch helper and Update Events

Could you ensure to run npm run docs to ensure that the docs within the README.md are updated please :+1:

Looks good for merge @jonman?

:+1:


renders as '-' when Node.text() is called

Consider the following JUnit4 test
@Test
public void testIfShyIsStripped(){
        String htmlwithSHY = "quitealongword";
        Document parse = Jsoup.parse(htmlwithSHY);
        String text = parse.body().text();
        assertEquals("quitealongword", text);
}

This test fails as text is parsed as quite-a-long-word rather then it's actual textual representation that would have been quitealongword in any browser.
Perhaps this is working as intended, but it would be interesting to understand the reasoning behind it.

It would make sense to normalize the soft-hyphen. Like   is normalized. Related commit is d3f02400eca1c5cbf84212c46cebcff511536655

Thanks, implemented.


【@webcontainer/api】SharedArrayBuffer transfer requires self.crossOriginIsolated

Describe the bug
I use @webcontainer/api in my own project. It works fine during local debugging, but after deploying it online, it throws an error like this. What should I do to make it work properly in this case?
webcontainer.d5d65229.js:1 Uncaught (in promise) Error: Failed to execute 'postMessage' on 'Worker': SharedArrayBuffer transfer requires self.crossOriginIsolated.
at blitz.d5d65229.js:329:181546
at new Promise ()
at _0x118c17 (blitz.d5d65229.js:329:180943)
at Object.apply (blitz.d5d65229.js:329:178849)
at _0x1710fa.init (blitz.d5d65229.js:334:521914)
Link to the blitz that caused the error
my own project
Steps to reproduce

use @webcontainer/api in my own project
It works fine during local debugging, but after deploying it online, it throws an error

Expected behavior
I want use @webcontainer/api in my own project and It works fine online.
Parity with Local

[X] I have run the project in my local machine and I could not reproduce the issue.

Screenshots
No response
Platform

OS: [e.g. macOS, Windows, Linux]
Browser: [e.g. Chrome, Safari, Firefox]
Version: [e.g. 91.1]

Additional context
No response

I am using webpack-dev-server to develop  my project , how to config crossOriginIsolated in webpack-dev-server?
I config like this

But not work

I am using webpack-dev-server to develop my project , how to config crossOriginIsolated in webpack-dev-server? I config like this  But not work

请问这个问题解决了嘛

Describe the bug
I use @webcontainer/api in my own project. It works fine during local debugging, but after deploying it online, it throws an error like this. What should I do to make it work properly in this case?
webcontainer.d5d65229.js:1 Uncaught (in promise) Error: Failed to execute 'postMessage' on 'Worker': SharedArrayBuffer transfer requires self.crossOriginIsolated. at blitz.d5d65229.js:329:181546 at new Promise () at _0x118c17 (blitz.d5d65229.js:329:180943) at Object.apply (blitz.d5d65229.js:329:178849) at _0x1710fa.init (blitz.d5d65229.js:334:521914)
Link to the blitz that caused the error
my own project
Steps to reproduce

use @webcontainer/api in my own project
It works fine during local debugging, but after deploying it online, it throws an error

Expected behavior
I want use @webcontainer/api in my own project and It works fine online.
Parity with Local

[x]  I have run the project in my local machine and I could not reproduce the issue.

Screenshots
No response
Platform

OS: [e.g. macOS, Windows, Linux]
Browser: [e.g. Chrome, Safari, Firefox]
Version: [e.g. 91.1]

Additional context
No response

我也遇到了相同的情况，请问解决了吗


Is test_series:test_types_values incorrect?

We're using the tests here with the Microsoft type stubs.  In test_series.py, you have:
def test_types_values() -> None:
    n1: np.ndarray = pd.Series([1, 2, 3]).values
    n2: np.ndarray = pd.Series(list('aabc')).values
    n3: np.ndarray = pd.Series(list('aabc')).astype('category').values
    n4: np.ndarray = pd.Series(pd.date_range('20130101', periods=3, tz='US/Eastern')).values

The issue here is that Series.values can return a np.ndarray or an ExtensionArray .  Here's results of typing the 4 cases above:
>>> import pandas as pd
>>> pd.__version__
'1.4.0'
>>> type(pd.Series([1, 2, 3]).values)
<class 'numpy.ndarray'>
>>> type( pd.Series(list('aabc')).values)
<class 'numpy.ndarray'>
>>> type(pd.Series(list('aabc')).astype('category').values)
<class 'pandas.core.arrays.categorical.Categorical'>
>>> type(pd.Series(pd.date_range('20130101', periods=3, tz='US/Eastern')).values
)
<class 'numpy.ndarray'>

So in your stubs and tests, for the category example, the test (and stubs) is incorrect, as it doesn't return a np.ndarray
And if you use the new string dtype, you have:
>>> type(pd.Series(["abc", "def", "ghi"], dtype="string").values)
<class 'pandas.core.arrays.string_.StringArray'>

Would like your thoughts on how to either test this or put in types so that it knows whether np.ndarray or ExtensionArray are being returned.

Thanks for letting us know about it @Dr-Irv.
This is revelation, albeit negative. There are three solutions with increasing grades of difficulty:

Make the return type Any so not be restrictive. Requires consciously doing a cast otherwise users will lose type safety.
Make the return type a union of all possible return types (I assume that the amount is finite). This will require a cast but the user will at least be forced to choose an appropriate type.
Make Series a generic (I think that's already the case in Microsoft stubs) and prepare a number of overloads base on dtype in the class constructor. Each constructor will return a differently parametrized Series object which will be then returned by the values property. The same would have to be done to astype. This would theoretically work however I'm not sure that it wouldn't "trickle-down" to the users which would be forced to specify a type for each declaration of Series  - this isn't necessarily a bad thing but that's a huge leap in terms of the interface.

Short term I'll might prepare a fix with the first option in the spirit of "can't prove I'm wrong" and making the interface overly broad but true.
Long term I might need to do a bit of research and trials.
Thanks for reaching out. It might take a while to find a systematic fix.

@zkrolikowski-vl
I don't think the third option will work because even after you have constructed a Series, the type can change under the hood due to calculations.  E.g.:
>>> import pandas as pd
>>> s = pd.Series([1,2,3])
>>> s
0    1
1    2
2    3
dtype: int64
>>> s.iloc[1] = 2.5
>>> s
0    1.0
1    2.5
2    3.0
dtype: float64
>>>

In pandas, the return type of values is ArrayLike which is defined as ArrayLike = Union["ExtensionArray", np.ndarray] in _typing.pyi and in the MS stubs, we are defining values to return ArrayLike , which is the second solution.
So I think we will go in that direction and change the tests you did accordingly.  I would suggest the second option.  For values, users have to do a cast


Enable FIPS mode for libssh

Signed-off-by: Paul Belanger<EMAIL_ADDRESS>

Pull-request updated, HEAD is now 1790bff042b8a79f8c380e8c078313ab63b8bad0


feat: handle profile updates

Codecov Report

Merging #33 into master will increase coverage by 0.19%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master      #33      +/-   ##
==========================================
+ Coverage   71.18%   71.37%   +0.19%
==========================================
  Files          66       68       +2
  Lines         753      758       +5
  Branches       47       48       +1
==========================================
+ Hits          536      541       +5
  Misses        197      197
  Partials       20       20

Impacted Files
Coverage Δ

...class-slot-list/queue-class-slot-list.component.ts
81.81% <ø> (+9.09%)
:arrow_up:

src/app/queue/queue.selectors.ts
68.42% <ø> (-1.58%)
:arrow_down:

src/app/queue/queue.actions.ts
100% <ø> (ø)
:arrow_up:

src/app/profile/profile-events.service.ts
100% <100%> (ø)

src/app/selectors.ts
100% <100%> (ø)

src/app/core/io-client.service.ts
25.86% <0%> (-1.73%)
:arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fb50316...82da7bb. Read the comment docs.


Add a group permission for plugin

Only users in this custom group can publish.

Works well so far in older a37f5ef, now merged into develop. Will reopen if I overlooked something :)


very slow (udp)

Hello.
https://kirill888.github.io/notes/wireguard-via-websocket/
Putting together a test bench on a localhost (virtual machine).
Measurements (on wg interface):

Wireguard tunnel (no nginx, no wstunnel) via VM.

iperf3 -c <IP_ADDRESS>
Connecting to host <IP_ADDRESS>, port 5301
[  5] local <IP_ADDRESS> port 40502 connected to <IP_ADDRESS> port 5301
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec  16.3 MBytes   137 Mbits/sec    0    657 KBytes
[  5]   1.00-2.00   sec  20.1 MBytes   168 Mbits/sec    0   1.24 MBytes
[  5]   2.00-3.01   sec  20.0 MBytes   167 Mbits/sec    0   1.51 MBytes
[  5]   3.01-4.00   sec  21.2 MBytes   179 Mbits/sec    0   1.51 MBytes
[  5]   4.00-5.01   sec  20.0 MBytes   168 Mbits/sec   78   1.16 MBytes
[  5]   5.01-6.01   sec  18.8 MBytes   157 Mbits/sec    0   1.26 MBytes
[  5]   6.01-7.01   sec  20.0 MBytes   168 Mbits/sec    0   1.35 MBytes
[  5]   7.01-8.00   sec  18.8 MBytes   158 Mbits/sec    0   1.41 MBytes
[  5]   8.00-9.00   sec  21.2 MBytes   179 Mbits/sec    0   1.46 MBytes
[  5]   9.00-10.01  sec  22.5 MBytes   188 Mbits/sec    0   1.49 MBytes

[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.01  sec   199 MBytes   167 Mbits/sec   78             sender
[  5]   0.00-10.06  sec   196 MBytes   164 Mbits/sec                  receiver
iperf Done.

Wireguard tunnel (with nginx, with wstunnel) via VM.

iperf3 -c <IP_ADDRESS>
Connecting to host <IP_ADDRESS>, port 5301
[  5] local <IP_ADDRESS> port 40508 connected to <IP_ADDRESS> port 5301
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec  1.89 MBytes  15.9 Mbits/sec    5   75.7 KBytes
[  5]   1.00-2.00   sec  1.62 MBytes  13.6 Mbits/sec    0   95.6 KBytes
[  5]   2.00-3.00   sec  1.71 MBytes  14.3 Mbits/sec    1   77.0 KBytes
[  5]   3.00-4.00   sec  1.71 MBytes  14.3 Mbits/sec    0   91.6 KBytes
[  5]   4.00-5.00   sec  1.84 MBytes  15.5 Mbits/sec    1   77.0 KBytes
[  5]   5.00-6.00   sec  1.83 MBytes  15.3 Mbits/sec    0   91.6 KBytes
[  5]   6.00-7.00   sec  1.77 MBytes  14.9 Mbits/sec    3   71.7 KBytes
[  5]   7.00-8.01   sec  1.95 MBytes  16.2 Mbits/sec    0   90.3 KBytes
[  5]   8.01-9.00   sec  1.72 MBytes  14.5 Mbits/sec    1   69.1 KBytes
[  5]   9.00-10.00  sec  1.77 MBytes  14.8 Mbits/sec    0   83.7 KBytes

[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec  17.8 MBytes  14.9 Mbits/sec   11             sender
[  5]   0.00-10.03  sec  17.6 MBytes  14.7 Mbits/sec                  receiver
iperf Done.
As you can see, the speed dropped 10 times.  Or is it okay?

Hello,
Can you try release v4.0 https://github.com/erebe/wstunnel/releases/tag/v4.0
and let me know the outcome ?
TCP window autoscaling was broken, so the connection between the client and the server was never growing if you had a small initial TCP window size.
Regarding UDP, performance will be limited as it is UDP over websocket over TCP, and as UDP require for the messages to be small in size, it will consume a lot of CPU to have a good throughput

Hello.
There is an increase, but it is not significant.
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec  20.4 MBytes  17.1 Mbits/sec   34             sender
[  5]   0.00-10.08  sec  20.2 MBytes  16.8 Mbits/sec                  receive

[  5]   0.00-10.06  sec  24.9 MBytes  20.8 Mbits/sec  217             sender
[  5]   0.00-10.00  sec  22.2 MBytes  18.6 Mbits/sec                  receiver

Most likely not to squeeze out of a similar configuration anymore, about the same  thing on other software written in go.

Hello,
Thanks for letting me know.
I guess there is not too much that I can do about it then ¯_(ツ)_/¯.
Most of the perf issue with UDP is due to message/frame/payload size.
Payload for UDP message is supposed to stay small (~4096 bytes), so if you need a lot of throughput you end-up doing a lot of syscalls which in turn churn your CPU :x

Hello,
Since I have everyting setup to test in a lab may I ask you if it is possible to test a version with a bigger datagram size (I see you hardcoded 4096 bytes) ? or having it configured through command line ?
The max length in UDP Datagram is something arround 65K, perhaps we could try something arround 16K to check the results.
Thank you

Hi back,
I can make it configurable from the command line, but increasing the frame size is going to work only on internal/private networks.
At the time I made some tests, and going further than 5000 B of data end-up message not being delivered on internet.
Seems that some routers are dropping udp packet above this size.
Even quic protocol has a QUIC packet is 1,350 bytes and this sie limit due to network equipment on internet make high troughput difficul https://www.fastly.com/blog/measuring-quic-vs-tcp-computational-efficiency
Anyway, I can make a flag in the command line if you want to play with it.
Regarding an ETA, I don't know if I will have much time this week so can't commit on it.
P.s: If you to play by yourself, you can build wstunnel with the dockerfile for linux.
Once build you can extract the binary with
docker run --rm -ti -v $(pwd):/mnt wstunnel cp wstunnel /mnt

You will have it in your current folder


Update readme to use current version numbers

Update Flyway version number to 9
Update workflow example to use current action version

@joshuaavalon any chance this could get merged soon? It's just a tiny change 🙏


display haxcms version on site list / install screens

Related to #367. It would be good to have the version number visible when installing / logging in. This can help especially going forward w/ issue reporting.

prev commit adds this

it's also in the installer