error: invalid suffix "b11110001" on integer constant

Asked by Arun on 2015-09-03

while installing stress-ng i'm getting the following error

[root@lx3 stress-ng-0.04.15]# uname -a
Linux lx3 2.6.18-194.el5 #1 SMP Tue Mar 16 21:52:39 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux
[root@lx3 stress-ng-0.04.15]#
[root@lx3 stress-ng-0.04.15]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.5 (Tikanga)
[root@lx3 stress-ng-0.04.15]#
[root@lx3 stress-ng-0.04.15]# ls
COPYING README.Android stress-chmod.o stress-futex.c stress-memcpy.c stress-poll.c stress-sigsegv.c stress-vm.c
coredump.c sched.c stress-clock.c stress-get.c stress-memfd.c stress-procfs.c stress-sigsuspend.c stress-vm-rw.c
helper.c stress-affinity.c stress-clock.o stress-getrandom.c stress-mincore.c stress-pthread.c stress-socket.c stress-vm-splice.c
io-priority.c stress-affinity.o stress-context.c stress-hdd.c stress-mlock.c stress-ptrace.c stress-socketpair.c stress-wait.c
limit.c stress-aio.c stress-context.o stress-hsearch.c stress-mmap.c stress-qsort.c stress-splice.c stress-wcstr.c
log.c stress-aio-linux.c stress-cpu.c stress-icache.c stress-mmapfork.c stress-quota.c stress-stack.c stress-xattr.c
madvise.c stress-aio-linux.o stress-crypt.c stress-inotify.c stress-mmapmany.c stress-rdrand.c stress-str.c stress-yield.c
Makefile stress-aio.o stress-dentry.c stress-iosync.c stress-mq.c stress-readahead.c stress-switch.c stress-zero.c
mascot stress-bigheap.c stress-dir.c stress-itimer.c stress-mremap.c stress-rename.c stress-sysfs.c stress-zombie.c
mincore.c stress-bigheap.o stress-dup.c stress-kcmp.c stress-msg.c stress-rlimit.c stress-sysinfo.c syscalls.txt
mlock.c stress-brk.c stress-epoll.c stress-key.c stress-ng.1 stress-seek.c stress-tee.c test-decimal.c
mounts.c stress-brk.o stress-eventfd.c stress-kill.c stress-ng.c stress-sem.c stress-timer.c thermal-zone.c
mwc.c stress-bsearch.c stress-fallocate.c stress-lease.c stress-ng.h stress-sem-sysv.c stress-timerfd.c time.c
net.c stress-bsearch.o stress-fault.c stress-link.c stress-nice.c stress-sendfile.c stress-tsearch.c
out-of-memory.c stress-cache.c stress-fcntl.c stress-lockf.c stress-noop.c stress-shm-sysv.c stress-udp.c
parse-opts.c stress-cache.o stress-fifo.c stress-longjmp.c stress-null.c stress-sigfd.c stress-udp-flood.c
perf.c stress-chdir.c stress-flock.c stress-lsearch.c stress-numa.c stress-sigfpe.c stress-urandom.c
proc-name.c stress-chdir.o stress-fork.c stress-malloc.c stress-open.c stress-sigpending.c stress-utime.c
README stress-chmod.c stress-fstat.c stress-matrix.c stress-pipe.c stress-sigq.c stress-vecmath.c
[root@maa1L3devlx3 stress-ng-0.04.15]#
[root@maa1L3devlx3 stress-ng-0.04.15]# make
cc -Wall -Wextra -DVERSION="0.04.15" -O2 -c -o stress-cpu.o stress-cpu.c
stress-cpu.c:128: warning: ‘optimize’ attribute directive ignored
stress-cpu.c:1231: warning: ‘optimize’ attribute directive ignored
stress-cpu.c:1676:3: error: invalid suffix "b11110001" on integer constant
stress-cpu.c:1677:3: error: invalid suffix "b11010010" on integer constant
stress-cpu.c:1678:3: error: invalid suffix "b10110100" on integer constant
stress-cpu.c:1679:3: error: invalid suffix "b01111000" on integer constant
make: *** [stress-cpu.o] Error 1
[root@lx3 stress-ng-0.04.15]#

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu stress-ng Edit question
Assignee:
No assignee Edit question
Last query:
2015-09-03
Last reply:
2015-09-15

[root@lx3 stress-ng-0.04.15]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.5 (Tikanga)

This isn't Red Hat support, this is Ubuntu support only. I suggest you post on the Red Hat forum.

Colin Ian King (colin-king) said : #2

The following patch will do the trick

diff --git a/stress-cpu.c b/stress-cpu.c
index 0fe1a36..c661ede 100644
--- a/stress-cpu.c
+++ b/stress-cpu.c
@@ -1673,10 +1673,10 @@ static uint8_t HOT OPTIMIZE3 hamming84(const uint8_t nybble)
         * G[] is reversed to turn G[3-j] into G[j] to save a subtraction
         */
        static const uint8_t G[] = {
- 0b11110001,
- 0b11010010,
- 0b10110100,
- 0b01111000,
+ 0xf1,
+ 0xd2,
+ 0xb4,
+ 0x78,
        };

        register uint8_t code = 0;

Can you help with this problem?

Provide an answer of your own, or ask Arun for more information if necessary.

To post a message you must log in.