Skip to content

Comments

fix build when being done out of tree#191

Merged
ericcurtin merged 1 commit intoinotify-tools:masterfrom
heitbaum:out-of-tree
Aug 25, 2023
Merged

fix build when being done out of tree#191
ericcurtin merged 1 commit intoinotify-tools:masterfrom
heitbaum:out-of-tree

Conversation

@heitbaum
Copy link
Contributor

When building "out of source tree" the src/yyy.cpp files can’t find inotifytools/inotifytools.h

/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-12.0-devel/toolchain/bin/x86_64-libreelec-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-12.0-devel/build/inotify-tools-4.23.8.0/src -I.. -I../libinotifytools/src/inotifytools  -std=c++17 -fno-exceptions -Wall -Wextra -Wshadow -Werror -I../libinotifytools/src -DENABLE_FANOTIFY   -march=x86-64-v3 -Wall -pipe  -O2 -fomit-frame-pointer -DNDEBUG -Wno-error=unused-parameter -MT fsnotifywait-inotifywait.o -MD -MP -MF .deps/fsnotifywait-inotifywait.Tpo -c -o fsnotifywait-inotifywait.o `test -f 'inotifywait.cpp' || echo '/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-12.0-devel/build/inotify-tools-4.23.8.0/src/'`inotifywait.cpp
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-12.0-devel/toolchain/bin/x86_64-libreelec-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-12.0-devel/build/inotify-tools-4.23.8.0/src -I.. -I../libinotifytools/src/inotifytools  -std=c++17 -fno-exceptions -Wall -Wextra -Wshadow -Werror -I../libinotifytools/src -DENABLE_FANOTIFY   -march=x86-64-v3 -Wall -pipe  -O2 -fomit-frame-pointer -DNDEBUG -Wno-error=unused-parameter -MT fsnotifywait-common.o -MD -MP -MF .deps/fsnotifywait-common.Tpo -c -o fsnotifywait-common.o `test -f 'common.cpp' || echo '/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-12.0-devel/build/inotify-tools-4.23.8.0/src/'`common.cpp
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-12.0-devel/toolchain/bin/x86_64-libreelec-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-12.0-devel/build/inotify-tools-4.23.8.0/src -I.. -I../libinotifytools/src/inotifytools  -std=c++17 -fno-exceptions -Wall -Wextra -Wshadow -Werror -I../libinotifytools/src -DENABLE_FANOTIFY   -march=x86-64-v3 -Wall -pipe  -O2 -fomit-frame-pointer -DNDEBUG -Wno-error=unused-parameter -MT fsnotifywatch-inotifywatch.o -MD -MP -MF .deps/fsnotifywatch-inotifywatch.Tpo -c -o fsnotifywatch-inotifywatch.o `test -f 'inotifywatch.cpp' || echo '/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-12.0-devel/build/inotify-tools-4.23.8.0/src/'`inotifywatch.cpp
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-12.0-devel/toolchain/bin/x86_64-libreelec-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-12.0-devel/build/inotify-tools-4.23.8.0/src -I.. -I../libinotifytools/src/inotifytools  -std=c++17 -fno-exceptions -Wall -Wextra -Wshadow -Werror -I../libinotifytools/src -DENABLE_FANOTIFY   -march=x86-64-v3 -Wall -pipe  -O2 -fomit-frame-pointer -DNDEBUG -Wno-error=unused-parameter -MT fsnotifywatch-common.o -MD -MP -MF .deps/fsnotifywatch-common.Tpo -c -o fsnotifywatch-common.o `test -f 'common.cpp' || echo '/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-12.0-devel/build/inotify-tools-4.23.8.0/src/'`common.cpp
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-12.0-devel/build/inotify-tools-4.23.8.0/src/common.cpp:15:10: fatal error: inotifytools/inotifytools.h: No such file or directory
   15 | #include <inotifytools/inotifytools.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [Makefile:485: common.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-12.0-devel/build/inotify-tools-4.23.8.0/src/inotifywatch.cpp:24:10: fatal error: inotifytools/inotifytools.h: No such file or directory
   24 | #include <inotifytools/inotifytools.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-12.0-devel/build/inotify-tools-4.23.8.0/src/inotifywait.cpp:26:10: fatal error: inotifytools/inotifytools.h: No such file or directory
   26 | #include <inotifytools/inotifytools.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [Makefile:485: inotifywatch.o] Error 1
make[2]: *** [Makefile:506: fsnotifywait-inotifywait.o] Error 1
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-12.0-devel/build/inotify-tools-4.23.8.0/src/inotifywait.cpp:26:10: fatal error: inotifytools/inotifytools.h: No such file or directory
   26 | #include <inotifytools/inotifytools.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [Makefile:485: inotifywait.o] Error 1
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-12.0-devel/build/inotify-tools-4.23.8.0/src/common.cpp:15:10: fatal error: inotifytools/inotifytools.h: No such file or directory
   15 | #include <inotifytools/inotifytools.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-12.0-devel/build/inotify-tools-4.23.8.0/src/common.cpp:15:10: fatal error: inotifytools/inotifytools.h: No such file or directory
   15 | #include <inotifytools/inotifytools.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [Makefile:548: fsnotifywatch-common.o] Error 1
make[2]: *** [Makefile:520: fsnotifywait-common.o] Error 1
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-12.0-devel/build/inotify-tools-4.23.8.0/src/inotifywatch.cpp:24:10: fatal error: inotifytools/inotifytools.h: No such file or directory
   24 | #include <inotifytools/inotifytools.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [Makefile:534: fsnotifywatch-inotifywatch.o] Error 1
make[2]: Leaving directory '/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-12.0-devel/build/inotify-tools-4.23.8.0/.x86_64-libreelec-linux-gnu/src'
make[1]: *** [Makefile:409: all-recursive] Error 1
make[1]: Leaving directory '/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-12.0-devel/build/inotify-tools-4.23.8.0/.x86_64-libreelec-linux-gnu'
make: *** [Makefile:341: all] Error 2

use relative pathes for includes
@heitbaum heitbaum changed the title fix build when being done out of tre fix build when being done out of tree Aug 24, 2023
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

warning The version of Java (11.0.3) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17.
Read more here

@ericcurtin
Copy link
Member

ericcurtin commented Aug 25, 2023

Thanks @heitbaum will draft a new release with this included next week. Hope the move to C++ was ok for you, it's a very limited set of C++, I wanted some of those features for free without adding runtime dependencies.

@ericcurtin ericcurtin merged commit e05db16 into inotify-tools:master Aug 25, 2023
@ericcurtin
Copy link
Member

LibreELEC is another project that uses inotify-tools that I was unaware of, every few months I learn of new ones 😊

@heitbaum heitbaum deleted the out-of-tree branch August 25, 2023 11:58
@heitbaum
Copy link
Contributor Author

LibreELEC is another project that uses inotify-tools that I was unaware of, every few months I learn of new ones 😊

It’s been in our system tools addon since ‘16 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants