[erlang-questions] compile error in LINUX 2.6 : "Fatal, could not get clock_monotonic value!, errno = 22"

Bengt Kleberg bengt.kleberg@REDACTED
Wed Apr 23 08:12:31 CEST 2008


Greetings,

Just to make things clear: erlc is only a compiler. It will not give you
a shell.
To compile from the erlang shell you could use the shell builtin c() or
compile:file/1


bengt

On Tue, 2008-04-22 at 14:53 -0700, Nageshwar Bajamahal wrote:
> Hi Mattew,
> 
>  
> 
> Yes, this problem is happening all the time when I am trying to
> compile.
> 
>  
> 
> When I type erlc, I do not get any erl prompt or any erl shell prompt?
> 
> I am not sure if I am missing some thing here.
> 
>  
> 
> Please see the output of strace erlc below and let me know how I could
> get erlang up and running.
> 
>  
> 
> Thank you,
> 
> Nageshwar
> 
>  
> 
> The Linux distribution that I have is Gentoo Base System version
> 1.6.13
> 
>  
> 
> >>>>>>>>>>>>>>>>>>>> UNAME –a output <<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> 
>  
> 
> -> Linux lxlogin-3-300 2.6.22.4 #1 SMP Tue Aug 21 17:47:29 PDT 2007
> i686 Dual Core AMD Opteron(tm) Processor 2212 AuthenticAMD GNU/Linux
> 
>  
> 
> >>>>>>>>>>>>>>>>>>>> strace –c erlc output
> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> 
>  
> 
> lxlogin-3-300:/home/nbajamah/utils/otp_src_R12B-2> strace -c erlc
> 
> Process 14931 detached
> 
> % time     seconds  usecs/call     calls    errors syscall
> 
> ------ ----------- ----------- --------- --------- ----------------
> 
>    nan    0.000000           0         5           read
> 
>    nan    0.000000           0         7         1 open
> 
>    nan    0.000000           0         6           close
> 
>    nan    0.000000           0         1           execve
> 
>    nan    0.000000           0         4           brk
> 
>    nan    0.000000           0         1           munmap
> 
>    nan    0.000000           0         1           uname
> 
>    nan    0.000000           0         1           getcwd
> 
>    nan    0.000000           0        12           mmap2
> 
>    nan    0.000000           0         5           fstat64
> 
> ------ ----------- ----------- --------- --------- ----------------
> 
> 100.00    0.000000                    43         1 total
> 
> lxlogin-3-300:/home/nbajamah/utils/otp_src_R12B-2> 
> 
>  
> 
> >>>>>>>>>>>>>>>>>>>> strace erlc <<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> 
>  
> 
> lxlogin-3-300:/home/nbajamah/utils/otp_src_R12B-2> strace erlc
> 
> execve("/home/nbajamah/utils/otp_src_R12B-2/bin/i686-pc-linux-gnu/erlc", ["erlc"], [/* 37 vars */]) = 0
> 
> uname({sys="Linux", node="lxlogin-3-300", ...}) = 0
> 
> brk(0)                                  = 0x804b000
> 
> mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
> 0) = 0xf7f6c000
> 
> open("/etc/ld.so.preload", 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=167968, ...}) = 0
> 
> mmap2(NULL, 167968, PROT_READ, MAP_PRIVATE, 3, 0) = 0xf7f42000
> 
> close(3)                                = 0
> 
> open("/lib/libutil.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\320\r\0"...,
> 512) = 512
> 
> fstat64(3, {st_mode=S_IFREG|0755, st_size=11057, ...}) = 0
> 
> mmap2(NULL, 10588, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) =
> 0xf7f3f000
> 
> mmap2(0xf7f41000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED,
> 3, 0x1) = 0xf7f41000
> 
> close(3)                                = 0
> 
> 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\0\360\33"...,
> 512) = 512
> 
> fstat64(3, {st_mode=S_IFREG|0755, st_size=13704, ...}) = 0
> 
> mmap2(NULL, 12248, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) =
> 0xf7f3c000
> 
> mmap2(0xf7f3e000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED,
> 3, 0x1) = 0xf7f3e000
> 
> close(3)                                = 0
> 
> 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\3004\0"...,
> 512) = 512
> 
> fstat64(3, {st_mode=S_IFREG|0755, st_size=187087, ...}) = 0
> 
> mmap2(NULL, 137120, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) =
> 0xf7f1a000
> 
> mmap2(0xf7f3b000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED,
> 3, 0x20) = 0xf7f3b000
> 
> close(3)                                = 0
> 
> 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\200^\1"...,
> 512) = 512
> 
> fstat64(3, {st_mode=S_IFREG|0755, st_size=1488107, ...}) = 0
> 
> mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
> 0) = 0xf7f19000
> 
> mmap2(NULL, 1251492, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) =
> 0xf7de7000
> 
> mmap2(0xf7f13000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED,
> 3, 0x12b) = 0xf7f13000
> 
> mmap2(0xf7f16000, 10404, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|
> MAP_ANONYMOUS, -1, 0) = 0xf7f16000
> 
> close(3)                                = 0
> 
> munmap(0xf7f42000, 167968)              = 0
> 
> open("/dev/urandom", O_RDONLY)          = 3
> 
> read(3, "\337,\263a\0373\317\231\374\274\f\267\224\3\306\223\377"...,
> 32) = 32
> 
> close(3)                                = 0
> 
> brk(0)                                  = 0x804b000
> 
> brk(0x806c000)                          = 0x806c000
> 
> brk(0)                                  = 0x806c000
> 
> getcwd("/home/nbajamah/utils/otp_src_R12B-2", 4096) = 36
> 
> _exit(0)                                = ?
> 
> Process 15608 detached
> 
>  
> 
> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>  compile error
> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> 
>  
> 
> make[2]: Entering directory
> `/home/nbajamah/utils/otp_src_R12B-2/lib/parsetools'
> 
> === Entering application parsetools
> 
> make[3]: Entering directory
> `/home/nbajamah/utils/otp_src_R12B-2/lib/parsetools/src'
> 
> erlc -W  +debug_info +warn_obsolete_guard
> -I/home/nbajamah/utils/otp_src_R12B-2/lib/stdlib/include -o../ebin
> yecc.erl
> 
> Fatal, could not get clock_monotonic value!, errno = 22
> 
> make[3]: *** [../ebin/yecc.beam] Aborted
> 
> make[3]: Leaving directory
> `/home/nbajamah/utils/otp_src_R12B-2/lib/parsetools/src'
> 
> make[2]: *** [opt] Error 2
> 
> make[2]: Leaving directory
> `/home/nbajamah/utils/otp_src_R12B-2/lib/parsetools'
> 
> make[1]: *** [opt] Error 2
> 
> make[1]: Leaving directory `/home/nbajamah/utils/otp_src_R12B-2/lib'
> 
> make: *** [secondary_bootstrap_build] Error 2
> 
>  
> 
>  
> 
>  
> 
>  
> 
> -----Original Message-----
> From: Matthew Dempsky [mailto:matthew@REDACTED] 
> Sent: Tuesday, April 22, 2008 1:38 AM
> To: Nageshwar Bajamahal
> Cc: erlang-questions@REDACTED
> Subject: Re: [erlang-questions] compile error in LINUX 2.6 : "Fatal,
> could not get clock_monotonic value!, errno = 22"
> 
>  
> 
> 2008/4/21 Nageshwar Bajamahal <nbajamah@REDACTED>:
> 
> > erlc -W  +debug_info +warn_obsolete_guard
> 
> > -I/home/nbajamah/utils/otp_src_R12B-2/lib/stdlib/include -o../ebin
> yecc.erl
> 
> > 
> 
> > Fatal, could not get clock_monotonic value!, errno = 22
> 
>  
> 
> Is this repeatable?  What if you just run "erlc"?  If so, what's the
> 
> output of "strace erlc" (particularly calls to the clock_gettime
> 
> syscalls)?
> 
>  
> 
> Is there anything unusual about this Linux host?  E.g., is it using
> 
> any virtualization or an embedded system without a real-time clock?
> 
> What Linux distribution are you using?
> 
> 
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions




More information about the erlang-questions mailing list