laurentkneip / opengv

OpenGV is a collection of computer vision methods for solving geometric vision problems. It is hosted and maintained by the Mobile Perception Lab of ShanghaiTech.
Other
1.02k stars 353 forks source link

Segmentation fault like error.... #107

Open majioa opened 4 years ago

majioa commented 4 years ago

I'm getting the error like the following in the middle of building, the error kind is unstable, it seems that during the build there become lack of memory....

{standard input}: Assembler messages:
{standard input}:21249: Warning: end of file not at end of a line; newline inserted
{standard input}:22178: Error: unknown pseudo-op: `.lbe173'
{standard input}: Error: open CFI at the end of file; missing .cfi_endproc directive
i586-alt-linux-g++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
make[2]: *** [CMakeFiles/opengv.dir/build.make:420: CMakeFiles/opengv.dir/src/absolute_pose/modules/upnp2.cpp.o] Error 1
make[2]: Leaving directory '/usr/src/RPM/BUILD/opengv-2020.07.08/BUILD'
make[1]: *** [CMakeFiles/Makefile2:124: CMakeFiles/opengv.dir/all] Error 2
make[1]: Leaving directory '/usr/src/RPM/BUILD/opengv-2020.07.08/BUILD'
make: *** [Makefile:149: all] Error 2
make: Leaving directory '/usr/src/RPM/BUILD/opengv-2020.07.08/BUILD'
error: Bad exit status from /usr/src/tmp/rpm-tmp.72818 (%build)

Build command is the following:

cmake .. -DCMAKE_SKIP_RPATH:BOOL=ON -DCMAKE_SKIP_INSTALL_RPATH:BOOL=yes '-DCMAKE_C_FLAGS:STRING=-pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic' '-DCMAKE_CXX_FLAGS:STRING=-pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic' '-DCMAKE_Fortran_FLAGS:STRING=-pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic' -DCMAKE_INSTALL_PREFIX=/usr -DINCLUDE_INSTALL_DIR:PATH=/usr/include -DLIB_INSTALL_DIR:PATH=/usr/lib -DSYSCONF_INSTALL_DIR:PATH=/etc -DSHARE_INSTALL_PREFIX:PATH=/usr/share -DLIB_DESTINATION=lib -DLIB_SUFFIX= -DBUILD_TESTS:BOOL=OFF -DBUILD_PYTHON:BOOL=OFF

So how to fix it?

majioa commented 4 years ago

It seems that the error is appeared due to -g key passed to gcc, strangely, -gcoff allows to compile suffessfully, but -gdwarf doesn't

byrock commented 2 years ago

relative_pose/modules/sixpt/modules2.cpp.o absolute_pose/modules/upnp2.cpp.o These 2 files are memory killer. They should be carefully built first as a static library and then be linked in libopengv.so :)