cocodataset / cocoapi

COCO API - Dataset @ http://cocodataset.org/
Other
6.07k stars 3.75k forks source link

maskApi.o: file not recognized: file format not recognized #359

Open shekarneo opened 4 years ago

shekarneo commented 4 years ago

I have tried 'make' inside the cocoapi/PythonAPI got the below error, i have installed cython and gcc in arch linux

gcc -pthread -B /home/neo/anaconda3/envs/YOLO/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/neo/anaconda3/envs/YOLO/lib/python3.7/site-packages/numpy/core/include -I../common -I/home/neo/anaconda3/envs/YOLO/include/python3.7m -c pycocotools/_mask.c -o build/temp.linux-x86_64-3.7/pycocotools/_mask.o -Wno-cpp -Wno-unused-function -std=c99 gcc -pthread -shared -B /home/neo/anaconda3/envs/YOLO/compiler_compat -L/home/neo/anaconda3/envs/YOLO/lib -Wl,-rpath=/home/neo/anaconda3/envs/YOLO/lib -Wl,--no-as-needed -Wl,--sysroot=/ build/temp.linux-x86_64-3.7/../common/maskApi.o build/temp.linux-x86_64-3.7/pycocotools/_mask.o -o build/lib.linux-x86_64-3.7/pycocotools/_mask.cpython-37m-x86_64-linux-gnu.so /home/neo/anaconda3/envs/YOLO/compiler_compat/ld: build/temp.linux-x86_64-3.7/../common/maskApi.o: unable to initialize decompress status for section .debug_info /home/neo/anaconda3/envs/YOLO/compiler_compat/ld: build/temp.linux-x86_64-3.7/../common/maskApi.o: unable to initialize decompress status for section .debug_info /home/neo/anaconda3/envs/YOLO/compiler_compat/ld: build/temp.linux-x86_64-3.7/../common/maskApi.o: unable to initialize decompress status for section .debug_info /home/neo/anaconda3/envs/YOLO/compiler_compat/ld: build/temp.linux-x86_64-3.7/../common/maskApi.o: unable to initialize decompress status for section .debug_info **build/temp.linux-x86_64-3.7/../common/maskApi.o: file not recognized: file format not recognized** collect2: error: ld returned 1 exit status error: command 'gcc' failed with exit status 1 make: *** [Makefile:3: all] Error 1

FiReTiTi commented 4 years ago

Same error for me. Any success fixing it?

Aaron20127 commented 4 years ago

same problem

zhouningyin commented 4 years ago

There is a same problem that has benn solved.https://github.com/cocodataset/cocoapi/issues/351 You can install pycocotools in your base environment. pip install --target=your environment path//lib//python//site-packages pycocotools

Livebewater commented 3 years ago

I also meet this problem,then I change python version to 3.6 and solve it

macimovic commented 1 year ago

Same issue here