Linux下 Mini-shell的实现(C/C++)

本文介绍了一个用C语言编写的简易shell程序,该程序能在Linux环境下读取并执行通过stdin输入的命令,支持多命令管道及输入输出重定向。

问题描述:

使用C语言在Linux下实现一个mini-shell,该shell从是stdin里面读取命令,然后执行该命令。

输入:

输入包含单行多命令,命令之间使用管道符('|')连接,可以使用输入输出重定向功能,

输入的BNF规范 :

    line ::= command ("|" command)* [redirection]    
    redirection ::= [input_redirection] [output_redirection] | [output_redirection] [input_redirection]
    input_redirecton ::= "<" filename
    output_redirecton ::= ">" filename
    command ::= file_name argument*

输出:

程序本身不输出任何东西,它的exit code就是输入一行命令中最后一个子命令的exit code


源码:

//Written by Openking 2014-11-15
/*Usage: inputs a line of commands connected by '|'
For example: ls -l | less > test.txt
*/

#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <dirent.h>
#include <stdbool.h>

char buf[150];    // save the input command
char command[20][30];  //save the commands that is splited
int commandNum = 0;    // save the numbers of command
char inputFilename[30];   //save the input file name if it exists
bool isInputExist = 0;    //save the state of existence of input file
char outputFilename[30];   //save the output file name if it exists
bool isOutputExist = 0;    //save the state of existence of output file
char *arg[20];


char * trim(char * src)
{
	int i = 0;
	char *begin = src;
	while(src[i] != '\0')
	{
	    if(src[i] != ' ')
	    {
	        break;
	    }
	    else
	    {
	        begin++;
	    }
	   	i++;
	}
	for(i = strlen(src)-1; i >= 0;  i--)
	{
	    if(src[i] != ' ')
	    {
	        break;
	    }
	    else
	    {
	        src[i] = '\0';
	    }
	}
	return begin;
}

int DealCommandStr()    //analysis the command
{
	int i=0,j=0;
	int p=0,q=0;
	int state = 0;  //state = 0,1,2
	char *str = buf;
	char ch;
	int flag = 0;

	while(ch=*str++)
	{
		if(ch == '|')  //start to save another command
		{
			state = 0;     //command state
			i++;
			j=0;
			continue;
		}
		else if(ch == '<')  //start to save the input file name
		{
			state = 1;         //input file name state
			isInputExist = 1;
			continue;
		}
		else if(ch == '>')
		{
			state = 2;      //output file name state
			isOutputExist = 1;
			continue;
		}
		else
		{
			if(state == 0)   //command state
			{
				command[i][j++] = ch;
			}
			else if(state == 1)  //input file name state
			{
				inputFilename[p++] = ch;
			}
			else    //output file name state
			{
				outputFilename[q++] = ch;
			}
		}
		commandNum = i;   //get the number of commands
	}
	//for(i = 0;i <= commandNum; i++)
	//{
	//	puts(command[i]);
	//}
}

int main()
{
	int i=0,j=0;
	gets(buf);     //get commands
	DealCommandStr();  //deal the input string
	char * str_temp;
	char * readStr;
	char * writeStr;
	pid_t pid[30];
	int pipefd1[2] = {-1,-1};
	int pipefd2[2] = {-1,-1};
	int fdr,fdw;
	int ii=0;
	    /* fork count child process */
	if(commandNum == 0)
	{
        //pid_t fork(void);
        pid[0] = fork();
		if(pid[0] == 0)
		{
			if(isInputExist)
            {
            	fdr = open(trim(inputFilename),O_RDONLY);
            	dup2(fdr, STDIN_FILENO);
            }
            if(isOutputExist)
            {
            	fdw = open(trim(outputFilename),O_WRONLY|O_CREAT|O_TRUNC,0600);
            	dup2(fdw, STDOUT_FILENO);
            }
            /* child process */
            //int execvp(const char *file, char *const argv[]);
            //PureCommandStr(command[0]);
            int iii=0;
            char *buffer = trim(command[0]);
            //puts(buffer);
            while((arg[iii++] = strsep(&buffer," "))!= NULL);
            //setbuf(stdout, NULL);
			//char *a = "ls";
			//char *b[]={"ls","-a"};
			//execvp(b[0],b);
			//printf("%s   %s\n",arg,argv2);
            execvp(arg[0], arg);
            exit(0);
        }
    }
    else
    {
		//printf("command num %d\n",commandNum);
	    for(i = 0; i <= commandNum+1; i++)
	    {
	    	//printf("i num: %d\n",i);
	        /* init pipe file descriptor */
	        pipe(pipefd1);

	        /* fork child i */
	        pid[i] = fork();
	        //printf("pid num: %d\n",pid[i]);

	    	if(pid[i] == 0)
	    	{
	            /* child i */

	            //int dup2(int oldfd, int newfd);
	            if(i == 0)
	            { /* the first child */
	            	close(pipefd1[0]);
	                if(isInputExist)
	                {
	                	fdr = open(trim(inputFilename),O_RDONLY);
	                	dup2(fdr, STDIN_FILENO);
	                }
	                dup2(pipefd1[1], STDOUT_FILENO);
	                close(pipefd1[1]);

	            }
	            else if(i == commandNum)
	            { /* the last child */
	            	dup2(pipefd2[0], STDIN_FILENO);
	                close(pipefd2[1]); /* close prev process end of write */
	                close(pipefd2[0]); /* close curr process end of read */

	                if(isOutputExist)
	                {
	                	fdw = open(trim(outputFilename),O_WRONLY|O_CREAT|O_TRUNC,0600);
	                	dup2(fdw, STDOUT_FILENO);
	                }
	            }
	            else
	            {
	            	dup2(pipefd1[1], STDOUT_FILENO);

	            	close(pipefd1[0]);
	                close(pipefd1[1]);

	                dup2(pipefd2[0], STDIN_FILENO);

	                close(pipefd2[0]);
	                close(pipefd2[1]);
	            }
	            //int execvp(const char *file, char *const argv[]);
	            //PureCommandStr(command[i]);
				//char *argv2 = command[i];
				int iii=0;
            	char *buffer = trim(command[i]);
            	//puts(buffer);
	            while((arg[iii++] = strsep(&buffer," "))!= NULL);
				//printf("%s   %s\n",arg,argv2);
				execvp(arg[0], arg);
				//printf("i num: %d\n",i);
	        }

	        if(i!=0)
		    {
		      	close(pipefd2[0]);
		      	close(pipefd2[1]);
		    }
			  	pipefd2[0]=pipefd1[0];
			  	pipefd2[1]=pipefd1[1];
		}
	}

    for(i = 0; i <=commandNum; i++)
    {
        //pid_t waitpid(pid_t pid, int *status, int options);
        waitpid(pid[i], NULL, 0);
    }
}

测试:我们使用命令:

ls -l | less > test.txt


在文件test.txt可以看到结果:

total 32
-rw------- 1 openking openking    33  1月 18 13:22 1.txt
-rw-rw-r-- 1 openking openking  8294 11月 21 16:42 shell.cc
-rwxrwxr-x 1 openking openking 13471  1月 18 13:21 shell.o
-rw------- 1 openking openking     0  1月 18 13:24 test.txt


building 'flash_attn_2_cuda' extension creating build/temp.linux-x86_64-cpython-310/csrc/flash_attn creating build/temp.linux-x86_64-cpython-310/csrc/flash_attn/src g++ -pthread -B /home/yxx/miniconda3/envs/simpler_ori/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /home/yxx/miniconda3/envs/simpler_ori/include -fPIC -O2 -isystem /home/yxx/miniconda3/envs/simpler_ori/include -fPIC -I/tmp/pip-install-ru5uufkn/flash-attn_d835e5ef515c4ef1ae25b02f8e2df32b/csrc/flash_attn -I/tmp/pip-install-ru5uufkn/flash-attn_d835e5ef515c4ef1ae25b02f8e2df32b/csrc/flash_attn/src -I/tmp/pip-install-ru5uufkn/flash-attn_d835e5ef515c4ef1ae25b02f8e2df32b/csrc/cutlass/include -I/home/yxx/miniconda3/envs/simpler_ori/lib/python3.10/site-packages/torch/include -I/home/yxx/miniconda3/envs/simpler_ori/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/yxx/miniconda3/envs/simpler_ori/lib/python3.10/site-packages/torch/include/TH -I/home/yxx/miniconda3/envs/simpler_ori/lib/python3.10/site-packages/torch/include/THC -I/home/yxx/miniconda3/envs/simpler_ori/include -I/home/yxx/miniconda3/envs/simpler_ori/include/python3.10 -c csrc/flash_attn/flash_api.cpp -o build/temp.linux-x86_64-cpython-310/csrc/flash_attn/flash_api.o -O3 -std=c++17 -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -DTORCH_EXTENSION_NAME=flash_attn_2_cuda -D_GLIBCXX_USE_CXX11_ABI=0 In file included from /tmp/pip-install-ru5uufkn/flash-attn_d835e5ef515c4ef1ae25b02f8e2df32b/csrc/cutlass/include/cutlass/numeric_types.h:42, from csrc/flash_attn/flash_api.cpp:13: /tmp/pip-install-ru5uufkn/flash-attn_d835e5ef515c4ef1ae25b02f8e2df32b/csrc/cutlass/include/cutlass/bfloat16.h:48:10: fatal error: cuda_bf16.h: No such file or directory 48 | #include <cuda_bf16.h> | ^~~~~~~~~~~~~ compilation terminated. error: command '/usr/bin/g++' failed with exit code 1 [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for flash-attn Running setup.py clean for flash-attn Failed to build flash-attn ERROR: Failed to build installable wheels for some pyproject.toml based projects (flash-attn)在安装flash-attn过程中出现了上述报错,是什么原因
07-02
This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by iptables configure 1.4.21, which was generated by GNU Autoconf 2.69. Invocation command line was $ ./configure --target=arm-openwrt-linux-uclibc --host=arm-openwrt-linux-uclibc --build=i686-linux-gnu --program-prefix= --program-suffix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/lib --sysconfdir=/etc --datadir=/usr/share --localstatedir=/var --mandir=/usr/man --infodir=/usr/info --disable-nls --enable-shared --enable-devel --with-kernel=/home/zhanggexu/newcode/be900v2/Iplatform/openwrt/../../bcm504L04/bcm963xx_5.04L.04/kernel/linux-4.19/user_headers --with-xtlibdir=/usr/lib/iptables --enable-static ## --------- ## ## Platform. ## ## --------- ## hostname = ubuntu uname -m = i686 uname -r = 3.19.0-25-generic uname -s = Linux uname -v = #26~14.04.1-Ubuntu SMP Fri Jul 24 21:18:00 UTC 2015 /usr/bin/uname -p = unknown /bin/uname -X = unknown /bin/arch = i686 /usr/bin/arch -k = unknown /usr/convex/getsysinfo = unknown /usr/bin/hostinfo = unknown /bin/machine = unknown /usr/bin/oslevel = unknown /bin/universe = unknown PATH: /home/zhanggexu/newcode/be900v2/Iplatform/openwrt/staging_dir/target-arm-openwrt-linux-uclibc-be900v2/host/bin PATH: /home/zhanggexu/newcode/be900v2/Iplatform/openwrt/staging_dir/toolchain-arm-openwrt-linux-uclibc/bin PATH: /home/zhanggexu/newcode/be900v2/Iplatform/openwrt/staging_dir/host/bin PATH: /home/zhanggexu/newcode/be900v2/Iplatform/openwrt/staging_dir/toolchain-arm-openwrt-linux-uclibc/bin PATH: /home/zhanggexu/newcode/be900v2/Iplatform/openwrt/staging_dir/host/bin PATH: /home/zhanggexu/miniconda2/envs/spider/bin PATH: /opt/cmake-install/bin PATH: /home/zhanggexu/miniconda2/bin PATH: /usr/local/sbin PATH: /usr/local/bin PATH: /usr/sbin PATH: /usr/bin PATH: /sbin PATH: /bin PATH: /usr/games PATH: /usr/local/games PATH: /home/zhanggexu/newcode/be900v2/Iplatform/build/../../bcm504L04/toolchain/opt/toolchains/crosstools-arm_softfp-gcc-10.3-linux-4.19-glibc-2.32-binutils-2.36.1/bin PATH: /home/zhanggexu/newcode/be900v2/Iplatform/build/../../bcm504L04/bcm963xx_5.04L.04/hostTools PATH: /home/zhanggexu/newcode/be900v2/Iplatform/openwrt/../../bcm504L04/toolchain/opt/toolchains/crosstools-arm_softfp-gcc-10.3-linux-4.19-glibc-2.32-binutils-2.36.1/usr/bin PATH: /home/zhanggexu/newcode/be900v2/Iplatform/openwrt/../../bcm504L04/toolchain/opt/toolchains/crosstools-aarch64-gcc-10.3-linux-4.19-glibc-2.32-binutils-2.36.1/usr/bin PATH: /home/zhanggexu/newcode/be900v2/Iplatform/openwrt/../../bcm504L04/toolchain/opt/toolchains/crosstools-arm_softfp-gcc-10.3-linux-4.19-glibc-2.32-binutils-2.36.1/usr/bin PATH: /home/zhanggexu/newcode/be900v2/Iplatform/openwrt/../../bcm504L04/toolchain/opt/toolchains/crosstools-aarch64-gcc-10.3-linux-4.19-glibc-2.32-binutils-2.36.1/usr/bin ## ----------- ## ## Core tests. ## ## ----------- ## configure:2376: loading site script /home/zhanggexu/newcode/be900v2/Iplatform/openwrt/include/site/arm-openwrt-linux-uclibc | #!/bin/sh | | . $TOPDIR/include/site/arm-linux | . $TOPDIR/include/site/linux-uclibc | configure:2523: checking for a BSD-compatible install configure:2591: result: /usr/bin/install -c configure:2604: checking whether build environment is sane configure:2659: result: yes configure:2718: checking for arm-openwrt-linux-uclibc-strip configure:2745: result: arm-buildroot-linux-gnueabi-strip configure:2810: checking for a thread-safe mkdir -p configure:2849: result: /bin/mkdir -p configure:2856: checking for gawk configure:2872: found /usr/bin/gawk configure:2883: result: gawk configure:2894: checking whether make sets $(MAKE) configure:2916: result: yes configure:2945: checking whether make supports nested variables configure:2962: result: yes configure:3097: checking for arm-openwrt-linux-uclibc-gcc configure:3124: result: arm-buildroot-linux-gnueabi-gcc configure:3393: checking for C compiler version configure:3402: arm-buildroot-linux-gnueabi-gcc --version >&5 arm-buildroot-linux-gnueabi-gcc.br_real (Buildroot 2021.02.4) 10.3.0 Copyright (C) 2020 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. configure:3413: $? = 0 configure:3402: arm-buildroot-linux-gnueabi-gcc -v >&5 Using built-in specs. COLLECT_GCC=/home/zhanggexu/newcode/be900v2/bcm504L04/toolchain/opt/toolchains/crosstools-arm_softfp-gcc-10.3-linux-4.19-glibc-2.32-binutils-2.36.1/bin/arm-buildroot-linux-gnueabi-gcc.br_real COLLECT_LTO_WRAPPER=/home/zhanggexu/newcode/be900v2/bcm504L04/toolchain/opt/toolchains/crosstools-arm_softfp-gcc-10.3-linux-4.19-glibc-2.32-binutils-2.36.1/bin/../libexec/gcc/arm-buildroot-linux-gnueabi/10.3.0/lto-wrapper Target: arm-buildroot-linux-gnueabi Configured with: ./configure --prefix=/home/tp/code2/SDK/build_toolchain_10.3/target/crosstools-arm_softfp-gcc-10.3-linux-4.19-glibc-2.32-binutils-2.36.1 --sysconfdir=/home/tp/code2/SDK/build_toolchain_10.3/target/crosstools-arm_softfp-gcc-10.3-linux-4.19-glibc-2.32-binutils-2.36.1/etc --enable-static --target=arm-buildroot-linux-gnueabi --with-sysroot=/home/tp/code2/SDK/build_toolchain_10.3/target/crosstools-arm_softfp-gcc-10.3-linux-4.19-glibc-2.32-binutils-2.36.1/arm-buildroot-linux-gnueabi/sysroot --enable-__cxa_atexit --with-gnu-ld --disable-libssp --disable-multilib --disable-decimal-float --with-gmp=/home/tp/code2/SDK/build_toolchain_10.3/target/crosstools-arm_softfp-gcc-10.3-linux-4.19-glibc-2.32-binutils-2.36.1 --with-mpc=/home/tp/code2/SDK/build_toolchain_10.3/target/crosstools-arm_softfp-gcc-10.3-linux-4.19-glibc-2.32-binutils-2.36.1 --with-mpfr=/home/tp/code2/SDK/build_toolchain_10.3/target/crosstools-arm_softfp-gcc-10.3-linux-4.19-glibc-2.32-binutils-2.36.1 --with-pkgversion='Buildroot 2021.02.4' --with-bugurl=http://bugs.buildroot.net/ --without-zstd --disable-libquadmath --disable-libquadmath-support --enable-tls --enable-plugins --enable-lto --enable-threads --with-isl=/home/tp/code2/SDK/build_toolchain_10.3/target/crosstools-arm_softfp-gcc-10.3-linux-4.19-glibc-2.32-binutils-2.36.1 --with-abi=aapcs-linux --with-cpu=cortex-a9 --with-fpu=vfpv3 --with-float=softfp --with-mode=arm --enable-languages=c,c++ --with-build-time-tools=/home/tp/code2/SDK/build_toolchain_10.3/target/crosstools-arm_softfp-gcc-10.3-linux-4.19-glibc-2.32-binutils-2.36.1/arm-buildroot-linux-gnueabi/bin --enable-shared --disable-libgomp Thread model: posix Supported LTO compression algorithms: zlib gcc version 10.3.0 (Buildroot 2021.02.4) COMPILER_PATH=/home/zhanggexu/newcode/be900v2/bcm504L04/toolchain/opt/toolchains/crosstools-arm_softfp-gcc-10.3-linux-4.19-glibc-2.32-binutils-2.36.1/bin/../libexec/gcc/arm-buildroot-linux-gnueabi/10.3.0/:/home/zhanggexu/newcode/be900v2/bcm504L04/toolchain/opt/toolchains/crosstools-arm_softfp-gcc-10.3-linux-4.19-glibc-2.32-binutils-2.36.1/bin/../libexec/gcc/:/home/zhanggexu/newcode/be900v2/bcm504L04/toolchain/opt/toolchains/crosstools-arm_softfp-gcc-10.3-linux-4.19-glibc-2.32-binutils-2.36.1/bin/../lib/gcc/arm-buildroot-linux-gnueabi/10.3.0/../../../../arm-buildroot-linux-gnueabi/bin/ LIBRARY_PATH=/home/zhanggexu/newcode/be900v2/bcm504L04/toolchain/opt/toolchains/crosstools-arm_softfp-gcc-10.3-linux-4.19-glibc-2.32-binutils-2.36.1/bin/../lib/gcc/arm-buildroot-linux-gnueabi/10.3.0/:/home/zhanggexu/newcode/be900v2/bcm504L04/toolchain/opt/toolchains/crosstools-arm_softfp-gcc-10.3-linux-4.19-glibc-2.32-binutils-2.36.1/bin/../lib/gcc/:/home/zhanggexu/newcode/be900v2/bcm504L04/toolchain/opt/toolchains/crosstools-arm_softfp-gcc-10.3-linux-4.19-glibc-2.32-binutils-2.36.1/bin/../lib/gcc/arm-buildroot-linux-gnueabi/10.3.0/../../../../arm-buildroot-linux-gnueabi/lib/:/home/zhanggexu/newcode/be900v2/bcm504L04/toolchain/opt/toolchains/crosstools-arm_softfp-gcc-10.3-linux-4.19-glibc-2.32-binutils-2.36.1/arm-buildroot-linux-gnueabi/sysroot/lib/:/home/zhanggexu/newcode/be900v2/bcm504L04/toolchain/opt/toolchains/crosstools-arm_softfp-gcc-10.3-linux-4.19-glibc-2.32-binutils-2.36.1/arm-buildroot-linux-gnueabi/sysroot/usr/lib/ ... rest of stderr output deleted ... configure:3413: $? = 1 configure:3402: arm-buildroot-linux-gnueabi-gcc -V >&5 arm-buildroot-linux-gnueabi-gcc.br_real: error: unrecognized command-line option '-V' configure:3413: $? = 1 configure:3402: arm-buildroot-linux-gnueabi-gcc -qversion >&5 arm-buildroot-linux-gnueabi-gcc.br_real: error: unrecognized command-line option '-qversion'; did you mean '--version'? configure:3413: $? = 1 configure:3433: checking whether the C compiler works configure:3455: arm-buildroot-linux-gnueabi-gcc -I/home/zhanggexu/newcode/be900v2/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/iptables-1.4.21/include -I/home/zhanggexu/newcode/be900v2/Iplatform/openwrt/../../bcm504L04/bcm963xx_5.04L.04/kernel/linux-4.19/user_headers/include -ffunction-sections -fdata-sections -I/home/zhanggexu/newcode/be900v2/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/iptables-1.4.21/include -I/home/zhanggexu/newcode/be900v2/Iplatform/openwrt/../../bcm504L04/bcm963xx_5.04L.04/kernel/linux-4.19/user_headers/include -I/home/zhanggexu/newcode/be900v2/Iplatform/openwrt/staging_dir/target-arm-openwrt-linux-uclibc-be900v2/usr/include -I/home/zhanggexu/newcode/be900v2/Iplatform/openwrt/staging_dir/target-arm-openwrt-linux-uclibc-be900v2/include -I/home/zhanggexu/newcode/be900v2/Iplatform/openwrt/staging_dir/usr-be900v2/include -I/home/zhanggexu/newcode/be900v2/Iplatform/openwrt/../../bcm504L04/toolchain/opt/toolchains/crosstools-arm_softfp-gcc-10.3-linux-4.19-glibc-2.32-binutils-2.36.1/usr/include -L/home/zhanggexu/newcode/be900v2/Iplatform/openwrt/staging_dir/target-arm-openwrt-linux-uclibc-be900v2/usr/lib -L/home/zhanggexu/newcode/be900v2/Iplatform/openwrt/staging_dir/target-arm-openwrt-linux-uclibc-be900v2/lib -Wl,-rpath-link,/home/zhanggexu/newcode/be900v2/Iplatform/openwrt/staging_dir/target-arm-openwrt-linux-uclibc-be900v2/usr/lib -L/home/zhanggexu/newcode/be900v2/Iplatform/openwrt/../../bcm504L04/toolchain/opt/toolchains/crosstools-arm_softfp-gcc-10.3-linux-4.19-glibc-2.32-binutils-2.36.1/usr/lib -L/home/zhanggexu/newcode/be900v2/Iplatform/openwrt/../../bcm504L04/toolchain/opt/toolchains/crosstools-arm_softfp-gcc-10.3-linux-4.19-glibc-2.32-binutils-2.36.1/lib -L/home/zhanggexu/newcode/be900v2/Iplatform/openwrt/staging_dir/target-arm-openwrt-linux-uclibc-be900v2/usr/lib/ -lnetfilter_conntrack -Wl,--gc-sections conftest.c >&5 /home/zhanggexu/newcode/be900v2/bcm504L04/toolchain/opt/toolchains/crosstools-arm_softfp-gcc-10.3-linux-4.19-glibc-2.32-binutils-2.36.1/bin/../lib/gcc/arm-buildroot-linux-gnueabi/10.3.0/../../../../arm-buildroot-linux-gnueabi/bin/ld: cannot find -lnetfilter_conntrack collect2: error: ld returned 1 exit status configure:3459: $? = 1 configure:3497: result: no configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "iptables" | #define PACKAGE_TARNAME "iptables" | #define PACKAGE_VERSION "1.4.21" | #define PACKAGE_STRING "iptables 1.4.21" | #define PACKAGE_BUGREPORT "" | #define PACKAGE_URL "" | #define PACKAGE "iptables" | #define VERSION "1.4.21" | /* end confdefs.h. */ | | int | main () | { | | ; | return 0; | } configure:3502: error: in `/home/zhanggexu/newcode/be900v2/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/iptables-1.4.21': configure:3504: error: C compiler cannot create executables See `config.log' for more details ## ---------------- ## ## Cache variables. ## ## ---------------- ## ac_cv_c_bigendian=no ac_cv_c_gettext_without_libintl=yes ac_cv_c_littleendian=yes ac_cv_c_long_double=no ac_cv_conv_longlong_to_float=yes ac_cv_env_CC_set=set ac_cv_env_CC_value=arm-buildroot-linux-gnueabi-gcc ac_cv_env_CFLAGS_set=set ac_cv_env_CFLAGS_value=' -I/home/zhanggexu/newcode/be900v2/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/iptables-1.4.21/include -I/home/zhanggexu/newcode/be900v2/Iplatform/openwrt/../../bcm504L04/bcm963xx_5.04L.04/kernel/linux-4.19/user_headers/include -ffunction-sections -fdata-sections ' ac_cv_env_CPPFLAGS_set=set ac_cv_env_CPPFLAGS_value='-I/home/zhanggexu/newcode/be900v2/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/iptables-1.4.21/include -I/home/zhanggexu/newcode/be900v2/Iplatform/openwrt/../../bcm504L04/bcm963xx_5.04L.04/kernel/linux-4.19/user_headers/include -I/home/zhanggexu/newcode/be900v2/Iplatform/openwrt/staging_dir/target-arm-openwrt-linux-uclibc-be900v2/usr/include -I/home/zhanggexu/newcode/be900v2/Iplatform/openwrt/staging_dir/target-arm-openwrt-linux-uclibc-be900v2/include -I/home/zhanggexu/newcode/be900v2/Iplatform/openwrt/staging_dir/usr-be900v2/include -I/home/zhanggexu/newcode/be900v2/Iplatform/openwrt/../../bcm504L04/toolchain/opt/toolchains/crosstools-arm_softfp-gcc-10.3-linux-4.19-glibc-2.32-binutils-2.36.1/usr/include ' ac_cv_env_CPP_set= ac_cv_env_CPP_value= ac_cv_env_LDFLAGS_set=set ac_cv_env_LDFLAGS_value='-L/home/zhanggexu/newcode/be900v2/Iplatform/openwrt/staging_dir/target-arm-openwrt-linux-uclibc-be900v2/usr/lib -L/home/zhanggexu/newcode/be900v2/Iplatform/openwrt/staging_dir/target-arm-openwrt-linux-uclibc-be900v2/lib -Wl,-rpath-link,/home/zhanggexu/newcode/be900v2/Iplatform/openwrt/staging_dir/target-arm-openwrt-linux-uclibc-be900v2/usr/lib -L/home/zhanggexu/newcode/be900v2/Iplatform/openwrt/../../bcm504L04/toolchain/opt/toolchains/crosstools-arm_softfp-gcc-10.3-linux-4.19-glibc-2.32-binutils-2.36.1/usr/lib -L/home/zhanggexu/newcode/be900v2/Iplatform/openwrt/../../bcm504L04/toolchain/opt/toolchains/crosstools-arm_softfp-gcc-10.3-linux-4.19-glibc-2.32-binutils-2.36.1/lib -L/home/zhanggexu/newcode/be900v2/Iplatform/openwrt/staging_dir/target-arm-openwrt-linux-uclibc-be900v2/usr/lib/ -lnetfilter_conntrack -Wl,--gc-sections ' ac_cv_env_LIBS_set= ac_cv_env_LIBS_value= ac_cv_env_PKG_CONFIG_LIBDIR_set=set ac_cv_env_PKG_CONFIG_LIBDIR_value=/home/zhanggexu/newcode/be900v2/Iplatform/openwrt/staging_dir/target-arm-openwrt-linux-uclibc-be900v2/usr/lib/pkgconfig ac_cv_env_PKG_CONFIG_PATH_set=set ac_cv_env_PKG_CONFIG_PATH_value=/home/zhanggexu/newcode/be900v2/Iplatform/openwrt/staging_dir/target-arm-openwrt-linux-uclibc-be900v2/usr/lib/pkgconfig ac_cv_env_PKG_CONFIG_set=set ac_cv_env_PKG_CONFIG_value=/home/zhanggexu/newcode/be900v2/Iplatform/openwrt/staging_dir/host/bin/pkg-config ac_cv_env_build_alias_set=set ac_cv_env_build_alias_value=i686-linux-gnu ac_cv_env_host_alias_set=set ac_cv_env_host_alias_value=arm-openwrt-linux-uclibc ac_cv_env_libnetfilter_conntrack_CFLAGS_set= ac_cv_env_libnetfilter_conntrack_CFLAGS_value= ac_cv_env_libnetfilter_conntrack_LIBS_set= ac_cv_env_libnetfilter_conntrack_LIBS_value= ac_cv_env_libnfnetlink_CFLAGS_set= ac_cv_env_libnfnetlink_CFLAGS_value= ac_cv_env_libnfnetlink_LIBS_set= ac_cv_env_libnfnetlink_LIBS_value= ac_cv_env_target_alias_set=set ac_cv_env_target_alias_value=arm-openwrt-linux-uclibc ac_cv_file__dev_zero=yes ac_cv_func___adjtimex=yes ac_cv_func___va_copy=no ac_cv_func__exit=yes ac_cv_func_bcmp=yes ac_cv_func_bcopy=yes ac_cv_func_bzero=yes ac_cv_func_cimag=yes ac_cv_func_creal=yes ac_cv_func_fchmod=yes ac_cv_func_getaddrinfo=yes ac_cv_func_getcwd=yes ac_cv_func_getdomainname=yes ac_cv_func_getpgrp_void=yes ac_cv_func_getpwuid_r=yes ac_cv_func_gettimeofday=yes ac_cv_func_index=yes ac_cv_func_lstat=yes ac_cv_func_lstat_dereferences_slashed_symlink=yes ac_cv_func_lstat_empty_string_bug=no ac_cv_func_malloc_0_nonnull=yes ac_cv_func_malloc_works=yes ac_cv_func_memcmp_clean=yes ac_cv_func_memcmp_working=yes ac_cv_func_posix_getgrgid_r=yes ac_cv_func_posix_getpwuid_r=yes ac_cv_func_psignal=yes ac_cv_func_pthread_key_delete=yes ac_cv_func_realloc_0_nonnull=yes ac_cv_func_realloc_works=yes ac_cv_func_rename=yes ac_cv_func_rindex=yes ac_cv_func_setgrent_void=yes ac_cv_func_setlocale=yes ac_cv_func_setpgrp_void=yes ac_cv_func_setresuid=no ac_cv_func_setvbuf_reversed=no ac_cv_func_stat_empty_string_bug=no ac_cv_func_stat_ignores_trailing_slash=no ac_cv_func_strerror=yes ac_cv_func_strftime=yes ac_cv_func_utimes=yes ac_cv_func_va_copy=no ac_cv_func_vsnprintf=yes ac_cv_have_accrights_in_msghdr=no ac_cv_have_broken_snprintf=no ac_cv_have_control_in_msghdr=yes ac_cv_have_decl_sys_siglist=no ac_cv_have_openpty_ctty_bug=yes ac_cv_have_space_d_name_in_struct_dirent=yes ac_cv_header_netinet_sctp_h=no ac_cv_header_netinet_sctp_uio_h=no ac_cv_int64_t=yes ac_cv_lbl_unaligned_fail=no ac_cv_linux_kernel_pppoe=yes ac_cv_linux_vers=2 ac_cv_pack_bitfields_reversed=yes ac_cv_path_LDCONFIG= ac_cv_path_install='/usr/bin/install -c' ac_cv_path_mkdir=/bin/mkdir ac_cv_prog_AWK=gawk ac_cv_prog_CC=arm-buildroot-linux-gnueabi-gcc ac_cv_prog_STRIP=arm-buildroot-linux-gnueabi-strip ac_cv_prog_make_make_set=yes ac_cv_regexec_segfault_emptystr=no ac_cv_sctp=no ac_cv_sizeof___int64=0 ac_cv_sizeof_char=1 ac_cv_sizeof_int16_t=2 ac_cv_sizeof_int32_t=4 ac_cv_sizeof_int64_t=8 ac_cv_sizeof_int=4 ac_cv_sizeof_long=4 ac_cv_sizeof_long_int=4 ac_cv_sizeof_long_long=8 ac_cv_sizeof_off_t=8 ac_cv_sizeof_short=2 ac_cv_sizeof_short_int=2 ac_cv_sizeof_size_t=4 ac_cv_sizeof_ssize_t=4 ac_cv_sizeof_u_int16_t=2 ac_cv_sizeof_u_int32_t=4 ac_cv_sizeof_u_int64_t=8 ac_cv_sizeof_uint16_t=2 ac_cv_sizeof_uint32_t=4 ac_cv_sizeof_uint64_t=8 ac_cv_sizeof_unsigned_int=4 ac_cv_sizeof_unsigned_long=4 ac_cv_sizeof_unsigned_long_long=8 ac_cv_sizeof_unsigned_short=2 ac_cv_sizeof_void_p=4 ac_cv_sys_restartable_syscalls=yes ac_cv_time_r_type=POSIX ac_cv_type_suseconds_t=yes ac_cv_uchar=no ac_cv_uint64_t=yes ac_cv_uint=yes ac_cv_ulong=yes ac_cv_ushort=yes ac_cv_va_copy=C99 ac_cv_va_val_copy=yes am_cv_make_support_nested_variables=yes as_cv_unaligned_access=yes ## ----------------- ## ## Output variables. ## ## ----------------- ## ACLOCAL='${SHELL} /home/zhanggexu/newcode/be900v2/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/iptables-1.4.21/build-aux/missing aclocal-1.15' AMDEPBACKSLASH='' AMDEP_FALSE='' AMDEP_TRUE='' AMTAR='$${TAR-tar}' AM_BACKSLASH='\' AM_DEFAULT_V='1' AM_DEFAULT_VERBOSITY='1' AM_V='1' AR='arm-buildroot-linux-gnueabi-ar' AUTOCONF='${SHELL} /home/zhanggexu/newcode/be900v2/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/iptables-1.4.21/build-aux/missing autoconf' AUTOHEADER='${SHELL} /home/zhanggexu/newcode/be900v2/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/iptables-1.4.21/build-aux/missing autoheader' AUTOMAKE='${SHELL} /home/zhanggexu/newcode/be900v2/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/iptables-1.4.21/build-aux/missing automake-1.15' AWK='gawk' CC='arm-buildroot-linux-gnueabi-gcc' CCDEPMODE='' CFLAGS=' -I/home/zhanggexu/newcode/be900v2/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/iptables-1.4.21/include -I/home/zhanggexu/newcode/be900v2/Iplatform/openwrt/../../bcm504L04/bcm963xx_5.04L.04/kernel/linux-4.19/user_headers/include -ffunction-sections -fdata-sections ' CPP='' CPPFLAGS='-I/home/zhanggexu/newcode/be900v2/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/iptables-1.4.21/include -I/home/zhanggexu/newcode/be900v2/Iplatform/openwrt/../../bcm504L04/bcm963xx_5.04L.04/kernel/linux-4.19/user_headers/include -I/home/zhanggexu/newcode/be900v2/Iplatform/openwrt/staging_dir/target-arm-openwrt-linux-uclibc-be900v2/usr/include -I/home/zhanggexu/newcode/be900v2/Iplatform/openwrt/staging_dir/target-arm-openwrt-linux-uclibc-be900v2/include -I/home/zhanggexu/newcode/be900v2/Iplatform/openwrt/staging_dir/usr-be900v2/include -I/home/zhanggexu/newcode/be900v2/Iplatform/openwrt/../../bcm504L04/toolchain/opt/toolchains/crosstools-arm_softfp-gcc-10.3-linux-4.19-glibc-2.32-binutils-2.36.1/usr/include ' CYGPATH_W='echo' DEFS='' DEPDIR='' DLLTOOL='' DSYMUTIL='' DUMPBIN='' ECHO_C='' ECHO_N='-n' ECHO_T='' EGREP='' ENABLE_BPFC_FALSE='' ENABLE_BPFC_TRUE='' ENABLE_DEVEL_FALSE='' ENABLE_DEVEL_TRUE='' ENABLE_IPV4_FALSE='' ENABLE_IPV4_TRUE='' ENABLE_IPV6_FALSE='' ENABLE_IPV6_TRUE='' ENABLE_LARGEFILE_FALSE='' ENABLE_LARGEFILE_TRUE='' ENABLE_LIBIPQ_FALSE='' ENABLE_LIBIPQ_TRUE='' ENABLE_SHARED_FALSE='' ENABLE_SHARED_TRUE='' ENABLE_STATIC_FALSE='' ENABLE_STATIC_TRUE='' ENABLE_SYNCONF_FALSE='' ENABLE_SYNCONF_TRUE='' EXEEXT='' FGREP='' GREP='' HAVE_LIBNETFILTER_CONNTRACK_FALSE='' HAVE_LIBNETFILTER_CONNTRACK_TRUE='' HAVE_LIBNFNETLINK_FALSE='' HAVE_LIBNFNETLINK_TRUE='' INSTALL_DATA='${INSTALL} -m 644' INSTALL_PROGRAM='${INSTALL}' INSTALL_SCRIPT='${INSTALL}' INSTALL_STRIP_PROGRAM='$(install_sh) -c -s' LD='arm-buildroot-linux-gnueabi-ld' LDFLAGS='-L/home/zhanggexu/newcode/be900v2/Iplatform/openwrt/staging_dir/target-arm-openwrt-linux-uclibc-be900v2/usr/lib -L/home/zhanggexu/newcode/be900v2/Iplatform/openwrt/staging_dir/target-arm-openwrt-linux-uclibc-be900v2/lib -Wl,-rpath-link,/home/zhanggexu/newcode/be900v2/Iplatform/openwrt/staging_dir/target-arm-openwrt-linux-uclibc-be900v2/usr/lib -L/home/zhanggexu/newcode/be900v2/Iplatform/openwrt/../../bcm504L04/toolchain/opt/toolchains/crosstools-arm_softfp-gcc-10.3-linux-4.19-glibc-2.32-binutils-2.36.1/usr/lib -L/home/zhanggexu/newcode/be900v2/Iplatform/openwrt/../../bcm504L04/toolchain/opt/toolchains/crosstools-arm_softfp-gcc-10.3-linux-4.19-glibc-2.32-binutils-2.36.1/lib -L/home/zhanggexu/newcode/be900v2/Iplatform/openwrt/staging_dir/target-arm-openwrt-linux-uclibc-be900v2/usr/lib/ -lnetfilter_conntrack -Wl,--gc-sections ' LIBOBJS='' LIBS='' LIBTOOL='' LIPO='' LN_S='' LTLIBOBJS='' MAKEINFO='${SHELL} /home/zhanggexu/newcode/be900v2/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/iptables-1.4.21/build-aux/missing makeinfo' MANIFEST_TOOL='' MKDIR_P='/bin/mkdir -p' NM='arm-buildroot-linux-gnueabi-nm' NMEDIT='' OBJDUMP='arm-buildroot-linux-gnueabi-objdump' OBJEXT='' OTOOL64='' OTOOL='' PACKAGE='iptables' PACKAGE_BUGREPORT='' PACKAGE_NAME='iptables' PACKAGE_STRING='iptables 1.4.21' PACKAGE_TARNAME='iptables' PACKAGE_URL='' PACKAGE_VERSION='1.4.21' PATH_SEPARATOR=':' PKG_CONFIG='/home/zhanggexu/newcode/be900v2/Iplatform/openwrt/staging_dir/host/bin/pkg-config' PKG_CONFIG_LIBDIR='/home/zhanggexu/newcode/be900v2/Iplatform/openwrt/staging_dir/target-arm-openwrt-linux-uclibc-be900v2/usr/lib/pkgconfig' PKG_CONFIG_PATH='/home/zhanggexu/newcode/be900v2/Iplatform/openwrt/staging_dir/target-arm-openwrt-linux-uclibc-be900v2/usr/lib/pkgconfig' RANLIB='arm-buildroot-linux-gnueabi-ranlib' SED='' SET_MAKE='' SHELL='/bin/sh' STRIP='arm-buildroot-linux-gnueabi-strip' VERSION='1.4.21' ac_ct_AR='' ac_ct_CC='' ac_ct_DUMPBIN='' am__EXEEXT_FALSE='' am__EXEEXT_TRUE='' am__fastdepCC_FALSE='' am__fastdepCC_TRUE='' am__include='' am__isrc='' am__leading_dot='.' am__nodep='' am__quote='' am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' bindir='/usr/bin' blacklist_modules='' build='i686-linux-gnu' build_alias='i686-linux-gnu' build_cpu='' build_os='' build_vendor='' datadir='/usr/share' datarootdir='${prefix}/share' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' dvidir='${docdir}' exec_prefix='/usr' host='arm-openwrt-linux-uclibc' host_alias='arm-openwrt-linux-uclibc' host_cpu='' host_os='' host_vendor='' htmldir='${docdir}' includedir='${prefix}/include' infodir='/usr/info' install_sh='${SHELL} /home/zhanggexu/newcode/be900v2/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/iptables-1.4.21/build-aux/install-sh' kbuilddir='' kinclude_CPPFLAGS='' ksourcedir='' libdir='${exec_prefix}/lib' libexecdir='/usr/lib' libiptc_LDFLAGS2='' libnetfilter_conntrack_CFLAGS='' libnetfilter_conntrack_LIBS='' libnfnetlink_CFLAGS='' libnfnetlink_LIBS='' libxtables_vage='0' libxtables_vcurrent='10' libxtables_vmajor='' localedir='${datarootdir}/locale' localstatedir='/var' mandir='/usr/man' mkdir_p='$(MKDIR_P)' noundef_LDFLAGS='' oldincludedir='/usr/include' pdfdir='${docdir}' pkgconfigdir='' pkgdatadir='' prefix='/usr' program_transform_name='s&$$&&;s&^&&' psdir='${docdir}' regular_CFLAGS='' regular_CPPFLAGS='' sbindir='/usr/sbin' sharedstatedir='${prefix}/com' sysconfdir='/etc' target_alias='arm-openwrt-linux-uclibc' xtlibdir='' ## ----------- ## ## confdefs.h. ## ## ----------- ## /* confdefs.h */ #define PACKAGE_NAME "iptables" #define PACKAGE_TARNAME "iptables" #define PACKAGE_VERSION "1.4.21" #define PACKAGE_STRING "iptables 1.4.21" #define PACKAGE_BUGREPORT "" #define PACKAGE_URL "" #define PACKAGE "iptables" #define VERSION "1.4.21" configure: exit 77
最新发布
10-24
ERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=sparse_conv_ext -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 FAILED: /tmp/pip-install-2orq3ccd/mmdet3d_bedd1fa9197349c4b23a2ae1df261803/build/temp.linux-x86_64-cpython-38/mmdet3d/ops/spconv/src/indice_cuda.o /usr/local/cuda/bin/nvcc -DWITH_CUDA -I/tmp/pip-install-2orq3ccd/mmdet3d_bedd1fa9197349c4b23a2ae1df261803/mmdet3d/ops/spconv/include -I/root/miniconda3/envs/open-mmlab/lib/python3.8/site-packages/torch/include -I/root/miniconda3/envs/open-mmlab/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/root/miniconda3/envs/open-mmlab/lib/python3.8/site-packages/torch/include/TH -I/root/miniconda3/envs/open-mmlab/lib/python3.8/site-packages/torch/include/THC -I/usr/local/cuda/include -I/root/miniconda3/envs/open-mmlab/include/python3.8 -c -c /tmp/pip-install-2orq3ccd/mmdet3d_bedd1fa9197349c4b23a2ae1df261803/mmdet3d/ops/spconv/src/indice_cuda.cu -o /tmp/pip-install-2orq3ccd/mmdet3d_bedd1fa9197349c4b23a2ae1df261803/build/temp.linux-x86_64-cpython-38/mmdet3d/ops/spconv/src/indice_cuda.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -w -std=c++14 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=sparse_conv_ext -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 /tmp/pip-install-2orq3ccd/mmdet3d_bedd1fa9197349c4b23a2ae1df261803/mmdet3d/ops/spconv/src/indice_cuda.cu:16:10: fatal error: spconv/indice.cu.h: No such file or directory 16 | #include <spconv/indice.cu.h> | ^~~~~~~~~~~~~~~~~~~~ compilation terminated.
03-26
Traceback (most recent call last): File "<string>", line 2, in <module> File "<pip-setuptools-caller>", line 34, in <module> File "/tmp/pip-install-zwu31id_/egl-probe_012d51b5046549af939ebf98b7f5ff8b/setup.py", line 50, in <module> setup( File "/root/miniconda3/envs/libero/lib/python3.8/site-packages/setuptools/__init__.py", line 117, in setup return distutils.core.setup(**attrs) File "/root/miniconda3/envs/libero/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 183, in setup return run_commands(dist) File "/root/miniconda3/envs/libero/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 199, in run_commands dist.run_commands() File "/root/miniconda3/envs/libero/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 954, in run_commands self.run_command(cmd) File "/root/miniconda3/envs/libero/lib/python3.8/site-packages/setuptools/dist.py", line 950, in run_command super().run_command(command) File "/root/miniconda3/envs/libero/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 973, in run_command cmd_obj.run() File "/root/miniconda3/envs/libero/lib/python3.8/site-packages/setuptools/command/bdist_wheel.py", line 398, in run self.run_command("build") File "/root/miniconda3/envs/libero/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command self.distribution.run_command(command) File "/root/miniconda3/envs/libero/lib/python3.8/site-packages/setuptools/dist.py", line 950, in run_command super().run_command(command) File "/root/miniconda3/envs/libero/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 973, in run_command cmd_obj.run() File "/root/miniconda3/envs/libero/lib/python3.8/site-packages/setuptools/_distutils/command/build.py", line 135, in run self.run_command(cmd_name) File "/root/miniconda3/envs/libero/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command self.distribution.run_command(command) File "/root/miniconda3/envs/libero/lib/python3.8/site-packages/setuptools/dist.py", line 950, in run_command super().run_command(command) File "/root/miniconda3/envs/libero/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 973, in run_command cmd_obj.run() File "/tmp/pip-install-zwu31id_/egl-probe_012d51b5046549af939ebf98b7f5ff8b/setup.py", line 26, in run self.build_extension(ext) File "/tmp/pip-install-zwu31id_/egl-probe_012d51b5046549af939ebf98b7f5ff8b/setup.py", line 38, in build_extension subprocess.check_call("cmake ..; make -j", cwd=build_dir, shell=True) File "/root/miniconda3/envs/libero/lib/python3.8/subprocess.py", line 364, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command 'cmake ..; make -j' returned non-zero exit status 2.
07-22
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值