Skip to content

Build/test failure on 32-bit Centos5 #685

Closed
kmsquire opened this Issue Jan 16, 2013 · 5 comments

2 participants

@kmsquire

I get the following quick build failure on Centos5:

~/src/libuv$ make
cc --std=c89 -pedantic -Wall -Wextra -Wno-unused-parameter -D_GNU_SOURCE -Iinclude -Iinclude/uv-private -Isrc -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -g -c src/unix/async.c -o out/src/unix/async.o
In file included from src/unix/internal.h:35,
                 from src/unix/async.c:22:
src/unix/linux/syscalls.h:80: error: expected specifier-qualifier-list before ‘__u64’
make: *** [out/src/unix/async.o] Error 1

Removing --std=c89 fixes the build problem, although I do get a (possibly unrelated?) single test failure:

~/src/libuv$ make test
...
test/run-tests
[%   0|+   0|-   0]: platform_output
Output from process `platform_output`:
uv_get_process_title: test/run-tests
uv_resident_set_memory: 684032
uv_uptime: 2513350.716642
uv_cpu_info:
  model: Intel(R) Xeon(TM) CPU 2.80GHz
  speed: 2800
  times.sys: 94494900
  times.user: 1012458200
  times.idle: 2527633320
  times.irq: 4400
  times.nice: 7822200
  model: Intel(R) Xeon(TM) CPU 2.80GHz
  speed: 2800
  times.sys: 63662700
  times.user: 322776100
  times.idle: 3175115820
  times.irq: 8171200
  times.nice: 38377900
  model: Intel(R) Xeon(TM) CPU 2.80GHz
  speed: 2800
  times.sys: 36220500
  times.user: 285243800
  times.idle: 3268368820
  times.irq: 2701700
  times.nice: 10529800
  model: Intel(R) Xeon(TM) CPU 2.80GHz
  speed: 2800
  times.sys: 86887400
  times.user: 764852800
  times.idle: 2738127620
  times.irq: 4076500
  times.nice: 10616600
uv_interface_addresses:
  name: lo
  internal: 1
  address: 127.0.0.1
  name: eth0
  internal: 0
  address: 164.67.183.101
  name: eth1
  internal: 0
  address: 10.1.255.213
  name: lo
  internal: 1
  address: ::1
  name: eth0
  internal: 0
  address: fe80::230:48ff:fe71:842c
  name: eth1
  internal: 0
  address: fe80::230:48ff:fe71:842d
=============================================================
[%  81|+ 147|-   0]: fs_futime
`fs_futime` failed: exit code 6
Output from process `fs_futime`:
Assertion failed in test/test-fs.c on line 1573: r == 0
=============================================================
[% 100|+ 179|-   1]: Done.
make: *** [test] Error 1
@bnoordhuis

Can you try bnoordhuis/libuv@629a59b?

Regarding the test failure, can you post the output of strace -f test/run-tests fs_futime fs_futime? That should hopefully show what goes wrong.

@kmsquire

That fixed the build issue, thanks!

Here's the output of the strace command.

~/src/libuv$ strace -f test/run-tests fs_futime fs_futime
execve("test/run-tests", ["test/run-tests", "fs_futime", "fs_futime"], [/* 50 vars */]) = 0
brk(0)                                  = 0x9815000
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f71000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/home/kmsquire/src/libuv/tls/i686/sse2/libuv.so", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/home/kmsquire/src/libuv/tls/i686/sse2", 0xbff14270) = -1 ENOENT (No such file or directory)
open("/home/kmsquire/src/libuv/tls/i686/libuv.so", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/home/kmsquire/src/libuv/tls/i686", 0xbff14270) = -1 ENOENT (No such file or directory)
open("/home/kmsquire/src/libuv/tls/sse2/libuv.so", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/home/kmsquire/src/libuv/tls/sse2", 0xbff14270) = -1 ENOENT (No such file or directory)
open("/home/kmsquire/src/libuv/tls/libuv.so", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/home/kmsquire/src/libuv/tls", 0xbff14270) = -1 ENOENT (No such file or directory)
open("/home/kmsquire/src/libuv/i686/sse2/libuv.so", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/home/kmsquire/src/libuv/i686/sse2", 0xbff14270) = -1 ENOENT (No such file or directory)
open("/home/kmsquire/src/libuv/i686/libuv.so", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/home/kmsquire/src/libuv/i686", 0xbff14270) = -1 ENOENT (No such file or directory)
open("/home/kmsquire/src/libuv/sse2/libuv.so", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/home/kmsquire/src/libuv/sse2", 0xbff14270) = -1 ENOENT (No such file or directory)
open("/home/kmsquire/src/libuv/libuv.so", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0pW\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=471315, ...}) = 0
mmap2(NULL, 142800, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x369000
mmap2(0x38b000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x21) = 0x38b000
close(3)                                = 0
open("/home/kmsquire/src/libuv/libpthread.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=34208, ...}) = 0
mmap2(NULL, 34208, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7f68000
close(3)                                = 0
open("/lib/libpthread.so.0", O_RDONLY)  = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0P8\276\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=137908, ...}) = 0
mmap2(0xbdf000, 98788, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xbdf000
mmap2(0xbf4000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x15) = 0xbf4000
mmap2(0xbf6000, 4580, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xbf6000
close(3)                                = 0
open("/home/kmsquire/src/libuv/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libc.so.6", O_RDONLY)        = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\340/\251\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1693812, ...}) = 0
mmap2(0xa7d000, 1410500, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xa7d000
mmap2(0xbd0000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x153) = 0xbd0000
mmap2(0xbd3000, 9668, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xbd3000
close(3)                                = 0
open("/home/kmsquire/src/libuv/libm.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libm.so.6", O_RDONLY)        = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\20$\301\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=216544, ...}) = 0
mmap2(0xc0f000, 163952, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xc0f000
mmap2(0xc36000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26) = 0xc36000
close(3)                                = 0
open("/home/kmsquire/src/libuv/libdl.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libdl.so.2", O_RDONLY)       = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0p\212\275\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=20668, ...}) = 0
mmap2(0xbd8000, 16504, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xbd8000
mmap2(0xbdb000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2) = 0xbdb000
close(3)                                = 0
open("/home/kmsquire/src/libuv/librt.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/librt.so.1", O_RDONLY)       = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\200\330\311\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=48156, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f67000
mmap2(0xc9c000, 33324, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xc9c000
mmap2(0xca3000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x7) = 0xca3000
close(3)                                = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f66000
set_thread_area({entry_number:-1 -> 6, base_addr:0xb7f666c0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
mprotect(0xca3000, 4096, PROT_READ)     = 0
mprotect(0xbdb000, 4096, PROT_READ)     = 0
mprotect(0xc36000, 4096, PROT_READ)     = 0
mprotect(0xbd0000, 8192, PROT_READ)     = 0
mprotect(0xbf4000, 4096, PROT_READ)     = 0
mprotect(0xa79000, 4096, PROT_READ)     = 0
munmap(0xb7f68000, 34208)               = 0
set_tid_address(0xb7f66708)             = 26203
set_robust_list(0xb7f66710, 0xc)        = 0
futex(0xbff14b24, FUTEX_WAKE_PRIVATE, 1) = 0
rt_sigaction(SIGRTMIN, {0xbe33e0, [], SA_SIGINFO}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0xbe32e0, [], SA_RESTART|SA_SIGINFO}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=10240*1024, rlim_max=RLIM_INFINITY}) = 0
uname({sys="Linux", node="...", ...}) = 0
getuid32()                              = 1255
rt_sigaction(SIGPIPE, {0x1, [PIPE], SA_RESTART}, {SIG_DFL, [], 0}, 8) = 0
brk(0)                                  = 0x9815000
brk(0x9836000)                          = 0x9836000
SYS_331(0x38bc5c, 0x80000, 0x3351f759, 0x3874ce, 0x38b668) = -1 ENOSYS (Function not implemented)
pipe([3, 4])                            = 0
ioctl(3, FIOCLEX)                       = 0
ioctl(4, FIOCLEX)                       = 0
write(4, "*", 1)                        = 1
futex(0x38bc54, FUTEX_WAKE_PRIVATE, 2147483647) = 0
clock_gettime(CLOCK_MONOTONIC, {2519346, 98533237}) = 0
SYS_329(0x80000, 0, 0x38bac0, 0x38731a, 0x38b668) = -1 ENOSYS (Function not implemented)
epoll_create(256)                       = 5
ioctl(5, FIOCLEX)                       = 0
pipe([6, 7])                            = 0
ioctl(6, FIOCLEX)                       = 0
ioctl(7, FIOCLEX)                       = 0
ioctl(6, FIONBIO, [1])                  = 0
ioctl(7, FIONBIO, [1])                  = 0
pipe([8, 9])                            = 0
ioctl(8, FIOCLEX)                       = 0
ioctl(9, FIOCLEX)                       = 0
ioctl(8, FIONBIO, [1])                  = 0
ioctl(9, FIONBIO, [1])                  = 0
unlink("test_file")                     = -1 ENOENT (No such file or directory)
open("test_file", O_RDWR|O_CREAT|O_LARGEFILE, 0600) = 10
close(10)                               = 0
open("test_file", O_RDWR|O_LARGEFILE)   = 10
utimensat(10, NULL, {{400497753, 582592000}, {400497753, 582592000}}, 0) = -1 ENOSYS (Function not implemented)
write(2, "Assertion failed in test/test-fs"..., 56Assertion failed in test/test-fs.c on line 1573: r == 0
) = 56
rt_sigprocmask(SIG_UNBLOCK, [ABRT], NULL, 8) = 0
tgkill(26203, 26203, SIGABRT)           = 0
--- SIGABRT (Aborted) @ 0 (0) ---
+++ killed by SIGABRT +++
@kmsquire

The Centos5 system I'm on doesn't seem to implement utimensat. (Kernel version 2.6.18)

@bnoordhuis bnoordhuis added a commit that closed this issue Jan 17, 2013
@bnoordhuis bnoordhuis linux: use stdint types in structs
Use the typedefs from stdint.h to avoid build breakage on systems
where __u64 and friends are hidden when --std=c89 is in effect.

Fixes #685.
629a59b
@bnoordhuis

The Centos5 system I'm on doesn't seem to implement utimensat. (Kernel version 2.6.18)

Right, that syscall wasn't added until 2.6.22. I'll add a fallback that calls utimes("/proc/self/fd/<fd>") instead.

@kmsquire

Perfect, thanks.

@vtjnash vtjnash referenced this issue in JuliaLang/libuv Jan 18, 2013
Closed

Build/test failure on 32-bit Centos5 #5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.