google / visqol

Perceptual Quality Estimator for speech and audio
Apache License 2.0
641 stars 118 forks source link

Building fails under Ubuntu 18.04 with GCC 7 #86

Open huangshincheng opened 1 year ago

huangshincheng commented 1 year ago

Hi thanks for the repo. I am compiling visqol in Ubuntu 18.04 with GCC 7.5.0

bazel build :visqol -c opt

I get the filesystem include error. image

Then I found similar issue in here https://stackoverflow.com/questions/73974753/undefined-reference-to-stdfilesystem-using-bazel-build Now I am trying to use gcc 8 to compile visqol based on the link above.

Just a quick question. Is there a gcc version that you recommend to use ? gcc 8 or above?

mchinen commented 1 year ago

Sorry for the delay. I hope that worked for you, let me know if not.

To answer your question, we don't have a specific gcc version we recommend (some people build with clang). The main requirement is that it supports C++17 (the filesystem module became available in that standard).

AndreyBocharnikov commented 1 year ago

@huangshincheng Did you manage to fix it? I am having the same error and the installation of gcc-8 did not really help, since gcc --version still returned 7.5.0, and I even removed gcc-7.5, but it didn't help either, so I am completely stucked now, would really appreciate your help.

AndreyBocharnikov commented 1 year ago

To anyone who also struggles with this, do the following apt-get install gcc-8 g++-8 to install gcc-8 update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 8
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 8 to make gcc-8 the default one, then run bazel clean --expunge and bazel build :visqol -c opt