Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build failed on AlpineLinux #60

Open
leleliu008 opened this issue Jul 8, 2024 · 2 comments
Open

build failed on AlpineLinux #60

leleliu008 opened this issue Jul 8, 2024 · 2 comments

Comments

@leleliu008
Copy link
Contributor

gmake: Entering directory '/github/home/.ppkg/run/166/linux-musl-x86_64/fsmon/src'
/github/home/.ppkg/core/wrapper-target-cc -o fsmon  -Os  -I. -Wall -DFSMON_VERSION=\"1.8.6\" -DHAVE_FANOTIFY=1 -DHAVE_SYS_FANOTIFY=1 -static --static -ffunction-sections -fdata-sections -Wl,--gc-sections -Wl,--no-dynamic-linker -L/github/home/.ppkg/run/166/linux-musl-x86_64/fsmon/lib -Wl,--as-needed -Wl,-z,muldefs -Wl,--allow-multiple-definition -flto -Wl,-s  main.c util.c backend/*.c
In file included from backend/fanotify.c:49:
/usr/include/linux/fanotify.h:130:8: error: redefinition of 'struct fanotify_event_metadata'
  130 | struct fanotify_event_metadata {
      |        ^~~~~~~~~~~~~~~~~~~~~~~
In file included from backend/fanotify.c:34:
/usr/include/sys/fanotify.h:10:8: note: originally defined here
   10 | struct fanotify_event_metadata {
      |        ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/linux/fanotify.h:[153](https://github.com/leleliu008/ppkg-formula-repository-official-core/actions/runs/9831066976/job/27137993068#step:10:154):8: error: redefinition of 'struct fanotify_event_info_header'
  153 | struct fanotify_event_info_header {
      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/sys/fanotify.h:24:8: note: originally defined here
   24 | struct fanotify_event_info_header {
      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/linux/fanotify.h:166:8: error: redefinition of 'struct fanotify_event_info_fid'
  166 | struct fanotify_event_info_fid {
      |        ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/sys/fanotify.h:30:8: note: originally defined here
   30 | struct fanotify_event_info_fid {
      |        ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/linux/fanotify.h:205:8: error: redefinition of 'struct fanotify_response'
  205 | struct fanotify_response {
      |        ^~~~~~~~~~~~~~~~~
/usr/include/sys/fanotify.h:36:8: note: originally defined here
   36 | struct fanotify_response {
      |        ^~~~~~~~~~~~~~~~~
backend/fanotify.c: In function 'parseFaEvent':
backend/fanotify.c:86:44: warning: passing argument 2 to 'restrict'-qualified parameter aliases with argument 1 [-Wrestrict]
   86 |                 path_len = readlink (path, path, sizeof(path)-1);
      |                                      ~~~~  ^~~~
backend/inotify.c: In function 'pidofuid':
backend/inotify.c:198:32: warning: unused variable 'entry2' [-Wunused-variable]
  198 |         struct dirent *entry, *entry2;
      |                                ^~~~~~
backend/inotify.c: At top level:
backend/inotify.c:98:13: warning: 'lsof' defined but not used [-Wunused-function]
   98 | static void lsof(const char *filename) {
      |             ^~~~
gmake: *** [Makefile:40: fsmon] Error 1
gmake: Leaving directory '/github/home/.ppkg/run/[166](https://github.com/leleliu008/ppkg-formula-repository-official-core/actions/runs/9831066976/job/27137993068#step:10:167)/linux-musl-x86_64/fsmon/src'
@trufae
Copy link
Member

trufae commented Jul 8, 2024

Can you try with the android target?

@leleliu008
Copy link
Contributor Author

gmakew FANOTIFY_CFLAGS="'-DHAVE_FANOTIFY=1 -DHAVE_SYS_FANOTIFY=0'"

worked for musl/linux and android

On Android, there is no sys/fanotify.h but has linux/fanotify.h

On musl/linux, both sys/fanotify.h and linux/fanotify.h exist.

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

No branches or pull requests

2 participants