* Problems when trying to build tools/testing/selftests @ 2025-12-03 5:20 Guenter Roeck 2025-12-03 17:25 ` Shuah 0 siblings, 1 reply; 7+ messages in thread From: Guenter Roeck @ 2025-12-03 5:20 UTC (permalink / raw) To: open list:KERNEL SELFTEST FRAMEWORK; +Cc: Shuah Khan Hi, when trying to build tools/testing/selftests, I get a lot of warnings such as mount-notify_test.c: In function ‘fanotify_fsmount’: mount-notify_test.c:360:14: warning: implicit declaration of function ‘fsopen’; did you mean ‘fdopen’? and subsequent build errors. testing/selftests/filesystems/mount-notify/mount-notify_test.c:360: undefined reference to `fsopen' /usr/bin/ld: tools/testing/selftests/filesystems/mount-notify/mount-notify_test.c:363: undefined reference to `fsconfig' /usr/bin/ld:tools/testing/selftests/filesystems/mount-notify/mount-notify_test.c:366: undefined reference to `fsmount' /usr/bin/ld: tools/testing/selftests/filesystems/mount-notify/mount-notify_test.c:371: undefined reference to `move_mount' This does not just affect a single file, but several of them. What am I missing ? Is there some magic needed to build the selftests ? Thanks, Guenter ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Problems when trying to build tools/testing/selftests 2025-12-03 5:20 Problems when trying to build tools/testing/selftests Guenter Roeck @ 2025-12-03 17:25 ` Shuah 2025-12-03 17:55 ` Randy Dunlap 0 siblings, 1 reply; 7+ messages in thread From: Shuah @ 2025-12-03 17:25 UTC (permalink / raw) To: Guenter Roeck, open list:KERNEL SELFTEST FRAMEWORK; +Cc: Shuah Khan On 12/2/25 22:20, Guenter Roeck wrote: > Hi, > > when trying to build tools/testing/selftests, I get a lot of warnings such as > > mount-notify_test.c: In function ‘fanotify_fsmount’: > mount-notify_test.c:360:14: warning: implicit declaration of function ‘fsopen’; did you mean ‘fdopen’? > > and subsequent build errors. > > testing/selftests/filesystems/mount-notify/mount-notify_test.c:360: undefined reference to `fsopen' > /usr/bin/ld: tools/testing/selftests/filesystems/mount-notify/mount-notify_test.c:363: undefined reference to `fsconfig' > /usr/bin/ld:tools/testing/selftests/filesystems/mount-notify/mount-notify_test.c:366: undefined reference to `fsmount' > /usr/bin/ld: tools/testing/selftests/filesystems/mount-notify/mount-notify_test.c:371: undefined reference to `move_mount' > > This does not just affect a single file, but several of them. > > What am I missing ? Is there some magic needed to build the selftests ? Not sure. It built fine for me on Linux 6.18 latest. Are you missing a library possibly? thanks, -- Shuah ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Problems when trying to build tools/testing/selftests 2025-12-03 17:25 ` Shuah @ 2025-12-03 17:55 ` Randy Dunlap 2025-12-03 21:01 ` Guenter Roeck 0 siblings, 1 reply; 7+ messages in thread From: Randy Dunlap @ 2025-12-03 17:55 UTC (permalink / raw) To: Shuah, Guenter Roeck, open list:KERNEL SELFTEST FRAMEWORK On 12/3/25 9:25 AM, Shuah wrote: > On 12/2/25 22:20, Guenter Roeck wrote: >> Hi, >> >> when trying to build tools/testing/selftests, I get a lot of warnings such as >> >> mount-notify_test.c: In function ‘fanotify_fsmount’: >> mount-notify_test.c:360:14: warning: implicit declaration of function ‘fsopen’; did you mean ‘fdopen’? >> >> and subsequent build errors. >> >> testing/selftests/filesystems/mount-notify/mount-notify_test.c:360: undefined reference to `fsopen' >> /usr/bin/ld: tools/testing/selftests/filesystems/mount-notify/mount-notify_test.c:363: undefined reference to `fsconfig' >> /usr/bin/ld:tools/testing/selftests/filesystems/mount-notify/mount-notify_test.c:366: undefined reference to `fsmount' >> /usr/bin/ld: tools/testing/selftests/filesystems/mount-notify/mount-notify_test.c:371: undefined reference to `move_mount' >> >> This does not just affect a single file, but several of them. >> >> What am I missing ? Is there some magic needed to build the selftests ? > > Not sure. It built fine for me on Linux 6.18 latest. Are you missing > a library possibly? Guenter, did you follow Documentation/dev-tools/kselftest.rst? Shuah, is that document what you recommend? -- ~Randy ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Problems when trying to build tools/testing/selftests 2025-12-03 17:55 ` Randy Dunlap @ 2025-12-03 21:01 ` Guenter Roeck 2025-12-03 21:51 ` Shuah Khan 0 siblings, 1 reply; 7+ messages in thread From: Guenter Roeck @ 2025-12-03 21:01 UTC (permalink / raw) To: Randy Dunlap, Shuah, open list:KERNEL SELFTEST FRAMEWORK On 12/3/25 09:55, Randy Dunlap wrote: > > > On 12/3/25 9:25 AM, Shuah wrote: >> On 12/2/25 22:20, Guenter Roeck wrote: >>> Hi, >>> >>> when trying to build tools/testing/selftests, I get a lot of warnings such as >>> >>> mount-notify_test.c: In function ‘fanotify_fsmount’: >>> mount-notify_test.c:360:14: warning: implicit declaration of function ‘fsopen’; did you mean ‘fdopen’? >>> >>> and subsequent build errors. >>> >>> testing/selftests/filesystems/mount-notify/mount-notify_test.c:360: undefined reference to `fsopen' >>> /usr/bin/ld: tools/testing/selftests/filesystems/mount-notify/mount-notify_test.c:363: undefined reference to `fsconfig' >>> /usr/bin/ld:tools/testing/selftests/filesystems/mount-notify/mount-notify_test.c:366: undefined reference to `fsmount' >>> /usr/bin/ld: tools/testing/selftests/filesystems/mount-notify/mount-notify_test.c:371: undefined reference to `move_mount' >>> >>> This does not just affect a single file, but several of them. >>> >>> What am I missing ? Is there some magic needed to build the selftests ? >> >> Not sure. It built fine for me on Linux 6.18 latest. Are you missing >> a library possibly? > > Guenter, did you follow Documentation/dev-tools/kselftest.rst? > The document says To build the tests:: $ make headers $ make -C tools/testing/selftests which is what I did. I did run kselftest_deps.sh gcc which tells me FAIL: net/tcp_ao/Makefile dependency check: $(LIB) FAIL: bpf/Makefile dependency check: $(LIBELF_LIBS) FAIL: bpf/Makefile dependency check: $(PCAP_LIBS) FAIL: net/netfilter/Makefile dependency check: $(MNL_LDLIBS) FAIL: net/netfilter/Makefile dependency check: $(MNL_LDLIBS) -------------------------------------------------------- Targets failed build dependency check on system: bpf net -------------------------------------------------------- Missing libraries system $(LIB) $(LIBELF_LIBS) $(MNL_LDLIBS) $(PCAP_LIBS) which doeesn't really help. For example, PCAP_LIBS seems to refer to libpcap, and I have libpcap-dev installed on my system. Unless I am missing something that doesn't explain the build failures. Guenter ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Problems when trying to build tools/testing/selftests 2025-12-03 21:01 ` Guenter Roeck @ 2025-12-03 21:51 ` Shuah Khan 2025-12-03 22:01 ` Guenter Roeck 0 siblings, 1 reply; 7+ messages in thread From: Shuah Khan @ 2025-12-03 21:51 UTC (permalink / raw) To: Guenter Roeck, Randy Dunlap, Shuah, open list:KERNEL SELFTEST FRAMEWORK, Shuah Khan On 12/3/25 14:01, Guenter Roeck wrote: > On 12/3/25 09:55, Randy Dunlap wrote: >> >> >> On 12/3/25 9:25 AM, Shuah wrote: >>> On 12/2/25 22:20, Guenter Roeck wrote: >>>> Hi, >>>> >>>> when trying to build tools/testing/selftests, I get a lot of warnings such as >>>> >>>> mount-notify_test.c: In function ‘fanotify_fsmount’: >>>> mount-notify_test.c:360:14: warning: implicit declaration of function ‘fsopen’; did you mean ‘fdopen’? >>>> >>>> and subsequent build errors. >>>> >>>> testing/selftests/filesystems/mount-notify/mount-notify_test.c:360: undefined reference to `fsopen' >>>> /usr/bin/ld: tools/testing/selftests/filesystems/mount-notify/mount-notify_test.c:363: undefined reference to `fsconfig' >>>> /usr/bin/ld:tools/testing/selftests/filesystems/mount-notify/mount-notify_test.c:366: undefined reference to `fsmount' >>>> /usr/bin/ld: tools/testing/selftests/filesystems/mount-notify/mount-notify_test.c:371: undefined reference to `move_mount' This usually indicates missing libraries or header path issues. >>>> >>>> This does not just affect a single file, but several of them. >>>> >>>> What am I missing ? Is there some magic needed to build the selftests ? >>> >>> Not sure. It built fine for me on Linux 6.18 latest. Are you missing >>> a library possibly? >> >> Guenter, did you follow Documentation/dev-tools/kselftest.rst? >> > > The document says > > To build the tests:: > > $ make headers > $ make -C tools/testing/selftests > > which is what I did. > > I did run > > kselftest_deps.sh gcc > > which tells me > > FAIL: net/tcp_ao/Makefile dependency check: $(LIB) > FAIL: bpf/Makefile dependency check: $(LIBELF_LIBS) > FAIL: bpf/Makefile dependency check: $(PCAP_LIBS) > FAIL: net/netfilter/Makefile dependency check: $(MNL_LDLIBS) > FAIL: net/netfilter/Makefile dependency check: $(MNL_LDLIBS) > -------------------------------------------------------- > Targets failed build dependency check on system: > bpf net > -------------------------------------------------------- > Missing libraries system > $(LIB) $(LIBELF_LIBS) $(MNL_LDLIBS) $(PCAP_LIBS) > > which doeesn't really help. For example, PCAP_LIBS seems to refer to libpcap, > and I have libpcap-dev installed on my system. > > Unless I am missing something that doesn't explain the build failures. > I ran "make kselftest-all" - mount-notify/mount-notify_test.c built fine on Linux 6.18 - which repo are you trying on? Can you try "make kselftest-all" and tell me what happens? I also tried make -C tools/testing/selftests and make -C tools/testing/selftests TARGETS="filesystems/mount-notify" Which repo are you trying on? thanks, -- Shuah ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Problems when trying to build tools/testing/selftests 2025-12-03 21:51 ` Shuah Khan @ 2025-12-03 22:01 ` Guenter Roeck 2025-12-03 22:25 ` Shuah Khan 0 siblings, 1 reply; 7+ messages in thread From: Guenter Roeck @ 2025-12-03 22:01 UTC (permalink / raw) To: Shuah Khan, Randy Dunlap, Shuah, open list:KERNEL SELFTEST FRAMEWORK On 12/3/25 13:51, Shuah Khan wrote: > On 12/3/25 14:01, Guenter Roeck wrote: >> On 12/3/25 09:55, Randy Dunlap wrote: >>> >>> >>> On 12/3/25 9:25 AM, Shuah wrote: >>>> On 12/2/25 22:20, Guenter Roeck wrote: >>>>> Hi, >>>>> >>>>> when trying to build tools/testing/selftests, I get a lot of warnings such as >>>>> >>>>> mount-notify_test.c: In function ‘fanotify_fsmount’: >>>>> mount-notify_test.c:360:14: warning: implicit declaration of function ‘fsopen’; did you mean ‘fdopen’? >>>>> >>>>> and subsequent build errors. >>>>> >>>>> testing/selftests/filesystems/mount-notify/mount-notify_test.c:360: undefined reference to `fsopen' >>>>> /usr/bin/ld: tools/testing/selftests/filesystems/mount-notify/mount-notify_test.c:363: undefined reference to `fsconfig' >>>>> /usr/bin/ld:tools/testing/selftests/filesystems/mount-notify/mount-notify_test.c:366: undefined reference to `fsmount' >>>>> /usr/bin/ld: tools/testing/selftests/filesystems/mount-notify/mount-notify_test.c:371: undefined reference to `move_mount' > > This usually indicates missing libraries or header path > issues. > >>>>> >>>>> This does not just affect a single file, but several of them. >>>>> >>>>> What am I missing ? Is there some magic needed to build the selftests ? >>>> >>>> Not sure. It built fine for me on Linux 6.18 latest. Are you missing >>>> a library possibly? >>> >>> Guenter, did you follow Documentation/dev-tools/kselftest.rst? >>> >> >> The document says >> >> To build the tests:: >> >> $ make headers >> $ make -C tools/testing/selftests >> >> which is what I did. >> >> I did run >> >> kselftest_deps.sh gcc >> >> which tells me >> >> FAIL: net/tcp_ao/Makefile dependency check: $(LIB) >> FAIL: bpf/Makefile dependency check: $(LIBELF_LIBS) >> FAIL: bpf/Makefile dependency check: $(PCAP_LIBS) >> FAIL: net/netfilter/Makefile dependency check: $(MNL_LDLIBS) >> FAIL: net/netfilter/Makefile dependency check: $(MNL_LDLIBS) >> -------------------------------------------------------- >> Targets failed build dependency check on system: >> bpf net >> -------------------------------------------------------- >> Missing libraries system >> $(LIB) $(LIBELF_LIBS) $(MNL_LDLIBS) $(PCAP_LIBS) >> >> which doeesn't really help. For example, PCAP_LIBS seems to refer to libpcap, >> and I have libpcap-dev installed on my system. >> >> Unless I am missing something that doesn't explain the build failures. >> > > I ran "make kselftest-all" - mount-notify/mount-notify_test.c built > fine on Linux 6.18 - which repo are you trying on? > > Can you try "make kselftest-all" and tell me what happens? > > I also tried > > make -C tools/testing/selftests > > and > > make -C tools/testing/selftests TARGETS="filesystems/mount-notify" > > Which repo are you trying on? > Mainline. Anyway, the problem turns out to be the glibc version. The missing functions require glibc 2.36 or later, but I have glibc version 2.35 installed on the affected system. Thanks, Guenter ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Problems when trying to build tools/testing/selftests 2025-12-03 22:01 ` Guenter Roeck @ 2025-12-03 22:25 ` Shuah Khan 0 siblings, 0 replies; 7+ messages in thread From: Shuah Khan @ 2025-12-03 22:25 UTC (permalink / raw) To: Guenter Roeck, Randy Dunlap, Shuah, open list:KERNEL SELFTEST FRAMEWORK, Shuah Khan On 12/3/25 15:01, Guenter Roeck wrote: > On 12/3/25 13:51, Shuah Khan wrote: >> On 12/3/25 14:01, Guenter Roeck wrote: >>> On 12/3/25 09:55, Randy Dunlap wrote: >>>> >>>> >>>> On 12/3/25 9:25 AM, Shuah wrote: >>>>> On 12/2/25 22:20, Guenter Roeck wrote: >>>>>> Hi, >>>>>> >>>>>> when trying to build tools/testing/selftests, I get a lot of warnings such as >>>>>> >>>>>> mount-notify_test.c: In function ‘fanotify_fsmount’: >>>>>> mount-notify_test.c:360:14: warning: implicit declaration of function ‘fsopen’; did you mean ‘fdopen’? >>>>>> >>>>>> and subsequent build errors. >>>>>> >>>>>> testing/selftests/filesystems/mount-notify/mount-notify_test.c:360: undefined reference to `fsopen' >>>>>> /usr/bin/ld: tools/testing/selftests/filesystems/mount-notify/mount-notify_test.c:363: undefined reference to `fsconfig' >>>>>> /usr/bin/ld:tools/testing/selftests/filesystems/mount-notify/mount-notify_test.c:366: undefined reference to `fsmount' >>>>>> /usr/bin/ld: tools/testing/selftests/filesystems/mount-notify/mount-notify_test.c:371: undefined reference to `move_mount' >> >> This usually indicates missing libraries or header path >> issues. >> >>>>>> >>>>>> This does not just affect a single file, but several of them. >>>>>> >>>>>> What am I missing ? Is there some magic needed to build the selftests ? >>>>> >>>>> Not sure. It built fine for me on Linux 6.18 latest. Are you missing >>>>> a library possibly? >>>> >>>> Guenter, did you follow Documentation/dev-tools/kselftest.rst? >>>> >>> >>> The document says >>> >>> To build the tests:: >>> >>> $ make headers >>> $ make -C tools/testing/selftests >>> >>> which is what I did. >>> >>> I did run >>> >>> kselftest_deps.sh gcc >>> >>> which tells me >>> >>> FAIL: net/tcp_ao/Makefile dependency check: $(LIB) >>> FAIL: bpf/Makefile dependency check: $(LIBELF_LIBS) >>> FAIL: bpf/Makefile dependency check: $(PCAP_LIBS) >>> FAIL: net/netfilter/Makefile dependency check: $(MNL_LDLIBS) >>> FAIL: net/netfilter/Makefile dependency check: $(MNL_LDLIBS) >>> -------------------------------------------------------- >>> Targets failed build dependency check on system: >>> bpf net >>> -------------------------------------------------------- >>> Missing libraries system >>> $(LIB) $(LIBELF_LIBS) $(MNL_LDLIBS) $(PCAP_LIBS) >>> >>> which doeesn't really help. For example, PCAP_LIBS seems to refer to libpcap, >>> and I have libpcap-dev installed on my system. >>> >>> Unless I am missing something that doesn't explain the build failures. >>> >> >> I ran "make kselftest-all" - mount-notify/mount-notify_test.c built >> fine on Linux 6.18 - which repo are you trying on? >> >> Can you try "make kselftest-all" and tell me what happens? >> >> I also tried >> >> make -C tools/testing/selftests >> >> and >> >> make -C tools/testing/selftests TARGETS="filesystems/mount-notify" >> >> Which repo are you trying on? >> > > Mainline. Anyway, the problem turns out to be the glibc version. The missing functions > require glibc 2.36 or later, but I have glibc version 2.35 installed on the affected system. > Ah that makes sense. thanks, -- Shuah ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-12-03 22:25 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2025-12-03 5:20 Problems when trying to build tools/testing/selftests Guenter Roeck 2025-12-03 17:25 ` Shuah 2025-12-03 17:55 ` Randy Dunlap 2025-12-03 21:01 ` Guenter Roeck 2025-12-03 21:51 ` Shuah Khan 2025-12-03 22:01 ` Guenter Roeck 2025-12-03 22:25 ` Shuah Khan
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.