• 请不要在回答技术问题时复制粘贴 AI 生成的内容
alwayshere
V2EX  ›  程序员

编译 opencv,老是终结在“c++: internal compiler error: Segmentation fault (program cc1plus)”

  •  
  •   alwayshere · Apr 19, 2017 · 9165 views
    This topic created in 3490 days ago, the information mentioned may be changed or developed.

    centos 6.7 32 位系统,编译 opencv 3.0.0, 33%的时候就弹出一个:

    c++: internal compiler error: Segmentation fault (program cc1plus) [modules/core/CMakeFiles/opencv_core.dir/src/ocl.cpp.o] Error 1

    系统的 GCC version : 4.9.0

    cmake version: 2.8.12.2

    折腾了两天,网上各种安装方法都试过了,老是给我一个 Segmentation fault ,快被急疯了,求热心 V 友帮忙一下怎么弄

    7 replies  •  2017-04-19 18:16:40 +08:00
    enenaaa
    enenaaa
    Apr 19, 2017
    1
    换 gcc 版本, 换操作系统
    alwayshere
    alwayshere
    OP
    Apr 19, 2017
    2
    @enenaaa centos 不行吗,目前这个服务器已经是生产环境了,不敢轻易换系统啊
    skydiver
    skydiver
    Apr 19, 2017
    3
    升级 gcc
    enenaaa
    enenaaa
    Apr 19, 2017
    4
    @alwayshere 我的意思是, 这不是你的锅。 与其慢慢找别人犯的错, 不如简单粗暴点, 省时间精力。
    whatot
    whatot
    Apr 19, 2017
    5
    http://pkgs.fedoraproject.org/cgit/rpms/opencv.git/
    照着这个在 centos6 上尝试 build 对应的 rpm 包吧。
    另外用 github 上的版本,在 centos6 64bit 上可以编译,没大问题。
    zcbenz
    zcbenz
    Apr 19, 2017
    6
    你这是遇上编译器的 bug 了,不想升级系统里的编译器的话可以网上下一个编译好的 clang 或者 gcc ,然后通过设置`CC`和`CXX`变量切换到下载的版本。
    erobot
    erobot
    Apr 19, 2017
    7
    32 位进程最大可用 4G 内存, opencv 这种复杂的库也许可能会内存不足
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1953 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 81ms · UTC 04:50 · PVG 12:50 · LAX 20:50 · JFK 23:50
    ♥ Do have faith in what you're doing.