用posix共享内存api,报错segmentation fault(core dump)

按照《操作系统概念》第十版上面照抄下来的,不知道为什么会报错

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <sys/shm.h> 
#include <sys/stat.h>

#include <sys/mman.h>
int main() {
/* the size (in bytes) of shared memory object */
const int SIZE = 4096; 
/* name of the shared memory object */
const char *name = "OS";
/* strings written to shared memory */ 
const char *message 0 = "Hello";
const char *message 1 = "World!";
/* shared memory file descriptor */
int fd;
/* pointer to shared memory obect */ 
char *ptr;

/* create the shared memory object */
    fd = shm open(name,O CREAT | O RDWR,0666);
/* configure the size of the shared memory object */
    ftruncate(fd, SIZE);
/* memory map the shared memory object */ 
    ptr = (char *) mmap(0, SIZE, PROT READ | PROT WRITE, MAP SHARED, fd, 0);
/* write to the shared memory object */ 
    sprintf(ptr,"%s",message 0);
    ptr += strlen(message 0); 
    sprintf(ptr,"%s",message 1); 
    ptr += strlen(message 1);
return 0;
}

Figure 3.16 Producer process illustrating POSIX shared-memory API.

#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h> 
#include <sys/shm.h> 
#include <sys/stat.h>

#include <sys/mman.h>
int main() {
/* the size (in bytes) of shared memory object */ 
const int SIZE = 4096; 
/* name of the shared memory object */
const char *name = "OS";
/* shared memory file descriptor */ 
int fd; 
/* pointer to shared memory obect */ 
char *ptr;

/* open the shared memory object */
    fd = shm open(name, O RDONLY, 0666);
/* memory map the shared memory object */ 
    ptr = (char *) mmap(0, SIZE, PROT READ | PROT WRITE, MAP SHARED, fd, 0);
/* read from the shared memory object */ 
    printf("%s",(char *)ptr);
/* remove the shared memory object */ 
    shm unlink(name);
    return 0;
}

Consumer process illustrating POSIX shared-memory API.

报错信息是这样的,先运行生产者,再运行消费者,就报错了

图片说明

1个回答

每一步都要检查是否成功,否则很容易出问题。比如这里:
mmap(0, SIZE, PROT READ | PROT WRITE, MAP SHARED, fd, 0);
有可能因为前后两次的SIZE不一样,导致map失败。

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
java中wait和park底层实现原理一样吗?都是调用POSIX中的函数吗?
java中wait和park底层实现原理一样吗?都是调用POSIX中的函数吗?
shm_open error:No such file or directory
操作系统实验共享内存posix新建shm_open(“Sharedmemory”,O_RDWR,0)报错 shm_open error:No such file or directory 代码: #include <stdlib.h> #include <stdio.h> #include <string.h> #include <errno.h> #include <unistd.h> #include <sys/stat.h> #include <sys/types.h> #include <sys/file.h> #include <sys/ipc.h> #include <sys/shm.h> #include <sys/mman.h> #include <fcntl.h> #include <wait.h> #define MAX_SEQUENCE 10 typedef struct{ int fib_sequence[MAX_SEQUENCE]; int sequence_size; }share_data; void Fibonacci(int n, int *Fibo){//获得斐波那契数列 if(n == 0){ Fibo[0] = 0; return; } Fibo[0] = 0; Fibo[1] = 1; if(n == 1){ return; } for(int i=2; i< n;i++){ Fibo[i] = Fibo[i-1] + Fibo[i-2]; } } int main(){ int num; int shmid;//共享内存ID share_data *shMemory;//创建结构体指针 pid_t pid; printf("Please enter a positive number(no more than 10): "); while(1){ scanf("%d", &num); if(num < 0) printf("The number less than 0. Please try agian: "); else if(num > 10) printf("The number more than 0. Please try agian: "); else break; } shm_unlink("shared-memory"); if((shmid = shm_open("shared-memory",O_RDWR,0777)) < 0) {//创建共享内存 printf("shm_open error:%s\n", strerror(errno)); return -1; } ftruncate(shmid,sizeof(share_data));//定义共享内存区大小 struct stat buf; if(fstat(shmid,&buf)==-1) { printf("buf error:%s\n", strerror(errno)); return -1; } shMemory=(share_data*)mmap(NULL,buf.st_size,PROT_WRITE|PROT_READ,MAP_SHARED,shmid,0);//给父进程附上共享内存 if(shMemory==MAP_FAILED) { printf("shMemory error:%s\n", strerror(errno)); return -1; } while((pid = fork()) == -1);//创建子进程 if(pid == 0){//在子进程中生成斐波那契数列 Fibonacci(shMemory->sequence_size, shMemory->fib_sequence); exit(0); } else if(pid > 0){//父进程中,执行输出 wait(0);//等待子进程完成 for(int i = 0; i < shMemory -> sequence_size; i++){ printf("%d ", shMemory->fib_sequence[i]); } printf("\n"); shm_unlink("shared-memory"); exit(0); } return 0; }
shm_open error:No such file or directory
操作系统实验共享内存posix新建shm_open(“Sharedmemory”,O_RDWR,0)报错 shm_open error:No such file or directory 代码: #include <stdlib.h> #include <stdio.h> #include <string.h> #include <errno.h> #include <unistd.h> #include <sys/stat.h> #include <sys/types.h> #include <sys/file.h> #include <sys/ipc.h> #include <sys/shm.h> #include <sys/mman.h> #include <fcntl.h> #include <wait.h> #define MAX_SEQUENCE 10 typedef struct{ int fib_sequence[MAX_SEQUENCE]; int sequence_size; }share_data; void Fibonacci(int n, int *Fibo){//获得斐波那契数列 if(n == 0){ Fibo[0] = 0; return; } Fibo[0] = 0; Fibo[1] = 1; if(n == 1){ return; } for(int i=2; i< n;i++){ Fibo[i] = Fibo[i-1] + Fibo[i-2]; } } int main(){ int num; int shmid;//共享内存ID share_data *shMemory;//创建结构体指针 pid_t pid; printf("Please enter a positive number(no more than 10): "); while(1){ scanf("%d", &num); if(num < 0) printf("The number less than 0. Please try agian: "); else if(num > 10) printf("The number more than 0. Please try agian: "); else break; } shm_unlink("shared-memory"); if((shmid = shm_open("shared-memory",O_RDWR,0777)) < 0) {//创建共享内存 printf("shm_open error:%s\n", strerror(errno)); return -1; } ftruncate(shmid,sizeof(share_data));//定义共享内存区大小 struct stat buf; if(fstat(shmid,&buf)==-1) { printf("buf error:%s\n", strerror(errno)); return -1; } shMemory=(share_data*)mmap(NULL,buf.st_size,PROT_WRITE|PROT_READ,MAP_SHARED,shmid,0);//给父进程附上共享内存 if(shMemory==MAP_FAILED) { printf("shMemory error:%s\n", strerror(errno)); return -1; } while((pid = fork()) == -1);//创建子进程 if(pid == 0){//在子进程中生成斐波那契数列 Fibonacci(shMemory->sequence_size, shMemory->fib_sequence); exit(0); } else if(pid > 0){//父进程中,执行输出 wait(0);//等待子进程完成 for(int i = 0; i < shMemory -> sequence_size; i++){ printf("%d ", shMemory->fib_sequence[i]); } printf("\n"); shm_unlink("shared-memory"); exit(0); } return 0; } 截图:
The posix_isatty() is available: FAILED
The posix_isatty() is available: FAILED这个怎么解决啊
linux内存充足但java报 不能申请到内存
OS:centos7 [ykt@yhbd-011 hadoop]$ uname -a Linux yhbd-011 3.10.0-327.el7.x86_64 #1 SMP Thu Nov 19 22:10:57 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux [ykt@yhbd-011 hadoop]$ java -version java version "1.7.0_51" Java(TM) SE Runtime Environment (build 1.7.0_51-b13) Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode) 开始运行SPARK任务后(该节点注册200G内存),不能再申请JVM,已运行的JAVA进程也可能报错。如下: [ykt@yhbd-011 hadoop]$ java -version Error occurred during initialization of VM Could not reserve enough space for object heap Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit. [ykt@yhbd-011 hadoop]$ free -g total used free shared buff/cache available Mem: 503 109 1 8 392 385 Swap: 46 0 46 [ykt@yhbd-011 hadoop]$ ulimit -a core file size (blocks, -c) 0 data seg size (kbytes, -d) unlimited scheduling priority (-e) 0 file size (blocks, -f) unlimited pending signals (-i) 2062565 max locked memory (kbytes, -l) 1024 max memory size (kbytes, -m) unlimited open files (-n) 65536 pipe size (512 bytes, -p) 8 POSIX message queues (bytes, -q) 819200 real-time priority (-r) 0 stack size (kbytes, -s) 8192 cpu time (seconds, -t) unlimited max user processes (-u) 60000 virtual memory (kbytes, -v) unlimited file locks (-x) unlimited [ykt@yhbd-010 sbin]$ ulimit -a -H core file size (blocks, -c) unlimited data seg size (kbytes, -d) unlimited scheduling priority (-e) 0 file size (blocks, -f) unlimited pending signals (-i) 2062565 max locked memory (kbytes, -l) 64 max memory size (kbytes, -m) unlimited open files (-n) 65536 pipe size (512 bytes, -p) 8 POSIX message queues (bytes, -q) 819200 real-time priority (-r) 0 stack size (kbytes, -s) unlimited cpu time (seconds, -t) unlimited max user processes (-u) 2062565 virtual memory (kbytes, -v) unlimited file locks (-x) unlimited [ykt@yhbd-011 hadoop]$ jps Error occurred during initialization of VM Could not reserve enough space for object heap Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit. [ykt@yhbd-011 hadoop]$ cat /proc/loadavg 33.95 13.65 7.01 23/2586 158650 [ykt@yhbd-011 hadoop]$ cat /proc/meminfo MemTotal: 528038572 kB MemFree: 1220568 kB MemAvailable: 443702696 kB Buffers: 515228 kB Cached: 443081564 kB SwapCached: 3720 kB Active: 296629196 kB Inactive: 217739768 kB Active(anon): 74540456 kB Inactive(anon): 5041016 kB Active(file): 222088740 kB Inactive(file): 212698752 kB Unevictable: 0 kB Mlocked: 0 kB SwapTotal: 48776184 kB SwapFree: 48747648 kB Dirty: 769960 kB Writeback: 0 kB AnonPages: 70770396 kB Mapped: 2974732 kB Shmem: 8807272 kB Slab: 8223164 kB SReclaimable: 8032496 kB SUnreclaim: 190668 kB KernelStack: 41920 kB PageTables: 416692 kB NFS_Unstable: 0 kB Bounce: 0 kB WritebackTmp: 0 kB CommitLimit: 312795468 kB Committed_AS: 288057748 kB VmallocTotal: 34359738367 kB VmallocUsed: 1110088 kB VmallocChunk: 34090206704 kB HardwareCorrupted: 0 kB AnonHugePages: 64978944 kB HugePages_Total: 0 HugePages_Free: 0 HugePages_Rsvd: 0 HugePages_Surp: 0 Hugepagesize: 2048 kB DirectMap4k: 177184 kB DirectMap2M: 4902912 kB DirectMap1G: 533725184 kB [ykt@yhbd-011 hadoop]$ vmstat 5 5 procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu----- r b swpd free buff cache si so bi bo in cs us sy id wa st 20 0 28536 1205320 511080 451261120 0 0 80 145 0 2 2 0 98 0 0 20 1 28536 1230880 507240 451189664 0 0 436039 24046 48238 18268 46 3 49 2 0 20 0 28536 1233228 507288 451152096 0 0 377784 8043 49985 21706 51 6 41 2 0 11 0 28536 1250476 507220 451097600 0 0 295318 15249 40533 15827 45 3 50 1 0 7 0 28536 1382224 507196 450526816 0 0 29652 16351 31081 12710 10 3 87 0 0
Ubuntu 16.04 编译 Ncurses 6.0 报错
### Ubuntu 16.04 LTS 编译 Ncurses 6.0 报错: ``` In file included from ./curses.priv.h:325:0, from ../ncurses/lib_gen.c:19: _24273.c:843:15: error: expected ‘)’ before ‘int’ ../include/curses.h:1631:56: note: in definition of macro ‘mouse_trafo’ #define mouse_trafo(y,x,to_screen) wmouse_trafo(stdscr,y,x,to_screen) ^ Makefile:962: recipe for target '../objects/lib_gen.o' failed make[1]: *** [../objects/lib_gen.o] Error 1 make[1]: Leaving directory '/home/netsamir/Sofware/Tmux/ncurses-6.0/ncurses' Makefile:113: recipe for target 'all' failed make: *** [all] Error 2 ``` ### 系统配置 ``` $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 16.04 LTS Release: 16.04 Codename: xenial $ gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.4.0-6ubuntu1~16.04.4' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4) $ g++ -v Using built-in specs. COLLECT_GCC=g++ COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.4.0-6ubuntu1~16.04.4' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4) ```
Posix多线程深入学习?
看了《linux程序设计》里面的多线程章节,又看了《linux高级程序设计》里面的多线程的一半,感觉还是不太懂,让我看代码我知道怎么回事,让我自己写我就不会了。想问问几个问题: 1、《unix高级环境编程》里面讲的多线程透彻吗?或者大家可以推荐本好书,主要希望是多点多线程的实例应用。。 2、希望熟悉多线程,不知道可以去做点什么小项目,来加深理解?大家有推荐的小项目么?这个主要是对线程理解不够深入,希望透过项目或者一些优秀的项目代码看看如何运用线程的。一直看书上的理论打上一些书上的例子感觉体会不是很深刻。
linux升级glibc2.11报错
linux升级glibc2.11报错,部分报错信息如下: gcc ../sysdeps/x86_64/dl-trampoline.S -c -I../include -I/usr/glibc/glibc-2.11.1/glibc-build/elf -I/usr/glibc/glibc-2.11.1/glibc-build -I../sysdeps/x86_64/elf -I../nptl/sysdeps/unix/sysv/linux/x86_64 -I../sysdeps/unix/sysv/linux/x86_64 -I../sysdeps/unix/sysv/linux/wordsize-64 -I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread -I../sysdeps/pthread -I../ports/sysdeps/unix/sysv/linux -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../nptl/sysdeps/unix/sysv -I../ports/sysdeps/unix/sysv -I../sysdeps/unix/sysv -I../sysdeps/unix/x86_64 -I../nptl/sysdeps/unix -I../ports/sysdeps/unix -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/x86_64/fpu -I../nptl/sysdeps/x86_64 -I../sysdeps/x86_64 -I../sysdeps/wordsize-64 -I../sysdeps/ieee754/ldbl-96 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -I../nptl -I../ports -I.. -I../libio -I. -D_LIBC_REENTRANT -include ../include/libc-symbols.h -DASSEMBLER -g -Wa,--noexecstack -o /usr/glibc/glibc-2.11.1/glibc-build/elf/dl-trampoline.o -MD -MP -MF /usr/glibc/glibc-2.11.1/glibc-build/elf/dl-trampoline.o.dt -MT /usr/glibc/glibc-2.11.1/glibc-build/elf/dl-trampoline.o ../sysdeps/x86_64/dl-trampoline.h: Assembler messages: ../sysdeps/x86_64/dl-trampoline.h:23: Error: no such instruction: `vmovdqu %ymm0,(192)(%rsp)' ../sysdeps/x86_64/dl-trampoline.h:24: Error: no such instruction: `vmovdqu %ymm1,(192+64)(%rsp)' ../sysdeps/x86_64/dl-trampoline.h:25: Error: no such instruction: `vmovdqu %ymm2,(192+64*2)(%rsp)' ../sysdeps/x86_64/dl-trampoline.h:26: Error: no such instruction: `vmovdqu %ymm3,(192+64*3)(%rsp)' ../sysdeps/x86_64/dl-trampoline.h:27: Error: no such instruction: `vmovdqu %ymm4,(192+64*4)(%rsp)' ../sysdeps/x86_64/dl-trampoline.h:28: Error: no such instruction: `vmovdqu %ymm5,(192+64*5)(%rsp)' ../sysdeps/x86_64/dl-trampoline.h:29: Error: no such instruction: `vmovdqu %ymm6,(192+64*6)(%rsp)' ../sysdeps/x86_64/dl-trampoline.h:30: Error: no such instruction: `vmovdqu %ymm7,(192+64*7)(%rsp)' ../sysdeps/x86_64/dl-trampoline.h:34: Error: no such instruction: `vmovdqa %xmm0,(704)(%rsp)' ../sysdeps/x86_64/dl-trampoline.h:35: Error: no such instruction: `vmovdqa %xmm1,(704+16)(%rsp)' ../sysdeps/x86_64/dl-trampoline.h:36: Error: no such instruction: `vmovdqa %xmm2,(704+16*2)(%rsp)' ../sysdeps/x86_64/dl-trampoline.h:37: Error: no such instruction: `vmovdqa %xmm3,(704+16*3)(%rsp)' ../sysdeps/x86_64/dl-trampoline.h:38: Error: no such instruction: `vmovdqa %xmm4,(704+16*4)(%rsp)' ../sysdeps/x86_64/dl-trampoline.h:39: Error: no such instruction: `vmovdqa %xmm5,(704+16*5)(%rsp)' ../sysdeps/x86_64/dl-trampoline.h:40: Error: no such instruction: `vmovdqa %xmm6,(704+16*6)(%rsp)' ../sysdeps/x86_64/dl-trampoline.h:41: Error: no such instruction: `vmovdqa %xmm7,(704+16*7)(%rsp)' ../sysdeps/x86_64/dl-trampoline.h:70: Error: no such instruction: `vpcmpeqq (704)(%rsp),%xmm0,%xmm8' ../sysdeps/x86_64/dl-trampoline.h:71: Error: no such instruction: `vpmovmskb %xmm8,%esi' ../sysdeps/x86_64/dl-trampoline.h:74: Error: no such instruction: `vmovdqa %xmm0,(192)(%rsp)' ../sysdeps/x86_64/dl-trampoline.h:76: Error: no such instruction: `vmovdqu (192)(%rsp),%ymm0' ../sysdeps/x86_64/dl-trampoline.h:77: Error: no such instruction: `vmovdqa %xmm0,(64)(%rsp)' ../sysdeps/x86_64/dl-trampoline.h:79: Error: no such instruction: `vpcmpeqq (704+16)(%rsp),%xmm1,%xmm8' ../sysdeps/x86_64/dl-trampoline.h:80: Error: no such instruction: `vpmovmskb %xmm8,%esi' ../sysdeps/x86_64/dl-trampoline.h:83: Error: no such instruction: `vmovdqa %xmm1,(192+64)(%rsp)' ../sysdeps/x86_64/dl-trampoline.h:85: Error: no such instruction: `vmovdqu (192+64)(%rsp),%ymm1' ../sysdeps/x86_64/dl-trampoline.h:86: Error: no such instruction: `vmovdqa %xmm1,(64+16)(%rsp)' ../sysdeps/x86_64/dl-trampoline.h:88: Error: no such instruction: `vpcmpeqq (704+16*2)(%rsp),%xmm2,%xmm8' ../sysdeps/x86_64/dl-trampoline.h:89: Error: no such instruction: `vpmovmskb %xmm8,%esi' ../sysdeps/x86_64/dl-trampoline.h:92: Error: no such instruction: `vmovdqa %xmm2,(192+64*2)(%rsp)' ../sysdeps/x86_64/dl-trampoline.h:94: Error: no such instruction: `vmovdqu (192+64*2)(%rsp),%ymm2' ../sysdeps/x86_64/dl-trampoline.h:95: Error: no such instruction: `vmovdqa %xmm2,(64+16*2)(%rsp)' ../sysdeps/x86_64/dl-trampoline.h:97: Error: no such instruction: `vpcmpeqq (704+16*3)(%rsp),%xmm3,%xmm8' ../sysdeps/x86_64/dl-trampoline.h:98: Error: no such instruction: `vpmovmskb %xmm8,%esi' ../sysdeps/x86_64/dl-trampoline.h:101: Error: no such instruction: `vmovdqa %xmm3,(192+64*3)(%rsp)' ../sysdeps/x86_64/dl-trampoline.h:103: Error: no such instruction: `vmovdqu (192+64*3)(%rsp),%ymm3' ../sysdeps/x86_64/dl-trampoline.h:104: Error: no such instruction: `vmovdqa %xmm3,(64+16*3)(%rsp)' ../sysdeps/x86_64/dl-trampoline.h:106: Error: no such instruction: `vpcmpeqq (704+16*4)(%rsp),%xmm4,%xmm8' ../sysdeps/x86_64/dl-trampoline.h:107: Error: no such instruction: `vpmovmskb %xmm8,%esi' ../sysdeps/x86_64/dl-trampoline.h:110: Error: no such instruction: `vmovdqa %xmm4,(192+64*4)(%rsp)' ../sysdeps/x86_64/dl-trampoline.h:112: Error: no such instruction: `vmovdqu (192+64*4)(%rsp),%ymm4' ../sysdeps/x86_64/dl-trampoline.h:113: Error: no such instruction: `vmovdqa %xmm4,(64+16*4)(%rsp)' ../sysdeps/x86_64/dl-trampoline.h:115: Error: no such instruction: `vpcmpeqq (704+16*5)(%rsp),%xmm5,%xmm8' ../sysdeps/x86_64/dl-trampoline.h:116: Error: no such instruction: `vpmovmskb %xmm8,%esi' ../sysdeps/x86_64/dl-trampoline.h:119: Error: no such instruction: `vmovdqa %xmm5,(192+64*5)(%rsp)' ../sysdeps/x86_64/dl-trampoline.h:121: Error: no such instruction: `vmovdqu (192+64*5)(%rsp),%ymm5' ../sysdeps/x86_64/dl-trampoline.h:122: Error: no such instruction: `vmovdqa %xmm5,(64+16*5)(%rsp)' ../sysdeps/x86_64/dl-trampoline.h:124: Error: no such instruction: `vpcmpeqq (704+16*6)(%rsp),%xmm6,%xmm8' ../sysdeps/x86_64/dl-trampoline.h:125: Error: no such instruction: `vpmovmskb %xmm8,%esi' ../sysdeps/x86_64/dl-trampoline.h:128: Error: no such instruction: `vmovdqa %xmm6,(192+64*6)(%rsp)' ../sysdeps/x86_64/dl-trampoline.h:130: Error: no such instruction: `vmovdqu (192+64*6)(%rsp),%ymm6' ../sysdeps/x86_64/dl-trampoline.h:131: Error: no such instruction: `vmovdqa %xmm6,(64+16*6)(%rsp)' ../sysdeps/x86_64/dl-trampoline.h:133: Error: no such instruction: `vpcmpeqq (704+16*7)(%rsp),%xmm7,%xmm8' ../sysdeps/x86_64/dl-trampoline.h:134: Error: no such instruction: `vpmovmskb %xmm8,%esi' ../sysdeps/x86_64/dl-trampoline.h:137: Error: no such instruction: `vmovdqa %xmm7,(192+64*7)(%rsp)' ../sysdeps/x86_64/dl-trampoline.h:139: Error: no such instruction: `vmovdqu (192+64*7)(%rsp),%ymm7' ../sysdeps/x86_64/dl-trampoline.h:140: Error: no such instruction: `vmovdqa %xmm7,(64+16*7)(%rsp)' ../sysdeps/x86_64/dl-trampoline.h:217: Error: no such instruction: `vmovdqu %ymm0,80(%rcx)' ../sysdeps/x86_64/dl-trampoline.h:218: Error: no such instruction: `vmovdqu %ymm1,144(%rcx)' ../sysdeps/x86_64/dl-trampoline.h:222: Error: no such instruction: `vmovdqa %xmm0,(208)(%rcx)' ../sysdeps/x86_64/dl-trampoline.h:223: Error: no such instruction: `vmovdqa %xmm1,(208+16)(%rcx)' ../sysdeps/x86_64/dl-trampoline.h:243: Error: no such instruction: `vpcmpeqq (208)(%rsp),%xmm0,%xmm2' ../sysdeps/x86_64/dl-trampoline.h:244: Error: no such instruction: `vpmovmskb %xmm2,%esi' ../sysdeps/x86_64/dl-trampoline.h:247: Error: no such instruction: `vmovdqu 80(%rsp),%ymm0' ../sysdeps/x86_64/dl-trampoline.h:249: Error: no such instruction: `vpcmpeqq (208+16)(%rsp),%xmm1,%xmm2' ../sysdeps/x86_64/dl-trampoline.h:250: Error: no such instruction: `vpmovmskb %xmm2,%esi' ../sysdeps/x86_64/dl-trampoline.h:253: Error: no such instruction: `vmovdqu 144(%rsp),%ymm1' make[2]: *** [/usr/glibc/glibc-2.11.1/glibc-build/elf/dl-trampoline.o] 错误 1 make[2]: Leaving directory `/usr/glibc/glibc-2.11.1/elf' make[1]: *** [elf/subdir_lib] 错误 2 make[1]: Leaving directory `/usr/glibc/glibc-2.11.1' make: *** [all] 错误 2
Android程序在有些手机上可以运行有些手机打开时就报错
有些人说是手机系统版本的问题,我的版本设置为 <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="19" /> 错误为: 03-27 17:42:49.851: D/jdwp(18655): sendBufferedRequest : len=0x33 03-27 17:42:50.544: D/dalvikvm(18655): threadid=11: interp stack at 0x5145f000 03-27 17:42:50.545: D/dalvikvm(18655): threadid=11: calling run() 03-27 17:42:50.771: V/rzf(18655): file = /data/data/com.jiuguo.app/app_config 03-27 17:42:50.772: W/System.err(18655): java.io.FileNotFoundException: /data/data/com.jiuguo.app/app_config/config: open failed: ENOENT (No such file or directory) 03-27 17:42:50.782: W/System.err(18655): at libcore.io.IoBridge.open(IoBridge.java:448) 03-27 17:42:50.782: W/System.err(18655): at java.io.FileInputStream.<init>(FileInputStream.java:78) 03-27 17:42:50.782: W/System.err(18655): at java.io.FileInputStream.<init>(FileInputStream.java:105) 03-27 17:42:50.782: W/System.err(18655): at com.jiuguo.app.core.AppConfig.get(AppConfig.java:110) 03-27 17:42:50.783: W/System.err(18655): at com.jiuguo.app.core.AppConfig.get(AppConfig.java:95) 03-27 17:42:50.783: W/System.err(18655): at com.jiuguo.app.core.AppContext.onCreate(AppContext.java:164) 03-27 17:42:50.783: W/System.err(18655): at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:969) 03-27 17:42:50.783: W/System.err(18655): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4165) 03-27 17:42:50.783: W/System.err(18655): at android.app.ActivityThread.access$1300(ActivityThread.java:134) 03-27 17:42:50.783: W/System.err(18655): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1285) 03-27 17:42:50.783: W/System.err(18655): at android.os.Handler.dispatchMessage(Handler.java:99) 03-27 17:42:50.783: W/System.err(18655): at android.os.Looper.loop(Looper.java:154) 03-27 17:42:50.783: W/System.err(18655): at android.app.ActivityThread.main(ActivityThread.java:4624) 03-27 17:42:50.783: W/System.err(18655): at java.lang.reflect.Method.invokeNative(Native Method) 03-27 17:42:50.783: W/System.err(18655): at java.lang.reflect.Method.invoke(Method.java:511) 03-27 17:42:50.783: W/System.err(18655): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:965) 03-27 17:42:50.783: W/System.err(18655): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:732) 03-27 17:42:50.783: W/System.err(18655): at dalvik.system.NativeStart.main(Native Method) 03-27 17:42:50.783: W/System.err(18655): Caused by: libcore.io.ErrnoException: open failed: ENOENT (No such file or directory) 03-27 17:42:50.784: W/System.err(18655): at libcore.io.Posix.open(Native Method) 03-27 17:42:50.784: W/System.err(18655): at libcore.io.BlockGuardOs.open(BlockGuardOs.java:110) 03-27 17:42:50.784: W/System.err(18655): at libcore.io.IoBridge.open(IoBridge.java:432) 03-27 17:42:50.784: W/System.err(18655): ... 17 more 03-27 17:42:50.784: V/rzf(18655): file = /data/data/com.jiuguo.app/app_config 03-27 17:42:50.784: W/System.err(18655): java.io.FileNotFoundException: /data/data/com.jiuguo.app/app_config/config: open failed: ENOENT (No such file or directory) 03-27 17:42:50.785: W/System.err(18655): at libcore.io.IoBridge.open(IoBridge.java:448) 03-27 17:42:50.785: W/System.err(18655): at java.io.FileInputStream.<init>(FileInputStream.java:78) 03-27 17:42:50.785: W/System.err(18655): at java.io.FileInputStream.<init>(FileInputStream.java:105)
POSIX定义的竞争范围在linux中是否有用? [
今天看线程的用法.发现线程属性里面有进程调度和系统调度之分. 但是Linux的线程不是轻量级进程吗? 那应该只有系统调度才对?怎么会有进程内调度呢? POSIX定义的PTHREAD_SCOPE_PROCESS和PTHREAD_SCODE_SYSTEM这两个在Linux下效果一样吗? 还是pthread库在Linux上自己实现了进程调度?
centos128m 内存就jdk只能用4m?
我有一个 专用主机 拿来玩的 。内存只有128m 顺利安装完jdk 后,查看jdk 是否安装正确 java -version 然后就是 报错 : [root@duoduo ~]# java -version Error occurred during initialization of VM Could not reserve enough space for object heap Could not create the Java virtual machine. [root@duoduo ~]# 自己想可能是 默认参数 中 设置的内存过大 那样我自己设置个小点的启动参数 java -Xmx8m -version Error occurred during initialization of VM java.lang.OutOfMemoryError: unable to create new native thread at java.lang.Thread.start0(Native Method) at java.lang.Thread.start(Thread.java:640) at java.lang.ref.Finalizer.<clinit>(Finalizer.java:176) 8m 还不行! java -Xmx4m -version java version "1.6.0_24" Java(TM) SE Runtime Environment (build 1.6.0_24-b07) Java HotSpot(TM) Client VM (build 19.1-b02, mixed mode) [root@duoduo ~]# 4m 正常了! 看看 还有多少内存可用 free total used free shared buffers cached Mem: 131072 12652 118420 0 0 0 -/+ buffers/cache: 12652 118420 Swap: 0 可见内存 是没有被其他程序占用的 然后 是不是 系统本身有限制 ulimit -a core file size (blocks, -c) 0 data seg size (kbytes, -d) unlimited scheduling priority (-e) 0 file size (blocks, -f) unlimited pending signals (-i) 71680 max locked memory (kbytes, -l) 32 max memory size (kbytes, -m) unlimited open files (-n) 1024 pipe size (512 bytes, -p) 8 POSIX message queues (bytes, -q) 819200 real-time priority (-r) 0 stack size (kbytes, -s) 10240 cpu time (seconds, -t) unlimited max user processes (-u) 71680 virtual memory (kbytes, -v) unlimited file locks (-x) unlimited max memory size 已经设过不限制 stack size 也设置过1024 和10240 都 一样不行 没有办法了 不知道到底是什么原因 难道128m 就只能用4m! 现在看我 win7 4g 内存的系统 C:\Users\Lenovo>java -Xmx1024m -version java version "1.6.0_24" Java(TM) SE Runtime Environment (build 1.6.0_24-b07) Java HotSpot(TM) Client VM (build 19.1-b02, mixed mode) C:\Users\Lenovo>
如何测试软件包在不同的linux内核版本上的兼容性?软件包基本上都是开源的,光测试POSIX行吗?
客户要求评估用户态软件包在同步内核版本上的兼容性,软件包都是开源的,光测试POSIX可以吗?哪个大神能给些意见?
solaris 内存溢出问题
编译器版本 Reading specs from /usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/specs Configured with: /sfw10/builds/build/sfw10-patch/usr/src/cmd/gcc/gcc-3.4.3/configure --prefix=/usr/sfw --with-as=/usr/ccs/bin/as --without-gnu-as --with-ld=/usr/ccs/bin/ld --without-gnu-ld --enable-languages=c,c++ --enable-shared Thread model: posix gcc version 3.4.3 (csl-sol210-3_4-branch+sol_rpath) test.h: include <iostream> #include <vector> #include <string> #include <unistd.h> #include <dirent.h> #include <sys/stat.h> #include <sys/types.h> #define MAX_DATE_STR_LEN 30 #define SECONDS_PER_DAY 3600 * 24 #define PATH_TOKEN "/" #define FILE_TYPE_DIR 0 #define FILE_TYPE_OTHER 1 #define FILE_TYPE_NORMAL_FILE 2 int const FILETYPECOUNT=6 ; using namespace std; using std::vector; using std::string; struct FileInfoSole{ string Name; /* \316\304\274\376\303\373 */ string Path; /* \316\304\274\376\302\267\276\266 */ string FullPath; /* \316\304\274\376\310\253\302\267\276\266 */ long FileId; /* \316\304\274\376\261\352\312\266 */ int Result; /* \264\246\300\355\275\341\271\373 */ int Reason; /* \322\354\263\243\324\255\322\362 */ string ReasonDesc; /* \322\354\263\243\303\350\312\366 */ int Type; /* \316\304\274\376\300\340\320\315 */ long Size; /* \316\304\274\376\263\244\266\310 */ string CreateTime; /* \264\264\275\250\310\325\306\332 */ string ErrFile; /* \264\355\316\363\316\304\274\376\303\373 */ string TmpErrFile; /* \301\331\312\261\264\355\316\363\316\304\274\376 */ string FileType; }; typedef vector<FileInfoSole> FileListSole; test.cpp: #include "test.h" using namespace std; int GetFileListSole(string dir, FileListSole &fileList,string substr, int flag); string tttypes[FILETYPECOUNT]={"CUST","USER","RED","HT","LT","MH"}; int main(){ string dir="./so/"; FileListSole fileList; string substr; GetFileListSole(dir,fileList,substr,0); return 0; } int GetFileListSole(string dir, FileListSole &fileList,string substr, int flag){ DIR *pDir = NULL; if ( ( pDir = opendir(dir.c_str()) ) == NULL ){ return false; } int retCode = 0; FileInfoSole fileInfoSole; cout<<"link sole"<<endl; cout<<fileInfoSole.Name<<endl; cout<<fileInfoSole.Name<<endl; cout<<fileInfoSole.Name<<endl; struct dirent entry; struct dirent *result; cout<<"4"<<fileInfoSole.Name<<endl; //for( retCode = readdir_r( pDir, &entry, &result ); result != NULL && 0 == retCode; retCode = readdir_r( pDir, &entry, &result ) ) retCode = readdir_r( pDir, &entry, &result ); for(int i=0 ;i< 4;i++) { retCode = readdir_r( pDir, &entry, &result ); cout<<"5"<<fileInfoSole.Name<<endl;//循环第一次时,程序在这个地方蹦会了,出现段错误,郁闷彻底,求大侠帮助 if( strcmp( entry.d_name, "." ) == 0 ||strcmp( entry.d_name, "..") == 0) { continue; } cout<<"testa"<<endl; cout<<fileInfoSole.Name<<endl; cout<<"---"<<endl; fileInfoSole.Name = entry.d_name; // cout<<fileInfoSole.Name<<endl; cout<<"testb"<<endl; if (substr!="") { if (fileInfoSole.Name.find(substr)==string::npos) { //printf("%s\n",fileInfoSole.Name.c_str()); continue; } else { //printf("%s\n",fileInfoSole.Name.c_str()); fileInfoSole.FileType=substr; } }else { fileInfoSole.FileType=string(""); for(int k=0;k<FILETYPECOUNT;k++) { if (fileInfoSole.Name.find(tttypes[k])!=string::npos) { fileInfoSole.FileType=string(tttypes[k]); break; } } } //printf("%s\n",fileInfoSole.Name.c_str()); fileInfoSole.Path = dir; fileInfoSole.FullPath.clear(); fileInfoSole.FullPath.append(dir).append(PATH_TOKEN).append(entry.d_name); //GetFileInfo( fileInfoSole ); if ( FILE_TYPE_NORMAL_FILE == fileInfoSole.Type ){ //fileList.push_back(fileInfoSole); } if ( FILE_TYPE_DIR == fileInfoSole.Type ) { if (flag) { GetFileListSole(fileInfoSole.FullPath,fileList,substr, flag); } } } closedir(pDir); cout<<"over"<<endl; return true; } so文件夹: -bash-3.2$ ls -l so total 0 -rw-r--r-- 1 bill bill 0 Apr 10 18:30 fileiiiiiiiiiiiiii 执行程序: -bash-3.2$ ./a.out link sole 4 5 Segmentation Fault (core dumped) -bash-3.2$ 我就想问程序到cout<<"5"<<fileInfoSole.Name<<endl;个语句是报段错误,我猜测是系统调用导致的内存泄露,于是我在程序 FileInfoSole fileInfoSole;和struct dirent entry; 之间放了一个int solearr[200]; 数组,就不会出现段错误了或者把so文件夹下的文件fileiiiiiiiiiiiiii改成短一点的file的时就不会出现段错误了,请问这是什么原因导致的,有什么更好的办法解决这个问题,越详细细越好,等代大神解决.....
linux下stm32flash下载出错:Unexpected reply from device on command 0x01
我的系统是linux mint18.1 在终端执行:sudo stm32flash /dev/ttyUSB0 报错: stm32flash 0.5 http://stm32flash.sourceforge.net/ Interface serial_posix: 57600 8E1 Failed to read ACK byte Unexpected reply from device on command 0x01 求解!怎么修复啊! 奉上小弟所有c币 感谢各位大牛!
qemu源码编译,make的时候出这些错,如何解决?
gcc -Wall -O2 -g -fno-strict-aliasing -I. -I/home/virtuoso/virtuoso-master/qemu-0.9.1 -MMD -MP -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/home/virtuoso/virtuoso-master/qemu-0.9.1/slirp -DQEMU_IMG -c -o qemu-img-block-raw-posix.o block-raw-posix.c block-raw-posix.c:242: error: SIGUSR2' undeclared here (not in a function) block-raw-posix.c: In functionqemu_aio_init': block-raw-posix.c:264: error: storage size of 'act' isn't known block-raw-posix.c:268: warning: implicit declaration of function sigfillset' block-raw-posix.c:271: warning: implicit declaration of functionsigaction' block-raw-posix.c:264: warning: unused variable act' block-raw-posix.c: In functionqemu_aio_wait_start': block-raw-posix.c:348: warning: implicit declaration of function sigemptyset' block-raw-posix.c:349: warning: implicit declaration of functionsigaddset' block-raw-posix.c:350: warning: implicit declaration of function sigprocmask' block-raw-posix.c:350: error:SIG_BLOCK' undeclared (first use in this function) block-raw-posix.c:350: error: (Each undeclared identifier is reported only once block-raw-posix.c:350: error: for each function it appears in.) block-raw-posix.c: In function qemu_aio_wait': block-raw-posix.c:364: warning: implicit declaration of functionsigwait' block-raw-posix.c: In function qemu_aio_wait_end': block-raw-posix.c:370: error:SIG_SETMASK' undeclared (first use in this function) Makefile:136: recipe for target 'qemu-img-block-raw-posix.o' failed make: *** [qemu-img-block-raw-posix.o] Error 1
pyinstaller打包处理的程序用不了
warn-xxx.txt文件的信息如下,求大佬处理 This file lists modules PyInstaller was not able to find. This does not necessarily mean this module is required for running you program. Python and Python 3rd-party packages include a lot of conditional or optional module. For example the module 'ntpath' only exists on Windows, whereas the module 'posixpath' only exists on Posix systems. Types if import: * top-level: imported at the top-level - look at these first * conditional: imported within an if-statement * delayed: imported from within a function * optional: imported within a try-except-statement IMPORTANT: Do NOT post this list to the issue-tracker. Use it as a basis for yourself tracking down the missing module. Thanks! missing module named pyimod03_importers - imported by PyInstaller.loader.pyimod02_archive (delayed, conditional), c:\program files\python37\lib\site-packages\PyInstaller\loader\rthooks\pyi_rth_pkgres.py (top-level) missing module named 'pkg_resources.extern.pyparsing' - imported by pkg_resources._vendor.packaging.requirements (top-level), pkg_resources._vendor.packaging.markers (top-level) missing module named 'com.sun' - imported by pkg_resources._vendor.appdirs (delayed, conditional, optional) missing module named com - imported by pkg_resources._vendor.appdirs (delayed) missing module named win32api - imported by distutils.msvccompiler (optional), pkg_resources._vendor.appdirs (delayed, conditional, optional) missing module named win32com.shell - imported by pkg_resources._vendor.appdirs (delayed, conditional, optional) missing module named _uuid - imported by uuid (optional) missing module named netbios - imported by uuid (delayed) missing module named win32wnet - imported by uuid (delayed) missing module named __builtin__ - imported by numpy.core.numerictypes (conditional), numpy.core.numeric (conditional), numpy.lib.function_base (conditional), numpy.lib._iotools (conditional), numpy.ma.core (conditional), numpy.distutils.misc_util (delayed, conditional), numpy (conditional), pymysql._compat (conditional), pkg_resources._vendor.pyparsing (conditional), setuptools._vendor.pyparsing (conditional) missing module named ordereddict - imported by pkg_resources._vendor.pyparsing (optional), setuptools._vendor.pyparsing (optional) missing module named StringIO - imported by PyInstaller.lib.modulegraph._compat (conditional), PyInstaller.lib.modulegraph.zipio (conditional), setuptools._vendor.six (conditional), numpy.lib.utils (delayed, conditional), numpy.lib.format (delayed, conditional), numpy.testing._private.utils (conditional), six (conditional), urllib3.packages.six (conditional), requests.compat (conditional), selenium.webdriver.remote.webelement (optional), pkg_resources._vendor.six (conditional) missing module named _scproxy - imported by urllib.request (conditional) missing module named 'macholib.MachO' - imported by PyInstaller.depend.dylib (delayed), PyInstaller.depend.bindepend (delayed), PyInstaller.utils.osx (top-level) missing module named macholib - imported by PyInstaller.depend.dylib (delayed, conditional) missing module named _pkgutil - imported by PyInstaller.lib.modulegraph.modulegraph (delayed, optional) missing module named dis3 - imported by PyInstaller.lib.modulegraph._compat (conditional) missing module named urllib.pathname2url - imported by urllib (conditional), PyInstaller.lib.modulegraph._compat (conditional) missing module named pyimod00_crypto_key - imported by PyInstaller.loader.pyimod02_archive (delayed, optional) missing module named thread - imported by numpy.core.arrayprint (conditional, optional), PyInstaller.loader.pyimod02_archive (conditional) missing module named 'macholib.dyld' - imported by PyInstaller.depend.bindepend (delayed) missing module named 'macholib.mach_o' - imported by PyInstaller.depend.bindepend (delayed) missing module named Crypto - imported by PyInstaller.building.makespec (delayed, conditional, optional) missing module named win32ctypes.core._time - imported by win32ctypes.core (top-level), win32ctypes.pywin32.win32api (top-level) missing module named win32ctypes.core._system_information - imported by win32ctypes.core (top-level), win32ctypes.pywin32.win32api (top-level) missing module named win32ctypes.core._resource - imported by win32ctypes.core (top-level), win32ctypes.pywin32.win32api (top-level) missing module named win32ctypes.core._dll - imported by win32ctypes.core (top-level), win32ctypes.pywin32.win32api (top-level) missing module named win32ctypes.core._common - imported by win32ctypes.core (top-level), win32ctypes.pywin32.win32api (top-level), win32ctypes.pywin32.win32cred (top-level) missing module named win32ctypes.core._authentication - imported by win32ctypes.core (top-level), win32ctypes.pywin32.win32cred (top-level) missing module named cffi - imported by win32ctypes.core (optional) missing module named UserDict - imported by PyInstaller.compat (conditional), pytz.lazy (optional) missing module named multiprocessing.set_start_method - imported by multiprocessing (top-level), multiprocessing.spawn (top-level) missing module named multiprocessing.get_start_method - imported by multiprocessing (top-level), multiprocessing.spawn (top-level) missing module named multiprocessing.TimeoutError - imported by multiprocessing (top-level), multiprocessing.pool (top-level) missing module named multiprocessing.get_context - imported by multiprocessing (top-level), multiprocessing.pool (top-level), multiprocessing.managers (top-level), multiprocessing.sharedctypes (top-level) missing module named multiprocessing.BufferTooShort - imported by multiprocessing (top-level), multiprocessing.connection (top-level) missing module named multiprocessing.AuthenticationError - imported by multiprocessing (top-level), multiprocessing.connection (top-level) missing module named pkg_resources.extern.packaging - imported by pkg_resources.extern (top-level), pkg_resources (top-level) missing module named pkg_resources.extern.appdirs - imported by pkg_resources.extern (top-level), pkg_resources (top-level) missing module named 'pkg_resources.extern.six.moves' - imported by pkg_resources (top-level), pkg_resources._vendor.packaging.requirements (top-level) missing module named pkg_resources.extern.six - imported by pkg_resources.extern (top-level), pkg_resources (top-level) missing module named 'multiprocessing.forking' - imported by c:\program files\python37\lib\site-packages\PyInstaller\loader\rthooks\pyi_rth_multiprocessing.py (optional) missing module named resource - imported by posix (top-level), E:\yxrj\dingzhi\cj\231.py (top-level) missing module named posix - imported by os (conditional, optional), E:\yxrj\dingzhi\cj\231.py (top-level) missing module named _posixsubprocess - imported by subprocess (conditional), multiprocessing.util (delayed), E:\yxrj\dingzhi\cj\231.py (top-level) missing module named readline - imported by cmd (delayed, conditional, optional), code (delayed, conditional, optional), pdb (delayed, optional), E:\yxrj\dingzhi\cj\231.py (top-level) excluded module named _frozen_importlib - imported by importlib (optional), importlib.abc (optional), PyInstaller.loader.pyimod02_archive (delayed, conditional), E:\yxrj\dingzhi\cj\231.py (top-level) missing module named _frozen_importlib_external - imported by importlib._bootstrap (delayed), importlib (optional), importlib.abc (optional), E:\yxrj\dingzhi\cj\231.py (top-level) missing module named _winreg - imported by platform (delayed, optional), numpy.distutils.cpuinfo (delayed, conditional, optional), requests.utils (delayed, conditional, optional), selenium.webdriver.firefox.firefox_binary (delayed, optional), E:\yxrj\dingzhi\cj\231.py (top-level), pkg_resources._vendor.appdirs (delayed) missing module named java - imported by platform (delayed), E:\yxrj\dingzhi\cj\231.py (top-level) missing module named 'java.lang' - imported by platform (delayed, optional), xml.sax._exceptions (conditional), E:\yxrj\dingzhi\cj\231.py (top-level) missing module named vms_lib - imported by platform (delayed, conditional, optional), E:\yxrj\dingzhi\cj\231.py (top-level) missing module named termios - imported by tty (top-level), getpass (optional), E:\yxrj\dingzhi\cj\231.py (top-level) missing module named urllib.getproxies_environment - imported by urllib (conditional), requests.compat (conditional) missing module named urllib.proxy_bypass_environment - imported by urllib (conditional), requests.compat (conditional) missing module named urllib.proxy_bypass - imported by urllib (conditional), requests.compat (conditional) missing module named urllib.getproxies - imported by urllib (conditional), requests.compat (conditional) missing module named urllib.unquote_plus - imported by urllib (conditional), requests.compat (conditional) missing module named urllib.quote_plus - imported by urllib (conditional), requests.compat (conditional) missing module named urllib.unquote - imported by urllib (conditional), requests.compat (conditional) missing module named urllib.urlencode - imported by urllib (optional), urllib3.packages.rfc3986.compat (optional), requests.compat (conditional) missing module named urllib.quote - imported by urllib (optional), urllib3.packages.rfc3986.compat (optional), requests.compat (conditional) missing module named grp - imported by shutil (optional), tarfile (optional), pathlib (delayed), distutils.archive_util (optional), E:\yxrj\dingzhi\cj\231.py (top-level) missing module named 'org.python' - imported by pickle (optional), xml.sax (delayed, conditional), setuptools.sandbox (conditional), E:\yxrj\dingzhi\cj\231.py (top-level) missing module named org - imported by copy (optional), E:\yxrj\dingzhi\cj\231.py (top-level) missing module named pwd - imported by posixpath (delayed, conditional), shutil (optional), tarfile (optional), http.server (delayed, optional), webbrowser (delayed), pathlib (delayed, conditional, optional), distutils.util (delayed, conditional), distutils.archive_util (optional), netrc (delayed, conditional), getpass (delayed), E:\yxrj\dingzhi\cj\231.py (top-level) missing module named urllib2 - imported by numpy.lib._datasource (delayed, conditional), requests.compat (conditional), selenium.webdriver.common.utils (delayed, optional), selenium.webdriver.common.service (delayed, optional) missing module named urlparse - imported by numpy.lib._datasource (delayed, conditional), requests.compat (conditional), selenium.webdriver.remote.remote_connection (optional) runtime module named urllib3.packages.six.moves - imported by http.client (top-level), urllib3.connectionpool (top-level), urllib3.util.response (top-level), 'urllib3.packages.six.moves.urllib' (top-level), urllib3.response (top-level), urllib3.util.queue (top-level) missing module named 'OpenSSL.crypto' - imported by urllib3.contrib.pyopenssl (delayed) missing module named 'cryptography.x509' - imported by urllib3.contrib.pyopenssl (delayed, optional) missing module named 'cryptography.hazmat' - imported by pymysql._auth (optional), urllib3.contrib.pyopenssl (top-level) missing module named cryptography - imported by pymysql._auth (optional), urllib3.contrib.pyopenssl (top-level), requests (optional) missing module named OpenSSL - imported by urllib3.contrib.pyopenssl (top-level) missing module named 'backports.ssl_match_hostname' - imported by setuptools.ssl_support (optional), urllib3.packages.ssl_match_hostname (optional) missing module named brotli - imported by urllib3.util.request (optional), urllib3.response (optional) missing module named "'urllib3.packages.six.moves.urllib'.parse" - imported by urllib3.request (top-level), urllib3.poolmanager (top-level) missing module named Queue - imported by urllib3.util.queue (conditional) missing module named httplib - imported by selenium.webdriver.safari.webdriver (optional), selenium.webdriver.blackberry.webdriver (optional), selenium.webdriver.webkitgtk.webdriver (optional) missing module named cStringIO - imported by selenium.webdriver.firefox.firefox_profile (optional) missing module named copy_reg - imported by numpy.core (conditional), soupsieve.util (conditional), cStringIO (top-level) missing module named 'backports.functools_lru_cache' - imported by soupsieve.util (conditional) missing module named iconv_codec - imported by bs4.dammit (optional) missing module named cchardet - imported by bs4.dammit (optional) missing module named lxml - imported by bs4.builder._lxml (top-level) missing module named 'html5lib.treebuilders' - imported by bs4.builder._html5lib (optional) missing module named 'html5lib.constants' - imported by bs4.builder._html5lib (top-level) missing module named html5lib - imported by bs4.builder._html5lib (top-level) missing module named Cookie - imported by requests.compat (conditional) missing module named cookielib - imported by requests.compat (conditional) missing module named simplejson - imported by pandas.util._print_versions (delayed, conditional, optional), requests.compat (optional) missing module named socks - imported by urllib3.contrib.socks (optional) missing module named _dummy_threading - imported by dummy_threading (optional) missing module named ConfigParser - imported by numpy.distutils.system_info (conditional), numpy.distutils.npy_pkg_config (conditional), pymysql.optionfile (conditional) missing module named scipy - imported by numpy.testing._private.nosetester (delayed, conditional), pandas.core.missing (delayed) missing module named numexpr - imported by pandas.core.computation.expressions (conditional), pandas.core.computation.engines (delayed) missing module named 'scipy.stats' - imported by pandas.plotting._matplotlib.hist (delayed), pandas.plotting._matplotlib.misc (delayed, conditional), pandas.core.nanops (delayed, conditional) missing module named 'scipy.signal' - imported by pandas.core.window (delayed, conditional) missing module named commands - imported by numpy.distutils.cpuinfo (conditional) missing module named setuptools.extern.packaging - imported by setuptools.extern (top-level), setuptools.dist (top-level), setuptools.command.egg_info (top-level) missing module named 'setuptools.extern.six' - imported by setuptools (top-level), setuptools.extension (top-level) missing module named setuptools.extern.six.moves.filterfalse - imported by setuptools.extern.six.moves (top-level), setuptools.dist (top-level), setuptools.msvc (top-level) missing module named setuptools.extern.six.moves.filter - imported by setuptools.extern.six.moves (top-level), setuptools.dist (top-level), setuptools.ssl_support (top-level), setuptools.command.py36compat (top-level) missing module named _manylinux - imported by setuptools.pep425tags (delayed, optional) missing module named wincertstore - imported by setuptools.ssl_support (delayed, optional) missing module named backports - imported by setuptools.ssl_support (optional) missing module named 'setuptools._vendor.six.moves' - imported by 'setuptools._vendor.six.moves' (top-level) missing module named 'setuptools.extern.pyparsing' - imported by setuptools._vendor.packaging.requirements (top-level), setuptools._vendor.packaging.markers (top-level) missing module named 'setuptools.extern.packaging.version' - imported by setuptools.msvc (top-level) missing module named setuptools.extern.six.moves.map - imported by setuptools.extern.six.moves (top-level), setuptools.dist (top-level), setuptools.command.easy_install (top-level), setuptools.sandbox (top-level), setuptools.package_index (top-level), setuptools.ssl_support (top-level), setuptools.command.egg_info (top-level), setuptools.namespaces (top-level) runtime module named setuptools.extern.six.moves - imported by setuptools.dist (top-level), setuptools.py33compat (top-level), setuptools.command.easy_install (top-level), setuptools.sandbox (top-level), setuptools.command.setopt (top-level), setuptools.package_index (top-level), setuptools.ssl_support (top-level), setuptools.command.egg_info (top-level), setuptools.command.py36compat (top-level), setuptools.namespaces (top-level), setuptools.msvc (top-level), 'setuptools._vendor.six.moves' (top-level) missing module named setuptools.extern.six - imported by setuptools.extern (top-level), setuptools.monkey (top-level), setuptools.dist (top-level), setuptools.extern.six.moves (top-level), setuptools.py33compat (top-level), setuptools.config (top-level), setuptools.command.easy_install (top-level), setuptools.sandbox (top-level), setuptools.py27compat (top-level), setuptools.package_index (top-level), setuptools.wheel (top-level), setuptools.command.egg_info (top-level), setuptools.command.sdist (top-level), setuptools.command.bdist_egg (top-level), setuptools.unicode_utils (top-level), setuptools.glob (top-level), setuptools.command.develop (top-level) missing module named 'numpy_distutils.cpuinfo' - imported by numpy.f2py.diagnose (delayed, conditional, optional) missing module named 'numpy_distutils.fcompiler' - imported by numpy.f2py.diagnose (delayed, conditional, optional) missing module named 'numpy_distutils.command' - imported by numpy.f2py.diagnose (delayed, conditional, optional) missing module named numpy_distutils - imported by numpy.f2py.diagnose (delayed, optional) missing module named 'nose.plugins' - imported by numpy.testing._private.noseclasses (top-level), numpy.testing._private.nosetester (delayed) missing module named numpy.core.number - imported by numpy.core (delayed), numpy.testing._private.utils (delayed) missing module named numpy.core.signbit - imported by numpy.core (delayed), numpy.testing._private.utils (delayed) missing module named numpy.core.float64 - imported by numpy.core (delayed), numpy.testing._private.utils (delayed) missing module named numpy.core.integer - imported by numpy.core (top-level), numpy.fft.helper (top-level) missing module named numpy.core.conjugate - imported by numpy.core (top-level), numpy.fft.pocketfft (top-level) missing module named numpy.core.sign - imported by numpy.core (top-level), numpy.linalg.linalg (top-level) missing module named numpy.core.divide - imported by numpy.core (top-level), numpy.linalg.linalg (top-level) missing module named numpy.core.object_ - imported by numpy.core (top-level), numpy.linalg.linalg (top-level) missing module named numpy.core.geterrobj - imported by numpy.core (top-level), numpy.linalg.linalg (top-level) missing module named numpy.core.sqrt - imported by numpy.core (top-level), numpy.linalg.linalg (top-level), numpy.fft.pocketfft (top-level) missing module named numpy.core.add - imported by numpy.core (top-level), numpy.linalg.linalg (top-level) missing module named numpy.core.complexfloating - imported by numpy.core (top-level), numpy.linalg.linalg (top-level) missing module named numpy.core.inexact - imported by numpy.core (top-level), numpy.linalg.linalg (top-level) missing module named numpy.core.cdouble - imported by numpy.core (top-level), numpy.linalg.linalg (top-level) missing module named numpy.core.csingle - imported by numpy.core (top-level), numpy.linalg.linalg (top-level) missing module named numpy.core.double - imported by numpy.core (top-level), numpy.linalg.linalg (top-level) missing module named numpy.core.single - imported by numpy.core (top-level), numpy.linalg.linalg (top-level) missing module named numpy.core.float32 - imported by numpy.core (top-level), numpy.testing._private.utils (top-level) missing module named numpy.core.intp - imported by numpy.core (top-level), numpy.testing._private.utils (top-level), numpy.linalg.linalg (top-level) missing module named numpy.eye - imported by numpy (delayed), numpy.core.numeric (delayed) missing module named dummy_thread - imported by numpy.core.arrayprint (conditional, optional) missing module named 'nose.util' - imported by numpy.testing._private.noseclasses (top-level) missing module named nose - imported by numpy.testing._private.utils (delayed, optional), numpy.testing._private.decorators (delayed), numpy.testing._private.noseclasses (top-level) missing module named win32pdh - imported by numpy.testing._private.utils (delayed, conditional) missing module named __svn_version__ - imported by numpy.f2py.__version__ (optional) missing module named numarray - imported by numpy.distutils.system_info (delayed, conditional, optional) missing module named Numeric - imported by numpy.distutils.system_info (delayed, conditional, optional) missing module named win32con - imported by distutils.msvccompiler (optional) missing module named _curses - imported by curses (top-level), curses.has_key (top-level) missing module named pytest - imported by numpy._pytesttester (delayed), pandas.util._tester (delayed, optional), pandas.util.testing (delayed, conditional, optional) missing module named future_builtins - imported by numpy.lib.npyio (conditional) missing module named cpickle - imported by numpy.compat.py3k (conditional) missing module named pickle5 - imported by numpy.compat.py3k (conditional, optional) missing module named numpy.histogramdd - imported by numpy (delayed), numpy.lib.twodim_base (delayed) missing module named numpy.lib.i0 - imported by numpy.lib (top-level), numpy.dual (top-level) missing module named 'scipy.sparse' - imported by pandas.core.sparse.scipy_sparse (delayed), pandas.core.arrays.sparse (delayed), pandas.core.dtypes.common (delayed, conditional, optional) missing module named botocore - imported by pandas.io.s3 (delayed) missing module named 'pyarrow.parquet' - imported by pandas.io.parquet (delayed) missing module named pyarrow - imported by pandas.io.feather_format (delayed) missing module named contextmanager - imported by dateutil.tz.tz (optional) runtime module named six.moves - imported by dateutil.tz.tz (top-level), dateutil.tz.win (top-level), dateutil.rrule (top-level) missing module named six.moves.range - imported by six.moves (top-level), dateutil.rrule (top-level) missing module named dateutil.tz.tzfile - imported by dateutil.tz (top-level), dateutil.zoneinfo (top-level) missing module named dateutil.tz.tzlocal - imported by dateutil.tz (top-level), dateutil.rrule (top-level) missing module named dateutil.tz.tzutc - imported by dateutil.tz (top-level), dateutil.rrule (top-level) missing module named PyQt4 - imported by pandas.io.clipboard.clipboards (delayed, optional), pandas.io.clipboard (delayed, conditional, optional) missing module named PyQt5 - imported by pandas.io.clipboard.clipboards (delayed, optional), pandas.io.clipboard (delayed, conditional, optional) missing module named qtpy - imported by pandas.io.clipboard.clipboards (delayed, optional), pandas.io.clipboard (delayed, conditional, optional) missing module named 'sqlalchemy.types' - imported by pandas.io.sql (delayed, conditional) missing module named 'sqlalchemy.schema' - imported by pandas.io.sql (delayed, conditional) missing module named sqlalchemy - imported by pandas.io.sql (delayed, conditional, optional) missing module named tables - imported by pandas.io.pytables (delayed, conditional) missing module named xlwt - imported by pandas.io.excel._xlwt (delayed) missing module named xlsxwriter - imported by pandas.io.excel._xlsxwriter (delayed) missing module named 'openpyxl.styles' - imported by pandas.io.excel._openpyxl (delayed) missing module named 'openpyxl.style' - imported by pandas.io.excel._openpyxl (delayed) missing module named openpyxl - imported by pandas.io.excel._openpyxl (delayed, conditional) missing module named xlrd - imported by pandas.io.excel._xlrd (delayed) missing module named 'odf.namespaces' - imported by pandas.io.excel._odfreader (delayed) missing module named 'odf.table' - imported by pandas.io.excel._odfreader (delayed) missing module named 'odf.opendocument' - imported by pandas.io.excel._odfreader (delayed) missing module named odf - imported by pandas.io.excel._odfreader (delayed) missing module named matplotlib - imported by pandas.plotting._matplotlib.boxplot (top-level), pandas.plotting._matplotlib.compat (delayed, optional), pandas.plotting._matplotlib.timeseries (delayed), pandas.plotting._matplotlib.core (delayed), pandas.io.formats.style (optional) missing module named 'matplotlib.pyplot' - imported by pandas.plotting._matplotlib.style (delayed), pandas.plotting._matplotlib.tools (delayed), pandas.plotting._matplotlib.core (delayed), pandas.plotting._matplotlib.timeseries (delayed), pandas.plotting._matplotlib.boxplot (delayed), pandas.plotting._matplotlib.hist (delayed), pandas.plotting._matplotlib.misc (delayed), pandas.plotting._matplotlib (delayed), pandas.io.formats.style (optional), pandas.util.testing (delayed) missing module named numpy.array - imported by numpy (top-level), numpy.ma.core (top-level), numpy.ma.extras (top-level), numpy.ma.mrecords (top-level), numpy.ctypeslib (top-level) missing module named numpy.recarray - imported by numpy (top-level), numpy.ma.mrecords (top-level) missing module named numpy.ndarray - imported by numpy (top-level), numpy.ma.core (top-level), numpy.ma.extras (top-level), numpy.ma.mrecords (top-level), numpy.ctypeslib (top-level), pandas.compat.numpy.function (top-level) missing module named numpy.dtype - imported by numpy (top-level), numpy.ma.mrecords (top-level), numpy.ctypeslib (top-level) missing module named numpy.bool_ - imported by numpy (top-level), numpy.ma.core (top-level), numpy.ma.mrecords (top-level) missing module named 'matplotlib.ticker' - imported by pandas.plotting._matplotlib.converter (top-level), pandas.plotting._matplotlib.tools (top-level), pandas.plotting._matplotlib.core (delayed) missing module named 'matplotlib.table' - imported by pandas.plotting._matplotlib.tools (top-level) missing module named 'matplotlib.colors' - imported by pandas.plotting._matplotlib.style (top-level) missing module named 'matplotlib.cm' - imported by pandas.plotting._matplotlib.style (top-level) missing module named 'matplotlib.patches' - imported by pandas.plotting._matplotlib.misc (top-level) missing module named 'matplotlib.lines' - imported by pandas.plotting._matplotlib.misc (top-level) missing module named 'matplotlib.axes' - imported by pandas.plotting._matplotlib.core (delayed) missing module named 'matplotlib.units' - imported by pandas.plotting._matplotlib.converter (top-level) missing module named 'matplotlib.transforms' - imported by pandas.plotting._matplotlib.converter (top-level) missing module named 'matplotlib.dates' - imported by pandas.plotting._matplotlib.converter (top-level) missing module named numpy.expand_dims - imported by numpy (top-level), numpy.ma.core (top-level) missing module named numpy.iscomplexobj - imported by numpy (top-level), numpy.ma.core (top-level) missing module named numpy.amin - imported by numpy (top-level), numpy.ma.core (top-level) missing module named numpy.amax - imported by numpy (top-level), numpy.ma.core (top-level) missing module named 'IPython.core' - imported by pandas.io.formats.printing (delayed, conditional) missing module named IPython - imported by pandas.io.formats.printing (delayed) missing module named s3fs - imported by pandas.io.common (delayed, optional) missing module named sets - imported by pytz.tzinfo (optional) missing module named numpy.random.randn - imported by numpy.random (top-level), pandas.util.testing (top-level) missing module named numpy.random.rand - imported by numpy.random (top-level), pandas.util.testing (top-level) missing module named hypothesis - imported by pandas.util._tester (delayed, optional) missing module named 'lxml.etree' - imported by pandas.io.html (delayed) missing module named 'lxml.html' - imported by pandas.io.html (delayed)
关于linux下pthread.h中的pthread_attr_t共同体
以前用线程都是设置NULL,今天翻了翻pthread_attr_t的文章,发现都是按照POSIX的标准说这是结构体。查看了/usr/include/bits/pthreadtypes.h,实际上定义是个共同体,并且没有那么多成员。这是Linux还没有实现POSIX标准的地方吗?
qemu源码编译,make的时候出这些错,怎么解决呢?
gcc -Wall -O2 -g -fno-strict-aliasing -I. -I/home/virtuoso/virtuoso-master/qemu-0.9.1 -MMD -MP -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/home/virtuoso/virtuoso-master/qemu-0.9.1/slirp -DQEMU_IMG -c -o qemu-img-block-raw-posix.o block-raw-posix.c block-raw-posix.c:242: error: `SIGUSR2' undeclared here (not in a function) block-raw-posix.c: In function `qemu_aio_init': block-raw-posix.c:264: error: storage size of 'act' isn't known block-raw-posix.c:268: warning: implicit declaration of function `sigfillset' block-raw-posix.c:271: warning: implicit declaration of function `sigaction' block-raw-posix.c:264: warning: unused variable `act' block-raw-posix.c: In function `qemu_aio_wait_start': block-raw-posix.c:348: warning: implicit declaration of function `sigemptyset' block-raw-posix.c:349: warning: implicit declaration of function `sigaddset' block-raw-posix.c:350: warning: implicit declaration of function `sigprocmask' block-raw-posix.c:350: error: `SIG_BLOCK' undeclared (first use in this function) block-raw-posix.c:350: error: (Each undeclared identifier is reported only once block-raw-posix.c:350: error: for each function it appears in.) block-raw-posix.c: In function `qemu_aio_wait': block-raw-posix.c:364: warning: implicit declaration of function `sigwait' block-raw-posix.c: In function `qemu_aio_wait_end': block-raw-posix.c:370: error: `SIG_SETMASK' undeclared (first use in this function) Makefile:136: recipe for target 'qemu-img-block-raw-posix.o' failed make: *** [qemu-img-block-raw-posix.o] Error 1
使用ubuntu编译 ffmpeg 时报错:ERROR: x265 not found using pkg-config
config.log 如下:不知道怎么弄了,望大牛指导 usr/local/include/x264.h:40:4: warning: #warning You must include stdint.h or inttypes.h before x264.h [-Wcpp] # warning You must include stdint.h or inttypes.h before x264.h ^~~~~~~ /tmp/ffconf.hRcv9aEw/test.c:3:2: error: #error "unsatisfied condition: X264_MPEG2" #error "unsatisfied condition: X264_MPEG2" ^~~~~ require_pkg_config libx265 x265 x265.h x265_api_get check_pkg_config libx265 x265 x265.h x265_api_get test_pkg_config libx265 x265 x265.h x265_api_get pkg-config --exists --print-errors x265 check_func_headers x265.h x265_api_get -I/usr/local/include -L/usr/local/lib -lx265 test_ld cc -I/usr/local/include -L/usr/local/lib -lx265 test_cc -I/usr/local/include -L/usr/local/lib BEGIN /tmp/ffconf.hRcv9aEw/test.c 1 #include <x265.h> 2 #include <stdint.h> 3 long check_x265_api_get(void) { return (long) x265_api_get; } 4 int main(void) { int ret = 0; 5 ret |= ((intptr_t)check_x265_api_get) & 0xFFFF; 6 return ret; } END /tmp/ffconf.hRcv9aEw/test.c gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DPIC -std=c11 -fPIC -pthread -I/usr/local/include -I/usr/local/include -L/usr/local/lib -c -o /tmp/ffconf.hRcv9aEw/test.o /tmp/ffconf.hRcv9aEw/test.c In file included from /tmp/ffconf.hRcv9aEw/test.c:1:0: /usr/local/include/x265.h:673:5: error: unknown type name 'x265_param' x265_param* zoneParam; ^~~~~~~~~~ ERROR: x265 not found using pkg-config
在中国程序员是青春饭吗?
今年,我也32了 ,为了不给大家误导,咨询了猎头、圈内好友,以及年过35岁的几位老程序员……舍了老脸去揭人家伤疤……希望能给大家以帮助,记得帮我点赞哦。 目录: 你以为的人生 一次又一次的伤害 猎头界的真相 如何应对互联网行业的「中年危机」 一、你以为的人生 刚入行时,拿着傲人的工资,想着好好干,以为我们的人生是这样的: 等真到了那一天,你会发现,你的人生很可能是这样的: ...
《MySQL 性能优化》之理解 MySQL 体系结构
本文介绍 MySQL 的体系结构,包括物理结构、逻辑结构以及插件式存储引擎。
程序员请照顾好自己,周末病魔差点一套带走我。
程序员在一个周末的时间,得了重病,差点当场去世,还好及时挽救回来了。
Python+OpenCV实时图像处理
目录 1、导入库文件 2、设计GUI 3、调用摄像头 4、实时图像处理 4.1、阈值二值化 4.2、边缘检测 4.3、轮廓检测 4.4、高斯滤波 4.5、色彩转换 4.6、调节对比度 5、退出系统 初学OpenCV图像处理的小伙伴肯定对什么高斯函数、滤波处理、阈值二值化等特性非常头疼,这里给各位分享一个小项目,可通过摄像头实时动态查看各类图像处理的特点,也可对各位调参、测试...
2020年一线城市程序员工资大调查
人才需求 一线城市共发布岗位38115个,招聘120827人。 其中 beijing 22805 guangzhou 25081 shanghai 39614 shenzhen 33327 工资分布 2020年中国一线城市程序员的平均工资为16285元,工资中位数为14583元,其中95%的人的工资位于5000到20000元之间。 和往年数据比较: yea...
为什么猝死的都是程序员,基本上不见产品经理猝死呢?
相信大家时不时听到程序员猝死的消息,但是基本上听不到产品经理猝死的消息,这是为什么呢? 我们先百度搜一下:程序员猝死,出现将近700多万条搜索结果: 搜索一下:产品经理猝死,只有400万条的搜索结果,从搜索结果数量上来看,程序员猝死的搜索结果就比产品经理猝死的搜索结果高了一倍,而且从下图可以看到,首页里面的五条搜索结果,其实只有两条才是符合条件。 所以程序员猝死的概率真的比产品经理大,并不是错...
害怕面试被问HashMap?这一篇就搞定了!
声明:本文以jdk1.8为主! 搞定HashMap 作为一个Java从业者,面试的时候肯定会被问到过HashMap,因为对于HashMap来说,可以说是Java集合中的精髓了,如果你觉得自己对它掌握的还不够好,我想今天这篇文章会非常适合你,至少,看了今天这篇文章,以后不怕面试被问HashMap了 其实在我学习HashMap的过程中,我个人觉得HashMap还是挺复杂的,如果真的想把它搞得明明白...
毕业5年,我问遍了身边的大佬,总结了他们的学习方法
我问了身边10个大佬,总结了他们的学习方法,原来成功都是有迹可循的。
python爬取百部电影数据,我分析出了一个残酷的真相
2019年就这么匆匆过去了,就在前几天国家电影局发布了2019年中国电影市场数据,数据显示去年总票房为642.66亿元,同比增长5.4%;国产电影总票房411.75亿元,同比增长8.65%,市场占比 64.07%;城市院线观影人次17.27亿,同比增长0.64%。 看上去似乎是一片大好对不对?不过作为一名严谨求实的数据分析师,我从官方数据中看出了一点端倪:国产票房增幅都已经高达8.65%了,为什...
推荐10个堪称神器的学习网站
每天都会收到很多读者的私信,问我:“二哥,有什么推荐的学习网站吗?最近很浮躁,手头的一些网站都看烦了,想看看二哥这里有什么新鲜货。” 今天一早做了个恶梦,梦到被老板辞退了。虽然说在我们公司,只有我辞退老板的份,没有老板辞退我这一说,但是还是被吓得 4 点多都起来了。(主要是因为我掌握着公司所有的核心源码,哈哈哈) 既然 4 点多起来,就得好好利用起来。于是我就挑选了 10 个堪称神器的学习网站,推...
这些软件太强了,Windows必装!尤其程序员!
Windows可谓是大多数人的生产力工具,集娱乐办公于一体,虽然在程序员这个群体中都说苹果是信仰,但是大部分不都是从Windows过来的,而且现在依然有很多的程序员用Windows。 所以,今天我就把我私藏的Windows必装的软件分享给大家,如果有一个你没有用过甚至没有听过,那你就赚了????,这可都是提升你幸福感的高效率生产力工具哦! 走起!???? NO、1 ScreenToGif 屏幕,摄像头和白板...
阿里面试,面试官没想到一个ArrayList,我都能跟他扯半小时
我是真的没想到,面试官会这样问我ArrayList。
曾经优秀的人,怎么就突然不优秀了。
职场上有很多辛酸事,很多合伙人出局的故事,很多技术骨干被裁员的故事。说来模板都类似,曾经是名校毕业,曾经是优秀员工,曾经被领导表扬,曾经业绩突出,然而突然有一天,因为种种原因,被裁员了,...
C语言荣获2019年度最佳编程语言
关注、星标公众号,不错过精彩内容作者:黄工公众号:strongerHuang近日,TIOBE官方发布了2020年1月编程语言排行榜单。我在前面给过一篇文章《2019年11月C语言接近Ja...
大学四年因为知道了这32个网站,我成了别人眼中的大神!
依稀记得,毕业那天,我们导员发给我毕业证的时候对我说“你可是咱们系的风云人物啊”,哎呀,别提当时多开心啦????,嗯,我们导员是所有导员中最帅的一个,真的???? 不过,导员说的是实话,很多人都叫我大神的,为啥,因为我知道这32个网站啊,你说强不强????,这次是绝对的干货,看好啦,走起来! PS:每个网站都是学计算机混互联网必须知道的,真的牛杯,我就不过多介绍了,大家自行探索,觉得没用的,尽管留言吐槽吧???? 社...
良心推荐,我珍藏的一些Chrome插件
上次搬家的时候,发了一个朋友圈,附带的照片中不小心暴露了自己的 Chrome 浏览器插件之多,于是就有小伙伴评论说分享一下我觉得还不错的浏览器插件。 我下面就把我日常工作和学习中经常用到的一些 Chrome 浏览器插件分享给大家,随便一个都能提高你的“生活品质”和工作效率。 Markdown Here Markdown Here 可以让你更愉快的写邮件,由于支持 Markdown 直接转电子邮...
看完这篇HTTP,跟面试官扯皮就没问题了
我是一名程序员,我的主要编程语言是 Java,我更是一名 Web 开发人员,所以我必须要了解 HTTP,所以本篇文章就来带你从 HTTP 入门到进阶,看完让你有一种恍然大悟、醍醐灌顶的感觉。 最初在有网络之前,我们的电脑都是单机的,单机系统是孤立的,我还记得 05 年前那会儿家里有个电脑,想打电脑游戏还得两个人在一个电脑上玩儿,及其不方便。我就想为什么家里人不让上网,我的同学 xxx 家里有网,每...
史上最全的IDEA快捷键总结
现在Idea成了主流开发工具,这篇博客对其使用的快捷键做了总结,希望对大家的开发工作有所帮助。
阿里程序员写了一个新手都写不出的低级bug,被骂惨了。
这种新手都不会范的错,居然被一个工作好几年的小伙子写出来,差点被当场开除了。
谁是华为扫地僧?
是的,华为也有扫地僧!2020年2月11-12日,“养在深闺人不知”的华为2012实验室扫地僧们,将在华为开发者大会2020(Cloud)上,和大家见面。到时,你可以和扫地僧们,吃一个洋...
AI 没让人类失业,搞 AI 的人先失业了
最近和几个 AI 领域的大佬闲聊 根据他们讲的消息和段子 改编出下面这个故事 如有雷同 都是巧合 1. 老王创业失败,被限制高消费 “这里写我跑路的消息实在太夸张了。” 王葱葱哼笑一下,把消息分享给群里。 阿杰也看了消息,笑了笑。在座几位也都笑了。 王葱葱是个有名的人物,21岁那年以全额奖学金进入 KMU 攻读人工智能博士,累计发表论文 40 余篇,个人技术博客更是成为深度学习领域内风向标。 ...
2020年,冯唐49岁:我给20、30岁IT职场年轻人的建议
点击“技术领导力”关注∆每天早上8:30推送 作者|Mr.K 编辑| Emma 来源|技术领导力(ID:jishulingdaoli) 前天的推文《冯唐:职场人35岁以后,方法论比经验重要》,收到了不少读者的反馈,觉得挺受启发。其实,冯唐写了不少关于职场方面的文章,都挺不错的。可惜大家只记住了“春风十里不如你”、“如何避免成为油腻腻的中年人”等不那么正经的文章。 本文整理了冯...
一份王者荣耀的英雄数据报告
咪哥杂谈本篇阅读时间约为 6 分钟。1前言前一阵写了关于王者的一些系列文章,从数据的获取到数据清洗,数据落地,都是为了本篇的铺垫。今天来实现一下,看看不同维度得到的结论。2环境准备本次实...
作为一名大学生,如何在B站上快乐的学习?
B站是个宝,谁用谁知道???? 作为一名大学生,你必须掌握的一项能力就是自学能力,很多看起来很牛X的人,你可以了解下,人家私底下一定是花大量的时间自学的,你可能会说,我也想学习啊,可是嘞,该学习啥嘞,不怕告诉你,互联网时代,最不缺的就是学习资源,最宝贵的是啥? 你可能会说是时间,不,不是时间,而是你的注意力,懂了吧! 那么,你说学习资源多,我咋不知道,那今天我就告诉你一个你必须知道的学习的地方,人称...
那些年,我们信了课本里的那些鬼话
教材永远都是有错误的,从小学到大学,我们不断的学习了很多错误知识。 斑羚飞渡 在我们学习的很多小学课文里,有很多是错误文章,或者说是假课文。像《斑羚飞渡》: 随着镰刀头羊的那声吼叫,整个斑羚群迅速分成两拨,老年斑羚为一拨,年轻斑羚为一拨。 就在这时,我看见,从那拨老斑羚里走出一只公斑羚来。公斑羚朝那拨年轻斑羚示意性地咩了一声,一只半大的斑羚应声走了出来。一老一少走到伤心崖,后退了几步,突...
一个程序在计算机中是如何运行的?超级干货!!!
强烈声明:本文很干,请自备茶水!???? 开门见山,咱不说废话! 你有没有想过,你写的程序,是如何在计算机中运行的吗?比如我们搞Java的,肯定写过这段代码 public class HelloWorld { public static void main(String[] args) { System.out.println("Hello World!"); } ...
【蘑菇街技术部年会】程序员与女神共舞,鼻血再次没止住。(文末内推)
蘑菇街技术部的年会,别开生面,一样全是美女。
那个在阿里养猪的工程师,5年了……
简介: 在阿里,走过1825天,没有趴下,依旧斗志满满,被称为“五年陈”。他们会被授予一枚戒指,过程就叫做“授戒仪式”。今天,咱们听听阿里的那些“五年陈”们的故事。 下一个五年,猪圈见! 我就是那个在养猪场里敲代码的工程师,一年多前我和20位工程师去了四川的猪场,出发前总架构师慷慨激昂的说:同学们,中国的养猪产业将因为我们而改变。但到了猪场,发现根本不是那么回事:要个WIFI,没有;...
为什么程序猿都不愿意去外包?
分享外包的组织架构,盈利模式,亲身经历,以及根据一些外包朋友的反馈,写了这篇文章 ,希望对正在找工作的老铁有所帮助
Java校招入职华为,半年后我跑路了
何来 我,一个双非本科弟弟,有幸在 19 届的秋招中得到前东家华为(以下简称 hw)的赏识,当时秋招签订就业协议,说是入了某 java bg,之后一系列组织架构调整原因等等让人无法理解的神操作,最终毕业前夕,被通知调往其他 bg 做嵌入式开发(纯 C 语言)。 由于已至于校招末尾,之前拿到的其他 offer 又无法再收回,一时感到无力回天,只得默默接受。 毕业后,直接入职开始了嵌入式苦旅,由于从未...
立即提问