usnistgov / trec_eval

Evaluation software used in the Text Retrieval Conference
232 stars 49 forks source link

Compiled with gcc-7 results in a segmentation fault #14

Closed MaicoTimmerman closed 5 years ago

MaicoTimmerman commented 6 years ago

GCC --version:

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /build/gcc/src/gcc/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared --enable-threads=posix --enable-libmpx --with-system-zlib --with-isl --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch --disable-libssp --enable-gnu-unique-object --enable-linker-build-id --enable-lto --enable-plugin --enable-install-libiberty --with-linker-hash-style=gnu --enable-gnu-indirect-function --enable-multilib --disable-werror --enable-checking=release --enable-default-pie --enable-default-ssp
Thread model: posix
gcc version 7.2.1 20180116 (GCC) 

Running trec_eval ./trec_eval -m all_trec -q test.qrel test.runwith the following files: test.qrel:

Q1 0 DOC1 1
Q1 0 DOC3 0
Q2 0 DOC3 1

test.run:

Q1 Q0 DOC1 1 1.0 example
Q1 Q0 DOC3 2 0.75 example
Q1 Q0 DOC2 3 0.5 example
Q2 Q0 DOC2 1 1.25 example
Q2 Q0 DOC3 2 0.0 example
Q2 Q0 DOC1 3 -0.1 example
tupini07 commented 6 years ago

I was having the same issue with GCC 7 , after compiling I tried running make quicktest and it would give me a segmentation fault. I changed the compiler in line 12 of the Makefile to clang and now it works fine, even when running make longtest. Maybe you could give it a try?

I'm currently using clang 6.0.0

This is how the top part of my Makefile looks like now..

image

akashdeep-singh commented 5 years ago

Any updates on this? I believe #16 solves the problem.

isoboroff commented 5 years ago

Yes, this should be fixed by #16