Skip to content

setitimer  #15

@Erhannis

Description

@Erhannis

Again, running the docker the README gives. I'm trying to compile some code. (I can provide a git repo, if desired.) Running into a problem - looks like it boils down to, setitimer from time.h isn't defined. Seems like it shows up in lljvm files:

root@ebb1c6a0a0c2:/usr/local/lib/lljvm-bin-linux-i386-0.2# grep -r "setitimer"
include/newlib/sys/time.h:int _EXFUN(setitimer, (int __which, const struct itimerval *__value,

but when I try to compile the project, I get:

root@ebb1c6a0a0c2:/project/src# lljvm-cc -X -DNESTEDVM -X -DHAVE_CONFIG_H -c minimodem.c databits_ascii.c databits_binary.c databits_callerid.c databits_baudot.c baudot.c databits_uic.c uic_codes.c fsk.c kiss_fft.c kiss_fftr.c simpleaudio.c simple-tone-generator.c simpleaudio-pulse.c simpleaudio-alsa.c simpleaudio-sndio.c simpleaudio-benchmark.c simpleaudio-sndfile.c simpleaudio-stdio.c
clang: warning: argument unused during compilation: '-X'
clang: warning: argument unused during compilation: '-X'
In file included from minimodem.c:23:
/usr/local/lib/lljvm/include/newlib/getopt.h:167:7: warning: declaration of 'struct getopt_data' will not be visible outside of this function
  int _EXFUN (__getopt_r,
      ^
/usr/local/lib/lljvm/include/newlib/getopt.h:169:16: note: instantiated from:
               struct getopt_data * __data));
                      ^
/usr/local/lib/lljvm/include/newlib/getopt.h:171:7: warning: declaration of 'struct getopt_data' will not be visible outside of this function
  int _EXFUN (__getopt_long_r,
      ^
/usr/local/lib/lljvm/include/newlib/getopt.h:174:16: note: instantiated from:
               struct getopt_data * __data));
                      ^
/usr/local/lib/lljvm/include/newlib/getopt.h:176:7: warning: declaration of 'struct getopt_data' will not be visible outside of this function
  int _EXFUN (__getopt_long_only_r,
      ^
/usr/local/lib/lljvm/include/newlib/getopt.h:179:16: note: instantiated from:
               struct getopt_data * __data));
                      ^
minimodem.c:319:2: warning: if statement has empty body [-Wempty-body]
        ;       // don't care, hush compiler.
        ^
4 diagnostics generated.
root@ebb1c6a0a0c2:/project/src# lljvm-cc -lm -link minimodem.o databits_ascii.o databits_binary.o databits_callerid.o databits_baudot.o baudot.o databits_uic.o uic_codes.o fsk.o kiss_fft.o kiss_fftr.o simpleaudio.o simple-tone-generator.o simpleaudio-pulse.o simpleaudio-alsa.o simpleaudio-sndio.o simpleaudio-benchmark.o simpleaudio-sndfile.o simpleaudio-stdio.o -o minimodem
lljvm-backend: Attributes.cpp:76: std::string llvm::Attribute::getAsString(llvm::Attributes): Assertion `!Result.empty() && "Unknown attribute!"' failed.
Stack dump:
0.	Running pass 'Function Pass Manager' on module 'minimodem.bc'.
1.	Running pass 'Module Verifier' on function '@bit_window'
Unable to find external method setitimer(III)I

Is setitimer not fully supported, or something?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions