emcrisostomo / fswatch

A cross-platform file change monitor with multiple backends: Apple OS X File System Events, *BSD kqueue, Solaris/Illumos File Events Notification, Linux inotify, Microsoft Windows and a stat()-based backend.
https://emcrisostomo.github.io/fswatch/
GNU General Public License v3.0
5.04k stars 328 forks source link

Autotools configure step fails #246

Closed zeule closed 2 years ago

zeule commented 4 years ago

Environment is AMD64 Gentoo Linux with GCC 10.1 (and CLang is also installled). The configure step fails.

I run configure as follows:

./configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --disable-dependency-tracking --disable-silent-rules --docdir=/usr/share/doc/fswatch-9999 --htmldir=/usr/share/doc/fswatch-9999/html --with-sysroot=/ --libdir=/usr/lib64 --disable-docker --enable-nls --disable-static

For unknown reason the configure script jumps from GCC to CLang in the middle of the process:

checking how to run the C++ preprocessor... x86_64-pc-linux-gnu-clang++ -E

and after that basically every test fails.

If I use the ./autogen.sh file and then simply ./configure, the configuration step passes but then in the Makefile GCC is replaced with CLang:

CC = gcc
CCDEPMODE = depmode=gcc3
CFLAGS = -g -O2
CPP = gcc -E
CPPFLAGS = 
CXX = clang++ -std=gnu++11
CXXCPP = clang++ -E -std=gnu++11

config.log

hedgepigdaniel commented 2 years ago

I had this issue, and solved it by removing some flags from CXXFLAGS which were being set in my environment. The flags in my case were the following (I haven't narrowed it down to which ones):

CXXFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2,-D_GLIBCXX_ASSERTIONS         -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -g -Og -fvar-tracking-assignments -fdebug-prefix-map=/home/dcal/.cache/yay/fswatch/src=/usr/src/debug
emcrisostomo commented 2 years ago

Apologies for the late answer. I've never experienced this problems in the development environments I've tried. Was this a vanilla environment, or was it customised in any way? @hedgepigdaniel what are you referring to exactly when you say 'some flags which were being set in my environment'? Who/what was setting those flags?

Feel free to open this again if still relevant.