x86_64-linux-gnu-gcc: error: pycocotools/_mask.c: No such file or directory

本文介绍如何解决在安装Cython和pycocotools过程中遇到的问题,具体步骤包括使用pip安装Cython和pycocotools,并且针对makefile文件中python版本不匹配的问题提供了解决方案。

以下方法可以试试


pip install Cython
pip install pycocotools
将makefile文件中的python换成python3

touch /home/tplink/code/be900v2/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/iot-security-1.0.0/.prepared_ff3f946004efdf04c05e4df40af18419 (cd /home/tplink/code/be900v2/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/iot-security-1.0.0/./; if [ -x ./configure ]; then /usr/bin/find /home/tplink/code/be900v2/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/iot-security-1.0.0/ -name config.guess | xargs -r chmod u+w; /usr/bin/find /home/tplink/code/be900v2/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/iot-security-1.0.0/ -name config.guess | xargs -r -n1 cp /home/tplink/code/be900v2/Iplatform/openwrt/scripts/config.guess; /usr/bin/find /home/tplink/code/be900v2/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/iot-security-1.0.0/ -name config.sub | xargs -r chmod u+w; /usr/bin/find /home/tplink/code/be900v2/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/iot-security-1.0.0/ -name config.sub | xargs -r -n1 cp /home/tplink/code/be900v2/Iplatform/openwrt/scripts/config.sub; AR=arm-buildroot-linux-gnueabi-ar AS="arm-buildroot-linux-gnueabi-gcc -c " LD=arm-buildroot-linux-gnueabi-ld NM=arm-buildroot-linux-gnueabi-nm CC="arm-buildroot-linux-gnueabi-gcc" GCC="arm-buildroot-linux-gnueabi-gcc" CXX="arm-buildroot-linux-gnueabi-g++" RANLIB=arm-buildroot-linux-gnueabi-ranlib STRIP=arm-buildroot-linux-gnueabi-strip OBJCOPY=arm-buildroot-linux-gnueabi-objcopy OBJDUMP=arm-buildroot-linux-gnueabi-objdump SIZE=arm-buildroot-linux-gnueabi-size CFLAGS=" " CXXFLAGS=" " CPPFLAGS="-I/home/tplink/code/be900v2/Iplatform/openwrt/staging_dir/target-arm-openwrt-linux-uclibc-be900v2/usr/include -I/home/tplink/code/be900v2/Iplatform/openwrt/staging_dir/target-arm-openwrt-linux-uclibc-be900v2/include -I/home/tplink/code/be900v2/Iplatform/openwrt/staging_dir/usr-be900v2/include -I/home/tplink/code/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 " LDFLAGS="-L/home/tplink/code/be900v2/Iplatform/openwrt/staging_dir/target-arm-openwrt-linux-uclibc-be900v2/usr/lib -L/home/tplink/code/be900v2/Iplatform/openwrt/staging_dir/target-arm-openwrt-linux-uclibc-be900v2/lib -Wl,-rpath-link,/home/tplink/code/be900v2/Iplatform/openwrt/staging_dir/target-arm-openwrt-linux-uclibc-be900v2/usr/lib -L/home/tplink/code/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/tplink/code/be900v2/Iplatform/openwrt/../../bcm504L04/toolchain/opt/toolchains/crosstools-arm_softfp-gcc-10.3-linux-4.19-glibc-2.32-binutils-2.36.1/lib " ./configure --target=arm-openwrt-linux-uclibc --host=arm-openwrt-linux-uclibc --build=x86_64-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 ; fi; ) rm -f /home/tplink/code/be900v2/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/iot-security-1.0.0/.configured_* touch /home/tplink/code/be900v2/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/iot-security-1.0.0/.configured_ make -C "/home/tplink/code/be900v2/Iplatform/openwrt/../../bcm504L04/bcm963xx_5.04L.04/kernel/linux-4.19" M="/home/tplink/code/be900v2/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/iot-security-1.0.0" modules make[4]: Entering directory '/home/tplink/code/be900v2/bcm504L04/bcm963xx_5.04L.04/kernel/linux-4.19' $KERNELPATH is [/opt/prpl_xgb834v/sdk_an7581_an7551/prplos/prplos-v3.0.1/build_dir/target-aarch64_cortex-a53_musl/linux-airoha_an7581/linux-5.4.55] $PRIVATE_MODULES_PATH is [] CC [M] /home/tplink/code/be900v2/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/iot-security-1.0.0/iot_main.o In file included from ././include/linux/compiler_types.h:64:0, from <command-line>:0: ./include/linux/compiler-gcc.h:20:3: error: #error Sorry, your version of GCC is too old - please use 5.1 or newer. # error Sorry, your version of GCC is too old - please use 5.1 or newer. ^ In file included from ./arch/x86/include/asm/pgtable_types.h:348:0, from ./arch/x86/include/asm/processor.h:19, from ./arch/x86/include/asm/cpufeature.h:5, from ./arch/x86/include/asm/thread_info.h:53, from ./include/linux/thread_info.h:39, from ./arch/x86/include/asm/preempt.h:7, from ./include/linux/preempt.h:81, from ./include/linux/spinlock.h:51, from ./include/linux/seqlock.h:36, from ./include/linux/time.h:6, from ./include/linux/stat.h:19, from ./include/linux/module.h:10, from /home/tplink/code/be900v2/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/iot-security-1.0.0/iot_main.c:20: ./include/asm-generic/pgtable-nopud.h:21:0: warning: "PUD_SHIFT" redefined #define PUD_SHIFT P4D_SHIFT ^ In file included from ./arch/x86/include/asm/pgtable_types.h:251:0, from ./arch/x86/include/asm/processor.h:19, from ./arch/x86/include/asm/cpufeature.h:5, from ./arch/x86/include/asm/thread_info.h:53, from ./include/linux/thread_info.h:39, from ./arch/x86/include/asm/preempt.h:7, from ./include/linux/preempt.h:81, from ./include/linux/spinlock.h:51, from ./include/linux/seqlock.h:36, from ./include/linux/time.h:6, from ./include/linux/stat.h:19, from ./include/linux/module.h:10, from /home/tplink/code/be900v2/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/iot-security-1.0.0/iot_main.c:20: ./arch/x86/include/asm/pgtable_64_types.h:83:0: note: this is the location of the previous definition #define PUD_SHIFT 30 ^ In file included from ./arch/x86/include/asm/pgtable_types.h:348:0, from ./arch/x86/include/asm/processor.h:19, from ./arch/x86/include/asm/cpufeature.h:5, from ./arch/x86/include/asm/thread_info.h:53, from ./include/linux/thread_info.h:39, from ./arch/x86/include/asm/preempt.h:7, from ./include/linux/preempt.h:81, from ./include/linux/spinlock.h:51, from ./include/linux/seqlock.h:36, from ./include/linux/time.h:6, from ./include/linux/stat.h:19, from ./include/linux/module.h:10, from /home/tplink/code/be900v2/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/iot-security-1.0.0/iot_main.c:20: ./include/asm-generic/pgtable-nopud.h:22:0: warning: "PTRS_PER_PUD" redefined #define PTRS_PER_PUD 1 ^ In file included from ./arch/x86/include/asm/pgtable_types.h:251:0, from ./arch/x86/include/asm/processor.h:19, from ./arch/x86/include/asm/cpufeature.h:5, from ./arch/x86/include/asm/thread_info.h:53, from ./include/linux/thread_info.h:39, from ./arch/x86/include/asm/preempt.h:7, from ./include/linux/preempt.h:81, from ./include/linux/spinlock.h:51, from ./include/linux/seqlock.h:36, from ./include/linux/time.h:6, from ./include/linux/stat.h:19, from ./include/linux/module.h:10, from /home/tplink/code/be900v2/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/iot-security-1.0.0/iot_main.c:20: ./arch/x86/include/asm/pgtable_64_types.h:84:0: note: this is the location of the previous definition #define PTRS_PER_PUD 512 ^ In file included from ./arch/x86/include/asm/pgtable_types.h:348:0, from ./arch/x86/include/asm/processor.h:19, from ./arch/x86/include/asm/cpufeature.h:5, from ./arch/x86/include/asm/thread_info.h:53, from ./include/linux/thread_info.h:39, from ./arch/x86/include/asm/preempt.h:7, from ./include/linux/preempt.h:81, from ./include/linux/spinlock.h:51, from ./include/linux/seqlock.h:36, from ./include/linux/time.h:6, from ./include/linux/stat.h:19, from ./include/linux/module.h:10, from /home/tplink/code/be900v2/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/iot-security-1.0.0/iot_main.c:20: ./include/asm-generic/pgtable-nopud.h:23:0: warning: "PUD_SIZE" redefined #define PUD_SIZE (1UL << PUD_SHIFT) ^ In file included from ./arch/x86/include/asm/pgtable_types.h:251:0, from ./arch/x86/include/asm/processor.h:19, from ./arch/x86/include/asm/cpufeature.h:5, from ./arch/x86/include/asm/thread_info.h:53, from ./include/linux/thread_info.h:39, from ./arch/x86/include/asm/preempt.h:7, from ./include/linux/preempt.h:81, from ./include/linux/spinlock.h:51, from ./include/linux/seqlock.h:36, from ./include/linux/time.h:6, from ./include/linux/stat.h:19, from ./include/linux/module.h:10, from /home/tplink/code/be900v2/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/iot-security-1.0.0/iot_main.c:20: ./arch/x86/include/asm/pgtable_64_types.h:100:0: note: this is the location of the previous definition #define PUD_SIZE (_AC(1, UL) << PUD_SHIFT) ^ In file included from ./arch/x86/include/asm/pgtable_types.h:348:0, from ./arch/x86/include/asm/processor.h:19, from ./arch/x86/include/asm/cpufeature.h:5, from ./arch/x86/include/asm/thread_info.h:53, from ./include/linux/thread_info.h:39, from ./arch/x86/include/asm/preempt.h:7, from ./include/linux/preempt.h:81, from ./include/linux/spinlock.h:51, from ./include/linux/seqlock.h:36, from ./include/linux/time.h:6, from ./include/linux/stat.h:19, from ./include/linux/module.h:10, from /home/tplink/code/be900v2/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/iot-security-1.0.0/iot_main.c:20: ./include/asm-generic/pgtable-nopud.h:24:0: warning: "PUD_MASK" redefined #define PUD_MASK (~(PUD_SIZE-1)) ^ In file included from ./arch/x86/include/asm/pgtable_types.h:251:0, from ./arch/x86/include/asm/processor.h:19, from ./arch/x86/include/asm/cpufeature.h:5, from ./arch/x86/include/asm/thread_info.h:53, from ./include/linux/thread_info.h:39, from ./arch/x86/include/asm/preempt.h:7, from ./include/linux/preempt.h:81, from ./include/linux/spinlock.h:51, from ./include/linux/seqlock.h:36, from ./include/linux/time.h:6, from ./include/linux/stat.h:19, from ./include/linux/module.h:10, from /home/tplink/code/be900v2/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/iot-security-1.0.0/iot_main.c:20: ./arch/x86/include/asm/pgtable_64_types.h:101:0: note: this is the location of the previous definition #define PUD_MASK (~(PUD_SIZE - 1)) ^ In file included from ./arch/x86/include/asm/cpufeature.h:5:0, from ./arch/x86/include/asm/thread_info.h:53, from ./include/linux/thread_info.h:39, from ./arch/x86/include/asm/preempt.h:7, from ./include/linux/preempt.h:81, from ./include/linux/spinlock.h:51, from ./include/linux/seqlock.h:36, from ./include/linux/time.h:6, from ./include/linux/stat.h:19, from ./include/linux/module.h:10, from /home/tplink/code/be900v2/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/iot-security-1.0.0/iot_main.c:20: ./arch/x86/include/asm/processor.h: In function 'load_cr3': ./arch/x86/include/asm/processor.h:251:2: error: implicit declaration of function '__sme_pa' [-Werror=implicit-function-declaration] write_cr3(__sme_pa(pgdir)); ^ In file included from ./include/linux/cache.h:6:0, from ./include/linux/printk.h:9, from ./include/linux/kernel.h:14, from ./include/linux/list.h:9, from ./include/linux/module.h:9, from /home/tplink/code/be900v2/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/iot-security-1.0.0/iot_main.c:20: ./arch/x86/include/asm/processor.h: At top level: ./arch/x86/include/asm/cache.h:8:25: error: 'CONFIG_X86_L1_CACHE_SHIFT' undeclared here (not in a function) #define L1_CACHE_SHIFT (CONFIG_X86_L1_CACHE_SHIFT) ^ ./arch/x86/include/asm/cache.h:9:30: note: in expansion of macro 'L1_CACHE_SHIFT' #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) ^ ./include/linux/cache.h:13:25: note: in expansion of macro 'L1_CACHE_BYTES' #define SMP_CACHE_BYTES L1_CACHE_BYTES ^ ./include/linux/cache.h:35:58: note: in expansion of macro 'SMP_CACHE_BYTES' #define ____cacheline_aligned __attribute__((__aligned__(SMP_CACHE_BYTES))) ^ ./include/linux/percpu-defs.h:149:2: note: in expansion of macro '____cacheline_aligned' ____cacheline_aligned ^ ./arch/x86/include/asm/processor.h:433:1: note: in expansion of macro 'DECLARE_PER_CPU_ALIGNED' DECLARE_PER_CPU_ALIGNED(struct stack_canary, stack_canary); ^ In file included from ./include/asm-generic/percpu.h:7:0, from ./arch/x86/include/asm/percpu.h:544, from ./arch/x86/include/asm/preempt.h:6, from ./include/linux/preempt.h:81, from ./include/linux/spinlock.h:51, from ./include/linux/seqlock.h:36, from ./include/linux/time.h:6, from ./include/linux/stat.h:19, from ./include/linux/module.h:10, from /home/tplink/code/be900v2/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/iot-security-1.0.0/iot_main.c:20: ./arch/x86/include/asm/processor.h:433:32: error: requested alignment is not an integer constant DECLARE_PER_CPU_ALIGNED(struct stack_canary, stack_canary); ^ ./include/linux/percpu-defs.h:101:38: note: in definition of macro 'DECLARE_PER_CPU_SECTION' extern __PCPU_ATTRS(sec) __typeof__(type) name ^ ./arch/x86/include/asm/processor.h:433:1: note: in expansion of macro 'DECLARE_PER_CPU_ALIGNED' DECLARE_PER_CPU_ALIGNED(struct stack_canary, stack_canary); ^ In file included from ./arch/x86/include/asm/preempt.h:7:0, from ./include/linux/preempt.h:81, from ./include/linux/spinlock.h:51, from ./include/linux/seqlock.h:36, from ./include/linux/time.h:6, from ./include/linux/stat.h:19, from ./include/linux/module.h:10, from /home/tplink/code/be900v2/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/iot-security-1.0.0/iot_main.c:20: ./include/linux/thread_info.h:116:19: error: redefinition of 'arch_within_stack_frames' static inline int arch_within_stack_frames(const void * const stack, ^ In file included from ./include/linux/thread_info.h:39:0, from ./arch/x86/include/asm/preempt.h:7, from ./include/linux/preempt.h:81, from ./include/linux/spinlock.h:51, from ./include/linux/seqlock.h:36, from ./include/linux/time.h:6, from ./include/linux/stat.h:19, from ./include/linux/module.h:10, from /home/tplink/code/be900v2/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/iot-security-1.0.0/iot_main.c:20: ./arch/x86/include/asm/thread_info.h:186:19: note: previous definition of 'arch_within_stack_frames' was here static inline int arch_within_stack_frames(const void * const stack, ^ In file included from ./include/linux/cache.h:6:0, from ./include/linux/printk.h:9, from ./include/linux/kernel.h:14, from ./include/linux/list.h:9, from ./include/linux/module.h:9, from /home/tplink/code/be900v2/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/iot-security-1.0.0/iot_main.c:20: ./arch/x86/include/asm/cache.h:13:31: error: 'CONFIG_X86_INTERNODE_CACHE_SHIFT' undeclared here (not in a function) #define INTERNODE_CACHE_SHIFT CONFIG_X86_INTERNODE_CACHE_SHIFT ^ ./include/linux/cache.h:72:35: note: in expansion of macro 'INTERNODE_CACHE_SHIFT' __attribute__((__aligned__(1 << (INTERNODE_CACHE_SHIFT)))) ^ ./include/linux/mmzone.h:112:3: note: in expansion of macro '____cacheline_internodealigned_in_smp' } ____cacheline_internodealigned_in_smp; ^ In file included from ./include/linux/gfp.h:6:0, from ./include/linux/umh.h:4, from ./include/linux/kmod.h:22, from ./include/linux/module.h:13, from /home/tplink/code/be900v2/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/iot-security-1.0.0/iot_main.c:20: ./include/linux/mmzone.h:112:1: error: requested alignment is not an integer constant } ____cacheline_internodealigned_in_smp; ^ ./include/linux/mmzone.h:509:1: error: requested alignment is not an integer constant } ____cacheline_internodealigned_in_smp; ^ In file included from ./include/linux/ktime.h:25:0, from ./include/linux/timer.h:6, from ./include/linux/workqueue.h:9, from ./include/linux/srcu.h:34, from ./include/linux/notifier.h:16, from ./include/linux/memory_hotplug.h:7, from ./include/linux/mmzone.h:749, from ./include/linux/gfp.h:6, from ./include/linux/umh.h:4, from ./include/linux/kmod.h:22, from ./include/linux/module.h:13, from /home/tplink/code/be900v2/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/iot-security-1.0.0/iot_main.c:20: ./include/linux/jiffies.h:80:1: error: requested alignment is not an integer constant extern u64 __cacheline_aligned_in_smp jiffies_64; ^ ./include/linux/jiffies.h:81:1: error: requested alignment is not an integer constant extern unsigned long volatile __cacheline_aligned_in_smp __jiffy_arch_data jiffies; ^ In file included from ./include/linux/srcu.h:62:0, from ./include/linux/notifier.h:16, from ./include/linux/memory_hotplug.h:7, from ./include/linux/mmzone.h:749, from ./include/linux/gfp.h:6, from ./include/linux/umh.h:4, from ./include/linux/kmod.h:22, from ./include/linux/module.h:13, from /home/tplink/code/be900v2/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/iot-security-1.0.0/iot_main.c:20: ./include/linux/srcutree.h:43:2: error: requested alignment is not an integer constant spinlock_t __private lock ____cacheline_internodealigned_in_smp; ^ In file included from ./include/linux/elf.h:5:0, from ./include/linux/module.h:15, from /home/tplink/code/be900v2/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/iot-security-1.0.0/iot_main.c:20: ./arch/x86/include/asm/elf.h: In function 'elf_common_init': ./arch/x86/include/asm/elf.h:180:3: error: 'struct thread_struct' has no member named 'fsbase' t->fsbase = t->gsbase = 0; ^ ./arch/x86/include/asm/elf.h:180:15: error: 'struct thread_struct' has no member named 'gsbase' t->fsbase = t->gsbase = 0; ^ ./arch/x86/include/asm/elf.h: At top level: ./arch/x86/include/asm/elf.h:381:1: error: requested alignment is not an integer constant } ____cacheline_aligned; ^ In file included from ./include/linux/module.h:26:0, from /home/tplink/code/be900v2/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/iot-security-1.0.0/iot_main.c:20: ./arch/x86/include/asm/module.h:67:2: error: #error unknown processor family #error unknown processor family ^ In file included from /home/tplink/code/be900v2/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/iot-security-1.0.0/iot_main.c:20:0: ./include/linux/module.h:486:1: error: requested alignment is not an integer constant } ____cacheline_aligned __randomize_layout; ^ In file included from ./include/linux/fs.h:8:0, from ./include/linux/net.h:27, from ./include/linux/skbuff.h:29, from ./include/linux/netfilter.h:6, from /home/tplink/code/be900v2/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/iot-security-1.0.0/iot_main.c:23: ./include/linux/dcache.h:149:1: error: requested alignment is not an integer constant } ____cacheline_aligned; ^ In file included from ./include/linux/fs.h:13:0, from ./include/linux/net.h:27, from ./include/linux/skbuff.h:29, from ./include/linux/netfilter.h:6, from /home/tplink/code/be900v2/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/iot-security-1.0.0/iot_main.c:23: ./include/linux/list_lru.h:50:1: error: requested alignment is not an integer constant } ____cacheline_aligned_in_smp; ^ In file included from ./include/uapi/linux/sem.h:5:0, from ./include/linux/sem.h:5, from ./include/linux/sched.h:15, from ./include/linux/ioprio.h:5, from ./include/linux/fs.h:39, from ./include/linux/net.h:27, from ./include/linux/skbuff.h:29, from ./include/linux/netfilter.h:6, from /home/tplink/code/be900v2/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/iot-security-1.0.0/iot_main.c:23: ./include/linux/ipc.h:29:1: error: requested alignment is not an integer constant } ____cacheline_aligned_in_smp __randomize_layout; ^ In file included from ./include/linux/sched.h:20:0, from ./include/linux/ioprio.h:5, from ./include/linux/fs.h:39, from ./include/linux/net.h:27, from ./include/linux/skbuff.h:29, from ./include/linux/netfilter.h:6, from /home/tplink/code/be900v2/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/iot-security-1.0.0/iot_main.c:23: ./include/linux/hrtimer.h:159:1: error: requested alignment is not an integer constant } __hrtimer_clock_base_align; ^ ./include/linux/hrtimer.h:221:1: error: requested alignment is not an integer constant } ____cacheline_aligned; ^ In file included from ./include/linux/ioprio.h:5:0, from ./include/linux/fs.h:39, from ./include/linux/net.h:27, from ./include/linux/skbuff.h:29, from ./include/linux/netfilter.h:6, from /home/tplink/code/be900v2/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/iot-security-1.0.0/iot_main.c:23: ./include/linux/sched.h:408:1: error: requested alignment is not an integer constant } ____cacheline_aligned; ^ In file included from ./include/linux/net.h:27:0, from ./include/linux/skbuff.h:29, from ./include/linux/netfilter.h:6, from /home/tplink/code/be900v2/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/iot-security-1.0.0/iot_main.c:23: ./include/linux/fs.h:1468:9: error: requested alignment is not an integer constant struct list_lru s_dentry_lru ____cacheline_aligned_in_smp; ^ ./include/linux/fs.h:1469:9: error: requested alignment is not an integer constant struct list_lru s_inode_lru ____cacheline_aligned_in_smp; ^ ./include/linux/fs.h:1481:2: error: requested alignment is not an integer constant spinlock_t s_inode_list_lock ____cacheline_aligned_in_smp; ^ ./include/linux/fs.h:1819:1: error: requested alignment is not an integer constant } ____cacheline_aligned; ^ In file included from ./include/linux/skbuff.h:29:0, from ./include/linux/netfilter.h:6, from /home/tplink/code/be900v2/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/iot-security-1.0.0/iot_main.c:23: ./include/linux/net.h:104:1: error: requested alignment is not an integer constant } ____cacheline_aligned_in_smp; ^ In file included from ./arch/x86/include/asm/realmode.h:15:0, from ./arch/x86/include/asm/acpi.h:33, from ./arch/x86/include/asm/fixmap.h:29, from ./arch/x86/include/asm/pgtable_64.h:17, from ./arch/x86/include/asm/pgtable.h:698, from ./include/linux/memremap.h:7, from ./include/linux/mm.h:27, from ./include/linux/scatterlist.h:8, from ./include/linux/dma-mapping.h:11, from ./include/linux/skbuff.h:34, from ./include/linux/netfilter.h:6, from /home/tplink/code/be900v2/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/iot-security-1.0.0/iot_main.c:23: ./arch/x86/include/asm/io.h:44:31: fatal error: asm/early_ioremap.h: No such file or directory #include <asm/early_ioremap.h> ^ cc1: some warnings being treated as errors compilation terminated. scripts/Makefile.build:303: recipe for target '/home/tplink/code/be900v2/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/iot-security-1.0.0/iot_main.o' failed make[5]: *** [/home/tplink/code/be900v2/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/iot-security-1.0.0/iot_main.o] Error 1 Makefile:1586: recipe for target '_module_/home/tplink/code/be900v2/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/iot-security-1.0.0' failed make[4]: *** [_module_/home/tplink/code/be900v2/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/iot-security-1.0.0] Error 2 make[4]: Leaving directory '/home/tplink/code/be900v2/bcm504L04/bcm963xx_5.04L.04/kernel/linux-4.19' Makefile:31: recipe for target '/home/tplink/code/be900v2/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/iot-security-1.0.0/.built' failed make[3]: *** [/home/tplink/code/be900v2/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/iot-security-1.0.0/.built] Error 2 make[3]: Leaving directory '/home/tplink/code/be900v2/prplos/platform/feeds/private/iot-security' package/Makefile:133: recipe for target 'package/feeds/feed_private/iot-security/compile' failed make[2]: *** [package/feeds/feed_private/iot-security/compile] Error 2 make[2]: Leaving directory '/home/tplink/code/be900v2/Iplatform/openwrt' /home/tplink/code/be900v2/Iplatform/openwrt/include/toplevel.mk:184: recipe for target 'package/iot-security/compile' failed make[1]: *** [package/iot-security/compile] Error 2 make[1]: Leaving directory '/home/tplink/code/be900v2/Iplatform/openwrt' Makefile:232: recipe for target 'iplatform_package/iot-security/compile' failed make: *** [iplatform_package/iot-security/compile] Error 2
最新发布
10-31
### 解决 x86_64-linux-gnu-gcc 编译时 maskApi.c 文件缺失问题 在编译过程中遇到 `maskApi.c` 文件缺失的问题,通常是因为相关依赖项未正确安装或路径配置不完整。以下是解决方法: #### 安装必要的依赖项 确保系统中已安装 `cocoapi` 或其等效库,该库包含 `maskApi.c` 文件。运行以下命令以安装 `cocoapi`: ```bash git clone https://github.com/cocodataset/cocoapi.git cd cocoapi/PythonAPI make ``` 此过程会生成所需的 `maskApi.c` 文件并完成编译[^1]。 #### 检查编译路径 如果 `maskApi.c` 文件已存在但编译仍失败,请检查编译器是否能够找到该文件。可以通过设置环境变量或修改编译命令来指定路径。例如: ```bash export C_INCLUDE_PATH=/path/to/cocoapi/PythonAPI:$C_INCLUDE_PATH export LIBRARY_PATH=/path/to/cocoapi/PythonAPI:$LIBRARY_PATH ``` #### 重新编译项目 完成上述步骤后,重新运行编译命令以确保所有依赖项均已正确加载: ```bash x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/path/to/cocoapi/PythonAPI -o build/temp.linux-x86_64-2.7/pcl/_pcl_180.o pcl/_pcl_180.cpp ``` --- ### 解决 ImportError: No module named skimage.io 在 Python 中的问题 如果在运行 Python 脚本时遇到 `ImportError: No module named skimage.io`,这表明 `scikit-image` 库未正确安装或缺少必要依赖项。以下是解决方案: #### 使用 pip 安装 scikit-image 确保使用正确的 `pip` 版本(针对 Python 2.7)安装 `scikit-image`: ```bash sudo pip install scikit-image ``` 如果系统中有多个 Python 版本,请明确指定 Python 2.7 的 `pip`: ```bash sudo pip2.7 install scikit-image ``` #### 安装依赖项 `scikit-image` 的正常运行需要多个依赖项,包括 `numpy`、`matplotlib` 和 `cython`。运行以下命令以安装这些依赖项: ```bash sudo apt-get update sudo apt-get install python-numpy python-matplotlib python-cython ``` #### 验证安装 完成安装后,验证 `scikit-image` 是否正常工作。运行以下 Python 脚本: ```python import skimage.io print("scikit-image version:", skimage.__version__) ``` 如果脚本成功输出版本号,则表示安装成功[^2]。 #### 常见问题排查 1. 如果仍然出现 `ImportError`,请检查是否存在命名冲突的模块(如自定义的 `skimage.py` 文件)。 2. 如果系统中已安装 `scikit-image` 但问题依旧存在,请尝试卸载并重新安装: ```bash sudo pip uninstall scikit-image sudo pip install scikit-image ``` --- ### 其他可能的依赖问题及解决方案 #### libpng16.so.16 缺失 如果在运行过程中出现 `ImportError: libpng16.so.16: cannot open shared object file: No such file or directory`,请安装 `libpng16-16`: ```bash sudo apt-get install libpng16-16 ``` #### 动态库问题(CXXABI_1.3.11) 如果出现类似 `ImportError: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version 'CXXABI_1.3.11' not found` 的错误,请参考以下链接中的解决方案: [https://blog.csdn.net/bitcarmanlee/article/details/90242598](https://blog.csdn.net/bitcarmanlee/article/details/90242598) --- ###
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值