error: unable to execute command: Segmentation fault: 11 解决办法

本文介绍了一种常见的编译错误及其解决方案。当遇到未知的编译问题时,可以通过禁用项目的Bitcode选项来尝试解决问题。文章提供了两种具体的操作方法:一是将配置项EnableBitcode设置为no;二是直接修改相关设置为no。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

这里写图片描述

这个错误很久以前碰到过。今天又碰到发现忘记解决办法了。查了查。还是在博客里记录一下。免得又忘了。毕竟年纪大了

造成这个问题的原因有很多。解决途径也有好几个。不清楚问题的话。挨个试一下吧

1、直接 Enable Bitcode 里的yes改成no

2、这里改成no 这里改成no

declare i32 @getint() declare void @putint(i32) define i32 @main() { label_entry: %v1 = add i32 1399, 0 %op4 = call i32 @getint() br label %label5 label5: ; preds = %label_entry, %label26 %a = phi i32 [ 1, %label_entry ], [ %a_next, %label26 ] %b = phi i32 [ 1, %label_entry ], [ %b_next, %label26 ] %c = phi i32 [ %op4, %label_entry ], [ %c, %label26 ] %op7 = icmp slt i32 %a, 99999999 br i1 %op7, label %label8, label %label15 label8: ; preds = %label5 %op11 = add i32 %a, %v1 %op13 = srem i32 %op11, %c %op14 = icmp eq i32 %op13, 0 br i1 %op14, label %label18, label %label19 label15: ; preds = %label5 call void @putint(i32 %c) ret i32 %a label18: ; preds = %label8 %b_next1 = add i32 411, 0 br label %label26 label19: ; preds = %label8 %op22 = add i32 %a, %v1 %op24 = srem i32 %op22, %c %op25 = icmp eq i32 %op24, 1 br i1 %op25, label %label32, label %label33 label26: ; preds = %label18, %label40 %b_phi = phi i32 [ %b_next1, %label18 ], [ %b_val40, %label40 ] %op28 = add i32 %a, 1 %op30 = srem i32 %b_phi, 3 %a_next = add i32 %op28, %op30 %b_next = phi i32 [ %b_phi, %label18 ], [ %b_phi, %label40 ] br label %label5 label32: ; preds = %label19 %b_val32 = add i32 101, 0 br label %label40 label33: ; preds = %label19 %op36 = add i32 %a, %v1 %op38 = srem i32 %op36, %c %op39 = icmp eq i32 %op38, 3 br i1 %op39, label %label41, label %label42 label40: ; preds = %label32, %label42 %b_val40 = phi i32 [ %b_val32, %label32 ], [ %b_val42, %label42 ] br label %label26 label41: ; preds = %label33 %b_next3 = add i32 99, 0 br label %label42 label42: ; preds = %label33, %label41 %b_val42 = phi i32 [ %b_next3, %label41 ], [ %b, %label33 ] br label %label40 } sailor@sailor:~/Test/compiler-labs/tests/5-opt/warmup/ll_opt$ clang -O0 -w -no-pie opt-mem2reg-4.ll -o opt-mem2reg-4 -lsysy_io PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script. Stack dump: 0. Program arguments: /usr/lib/llvm-14/bin/clang -cc1 -triple x86_64-pc-linux-gnu -emit-obj -mrelax-all --mrelax-relocations -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name opt-mem2reg-4.ll -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -mllvm -treat-scalable-fixed-error-as-warning -debugger-tuning=gdb -fcoverage-compilation-dir=/home/sailor/Test/compiler-labs/tests/5-opt/warmup/ll_opt -resource-dir /usr/lib/llvm-14/lib/clang/14.0.0 -O0 -w -fdebug-compilation-dir=/home/sailor/Test/compiler-labs/tests/5-opt/warmup/ll_opt -ferror-limit 19 -fgnuc-version=4.2.1 -fcolor-diagnostics -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /tmp/opt-mem2reg-4-f0d56f.o -x ir opt-mem2reg-4.ll 1. Code generation 2. Running pass 'Function Pass Manager' on module 'opt-mem2reg-4.ll'. 3. Running pass 'X86 DAG->DAG Instruction Selection' on function '@main' clang: error: unable to execute command: Segmentation fault (core dumped) clang: error: clang frontend command failed due to signal (use -v to see invocation) Ubuntu clang version 14.0.0-1ubuntu1.1 Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir: /usr/bin clang: note: diagnostic msg: Error generating preprocessed source(s) - no preprocessable inputs. 怎么定位错误的地方?如何查看原因?
07-02
pyfluent.launcher ERROR: Exception caught - RuntimeError: Error occurred while reading. Error Object: #f Traceback (most recent call last): File "C:\Users\asus\.conda\envs\fluent\Lib\site-packages\ansys\fluent\core\launcher\standalone_launcher.py", line 301, in __call__ session.tui.file.read_case(self.argvals["case_file_name"]) ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\asus\.conda\envs\fluent\Lib\site-packages\ansys\fluent\core\services\datamodel_tui.py", line 342, in __call__ return PyMenu(self._service, self._version, self._mode, self._path).execute( ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ *args, **kwargs ^^^^^^^^^^^^^^^ ) ^ File "C:\Users\asus\.conda\envs\fluent\Lib\site-packages\ansys\fluent\core\services\datamodel_tui.py", line 268, in execute return self._service.execute_command(self._path, *args, **kwargs) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\asus\.conda\envs\fluent\Lib\site-packages\ansys\fluent\core\services\datamodel_tui.py", line 179, in execute_command return self._impl.execute_command(request) ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^ File "C:\Users\asus\.conda\envs\fluent\Lib\site-packages\ansys\fluent\core\services\datamodel_tui.py", line 89, in execute_command return self._stub.ExecuteCommand(request, metadata=self._metadata) ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\asus\.conda\envs\fluent\Lib\site-packages\grpc\_interceptor.py", line 277, in __call__ response, ignored_call = self._with_call( ~~~~~~~~~~~~~~~^ request, ^^^^^^^^ ...<4 lines>... compression=compression, ^^^^^^^^^^^^^^^^^^^^^^^^ ) ^ File "C:\Users\asus\.conda\envs\fluent\Lib\site-packages\grpc\_interceptor.py", line 329, in _with_call call = self._interceptor.intercept_unary_unary( continuation, client_call_details, request ) File "C:\Users\asus\.conda\envs\fluent\Lib\site-packages\ansys\fluent\core\services\interceptors.py", line 172, in intercept_unary_unary return self._intercept_call(continuation, client_call_details, request) ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\asus\.conda\envs\fluent\Lib\site-packages\ansys\fluent\core\services\interceptors.py", line 162, in _intercept_call raise new_ex from None RuntimeError: Error occurred while reading. Error Object: #f The above exception was the direct cause of the following exception: Traceback (most recent call last): File "E:\download\pyfluent-main\pyfluent-main\examples\piont.py", line 6, in <module> session = pyfluent.launch_fluent( product_version = 242, ...<6 lines>... # show_gui=True ) File "C:\Users\asus\.conda\envs\fluent\Lib\site-packages\ansys\fluent\core\utils\deprecate.py", line 73, in wrapper return decorated(*args, **kwargs) File "C:\Users\asus\.conda\envs\fluent\Lib\site-packages\deprecated\classic.py", line 199, in wrapper_function return wrapped_(*args_, **kwargs_) File "C:\Users\asus\.conda\envs\fluent\Lib\site-packages\ansys\fluent\core\utils\deprecate.py", line 118, in wrapper return func(*args, **kwargs) File "C:\Users\asus\.conda\envs\fluent\Lib\site-packages\ansys\fluent\core\utils\deprecate.py", line 118, in wrapper return func(*args, **kwargs) File "C:\Users\asus\.conda\envs\fluent\Lib\site-packages\ansys\fluent\core\launcher\launcher.py", line 355, in launch_fluent return launcher() File "C:\Users\asus\.conda\envs\fluent\Lib\site-packages\ansys\fluent\core\launcher\standalone_launcher.py", line 323, in __call__ raise LaunchFluentError(self._launch_cmd) from ex ansys.fluent.core.launcher.error_handler.LaunchFluentError: Fluent Launch command: start "" "D:\ANSYS Inc\v242\fluent\ntbin\win64\fluent.exe" 3ddp -t12 -hidden -meshing -sifile=C:\Users\asus\AppData\Local\Temp\serverinfo-3b1gukha.txt -nm、
最新发布
08-01
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值