gaoxiang12 / g2o_ba_example

An easy example of doing bundle adjustment within two images using g2o.
130 stars 54 forks source link

malloc(): memory corruption #1

Open LinHuican opened 8 years ago

LinHuican commented 8 years ago

~/Projects/g2o_ba_example/build$ ./ba_example 1.png 2.png 分别找到了500和500个特征点 找到了326组对应特征点。 * Error in `./ba_example': malloc(): memory corruption: 0x000000000079f820 * Aborted (core dumped)

luxinglong commented 7 years ago

$ ./ba_example 1.png 2.png Error in `./ba_example': double free or corruption (out): 0x0000000001410720 已放弃 (核心已转储) 请问这是什么问题呀?有没有小伙伴遇到同样的问题?

LoSealL commented 7 years ago

g2o 版本问题吧,如果你用最新的g2o的话需要稍微修改一下例子中的代码,接口参数有些改变,g2o有些接口用std::unique_ptr取代了裸指针。

Junkai-Liu commented 6 years ago

@LoSealL when i use unique_ptr to modify pointer construction,the compile processing is fine .But when i run the binary file on the dataset of g2o fromat file .output error is malloc():memory corruption(fast):0x0000000001400340 *** how can i fix this bug?Do u have a solution?

Junkai-Liu commented 6 years ago

@LinHuican 老哥 找到解决方案了吗?

LinHuican commented 6 years ago

@LinHuican 老哥 找到解决方案了吗?

@Junkai-Liu

应该是g2o版本问题,高博slambook里的g2o: https://github.com/gaoxiang12/slambook/blob/master/3rdparty/g2o.tar.gz 我这边没有问题了,你可以试试。

Junkai-Liu commented 6 years ago

@LinHuican 我现在改用新版本的g2o 改了一下程序在运行生成的bin的时候就会报memory corruption这个错,你知道怎么解决吗?

LoSealL commented 6 years ago

@Junkai-Liu 年代久远有点记忆迷糊了,你的bin指的是这个example的执行文件? 把你改后的代码贴一下

参考一下我的fork,这是一年前的g2o版本,不保证对现在的仍然有效

Junkai-Liu commented 6 years ago

@LoSealL 对阿 是执行文件运行g2o文件时报错 代码就是把指针改成unique_ptr的模板指针 Block::LinearSolverType linearSolver = new g2o::LinearSolverCholmod(); Block solver_ptr = new Block( unique_ptr(linearSolver));
g2o::OptimizationAlgorithmLevenberg* solver = new g2o::OptimizationAlgorithmLevenberg( unique_ptr(solver_ptr) );

因为有需要现在版本的g2o 所以想知道怎么改

LoSealL commented 6 years ago

@Junkai-Liu unique_ptr不要这么用,使用std::move的方式,具体参见fork里面改动的部分

Junkai-Liu commented 6 years ago

@LoSealL 好的 老哥 谢谢 我改改看

zzcczzcc commented 5 years ago

你好 请问解决了吗?为什么我换了旧的G2O版本还是不行啊 同样的错误啊 555 Error in `./ba_example': double free or corruption (out): 0x000000000202e6e0 ======= Backtrace: ========= /lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7f56ab67a7e5] /lib/x86_64-linux-gnu/libc.so.6(+0x8037a)[0x7f56ab68337a] /lib/x86_64-linux-gnu/libc.so.6(cfree+0x4c)[0x7f56ab68753c] /usr/local/lib/libg2o_types_sba.so(_ZN3g2o26EdgeProjectP2MC_IntrinsicsD0Ev+0x2d)[0x7f56ad8d1ced] /usr/local/lib/libg2o_core.so(_ZN3g2o7Factory12registerTypeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPNS_32AbstractHyperGraphElementCreatorE+0x497)[0x7f56add5dfe7] /usr/local/lib/libg2o_types_sba.so(+0x1bbca)[0x7f56ad8c9bca] /lib64/ld-linux-x86-64.so.2(+0x106ca)[0x7f56adf8e6ca] /lib64/ld-linux-x86-64.so.2(+0x107db)[0x7f56adf8e7db] /lib64/ld-linux-x86-64.so.2(+0xc6a)[0x7f56adf7ec6a] ======= Memory map: ======== 00400000-0041e000 r-xp 00000000 08:15 8919034 /home/zhenzhen/SLAM/g2o_ba_example-master/build/ba_example 0061e000-0061f000 r--p 0001e000 08:15 8919034 /home/zhenzhen/SLAM/g2o_ba_example-master/build/ba_example 0061f000-00620000 rw-p 0001f000 08:15 8919034 /home/zhenzhen/SLAM/g2o_ba_example-master/build/ba_example 0200d000-0204f000 rw-p 00000000 00:00 0 [heap] 7f56a0000000-7f56a0021000 rw-p 00000000 00:00 0 7f56a0021000-7f56a4000000 ---p 00000000 00:00 0 7f56a6b1f000-7f56a6b5d000 r-xp 00000000 08:14 5251881 /usr/lib/x86_64-linux-gnu/libquadmath.so.0.0.0 7f56a6b5d000-7f56a6d5c000 ---p 0003e000 08:14 5251881 /usr/lib/x86_64-linux-gnu/libquadmath.so.0.0.0 7f56a6d5c000-7f56a6d5d000 r--p 0003d000 08:14 5251881 /usr/lib/x86_64-linux-gnu/libquadmath.so.0.0.0 7f56a6d5d000-7f56a6d5e000 rw-p 0003e000 08:14 5251881 /usr/lib/x86_64-linux-gnu/libquadmath.so.0.0.0 7f56a6d5e000-7f56a6d63000 r-xp 00000000 08:14 5250915 /usr/lib/x86_64-linux-gnu/libIlmThread-2_2.so.12.0.0 7f56a6d63000-7f56a6f63000 ---p 00005000 08:14 5250915 /usr/lib/x86_64-linux-gnu/libIlmThread-2_2.so.12.0.0 7f56a6f63000-7f56a6f64000 r--p 00005000 08:14 5250915 /usr/lib/x86_64-linux-gnu/libIlmThread-2_2.so.12.0.0 7f56a6f64000-7f56a6f65000 rw-p 00006000 08:14 5250915 /usr/lib/x86_64-linux-gnu/libIlmThread-2_2.so.12.0.0 7f56a6f65000-7f56a6f80000 r-xp 00000000 08:14 5250907 /usr/lib/x86_64-linux-gnu/libIex-2_2.so.12.0.0 7f56a6f80000-7f56a717f000 ---p 0001b000 08:14 5250907 /usr/lib/x86_64-linux-gnu/libIex-2_2.so.12.0.0 7f56a717f000-7f56a7182000 r--p 0001a000 08:14 5250907 /usr/lib/x86_64-linux-gnu/libIex-2_2.so.12.0.0 7f56a7182000-7f56a7183000 rw-p 0001d000 08:14 5250907 /usr/lib/x86_64-linux-gnu/libIex-2_2.so.12.0.0 7f56a7183000-7f56a71c5000 r-xp 00000000 08:14 5250901 /usr/lib/x86_64-linux-gnu/libHalf.so.12.0.0 7f56a71c5000-7f56a73c4000 ---p 00042000 08:14 5250901 /usr/lib/x86_64-linux-gnu/libHalf.so.12.0.0 7f56a73c4000-7f56a73c5000 r--p 00041000 08:14 5250901 /usr/lib/x86_64-linux-gnu/libHalf.so.12.0.0 7f56a73c5000-7f56a73c6000 rw-p 00042000 08:14 5250901 /usr/lib/x86_64-linux-gnu/libHalf.so.12.0.0 7f56a73c6000-7f56a73d1000 r-xp 00000000 08:14 5251789 /usr/lib/x86_64-linux-gnu/libjbig.so.0 7f56a73d1000-7f56a75d0000 ---p 0000b000 08:14 5251789 /usr/lib/x86_64-linux-gnu/libjbig.so.0 7f56a75d0000-7f56a75d1000 r--p 0000a000 08:14 5251789 /usr/lib/x86_64-linux-gnu/libjbig.so.0 7f56a75d1000-7f56a75d4000 rw-p 0000b000 08:14 5251789 /usr/lib/x86_64-linux-gnu/libjbig.so.0 7f56a75d4000-7f56a75f5000 r-xp 00000000 08:14 10752679 /lib/x86_64-linux-gnu/liblzma.so.5.0.0 7f56a75f5000-7f56a77f4000 ---p 00021000 08:14 10752679 /lib/x86_64-linux-gnu/liblzma.so.5.0.0 7f56a77f4000-7f56a77f5000 r--p 00020000 08:14 10752679 /lib/x86_64-linux-gnu/liblzma.so.5.0.0 7f56a77f5000-7f56a77f6000 rw-p 00021000 08:14 10752679 /lib/x86_64-linux-gnu/liblzma.so.5.0.0 7f56a77f6000-7f56a791f000 r-xp 00000000 08:14 5244492 /usr/lib/x86_64-linux-gnu/libgfortran.so.3.0.0 7f56a791f000-7f56a7b1e000 ---p 00129000 08:14 5244492 /usr/lib/x86_64-linux-gnu/libgfortran.so.3.0.0 7f56a7b1e000-7f56a7b1f000 r--p 00128000 08:14 5244492 /usr/lib/x86_64-linux-gnu/libgfortran.so.3.0.0 7f56a7b1f000-7f56a7b21000 rw-p 00129000 08:14 5244492 /usr/lib/x86_64-linux-gnu/libgfortran.so.3.0.0 7f56a7b21000-7f56a7b3a000 r-xp 00000000 08:14 10752803 /lib/x86_64-linux-gnu/libz.so.1.2.8 7f56a7b3a000-7f56a7d39000 ---p 00019000 08:14 10752803 /lib/x86_64-linux-gnu/libz.so.1.2.8 7f56a7d39000-7f56a7d3a000 r--p 00018000 08:14 10752803 /lib/x86_64-linux-gnu/libz.so.1.2.8 7f56a7d3a000-7f56a7d3b000 rw-p 00019000 08:14 10752803 /lib/x86_64-linux-gnu/libz.so.1.2.8 7f56a7d3b000-7f56a7da4000 r-xp 00000000 08:14 8914030 /usr/local/cuda-9.0/lib64/libcudart.so.9.0.176 7f56a7da4000-7f56a7fa3000 ---p 00069000 08:14 8914030 /usr/local/cuda-9.0/lib64/libcudart.so.9.0.176 7f56a7fa3000-7f56a7fa7000 rw-p 00068000 08:14 8914030 /usr/local/cuda-9.0/lib64/libcudart.so.9.0.176 7f56a7fa7000-7f56a7fa8000 rw-p 00000000 00:00 0 7f56a7fa8000-7f56a7fab000 r-xp 00000000 08:14 10747986 /lib/x86_64-linux-gnu/libdl-2.23.so 7f56a7fab000-7f56a81aa000 ---p 00003000 08:14 10747986 /lib/x86_64-linux-gnu/libdl-2.23.so 7f56a81aa000-7f56a81ab000 r--p 00002000 08:14 10747986 /lib/x86_64-linux-gnu/libdl-2.23.so 7f56a81ab000-7f56a81ac000 rw-p 00003000 08:14 10747986 /lib/x86_64-linux-gnu/libdl-2.23.so 7f56a81ac000-7f56a8376000 r-xp 00000000 08:14 5250911 /usr/lib/x86_64-linux-gnu/libIlmImf-2_2.so.22.0.0 7f56a8376000-7f56a8575000 ---p 001ca000 08:14 5250911 /usr/lib/x86_64-linux-gnu/libIlmImf-2_2.so.22.0.0 7f56a8575000-7f56a8578000 r--p 001c9000 08:14 5250911 /usr/lib/x86_64-linux-gnu/libIlmImf-2_2.so.22.0.0 7f56a8578000-7f56a8679000 rw-p 001cc000 08:14 5250911 /usr/lib/x86_64-linux-gnu/libIlmImf-2_2.so.22.0.0 7f56a8679000-7f56a867a000 rw-p 00000000 00:00 0 7f56a867a000-7f56a86c4000 r-xp 00000000 08:14 5251786 /usr/lib/x86_64-linux-gnu/libjasper.so.1.0.0 7f56a86c4000-7f56a88c3000 ---p 0004a000 08:14 5251786 /usr/lib/x86_64-linux-gnu/libjasper.so.1.0.0 7f56a88c3000-7f56a88c4000 r--p 00049000 08:14 5251786 /usr/lib/x86_64-linux-gnu/libjasper.so.1.0.0 7f56a88c4000-7f56a88c8000 rw-p 0004a000 08:14 5251786 /usr/lib/x86_64-linux-gnu/libjasper.so.1.0.0 7f56a88c8000-7f56a88cf000 rw-p 00000000 00:00 0 7f56a88cf000-7f56a8940000 r-xp 00000000 08:14 5245113 /usr/lib/x86_64-linux-gnu/libtiff.so.5.2.4 7f56a8940000-7f56a8b40000 ---p 00071000 08:14 5245113 /usr/lib/x86_64-linux-gnu/libtiff.so.5.2.4 7f56a8b40000-7f56a8b41000 r--p 00071000 08:14 5245113 /usr/lib/x86_64-linux-gnu/libtiff.so.5.2.4 7f56a8b41000-7f56a8b44000 rw-p 00072000 08:14 5245113 /usr/lib/x86_64-linux-gnu/libtiff.so.5.2.4 7f56a8b44000-7f56a8b68000 r-xp 00000000 08:14 10752753 /lib/x86_64-linux-gnu/libpng12.so.0.54.0 7f56a8b68000-7f56a8d67000 ---p 00024000 08:14 10752753 /lib/x86_64-linux-gnu/libpng12.so.0.54.0 7f56a8d67000-7f56a8d68000 r--p 00023000 08:14 10752753 /lib/x86_64-linux-gnu/libpng12.so.0.54.0 7f56a8d68000-7f56a8d69000 rw-p 00024000 08:14 10752753 /lib/x86_64-linux-gnu/libpng12.so.0.54.0 7f56a8d69000-7f56a8dc0000 r-xp 00000000 08:14 5251793 /usr/lib/x86_64-linux-gnu/libjpeg.so.8.0.2 7f56a8dc0000-7f56a8fc0000 ---p 00057000 08:14 5251793 /usr/lib/x86_64-linux-gnu/libjpeg.so.8.0.2 7f56a8fc0000-7f56a8fc1000 r--p 00057000 08:14 5251793 /usr/lib/x86_64-linux-gnu/libjpeg.so.8.0.2 7f56a8fc1000-7f56a8fc2000 rw-p 00058000 08:14 5251793 /usr/lib/x86_64-linux-gnu/libjpeg.so.8.0.2 7f56a8fc2000-7f56a8fda000 r-xp 00000000 08:14 10747988 /lib/x86_64-linux-gnu/libpthread-2.23.so 7f56a8fda000-7f56a91d9000 ---p 00018000 08:14 10747988 /lib/x86_64-linux-gnu/libpthread-2.23.so 7f56a91d9000-7f56a91da000 r--p 00017000 08:14 10747988 /lib/x86_64-linux-gnu/libpthread-2.23.so 7f56a91da000-7f56a91db000 rw-p 00018000 08:14 10747988 /lib/x86_64-linux-gnu/libpthread-2.23.so 7f56a91db000-7f56a91df000 rw-p 00000000 00:00 0 7f56a91df000-7f56a9708000 r-xp 00000000 08:14 5381974 /usr/local/lib/libopencv_imgproc.so.3.4.5 7f56a9708000-7f56a9907000 ---p 00529000 08:14 5381974 /usr/local/lib/libopencv_imgproc.so.3.4.5 7f56a9907000-7f56a9911000 r--p 00528000 08:14 5381974 /usr/local/lib/libopencv_imgproc.so.3.4.5 7f56a9911000-7f56a991d000 rw-p 00532000 08:14 5381974 /usr/local/lib/libopencv_imgproc.so.3.4.5 7f56a991d000-7f56a99bc000 rw-p 00000000 00:00 0 7f56a99bc000-7f56a9a5f000 r-xp 00000000 08:14 5381971 /usr/local/lib/libopencv_flann.so.3.4.5 7f56a9a5f000-7f56a9c5e000 ---p 000a3000 08:14 5381971 /usr/local/lib/libopencv_flann.so.3.4.5 7f56a9c5e000-7f56a9c61000 r--p 000a2000 08:14 5381971 /usr/local/lib/libopencv_flann.so.3.4.5 7f56a9c61000-7f56a9c63000 rw-p 000a5000 08:14 5381971 /usr/local/lib/libopencv_flann.so.3.4.5 7f56a9c63000-7f56a9c65000 r-xp 00000000 08:14 5252215 /usr/lib/x86_64-linux-gnu/libsuitesparseconfig.so.4.4.6 7f56a9c65000-7f56a9e64000 ---p 00002000 08:14 5252215 /usr/lib/x86_64-linux-gnu/libsuitesparseconfig.so.4.4.6 7f56a9e64000-7f56a9e65000 r--p 00001000 08:14 5252215 /usr/lib/x86_64-linux-gnu/libsuitesparseconfig.so.4.4.6 7f56a9e65000-7f56a9e66000 rw-p 00002000 08:14 5252215 /usr/lib/x86_64-linux-gnu/libsuitesparseconfig.so.4.4.6 7f56a9e66000-7f56a9e6f000 r-xp 00000000 08:14 5252053 /usr/lib/x86_64-linux-gnu/libccolamd.so.2.9.1 7f56a9e6f000-7f56aa06f000 ---p 00009000 08:14 5252053 /usr/lib/x86_64-linux-gnu/libccolamd.so.2.9.1 7f56aa06f000-7f56aa070000 r--p 00009000 08:14 5252053 /usr/lib/x86_64-linux-gnu/libccolamd.so.2.9.1 7f56aa070000-7f56aa071000 rw-p 0000a000 08:14 5252053 /usr/lib/x86_64-linux-gnu/libccolamd.so.2.9.1 7f56aa071000-7f56aa07a000 r-xp 00000000 08:14 5252051 /usr/lib/x86_64-linux-gnu/libcamd.so.2.4.1 7f56aa07a000-7f56aa279000 ---p 00009000 08:14 5252051 /usr/lib/x86_64-linux-gnu/libcamd.so.2.4.1 7f56aa279000-7f56aa27a000 r--p 00008000 08:14 5252051 /usr/lib/x86_64-linux-gnu/libcamd.so.2.4.1 7f56aa27a000-7f56aa27b000 rw-p 00009000 08:14 5252051 /usr/lib/x86_64-linux-gnu/libcamd.so.2.4.1 7f56aa27b000-7f56aa281000 r-xp 00000000 08:14 5251266 /usr/lib/x86_64-linux-gnu/libcolamd.so.2.9.1 7f56aa281000-7f56aa480000 ---p 00006000 08:14 5251266 /usr/lib/x86_64-linux-gnu/libcolamd.so.2.9.1 7f56aa480000-7f56aa481000 r--p 00005000 08:14 5251266 /usr/lib/x86_64-linux-gnu/libcolamd.so.2.9.1 7f56aa481000-7f56aa482000 rw-p 00006000 08:14 5251266 /usr/lib/x86_64-linux-gnu/libcolamd.so.2.9.1 7f56aa482000-7f56aa48a000 r-xp 00000000 08:14 5248524 /usr/lib/x86_64-linux-gnu/libamd.so.2.4.1 7f56aa48a000-7f56aa689000 ---p 00008000 08:14 5248524 /usr/lib/x86_64-linux-gnu/libamd.so.2.4.1 7f56aa689000-7f56aa68a000 r--p 00007000 08:14 5248524 /usr/lib/x86_64-linux-gnu/libamd.so.2.4.1 7f56aa68a000-7f56aa68b000 rw-p 00008000 08:14 5248524 /usr/lib/x86_64-linux-gnu/libamd.so.2.4.1 7f56aa68b000-7f56aac7f000 r-xp 00000000 08:14 9045489 /usr/lib/lapack/liblapack.so.3.6.0 7f56aac7f000-7f56aae7e000 ---p 005f4000 08:14 9045489 /usr/lib/lapack/liblapack.so.3.6.0 7f56aae7e000-7f56aae7f000 r--p 005f3000 08:14 9045489 /usr/lib/lapack/liblapack.so.3.6.0 7f56aae7f000-7f56aae83000 rw-p 005f4000 08:14 9045489 /usr/lib/lapack/liblapack.so.3.6.0 7f56aae83000-7f56aaef1000 r-xp 00000000 08:14 9045457 /usr/lib/libblas/libblas.so.3.6.0 7f56aaef1000-7f56ab0f0000 ---p 0006e000 08:14 9045457 /usr/lib/libblas/libblas.so.3.6.0 7f56ab0f0000-7f56ab0f1000 r--p 0006d000 08:14 9045457 /usr/lib/libblas/libblas.so.3.6.0 7f56ab0f1000-7f56ab0f2000 rw-p 0006e000 08:14 9045457 /usr/lib/libblas/libblas.so.3.6.0 7f56ab0f2000-7f56ab0f9000 r-xp 00000000 08:14 10747921 /lib/x86_64-linux-gnu/librt-2.23.so 7f56ab0f9000-7f56ab2f8000 ---p 00007000 08:14 10747921 /lib/x86_64-linux-gnu/librt-2.23.so 7f56ab2f8000-7f56ab2f9000 r--p 00006000 08:14 10747921 /lib/x86_64-linux-gnu/librt-2.23.so 7f56ab2f9000-7f56ab2fa000 rw-p 00007000 08:14 10747921 /lib/x86_64-linux-gnu/librt-2.23.so 7f56ab2fa000-7f56ab402000 r-xp 00000000 08:14 10752630 /lib/x86_64-linux-gnu/libm-2.23.so 7f56ab402000-7f56ab601000 ---p 00108000 08:14 10752630 /lib/x86_64-linux-gnu/libm-2.23.so 7f56ab601000-7f56ab602000 r--p 00107000 08:14 10752630 /lib/x86_64-linux-gnu/libm-2.23.so 7f56ab602000-7f56ab603000 rw-p 00108000 08:14 10752630 /lib/x86_64-linux-gnu/libm-2.23.so 7f56ab603000-7f56ab7c3000 r-xp 00000000 08:14 10748001 /lib/x86_64-linux-gnu/libc-2.23.so 7f56ab7c3000-7f56ab9c3000 ---p 001c0000 08:14 10748001 /lib/x86_64-linux-gnu/libc-2.23.so 7f56ab9c3000-7f56ab9c7000 r--p 001c0000 08:14 10748001 /lib/x86_64-linux-gnu/libc-2.23.so 7f56ab9c7000-7f56ab9c9000 rw-p 001c4000 08:14 10748001 /lib/x86_64-linux-gnu/libc-2.23.so 7f56ab9c9000-7f56ab9cd000 rw-p 00000000 00:00 0 7f56ab9cd000-7f56ab9e3000 r-xp 00000000 08:14 10752650 /lib/x86_64-linux-gnu/libgcc_s.so.1 7f56ab9e3000-7f56abbe2000 ---p 00016000 08:14 10752650 /lib/x86_64-linux-gnu/libgcc_s.so.1 7f56abbe2000-7f56abbe3000 rw-p 00015000 08:14 10752650 /lib/x86_64-linux-gnu/libgcc_s.so.1 7f56abbe3000-7f56abd55000 r-xp 00000000 08:14 5243068 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21 7f56abd55000-7f56abf55000 ---p 00172000 08:14 5243068 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21 7f56abf55000-7f56abf5f000 r--p 00172000 08:14 5243068 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21 7f56abf5f000-7f56abf61000 rw-p 0017c000 08:14 5243068 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21 7f56abf61000-7f56abf65000 rw-p 00000000 00:00 0 7f56abf65000-7f56acd3f000 r-xp 00000000 08:14 5381964 /usr/local/lib/libopencv_core.so.3.4.5 7f56acd3f000-7f56acf3f000 ---p 00dda000 08:14 5381964 /usr/local/lib/libopencv_core.so.3.4.5 7f56acf3f000-7f56acf48000 r--p 00dda000 08:14 5381964 /usr/local/lib/libopencv_core.so.3.4.5 7f56acf48000-7f56acf54000 rw-p 00de3000 08:14 5381964 /usr/local/lib/libopencv_core.so.3.4.5 7f56acf54000-7f56acf67000 rw-p 00000000 00:00 0 7f56acf67000-7f56ad081000 r-xp 00000000 08:14 5381998 /usr/local/lib/libopencv_imgcodecs.so.3.4.5 7f56ad081000-7f56ad280000 ---p 0011a000 08:14 5381998 /usr/local/lib/libopencv_imgcodecs.so.3.4.5 7f56ad280000-7f56ad283000 r--p 00119000 08:14 5381998 /usr/local/lib/libopencv_imgcodecs.so.3.4.5 7f56ad283000-7f56ad285000 rw-p 0011c000 08:14 5381998 /usr/local/lib/libopencv_imgcodecs.so.3.4.5 7f56ad285000-7f56ad287000 rw-p 00000000 00:00 0 7f56ad287000-7f56ad3d0000 r-xp 00000000 08:14 5382016 /usr/local/lib/libopencv_features2d.so.3.4.5 7f56ad3d0000-7f56ad5d0000 ---p 00149000 08:14 5382016 /usr/local/lib/libopencv_features2d.so.3.4.5 7f56ad5d0000-7f56ad5d5000 r--p 00149000 08:14 5382016 /usr/local/lib/libopencv_features2d.so.3.4.5 7f56ad5d5000-7f56ad5da000 rw-p 0014e000 08:14 5382016 /usr/local/lib/libopencv_features2d.so.3.4.5 7f56ad5da000-7f56ad6ad000 r-xp 00000000 08:14 5260200 /usr/lib/x86_64-linux-gnu/libcholmod.so.3.0.6 7f56ad6ad000-7f56ad8ac000 ---p 000d3000 08:14 5260200 /usr/lib/x86_64-linux-gnu/libcholmod.so.3.0.6 7f56ad8ac000-7f56ad8ad000 r--p 000d2000 08:14 5260200 /usr/lib/x86_64-linux-gnu/libcholmod.so.3.0.6 7f56ad8ad000-7f56ad8ae000 rw-p 000d3000 08:14 5260200 /usr/lib/x86_64-linux-gnu/libcholmod.so.3.0.6 7f56ad8ae000-7f56ad8fe000 r-xp 00000000 08:14 5379683 /usr/local/lib/libg2o_types_sba.so 7f56ad8fe000-7f56adafe000 ---p 00050000 08:14 5379683 /usr/local/lib/libg2o_types_sba.so 7f56adafe000-7f56adb01000 r--p 00050000 08:14 5379683 /usr/local/lib/libg2o_types_sba.so 7f56adb01000-7f56adb02000 rw-p 00053000 08:14 5379683 /usr/local/lib/libg2o_types_sba.so 7f56adb02000-7f56adb1d000 r-xp 00000000 08:14 5379673 /usr/local/lib/libg2o_stuff.so 7f56adb1d000-7f56add1d000 ---p 0001b000 08:14 5379673 /usr/local/lib/libg2o_stuff.so 7f56add1d000-7f56add1e000 r--p 0001b000 08:14 5379673 /usr/local/lib/libg2o_stuff.so 7f56add1e000-7f56add1f000 rw-p 0001c000 08:14 5379673 /usr/local/lib/libg2o_stuff.so 7f56add1f000-7f56add20000 rw-p 00000000 00:00 0 7f56add20000-7f56add7b000 r-xp 00000000 08:14 5379675 /usr/local/lib/libg2o_core.so 7f56add7b000-7f56adf7b000 ---p 0005b000 08:14 5379675 /usr/local/lib/libg2o_core.so 7f56adf7b000-7f56adf7d000 r--p 0005b000 08:14 5379675 /usr/local/lib/libg2o_core.so 7f56adf7d000-7f56adf7e000 rw-p 0005d000 08:14 5379675 /usr/local/lib/libg2o_core.so 7f56adf7e000-7f56adfa4000 r-xp 00000000 08:14 10747987 /lib/x86_64-linux-gnu/ld-2.23.so 7f56ae147000-7f56ae15a000 rw-p 00000000 00:00 0 7f56ae1a1000-7f56ae1a3000 rw-p 00000000 00:00 0 7f56ae1a3000-7f56ae1a4000 r--p 00025000 08:14 10747987 /lib/x86_64-linux-gnu/ld-2.23.so 7f56ae1a4000-7f56ae1a5000 rw-p 00026000 08:14 10747987 /lib/x86_64-linux-gnu/ld-2.23.so 7f56ae1a5000-7f56ae1a6000 rw-p 00000000 00:00 0 7ffcd9df9000-7ffcd9e1a000 rw-p 00000000 00:00 0 [stack] 7ffcd9f07000-7ffcd9f0a000 r--p 00000000 00:00 0 [vvar] 7ffcd9f0a000-7ffcd9f0c000 r-xp 00000000 00:00 0 [vdso] ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall] Aborted (core dumped)

lucasjinreal commented 5 years ago

@zzcczzcc Same issue here, to be more specific, the error comes from exactly here:

LOG(INFO) << "g2o optimizer done.";

  // 添加节点
  // 两个位姿节点
  for (int i = 0; i < 2; i++) {
    g2o::VertexSE3Expmap *v = new g2o::VertexSE3Expmap();
    v->setId(i);
    if (i == 0)
      v->setFixed(true); // 第一个点固定为零
    // 预设值为单位Pose,因为我们不知道任何信息
    v->setEstimate(g2o::SE3Quat());
    optimizer.addVertex(v);
  }
  // 很多个特征点的节点
  // 以第一帧为准
//  for (size_t i = 0; i < pts1.size(); i++) {
//    g2o::VertexSBAPointXYZ *v = new g2o::VertexSBAPointXYZ();
//    v->setId(2 + i);
//    // 由于深度不知道,只能把深度设置为1了
//    double z = 1;
//    double x = (pts1[i].x - cx) * z / fx;
//    double y = (pts1[i].y - cy) * z / fy;
//    v->setMarginalized(true);
//    v->setEstimate(Eigen::Vector3d(x, y, z));
//    optimizer.addVertex(v);
//  }

  LOG(INFO) << "vertex added.";

I debuged line by line, only when umcomment those lines got that problem

LoSealL commented 5 years ago

Does this fork version solve your problem?

lucasjinreal commented 5 years ago

@LoSealL It can solve API error, but after compile execution still got above error..... No clue to debug for reason, I am using master branch g2o, does not using your commit version though.

LoSealL commented 5 years ago

@jinfagang I re-tested my forked repo, and update for the latest master branch g2o. It seems no error in my compilation. URL here: https://github.com/LoSealL/g2o_ba_example

Use like this:

cd g2o_ba_example
mkdir _build && cd _build
cmake .. -DEIGEN3_INCLUDE_DIR=<eigen3/path> -DG2O_BUILD_APPS=OFF -DG2O_BUILD_EXAMPLES=OFF
cmake --build . --config Release

Test with ./ba_example_win ../data/1.png ../data/2.png

Found 500 and 500 key points respectively. Found331groups matched points. Optimizing... iteration= 0 chi2= 1206.331047 time= 0.00037288 cumTime= 0.00037288 edges= 662 schur= 1 lambda= 11.426977 levenbergIter= 1 iteration= 1 chi2= 673.543713 time= 0.000210095 cumTime= 0.000582975 edges= 662 schur= 1 lambda= 3.808992 levenbergIter= 1 iteration= 2 chi2= 607.516253 time= 0.000345898 cumTime= 0.000928873 edges= 662 schur= 1 lambda= 20.314626 levenbergIter= 3 iteration= 3 chi2= 367.436622 time= 0.000197282 cumTime= 0.00112616 edges= 662 schur= 1 lambda= 6.771542 levenbergIter= 1 iteration= 4 chi2= 298.199199 time= 0.000196061 cumTime= 0.00132222 edges= 662 schur= 1 lambda= 2.257181 levenbergIter= 1 iteration= 5 chi2= 272.903259 time= 0.000195839 cumTime= 0.00151806 edges= 662 schur= 1 lambda= 0.752394 levenbergIter= 1 iteration= 6 chi2= 253.924388 time= 0.000194876 cumTime= 0.00171293 edges= 662 schur= 1 lambda= 0.501596 levenbergIter= 1 iteration= 7 chi2= 223.257697 time= 0.000202584 cumTime= 0.00191552 edges= 662 schur= 1 lambda= 0.167199 levenbergIter= 1 iteration= 8 chi2= 213.846372 time= 0.000194928 cumTime= 0.00211044 edges= 662 schur= 1 lambda= 0.055733 levenbergIter= 1 iteration= 9 chi2= 209.111413 time= 0.000195681 cumTime= 0.00230612 edges= 662 schur= 1 lambda= 0.018578 levenbergIter= 1 Optimized. Pose= 0.999942 -0.0070796 -0.00811293 0.0441778 0.00738186 0.999256 0.0378532 -0.00803821 0.00783891 -0.0379109 0.99925 0.000133666 0 0 0 1 vertex id 2, pos = -0.0164274,-0.262995,0.814918 ...


OS: Ubuntu 18.04 cmake: 3.11.2 g2o version: 9b41a4ea5ade8e1250b9c1b279f3a9c098811b5a eigen3: 3.3.7 opencv: 3.4.2 gcc: 7.3.0

lucasjinreal commented 5 years ago

@LoSealL I use your code, but not your fork g2o, cause I installed from master branch

LoSealL commented 5 years ago

@jinfagang I also update CMakeLists of g2o_ba_example. Adding include_directories and remove Cholmod detailly.

You didn't compile g2o from source? How did you link g2o libraries (*.so)?

lucasjinreal commented 5 years ago

@LoSealL I built from master branch of g2o source code, the example provide by g2o can work properly, except this example. Have you tried built and install newest master branch g2o and re-compile this example link to installed g2o? Maybe will be same issue, but to be honest, I have no idea why.

LoSealL commented 5 years ago

@jinfagang Still worked for me... Before I find a time to change g2o as an external library, can you just try to build g2o from the code? Could be some external issues...

The error above seems to be a double free, but I'm not aware where it could be.

lucasjinreal commented 5 years ago

@LoSealL Ok, quick try

lucasjinreal commented 5 years ago

@LoSealL Using the fork and that commit g2o:

[ 89%] Linking CXX executable ba_example_win
CMakeFiles/ba_example_win.dir/main.cpp.o: In function `g2o::LinearSolverCSparse<Eigen::Matrix<double, 6, 6, 0, 6, 6> >::solvePattern(g2o::SparseBlockMatrix<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&, std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&, g2o::SparseBlockMatrix<Eigen::Matrix<double, 6, 6, 0, 6, 6> > const&)':
main.cpp:(.text._ZN3g2o19LinearSolverCSparseIN5Eigen6MatrixIdLi6ELi6ELi0ELi6ELi6EEEE12solvePatternERNS_17SparseBlockMatrixINS2_IdLin1ELin1ELi0ELin1ELin1EEEEERKSt6vectorISt4pairIiiESaISB_EERKNS5_IS3_EE[_ZN3g2o19LinearSolverCSparseIN5Eigen6MatrixIdLi6ELi6ELi0ELi6ELi6EEEE12solvePatternERNS_17SparseBlockMatrixINS2_IdLin1ELin1ELi0ELin1ELin1EEEEERKSt6vectorISt4pairIiiESaISB_EERKNS5_IS3_EE]+0xd8): undefined reference to `g2o::csparse_extension::cs_chol_workspace(cs_sparse const*, cs_symbolic const*, int*, double*)'
CMakeFiles/ba_example_win.dir/main.cpp.o: In function `g2o::LinearSolverCSparse<Eigen::Matrix<double, 6, 6, 0, 6, 6> >::solveBlocks(double**&, g2o::SparseBlockMatrix<Eigen::Matrix<double, 6, 6, 0, 6, 6> > const&)':
main.cpp:(.text._ZN3g2o19LinearSolverCSparseIN5Eigen6MatrixIdLi6ELi6ELi0ELi6ELi6EEEE11solveBlocksERPPdRKNS_17SparseBlockMatrixIS3_EE[_ZN3g2o19LinearSolverCSparseIN5Eigen6MatrixIdLi6ELi6ELi0ELi6ELi6EEEE11solveBlocksERPPdRKNS_17SparseBlockMatrixIS3_EE]+0xfd): undefined reference to `g2o::csparse_extension::cs_chol_workspace(cs_sparse const*, cs_symbolic const*, int*, double*)'
CMakeFiles/ba_example_win.dir/main.cpp.o: In function `g2o::LinearSolverCSparse<Eigen::Matrix<double, 6, 6, 0, 6, 6> >::solve(g2o::SparseBlockMatrix<Eigen::Matrix<double, 6, 6, 0, 6, 6> > const&, double*, double*)':
main.cpp:(.text._ZN3g2o19LinearSolverCSparseIN5Eigen6MatrixIdLi6ELi6ELi0ELi6ELi6EEEE5solveERKNS_17SparseBlockMatrixIS3_EEPdS9_[_ZN3g2o19LinearSolverCSparseIN5Eigen6MatrixIdLi6ELi6ELi0ELi6ELi6EEEE5solveERKNS_17SparseBlockMatrixIS3_EEPdS9_]+0xe8): undefined reference to `g2o::csparse_extension::cs_cholsolsymb(cs_sparse const*, double*, cs_symbolic const*, double*, int*)'
main.cpp:(.text._ZN3g2o19LinearSolverCSparseIN5Eigen6MatrixIdLi6ELi6ELi0ELi6ELi6EEEE5solveERKNS_17SparseBlockMatrixIS3_EEPdS9_[_ZN3g2o19LinearSolverCSparseIN5Eigen6MatrixIdLi6ELi6ELi0ELi6ELi6EEEE5solveERKNS_17SparseBlockMatrixIS3_EEPdS9_]+0x1ea): undefined reference to `g2o::csparse_extension::writeCs2Octave(char const*, cs_sparse const*, bool)'
collect2: error: ld returned 1 exit status
CMakeFiles/ba_example_win.dir/build.make:148: recipe for target 'ba_example_win' failed
make[2]: *** [ba_example_win] Error 1
CMakeFiles/Makefile2:73: recipe for target 'CMakeFiles/ba_example_win.dir/all' failed
make[1]: *** [CMakeFiles/ba_example_win.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
LoSealL commented 5 years ago

@jinfagang Found an issue: I had a cached setting disable cholmod. So add -DG2O_USE_CHOLMOD=OFF to cmake command.

I will look into this later.

lucasjinreal commented 5 years ago

@LoSealL Same issue:

[ 88%] Linking CXX executable ba_example_win
CMakeFiles/ba_example_win.dir/main.cpp.o: In function `g2o::LinearSolverCSparse<Eigen::Matrix<double, 6, 6, 0, 6, 6> >::solvePattern(g2o::SparseBlockMatrix<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&, std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&, g2o::SparseBlockMatrix<Eigen::Matrix<double, 6, 6, 0, 6, 6> > const&)':
main.cpp:(.text._ZN3g2o19LinearSolverCSparseIN5Eigen6MatrixIdLi6ELi6ELi0ELi6ELi6EEEE12solvePatternERNS_17SparseBlockMatrixINS2_IdLin1ELin1ELi0ELin1ELin1EEEEERKSt6vectorISt4pairIiiESaISB_EERKNS5_IS3_EE[_ZN3g2o19LinearSolverCSparseIN5Eigen6MatrixIdLi6ELi6ELi0ELi6ELi6EEEE12solvePatternERNS_17SparseBlockMatrixINS2_IdLin1ELin1ELi0ELin1ELin1EEEEERKSt6vectorISt4pairIiiESaISB_EERKNS5_IS3_EE]+0xd8): undefined reference to `g2o::csparse_extension::cs_chol_workspace(cs_sparse const*, cs_symbolic const*, int*, double*)'
CMakeFiles/ba_example_win.dir/main.cpp.o: In function `g2o::LinearSolverCSparse<Eigen::Matrix<double, 6, 6, 0, 6, 6> >::solveBlocks(double**&, g2o::SparseBlockMatrix<Eigen::Matrix<double, 6, 6, 0, 6, 6> > const&)':
main.cpp:(.text._ZN3g2o19LinearSolverCSparseIN5Eigen6MatrixIdLi6ELi6ELi0ELi6ELi6EEEE11solveBlocksERPPdRKNS_17SparseBlockMatrixIS3_EE[_ZN3g2o19LinearSolverCSparseIN5Eigen6MatrixIdLi6ELi6ELi0ELi6ELi6EEEE11solveBlocksERPPdRKNS_17SparseBlockMatrixIS3_EE]+0xfd): undefined reference to `g2o::csparse_extension::cs_chol_workspace(cs_sparse const*, cs_symbolic const*, int*, double*)'
CMakeFiles/ba_example_win.dir/main.cpp.o: In function `g2o::LinearSolverCSparse<Eigen::Matrix<double, 6, 6, 0, 6, 6> >::solve(g2o::SparseBlockMatrix<Eigen::Matrix<double, 6, 6, 0, 6, 6> > const&, double*, double*)':
main.cpp:(.text._ZN3g2o19LinearSolverCSparseIN5Eigen6MatrixIdLi6ELi6ELi0ELi6ELi6EEEE5solveERKNS_17SparseBlockMatrixIS3_EEPdS9_[_ZN3g2o19LinearSolverCSparseIN5Eigen6MatrixIdLi6ELi6ELi0ELi6ELi6EEEE5solveERKNS_17SparseBlockMatrixIS3_EEPdS9_]+0xe8): undefined reference to `g2o::csparse_extension::cs_cholsolsymb(cs_sparse const*, double*, cs_symbolic const*, double*, int*)'
main.cpp:(.text._ZN3g2o19LinearSolverCSparseIN5Eigen6MatrixIdLi6ELi6ELi0ELi6ELi6EEEE5solveERKNS_17SparseBlockMatrixIS3_EEPdS9_[_ZN3g2o19LinearSolverCSparseIN5Eigen6MatrixIdLi6ELi6ELi0ELi6ELi6EEEE5solveERKNS_17SparseBlockMatrixIS3_EEPdS9_]+0x1ea): undefined reference to `g2o::csparse_extension::writeCs2Octave(char const*, cs_sparse const*, bool)'
collect2: error: ld returned 1 exit status
CMakeFiles/ba_example_win.dir/build.make:148: recipe for target 'ba_example_win' failed
make[2]: *** [ba_example_win] Error 1
CMakeFiles/Makefile2:73: recipe for target 'CMakeFiles/ba_example_win.dir/all' failed
make[1]: *** [CMakeFiles/ba_example_win.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

```'
with this command: 

cmake -DG2O_USE_CHOLMOD=OFF ..

LoSealL commented 5 years ago

@jinfagang emmm... Could you show me your CMakeCache.txt? I'm interested in the following keywords:

G2O_USE_CHOLMOD
G2O_USE_CSPARSE
BUILD_CSPARSE

You can also paste g2o/config.h here to inspect.

lucasjinreal commented 5 years ago

@LoSealL In CmakeCache.txt:

# This is the CMakeCache file.
# For build in directory: /media/jintian/data/tmp/g2o_ba_example/build
# It was generated by CMake: /usr/bin/cmake
# You can edit this file to change values found and used by cmake.
# If you do not want to change any of the values, simply exit the editor.
# If you do want to change a value, simply edit, save, and exit the editor.
# The syntax for the file is as follows:
# KEY:TYPE=VALUE
# KEY is the name of a variable in the cache.
# TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!.
# VALUE is the current value for the KEY.

########################
# EXTERNAL cache entries
########################

//Path to a library.
AMD_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libamd.so

//Compilation options to use BLAS
BLAS_DEFINITIONS:STRING=-DBLAS_USE_F2C

//Directories containing the BLAS header files
BLAS_INCLUDE_DIR:PATH=

//BLAS libraries name
BLAS_LIBRARIES:FILEPATH=/usr/lib/libopenblas.so

//Directories containing the BLAS libraries
BLAS_LIBRARIES_DIR:PATH=

//Linker flags to use BLAS
BLAS_LINKER_FLAGS:STRING=

//Path to a library.
BLAS_openblas_LIBRARY:FILEPATH=/usr/lib/libopenblas.so

//Build local CSparse library
BUILD_CSPARSE:BOOL=OFF

//Build LGPL Code as Shared Libraries (LGPL Code)
BUILD_LGPL_SHARED_LIBS:BOOL=ON

//Build Shared Libraries (preferred and required for the g2o plugin
// system)
BUILD_SHARED_LIBS:BOOL=ON

//build unit test framework and the tests
BUILD_UNITTESTS:BOOL=OFF

//Build with "-march native"
BUILD_WITH_MARCH_NATIVE:BOOL=OFF

//Path to a library.
CAMD_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libcamd.so

//Path to a library.
CCOLAMD_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libccolamd.so

//Path to a file.
CHOLMOD_INCLUDE_DIR:PATH=/usr/include/suitesparse

//Path to a library.
CHOLMOD_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libcholmod.so

//Path to a library.
CHOLMOD_METIS_LIBRARY:FILEPATH=CHOLMOD_METIS_LIBRARY-NOTFOUND

//Path to a program.
CMAKE_AR:FILEPATH=/usr/bin/ar

//Choose the type of build, options are: None Debug Release RelWithDebInfo
// MinSizeRel.
CMAKE_BUILD_TYPE:STRING=Release

//Enable/Disable color output during build.
CMAKE_COLOR_MAKEFILE:BOOL=ON

//CXX compiler
CMAKE_CXX_COMPILER:FILEPATH=/usr/bin/c++

//Flags used by the compiler during all build types.
CMAKE_CXX_FLAGS:STRING=

//Flags used by the compiler during debug builds.
CMAKE_CXX_FLAGS_DEBUG:STRING=-g

//Flags used by the compiler during release builds for minimum
// size.
CMAKE_CXX_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG

//Flags used by the compiler during release builds.
CMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG

//Flags used by the compiler during release builds with debug info.
CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG

//C compiler
CMAKE_C_COMPILER:FILEPATH=/usr/bin/cc

//Flags used by the compiler during all build types.
CMAKE_C_FLAGS:STRING=

//Flags used by the compiler during debug builds.
CMAKE_C_FLAGS_DEBUG:STRING=-g

//Flags used by the compiler during release builds for minimum
// size.
CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG

//Flags used by the compiler during release builds.
CMAKE_C_FLAGS_RELEASE:STRING=-O3 -DNDEBUG

//Flags used by the compiler during release builds with debug info.
CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG

//postfix applied to debug build of libraries
CMAKE_DEBUG_POSTFIX:STRING=_d

//Flags used by the linker.
CMAKE_EXE_LINKER_FLAGS:STRING=

//Flags used by the linker during debug builds.
CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING=

//Flags used by the linker during release minsize builds.
CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING=

//Flags used by the linker during release builds.
CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING=

//Flags used by the linker during Release with Debug Info builds.
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING=

//Enable/Disable output of compile commands during generation.
CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=OFF

//Install path prefix, prepended onto install directories.
CMAKE_INSTALL_PREFIX:PATH=/usr/local

//Path to a program.
CMAKE_LINKER:FILEPATH=/usr/bin/ld

//Path to a program.
CMAKE_MAKE_PROGRAM:FILEPATH=/usr/bin/make

//postfix applied to minimium-size-build libraries
CMAKE_MINSIZEREL_POSTFIX:STRING=_s

//Flags used by the linker during the creation of modules.
CMAKE_MODULE_LINKER_FLAGS:STRING=

//Flags used by the linker during debug builds.
CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING=

//Flags used by the linker during release minsize builds.
CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING=

//Flags used by the linker during release builds.
CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING=

//Flags used by the linker during Release with Debug Info builds.
CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING=

//Path to a program.
CMAKE_NM:FILEPATH=/usr/bin/nm

//Path to a program.
CMAKE_OBJCOPY:FILEPATH=/usr/bin/objcopy

//Path to a program.
CMAKE_OBJDUMP:FILEPATH=/usr/bin/objdump

//Value Computed by CMake
CMAKE_PROJECT_NAME:STATIC=g2o_ba_example_win

//Path to a program.
CMAKE_RANLIB:FILEPATH=/usr/bin/ranlib

//postfix applied to release build of libraries
CMAKE_RELEASE_POSTFIX:STRING=

//postfix applied to release-with-debug-information libraries
CMAKE_RELWITHDEBINFO_POSTFIX:STRING=_rd

//Flags used by the linker during the creation of dll's.
CMAKE_SHARED_LINKER_FLAGS:STRING=

//Flags used by the linker during debug builds.
CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING=

//Flags used by the linker during release minsize builds.
CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING=

//Flags used by the linker during release builds.
CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING=

//Flags used by the linker during Release with Debug Info builds.
CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING=

//If set, runtime paths are not added when installing shared libraries,
// but are added when building.
CMAKE_SKIP_INSTALL_RPATH:BOOL=NO

//If set, runtime paths are not added when using shared libraries.
CMAKE_SKIP_RPATH:BOOL=NO

//Flags used by the linker during the creation of static libraries.
CMAKE_STATIC_LINKER_FLAGS:STRING=

//Flags used by the linker during debug builds.
CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING=

//Flags used by the linker during release minsize builds.
CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING=

//Flags used by the linker during release builds.
CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING=

//Flags used by the linker during Release with Debug Info builds.
CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING=

//Path to a program.
CMAKE_STRIP:FILEPATH=/usr/bin/strip

//If this value is on, makefiles will be generated without the
// .SILENT directive, and all commands will be echoed to the console
// during the make.  This is useful for debugging only. With Visual
// Studio IDE projects all commands are done without /nologo.
CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE

//Path to a library.
COLAMD_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libcolamd.so

//Enable to build Debian packages
CPACK_BINARY_DEB:BOOL=OFF

//Enable to build IFW packages
CPACK_BINARY_IFW:BOOL=OFF

//Enable to build NSIS packages
CPACK_BINARY_NSIS:BOOL=OFF

//Enable to build RPM packages
CPACK_BINARY_RPM:BOOL=OFF

//Enable to build STGZ packages
CPACK_BINARY_STGZ:BOOL=ON

//Enable to build TBZ2 packages
CPACK_BINARY_TBZ2:BOOL=OFF

//Enable to build TGZ packages
CPACK_BINARY_TGZ:BOOL=ON

//Enable to build TXZ packages
CPACK_BINARY_TXZ:BOOL=OFF

//Enable to build TZ packages
CPACK_BINARY_TZ:BOOL=ON

//Enable to build TBZ2 source packages
CPACK_SOURCE_TBZ2:BOOL=ON

//Enable to build TGZ source packages
CPACK_SOURCE_TGZ:BOOL=ON

//Enable to build TXZ source packages
CPACK_SOURCE_TXZ:BOOL=ON

//Enable to build TZ source packages
CPACK_SOURCE_TZ:BOOL=ON

//Enable to build ZIP source packages
CPACK_SOURCE_ZIP:BOOL=OFF

//Path to a file.
CSPARSE_INCLUDE_DIR:PATH=/usr/include/suitesparse

//Path to a library.
CSPARSE_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libcxsparse.so

//Enable autodetection of SSE* CPU sets and enable their use in
// optimized code
DO_SSE_AUTODETECT:BOOL=ON

//Path to a file.
EIGEN3_INCLUDE_DIR:PATH=/usr/local/include/eigen3

//The directory containing a CMake configuration file for F2C.
F2C_DIR:PATH=F2C_DIR-NOTFOUND

//Build g2o apps
G2O_BUILD_APPS:BOOL=ON

//Compile the deprecated types
G2O_BUILD_DEPRECATED_TYPES:BOOL=OFF

//Build g2o examples
G2O_BUILD_EXAMPLES:BOOL=ON

//Build apps linked with the libraries (no plugin system)
G2O_BUILD_LINKED_APPS:BOOL=OFF

//Enable fast math operations
G2O_FAST_MATH:BOOL=OFF

//Disables memory management in the graph types, this requires
// the callers to manager the memory of edges and nodes
G2O_NO_IMPLICIT_OWNERSHIP_OF_OBJECTS:BOOL=OFF

//Build g2o with CHOLMOD support
G2O_USE_CHOLMOD:BOOL=OFF

//Build g2o with CSParse support
G2O_USE_CSPARSE:BOOL=ON

//Build g2o with OpenGL support for visualization
G2O_USE_OPENGL:BOOL=ON

//Build g2o with OpenMP support (EXPERIMENTAL)
G2O_USE_OPENMP:BOOL=OFF

//Path to a library.
LAPACK_Accelerate_LIBRARY:FILEPATH=LAPACK_Accelerate_LIBRARY-NOTFOUND

//Compilation options to use LAPACK
LAPACK_DEFINITIONS:STRING=-DLAPACK_USE_F2C

//Directories containing the LAPACK header files
LAPACK_INCLUDE_DIR:PATH=

//LAPACK libraries name
LAPACK_LIBRARIES:FILEPATH=/usr/lib/liblapack.so

//Directories containing the LAPACK libraries
LAPACK_LIBRARIES_DIR:PATH=

//Linker flags to use LAPACK
LAPACK_LINKER_FLAGS:STRING=

//Path to a library.
LAPACK_acml_LIBRARY:FILEPATH=LAPACK_acml_LIBRARY-NOTFOUND

//Path to a library.
LAPACK_lapack_LIBRARY:FILEPATH=/usr/lib/liblapack.so

//Path to a library.
LAPACK_mkl_lapack_LIBRARY:FILEPATH=LAPACK_mkl_lapack_LIBRARY-NOTFOUND

//Path to a library.
LAPACK_vecLib_LIBRARY:FILEPATH=LAPACK_vecLib_LIBRARY-NOTFOUND

//Path to a file.
OPENGL_INCLUDE_DIR:PATH=/usr/include

//Path to a library.
OPENGL_gl_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libGL.so

//Path to a library.
OPENGL_glu_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libGLU.so

//Path to a file.
OPENGL_xmesa_INCLUDE_DIR:PATH=OPENGL_xmesa_INCLUDE_DIR-NOTFOUND

//The directory containing a CMake configuration file for OpenCV.
OpenCV_DIR:PATH=/usr/local/share/OpenCV

//Path to a file.
QGLVIEWER_INCLUDE_DIR:PATH=/usr/include/QGLViewer

//Path to a library.
QGLVIEWER_LIBRARY_DEBUG:FILEPATH=QGLVIEWER_LIBRARY_DEBUG-NOTFOUND

//Path to a library.
QGLVIEWER_LIBRARY_RELEASE:FILEPATH=/usr/lib/x86_64-linux-gnu/libQGLViewer.so

//The directory containing a CMake configuration file for Qt5Core.
Qt5Core_DIR:PATH=/usr/lib/x86_64-linux-gnu/cmake/Qt5Core

//The directory containing a CMake configuration file for Qt5Gui.
Qt5Gui_DIR:PATH=/usr/lib/x86_64-linux-gnu/cmake/Qt5Gui

//The directory containing a CMake configuration file for Qt5OpenGL.
Qt5OpenGL_DIR:PATH=/usr/lib/x86_64-linux-gnu/cmake/Qt5OpenGL

//The directory containing a CMake configuration file for Qt5Widgets.
Qt5Widgets_DIR:PATH=/usr/lib/x86_64-linux-gnu/cmake/Qt5Widgets

//The directory containing a CMake configuration file for Qt5Xml.
Qt5Xml_DIR:PATH=/usr/lib/x86_64-linux-gnu/cmake/Qt5Xml

//The directory containing a CMake configuration file for Qt5.
Qt5_DIR:PATH=/usr/lib/x86_64-linux-gnu/cmake/Qt5

//Path to a library.
SUITESPARSECONFIG_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libsuitesparseconfig.so

//Dependencies for the target
calibration_odom_laser_library_LIB_DEPENDS:STATIC=general;core;general;solver_csparse;general;types_sclam2d;general;types_data;

//Dependencies for the target
core_LIB_DEPENDS:STATIC=general;stuff;

//Dependencies for the target
csparse_extension_LIB_DEPENDS:STATIC=general;/usr/lib/x86_64-linux-gnu/libcxsparse.so;

//Dependencies for the target
freeglut_minimal_LIB_DEPENDS:STATIC=general;/usr/lib/x86_64-linux-gnu/libGLU.so;general;/usr/lib/x86_64-linux-gnu/libGL.so;

//Value Computed by CMake
g2o_BINARY_DIR:STATIC=/media/jintian/data/tmp/g2o_ba_example/build/g2o

//Target for the libraries
g2o_LIBRARY_OUTPUT_DIRECTORY:PATH=/media/jintian/data/tmp/g2o_ba_example/g2o/lib

//Target for the binaries
g2o_RUNTIME_OUTPUT_DIRECTORY:PATH=/media/jintian/data/tmp/g2o_ba_example/g2o/bin

//Value Computed by CMake
g2o_SOURCE_DIR:STATIC=/media/jintian/data/tmp/g2o_ba_example/g2o

//Value Computed by CMake
g2o_ba_example_win_BINARY_DIR:STATIC=/media/jintian/data/tmp/g2o_ba_example/build

//Value Computed by CMake
g2o_ba_example_win_SOURCE_DIR:STATIC=/media/jintian/data/tmp/g2o_ba_example

//Dependencies for the target
g2o_cli_library_LIB_DEPENDS:STATIC=general;core;general;dl;

//Dependencies for the target
g2o_hierarchical_library_LIB_DEPENDS:STATIC=general;core;

//Dependencies for the target
g2o_simulator_library_LIB_DEPENDS:STATIC=general;types_slam3d_addons;general;types_slam3d;general;types_slam2d_addons;general;types_slam2d;general;core;

//Dependencies for the target
interface_library_LIB_DEPENDS:STATIC=general;parser_library;

//Dependencies for the target
opengl_helper_LIB_DEPENDS:STATIC=general;/usr/lib/x86_64-linux-gnu/libGLU.so;general;/usr/lib/x86_64-linux-gnu/libGL.so;

//Dependencies for target
parser_library_LIB_DEPENDS:STATIC=

//Dependencies for the target
solver_csparse_LIB_DEPENDS:STATIC=general;csparse_extension;general;core;

//Dependencies for the target
solver_dense_LIB_DEPENDS:STATIC=general;core;

//Dependencies for the target
solver_eigen_LIB_DEPENDS:STATIC=general;core;

//Dependencies for the target
solver_pcg_LIB_DEPENDS:STATIC=general;core;

//Dependencies for the target
solver_slam2d_linear_LIB_DEPENDS:STATIC=general;solver_csparse;general;types_slam2d;

//Dependencies for the target
solver_structure_only_LIB_DEPENDS:STATIC=general;core;

//Dependencies for the target
stuff_LIB_DEPENDS:STATIC=general;rt;

//Dependencies for the target
tutorial_slam2d_library_LIB_DEPENDS:STATIC=general;core;general;solver_csparse;

//Dependencies for the target
types_data_LIB_DEPENDS:STATIC=general;core;general;types_slam2d;general;freeglut_minimal;general;opengl_helper;

//Dependencies for the target
types_icp_LIB_DEPENDS:STATIC=general;types_sba;general;types_slam3d;

//Dependencies for the target
types_sba_LIB_DEPENDS:STATIC=general;core;general;types_slam3d;

//Dependencies for the target
types_sclam2d_LIB_DEPENDS:STATIC=general;types_slam2d;general;core;general;/usr/lib/x86_64-linux-gnu/libGL.so;

//Dependencies for the target
types_sim3_LIB_DEPENDS:STATIC=general;types_sba;

//Dependencies for the target
types_slam2d_LIB_DEPENDS:STATIC=general;core;general;opengl_helper;general;/usr/lib/x86_64-linux-gnu/libGL.so;

//Dependencies for the target
types_slam2d_addons_LIB_DEPENDS:STATIC=general;types_slam2d;general;core;general;/usr/lib/x86_64-linux-gnu/libGL.so;

//Dependencies for the target
types_slam3d_LIB_DEPENDS:STATIC=general;core;general;opengl_helper;general;/usr/lib/x86_64-linux-gnu/libGL.so;

//Dependencies for the target
types_slam3d_addons_LIB_DEPENDS:STATIC=general;types_slam3d;general;core;general;/usr/lib/x86_64-linux-gnu/libGL.so;

//Dependencies for the target
viewer_library_LIB_DEPENDS:STATIC=general;core;general;g2o_cli_library;general;/usr/lib/x86_64-linux-gnu/libQGLViewer.so;general;Qt5::Widgets;general;Qt5::Core;general;Qt5::Gui;general;Qt5::Xml;general;Qt5::OpenGL;general;/usr/lib/x86_64-linux-gnu/libGLU.so;general;/usr/lib/x86_64-linux-gnu/libGL.so;general;core;general;opengl_helper;

########################
# INTERNAL cache entries
########################

//ADVANCED property for variable: BLAS_openblas_LIBRARY
BLAS_openblas_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: BLAS_sgemm__openblas_f2c_WORKS
BLAS_sgemm__openblas_f2c_WORKS-ADVANCED:INTERNAL=1
//Have function sgemm_
BLAS_sgemm__openblas_f2c_WORKS:INTERNAL=1
//ADVANCED property for variable: CMAKE_AR
CMAKE_AR-ADVANCED:INTERNAL=1
//This is the directory where this CMakeCache.txt was created
CMAKE_CACHEFILE_DIR:INTERNAL=/media/jintian/data/tmp/g2o_ba_example/build
//Major version of cmake used to create the current loaded cache
CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3
//Minor version of cmake used to create the current loaded cache
CMAKE_CACHE_MINOR_VERSION:INTERNAL=5
//Patch version of cmake used to create the current loaded cache
CMAKE_CACHE_PATCH_VERSION:INTERNAL=1
//ADVANCED property for variable: CMAKE_COLOR_MAKEFILE
CMAKE_COLOR_MAKEFILE-ADVANCED:INTERNAL=1
//Path to CMake executable.
CMAKE_COMMAND:INTERNAL=/usr/bin/cmake
//Path to cpack program executable.
CMAKE_CPACK_COMMAND:INTERNAL=/usr/bin/cpack
//Path to ctest program executable.
CMAKE_CTEST_COMMAND:INTERNAL=/usr/bin/ctest
//ADVANCED property for variable: CMAKE_CXX_COMPILER
CMAKE_CXX_COMPILER-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_CXX_FLAGS
CMAKE_CXX_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_CXX_FLAGS_DEBUG
CMAKE_CXX_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_CXX_FLAGS_MINSIZEREL
CMAKE_CXX_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELEASE
CMAKE_CXX_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELWITHDEBINFO
CMAKE_CXX_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_COMPILER
CMAKE_C_COMPILER-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_FLAGS
CMAKE_C_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_FLAGS_DEBUG
CMAKE_C_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_FLAGS_MINSIZEREL
CMAKE_C_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_FLAGS_RELEASE
CMAKE_C_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_FLAGS_RELWITHDEBINFO
CMAKE_C_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//Path to cache edit program executable.
CMAKE_EDIT_COMMAND:INTERNAL=/usr/bin/cmake-gui
//Executable file format
CMAKE_EXECUTABLE_FORMAT:INTERNAL=ELF
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS
CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG
CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL
CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE
CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_EXPORT_COMPILE_COMMANDS
CMAKE_EXPORT_COMPILE_COMMANDS-ADVANCED:INTERNAL=1
//Name of external makefile project generator.
CMAKE_EXTRA_GENERATOR:INTERNAL=
//Name of generator.
CMAKE_GENERATOR:INTERNAL=Unix Makefiles
//Name of generator platform.
CMAKE_GENERATOR_PLATFORM:INTERNAL=
//Name of generator toolset.
CMAKE_GENERATOR_TOOLSET:INTERNAL=
//Source directory with the top level CMakeLists.txt file for this
// project
CMAKE_HOME_DIRECTORY:INTERNAL=/media/jintian/data/tmp/g2o_ba_example
//Install .so files without execute permission.
CMAKE_INSTALL_SO_NO_EXE:INTERNAL=1
//ADVANCED property for variable: CMAKE_LINKER
CMAKE_LINKER-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MAKE_PROGRAM
CMAKE_MAKE_PROGRAM-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS
CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG
CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL
CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE
CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO
CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_NM
CMAKE_NM-ADVANCED:INTERNAL=1
//number of local generators
CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=46
//ADVANCED property for variable: CMAKE_OBJCOPY
CMAKE_OBJCOPY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_OBJDUMP
CMAKE_OBJDUMP-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_RANLIB
CMAKE_RANLIB-ADVANCED:INTERNAL=1
//Path to CMake installation.
CMAKE_ROOT:INTERNAL=/usr/share/cmake-3.5
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS
CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG
CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL
CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE
CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO
CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SKIP_INSTALL_RPATH
CMAKE_SKIP_INSTALL_RPATH-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SKIP_RPATH
CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS
CMAKE_STATIC_LINKER_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_DEBUG
CMAKE_STATIC_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL
CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELEASE
CMAKE_STATIC_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO
CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STRIP
CMAKE_STRIP-ADVANCED:INTERNAL=1
//uname command
CMAKE_UNAME:INTERNAL=/bin/uname
//ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE
CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CPACK_BINARY_DEB
CPACK_BINARY_DEB-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CPACK_BINARY_IFW
CPACK_BINARY_IFW-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CPACK_BINARY_NSIS
CPACK_BINARY_NSIS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CPACK_BINARY_RPM
CPACK_BINARY_RPM-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CPACK_BINARY_STGZ
CPACK_BINARY_STGZ-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CPACK_BINARY_TBZ2
CPACK_BINARY_TBZ2-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CPACK_BINARY_TGZ
CPACK_BINARY_TGZ-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CPACK_BINARY_TXZ
CPACK_BINARY_TXZ-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CPACK_BINARY_TZ
CPACK_BINARY_TZ-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CPACK_SOURCE_TBZ2
CPACK_SOURCE_TBZ2-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CPACK_SOURCE_TGZ
CPACK_SOURCE_TGZ-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CPACK_SOURCE_TXZ
CPACK_SOURCE_TXZ-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CPACK_SOURCE_TZ
CPACK_SOURCE_TZ-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CPACK_SOURCE_ZIP
CPACK_SOURCE_ZIP-ADVANCED:INTERNAL=1
//ADVANCED property for variable: EIGEN3_INCLUDE_DIR
EIGEN3_INCLUDE_DIR-ADVANCED:INTERNAL=1
//Details about finding CHOLMOD
FIND_PACKAGE_MESSAGE_DETAILS_CHOLMOD:INTERNAL=[/usr/include/suitesparse][/usr/lib/x86_64-linux-gnu/libcholmod.so;/usr/lib/x86_64-linux-gnu/libamd.so;/usr/lib/x86_64-linux-gnu/libcolamd.so;/usr/lib/x86_64-linux-gnu/libcamd.so;/usr/lib/x86_64-linux-gnu/libccolamd.so;/usr/lib/x86_64-linux-gnu/libsuitesparseconfig.so][v()]
//Details about finding CSPARSE
FIND_PACKAGE_MESSAGE_DETAILS_CSPARSE:INTERNAL=[/usr/include/suitesparse][/usr/lib/x86_64-linux-gnu/libcxsparse.so][v()]
//Details about finding Eigen3
FIND_PACKAGE_MESSAGE_DETAILS_Eigen3:INTERNAL=[/usr/local/include/eigen3][TRUE][v(2.91.0)]
//Details about finding OpenCV
FIND_PACKAGE_MESSAGE_DETAILS_OpenCV:INTERNAL=[/usr/local][v3.4.3()]
//Details about finding OpenGL
FIND_PACKAGE_MESSAGE_DETAILS_OpenGL:INTERNAL=[/usr/lib/x86_64-linux-gnu/libGL.so][/usr/include][v()]
//Details about finding QGLVIEWER
FIND_PACKAGE_MESSAGE_DETAILS_QGLVIEWER:INTERNAL=[/usr/include/QGLViewer][/usr/lib/x86_64-linux-gnu/libQGLViewer.so][v()]
//ADVANCED property for variable: LAPACK_Accelerate_LIBRARY
LAPACK_Accelerate_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: LAPACK_acml_LIBRARY
LAPACK_acml_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: LAPACK_cheev__lapack_f2c_WORKS
LAPACK_cheev__lapack_f2c_WORKS-ADVANCED:INTERNAL=1
//Have function cheev_
LAPACK_cheev__lapack_f2c_WORKS:INTERNAL=1
//ADVANCED property for variable: LAPACK_lapack_LIBRARY
LAPACK_lapack_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: LAPACK_mkl_lapack_LIBRARY
LAPACK_mkl_lapack_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: LAPACK_vecLib_LIBRARY
LAPACK_vecLib_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: OPENGL_INCLUDE_DIR
OPENGL_INCLUDE_DIR-ADVANCED:INTERNAL=1
//ADVANCED property for variable: OPENGL_gl_LIBRARY
OPENGL_gl_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: OPENGL_glu_LIBRARY
OPENGL_glu_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: OPENGL_xmesa_INCLUDE_DIR
OPENGL_xmesa_INCLUDE_DIR-ADVANCED:INTERNAL=1
LoSealL commented 5 years ago

@jinfagang Got it. I'm using g2o's external csparse version, which is in g2o/EXTERNAL. This is done only when SuiteSparse's version hasn't been installed, and G2O_USE_CSPAESE=ON.

So here your link to csparse functions failed. Could be a bug in CMakeLists.txt in my repo. I'm working out...

lucasjinreal commented 5 years ago

@LoSealL thanks for your patience, waiting for your move on uncover

LoSealL commented 5 years ago

@jinfagang I think I solved this issue, checkout my latest master branch.

cmake .. -DCSPARSE_DIR=/opt/SuiteSparse

Where /opt/SuiteSparse is my installation dir of SuiteSparse, containing include and lib folders there.

Note in my test, switching from SuiteSparse to G2O_CSPARSE MUST clean all build files.

MingHongDev commented 6 months ago

I fixed this problem (double free or corruption) by myself. On CMakeLists.txt,

# set( CMAKE_CXX_FLAGS "-std=c++11 -Wall -O2 -march=native" )
set(CMAKE_CXX_FLAGS "-O3 -std=c++11")
curryandklay commented 5 months ago

@MingHongDev 你是我的神! Thank you so much!