FischerJo / FAME

GNU General Public License v3.0
14 stars 4 forks source link

Minimum GCC required? #4

Open IsmailM opened 5 years ago

IsmailM commented 5 years ago

With GCC 4.8.5, I get the following error:

g++ -std=c++14 -ggdb -Wshadow -Wall -pedantic -pipe -O3 -fopenmp -march=native -I ./sparsehash/include/usr/local/include/ -I ./hopscotch-map/include/tsl/ -c gzstream/gzstream.C
g++: error: unrecognized command line option ‘-std=c++14’
make: *** [gzstream.o] Error 1

(Attempting to use -std=c++1y instead causes a different issue (in ReadQueue.cpp))

So what is the min GCC version required?

FischerJo commented 5 years ago

Your attempt with -std=c++1y was the right thing to do. Could you please post the followup error that you got in ReadQueue.cpp?

IsmailM commented 5 years ago
ReadQueue.cpp:2571:38:   required from here
./hopscotch-map/include/tsl/hopscotch_hash.h:1729:20: warning: declaration of ‘bucket_count’ shadows a member of 'this' [-Wshadow]
make: *** [ReadQueue.o] Error 1
The command '/bin/sh -c make' returned a non-zero code: 2

You can reproduce with the following Dockerfile:

FROM gcc:4.8.5
COPY . /usr/src/fame
WORKDIR /usr/src/fame
RUN sed -i 's/-std=c++14/-std=c++1y/g' Makefile
RUN make
CMD ["./FAME"]

Building the above in the FAME source directory (docker build -t fame .) will show the above error...

On a side note, I was able to use the above Dockerfile with gcc:latest to create a static binary (using -static -static-libgcc -static-libstdc++), which I was then able to use in the host machine (would be nice if these were available in Github releases)

FischerJo commented 4 years ago

Okay what wonders me the most is that it crashes when there is a warning. Could it be that the compiler is set with a flag that enforces warnings to be treated as errors, e.g. -Werror? Or is there any earlier error message that was not posted here?

I will soon include docker builds into the release of FAME, including your suggestion of a static binary. Thanks for trying it out!