Unable to build 0.08.06 on RHEL6.9

Bug #1700484 reported by Andy Williams
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
stress-ng (Ubuntu)
Fix Released
High
Colin Ian King

Bug Description

[root@lonineng380ivb1 stress-ng-0.08.06]#
[root@lonineng380ivb1 stress-ng-0.08.06]# make
#cc -Wall -Wextra -DVERSION="0.08.06" -O2 -std=gnu99 -DHAVE_LIB_Z -DHAVE_LIB_CRYPT -DHAVE_LIB_RT -DHAVE_LIB_PTHREAD -DHAVE_LIB_SCTP -DHAVE_LIB_AIO -DHAVE_KEYUTILS_H -DHAVE_XATTR_H -DHAVE_FLOAT_DECIMAL -DHAVE_ASM_NOP -DHAVE_ALIGNED_64 -DHAVE_ALIGNED_128 -DHAVE_ALIGNED_64K -DHAVE_AFFINITY -DHAVE_MADVISE -DHAVE_SEM_POSIX -DHAVE_MQ_POSIX -DHAVE_MQ_SYSV -DHAVE_SHM_SYSV -c -o stress-cyclic.o stress-cyclic.c
stress-cyclic.c: In function 'stress_cyclic':
stress-cyclic.c:606: error: 'RLIMIT_RTTIME' undeclared (first use in this function)
stress-cyclic.c:606: error: (Each undeclared identifier is reported only once
stress-cyclic.c:606: error: for each function it appears in.)
stress-cyclic.c:576: warning: unused variable 'count'
make: *** [stress-cyclic.o] Error 1
[root@lonineng380ivb1 stress-ng-0.08.06]#

Revision history for this message
Andy Williams (wilandy) wrote :

[root@lonineng380ivb1 stress-ng-0.08.06]# cc -v
Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.4.7 20120313 (Red Hat 4.4.7-18) (GCC)
[root@lonineng380ivb1 stress-ng-0.08.06]#

Revision history for this message
Colin Ian King (colin-king) wrote :

Thanks for reporting this. Fix committed:

http://kernel.ubuntu.com/git/cking/stress-ng.git/commit/?id=138670bab0c352c09c81ee8836863f660c696107

Please try this fix and let me know if it resolves the issue.

Changed in stress-ng (Ubuntu):
status: New → In Progress
importance: Undecided → High
assignee: nobody → Colin Ian King (colin-king)
status: In Progress → Fix Committed
Revision history for this message
Andy Williams (wilandy) wrote :
Download full text (4.2 KiB)

Hi Colin,

Apologies; I'm not a programmer and don't use git so I've tried to manually apply this edit. If I've done it correctly the fix has not worked.

I downloaded the latest source for stress-cyclic.c and compared it with the version from the tarball and there appear to be a few other fixes included:

# diff stress-cyclic.c new_stress-cyclic.c
82c82
< check_range_bytes("cyclic-sleep", cyclic_sleep,
---
> check_range("cyclic-sleep", cyclic_sleep,
110c110
< check_range_bytes("cyclic-prio", cyclic_prio, 1, 100);
---
> check_range("cyclic-prio", cyclic_prio, 1, 100);
119c119
< check_range_bytes("cyclic-dist", cyclic_dist, 1, 10000000);
---
> check_range("cyclic-dist", cyclic_dist, 1, 10000000);
603a604
> #if defined(RLIMIT_RTTIME)
606a608
> #endif
716a719,720
>
>
#

When I ran the make:

# cp ../new_stress-cyclic.c stress-cyclic.c
#
# make
autoconfig: using -lz
autoconfig: using -lcrypt
autoconfig: using -lrt
... ... ...
... ... ...
cc -Wall -Wextra -DVERSION="0.08.06" -O2 -std=gnu99 -DHAVE_LIB_Z -DHAVE_LIB_CRYPT -DHAVE_LIB_RT -DHAVE_LIB_PTHREAD -DHAVE_LIB_SCTP -DHAVE_LIB_AIO -DHAVE_KEYUTILS_H -DHAVE_XATTR_H -DHAVE_FLOAT_DECIMAL -DHAVE_ASM_NOP -DHAVE_ALIGNED_64 -DHAVE_ALIGNED_128 -DHAVE_ALIGNED_64K -DHAVE_AFFINITY -DHAVE_MADVISE -DHAVE_SEM_POSIX -DHAVE_MQ_POSIX -DHAVE_MQ_SYSV -DHAVE_SHM_SYSV -c -o stress-flock.o stress-flock.c
cc -Wall -Wextra -DVERSION="0.08.06" -O2 -std=gnu99 -DHAVE_LIB_Z -DHAVE_LIB_CRYPT -DHAVE_LIB_RT -DHAVE_LIB_PTHREAD -DHAVE_LIB_SCTP -DHAVE_LIB_AIO -DHAVE_KEYUTILS_H -DHAVE_XATTR_H -DHAVE_FLOAT_DECIMAL -DHAVE_ASM_NOP -DHAVE_ALIGNED_64 -DHAVE_ALIGNED_128 -DHAVE_ALIGNED_64K -DHAVE_AFFINITY -DHAVE_MADVISE -DHAVE_SEM_POSIX -DHAVE_MQ_POSIX -DHAVE_MQ_SYSV -DHAVE_SHM_SYSV -c -o stress-fanotify.o stress-fanotify.c
stress-fanotify.c:30:26: error: sys/fanotify.h: No such file or directory
stress-fanotify.c: In function 'fanotify_event_init':
stress-fanotify.c:70: warning: implicit declaration of function 'fanotify_init'
stress-fanotify.c:91: warning: implicit declaration of function 'fanotify_mark'
stress-fanotify.c:91: error: 'FAN_MARK_ADD' undeclared (first use in this function)
stress-fanotify.c:91: error: (Each undeclared identifier is reported only once
stress-fanotify.c:91: error: for each function it appears in.)
stress-fanotify.c:91: error: 'FAN_MARK_MOUNT' undeclared (first use in this function)
stress-fanotify.c:92: error: 'FAN_ACCESS' undeclared (first use in this function)
stress-fanotify.c:92: error: 'FAN_MODIFY' undeclared (first use in this function)
stress-fanotify.c:92: error: 'FAN_OPEN' undeclared (first use in this function)
stress-fanotify.c:92: error: 'FAN_CLOSE' undeclared (first use in this function)
stress-fanotify.c:93: error: 'FAN_ONDIR' undeclared (first use in this function)
stress-fanotify.c:93: error: 'FAN_EVENT_ON_CHILD' undeclared (first use in this function)
stress-fanotify.c: In function 'stress_fanotify':
stress-fanotify.c:221: warning: implicit declaration of function 'FAN_EVENT_OK'
stress-fanotify.c:224: error: dereferencing pointer to incomplete type
stress-fanotify.c:224: error: 'FAN_NOFD' undeclared (first use in this function)
stre...

Read more...

Revision history for this message
Colin Ian King (colin-king) wrote :

try the following:

mkdir tmp
cd tmp
git clone git://kernel.ubuntu.com/cking/stress-ng
cd stress-ng
make clean
make

Revision history for this message
Andy Williams (wilandy) wrote :

Thanks again.

Unfortunately this server is in a location firewalled from the internet so I can't clone the repo. However, there seems to be a trail of issues I need to address in the same way you've done. I downloaded the stress-fanotify.c module via copy & paste & tried to recompile and that failed because fanotify.h can't be found. I copied /usr/include/sys/fanotify.h and /usr/include/Linux/fanotify.h across from a RHEL7 server (since they don't appear to be in the RHEL6 repos) and retried the make.

This time it fails in stress-softlockup.c, again complaining about RLIMIT_RTTIME. I'll go through trying to add the same fix as you did originally and I'll check with Red Hat about fanotify.h

Revision history for this message
Colin Ian King (colin-king) wrote :

Hi Andy,

Attached is a tarball with some more RLIMIT_RTTIME fixes and fixes to the fanotify stressor too. Let me know if this builds for you.

Revision history for this message
Andy Williams (wilandy) wrote :
Download full text (3.7 KiB)

Thanks Colin,

Almost there, I think, but not quite:

... ... ...
... ... ...
cc -Wall -Wextra -DVERSION='"0.08.06"' -O2 -std=gnu99 -DHAVE_LIB_Z -DHAVE_LIB_CRYPT -DHAVE_LIB_RT -DHAVE_LIB_PTHREAD -DHAVE_LIB_SCTP -DHAVE_LIB_AIO -DHAVE_KEYUTILS_H -DHAVE_XATTR_H -DHAVE_FLOAT_DECIMAL -DHAVE_ASM_NOP -DHAVE_ALIGNED_64 -DHAVE_ALIGNED_128 -DHAVE_ALIGNED_64K -DHAVE_AFFINITY -DHAVE_MADVISE -DHAVE_SEM_POSIX -DHAVE_MQ_POSIX -DHAVE_MQ_SYSV -DHAVE_SHM_SYSV stress-affinity.o stress-af-alg.o stress-aio.o stress-aio-linux.o stress-apparmor.o stress-atomic.o stress-bigheap.o stress-bind-mount.o stress-brk.o stress-bsearch.o stress-cache.o stress-cap.o stress-chdir.o stress-chmod.o stress-chown.o stress-chroot.o stress-clock.o stress-clone.o stress-context.o stress-copy-file.o stress-cpu.o stress-cpu-online.o stress-crypt.o stress-cyclic.o stress-daemon.o stress-dccp.o stress-dentry.o stress-dev.o stress-dir.o stress-dirdeep.o stress-dnotify.o stress-dup.o stress-epoll.o stress-eventfd.o stress-exec.o stress-fallocate.o stress-fault.o stress-fcntl.o stress-fiemap.o stress-fifo.o stress-filename.o stress-flock.o stress-fanotify.o stress-fork.o stress-fp-error.o stress-fstat.o stress-full.o stress-futex.o stress-get.o stress-getrandom.o stress-getdent.o stress-handle.o stress-hdd.o stress-heapsort.o stress-hsearch.o stress-icache.o stress-icmp-flood.o stress-inotify.o stress-iomix.o stress-ioprio.o stress-iosync.o stress-itimer.o stress-kcmp.o stress-key.o stress-kill.o stress-klog.o stress-lease.o stress-lsearch.o stress-link.o stress-lockbus.o stress-locka.o stress-lockf.o stress-lockofd.o stress-longjmp.o stress-madvise.o stress-malloc.o stress-matrix.o stress-membarrier.o stress-memcpy.o stress-memfd.o stress-memthrash.o stress-mergesort.o stress-mincore.o stress-mknod.o stress-mlock.o stress-mmap.o stress-mmapfork.o stress-mmapmany.o stress-mremap.o stress-msg.o stress-msync.o stress-mq.o stress-netdev.o stress-netlink-proc.o stress-nice.o stress-nop.o stress-null.o stress-numa.o stress-oom-pipe.o stress-opcode.o stress-open.o stress-personality.o stress-pipe.o stress-poll.o stress-procfs.o stress-pthread.o stress-ptrace.o stress-pty.o stress-quota.o stress-qsort.o stress-rdrand.o stress-readahead.o stress-remap-file-pages.o stress-rename.o stress-resources.o stress-rlimit.o stress-rmap.o stress-rtc.o stress-sctp.o stress-schedpolicy.o stress-seal.o stress-seccomp.o stress-seek.o stress-sem.o stress-sem-sysv.o stress-sendfile.o stress-shm.o stress-shm-sysv.o stress-sigfd.o stress-sigfpe.o stress-sigpending.o stress-sigsegv.o stress-sigsuspend.o stress-sigq.o stress-sleep.o stress-socket.o stress-socket-fd.o stress-socketpair.o stress-softlockup.o stress-spawn.o stress-splice.o stress-stack.o stress-stackmmap.o stress-str.o stress-stream.o stress-switch.o stress-sync-file.o stress-sysinfo.o stress-sysfs.o stress-tee.o stress-timer.o stress-timerfd.o stress-tlb-shootdown.o stress-tmpfs.o stress-tsc.o stress-tsearch.o stress-udp.o stress-udp-flood.o stress-unshare.o stress-urandom.o stress-userfaultfd.o stress-utime.o stress-vecmath.o stress-vforkmany.o stress-vm.o stress-vm-rw.o stress-vm-splice.o stress-wait.o stress-wcstr.o stress-xattr.o stress-...

Read more...

Revision history for this message
Colin Ian King (colin-king) wrote :

Try this tarball, it incorporates some extra automatic detection for fanotify.

Revision history for this message
Andy Williams (wilandy) wrote :

Hi Colin,

Yes, that's fixed it! I've run some cursory checks using stress-ng and all seems to be working fine. I can also confirm the tarball continues to compile on RHEL7.3.

Thanks for your help on this... you're a superstar!

Cheers,

-Andy

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package stress-ng - 0.08.07-1

---------------
stress-ng (0.08.07-1) unstable; urgency=medium

  * Makefile: bump version
  * test-inotify: initialize variable i to zero
  * Manual: update date
  * stress-cyclic: add pselect sleep method
  * stress-rmap: fix comment, remove 'of'
  * stress-netlink-proc: add more PROC event types
  * Add inotify build time detection
  * stress-get: re-format macro, no functional change
  * stress-dup: use fcntl(2) F_DUPFD to perform a dup
  * stress-dnotify: check if F_NOTIFY is available
  * test-fanotify: clean up some static analysis warnings
  * Ensure plural of cpus online and configured is correct
  * Add fanotify build time detection
  * stress-softlockup: fix builds where RLIMIT_RTTIME is not defined
  * stress-fanotify: only build if FAN flags are defined
  * stress-cyclic: fix build where RLIMIT_RTTIME is undefined (LP: #1700484)
  * test-sem-posix: voidify returns
  * test-mq_sysv: voidify ret rather than msg
  * stress-socket-fd: don't force overcommit on fd allocations (LP: #1692668)
  * stress-cyclic: use check_range instead of check_range_bytes for
    scalar values

 -- Colin King <email address hidden> Wed, 28 Jun 2017 11:09:11 +0100

Changed in stress-ng (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.