Git Product home page Git Product logo

core_unix's Introduction

Core_unix

A package including Core_unix and various Linux-specific libraries. See readme files in subfolders.

core_unix's People

Contributors

aalekseyev avatar d-kalinichenko avatar public-release avatar staronj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

core_unix's Issues

Can't find `Command_unix` in 0.15.2

Is the build broken? This page has an error message:
https://ocaml.org/p/core_unix/v0.15.2/doc/index.html

I have installed core_unix 0.15.2 from opam

I add core_unix to dune libraries, but there does not seem to be any Core_unix.Command_unix module

The README here https://github.com/janestreet/core_unix/blob/v0.15.2/command_unix/README.md says

Command_unix is a standalone library that has functionality related to Core.Command and depends on depends on Core_unix -- including Command_unix.run.

...but I there does not seem to be a command_unix library to add to my dine file, or to install via opam.

time stamp counter does not work on ARM64

Uncaught exception:
  
  (Invalid_argument
   "Float.iround_nearest_exn: argument (nan) is too small or NaN")

Raised at Stdlib.invalid_arg in file "stdlib.ml", line 30, characters 20-45
Called from Base__Float.iround_nearest_exn_64 in file "src/float.ml" (inlined), line 360, characters 4-89
Called from Base__Float.int63_round_nearest_arch64_noalloc_exn in file "src/float.ml", line 514, characters 60-82
Called from Time_stamp_counter.Calibrator.calibrate_using in file "time_stamp_counter/src/time_stamp_counter.ml" (inlined), line 277, characters 7-69
Called from Time_stamp_counter.Calibrator.initialize.(fun) in file "time_stamp_counter/src/time_stamp_counter.ml", line 285, characters 6-56
Called from Base__List0.iter in file "src/list0.ml", line 60, characters 4-7
Called from Time_stamp_counter.Calibrator.create_using in file "time_stamp_counter/src/time_stamp_counter.ml", line 322, characters 4-24

FreeBSD 14 failures

Dear Sir or Madam,

I encounted the following issue on FreeBSD 14 with "core_unix":

ld: error: undefined symbol: core_linux_timerfd_create
>>> referenced by linux_ext.o:(.text+0x39FD) in archive linux_ext/src/linux_ext.a
>>> referenced by linux_ext.o:(.data+0x32D0) in archive linux_ext/src/linux_ext.a

ld: error: undefined symbol: core_linux_timerfd_settime
>>> referenced by linux_ext.o:(.text+0x3C61) in archive linux_ext/src/linux_ext.a
>>> referenced by linux_ext.o:(.text+0x3F41) in archive linux_ext/src/linux_ext.a
>>> referenced by linux_ext.o:(.data+0x32C8) in archive linux_ext/src/linux_ext.a

ld: error: undefined symbol: core_linux_timerfd_gettime
>>> referenced by linux_ext.o:(.text+0x3E9A) in archive linux_ext/src/linux_ext.a
>>> referenced by linux_ext.o:(.data+0x32C0) in archive linux_ext/src/linux_ext.a

ld: error: undefined symbol: core_linux_timerfd_CLOCK_REALTIME
>>> referenced by linux_ext.o:(.text+0x7364) in archive linux_ext/src/linux_ext.a
>>> referenced by linux_ext.o:(.data+0x32F0) in archive linux_ext/src/linux_ext.a

ld: error: undefined symbol: core_linux_timerfd_CLOCK_MONOTONIC
>>> referenced by linux_ext.o:(.text+0x737E) in archive linux_ext/src/linux_ext.a
>>> referenced by linux_ext.o:(.data+0x32E8) in archive linux_ext/src/linux_ext.a

ld: error: undefined symbol: core_linux_timerfd_TFD_NONBLOCK
>>> referenced by linux_ext.o:(.text+0x7430) in archive linux_ext/src/linux_ext.a
>>> referenced by linux_ext.o:(.data+0x32E0) in archive linux_ext/src/linux_ext.a

ld: error: undefined symbol: core_linux_timerfd_TFD_CLOEXEC
>>> referenced by linux_ext.o:(.text+0x7449) in archive linux_ext/src/linux_ext.a
>>> referenced by linux_ext.o:(.data+0x32D8) in archive linux_ext/src/linux_ext.a

The underlying issue seems to be that FreeBSD 14 now ships a sys/timerfd.h, and your autodetection assumes more than it tests for - read further at ocurrent/ocaml-ci#924 (comment). Please note that investigation was done by @mtelvers - thanks a lot.

ERROR while compiling core_unix.v0.15~preview.126.02+18

Similar issue in core has been fixed in the latest commit (janestreet/core#149), however the issue seem to still persist in core_unix

Am I doing something wrong?

#=== ERROR while compiling core_unix.v0.15~preview.126.02+18 ==================#
# context     2.1.0 | macos/x86_64 | ocaml-base-compiler.4.11.1 | https://ocaml.janestreet.com/opam-repository
# path        ~/Documents/abc/_opam/.opam-switch/build/core_unix.v0.15~preview.126.02+18
# command     ~/.opam/opam-init/hooks/sandbox.sh build dune build -p core_unix -j 11
# exit-code   1
# env-file    ~/.opam/log/core_unix-12447-6904f5.env
# output-file ~/.opam/log/core_unix-12447-6904f5.out
### output ###
# Error: Unbound module Spawn.Pgid
# [...]
# (cd _build/default && /Users/denis.grebennicov/Documents/abc/_opam/bin/ocamlc.opt -w -40 -g -bin-annot -I linux_ext/src/.linux_ext.objs/byte -I /Users/denis.grebennicov/Documents/mongo_utils/_opam/lib/base -I /Users/denis.grebennicov/Documents/mongo_utils/_opam/lib/base/base_internalhash_types -I /Users/denis.grebennicov/Documents/mongo_utils/_opam/lib/base/caml -I /Users/denis.greben[...]
# File "linux_ext/src/linux_ext.ml", line 615, characters 17-29:
# 615 | module Timerfd = Null.Timerfd
#                        ^^^^^^^^^^^^
# Error: Unbound module Null
#     ocamlopt core_unix/src/.core_unix.objs/native/core_unix.{cmx,o} (exit 2)
# (cd _build/default && /Users/denis.grebennicov/Documents/abc/_opam/bin/ocamlopt.opt -w -40 -g -I core_unix/src/.core_unix.objs/byte -I core_unix/src/.core_unix.objs/native -I /Users/denis.grebennicov/Documents/mongo_utils/_opam/lib/base -I /Users/denis.grebennicov/Documents/mongo_utils/_opam/lib/base/base_internalhash_types -I /Users/denis.grebennicov/Documents/mongo_utils/_opam/lib/b[...]
# File "core_unix/src/core_unix.ml", line 849, characters 11-23:
# 849 |   type t = Spawn.Pgid.t
#                  ^^^^^^^^^^^^
# Error: Unbound module Spawn.Pgid

Installation fails on windows

There is a clash between the windows path separator and the uses of bash:

File "lock_file_blocking/src/dune", line 9, characters 0-96:
 9 | (rule
10 |  (targets config.h)
11 |  (deps)
12 |  (action
13 |   (bash "cp %{lib:jst-config:config.h} %{targets}")))
(cd _build/default/lock_file_blocking/src && C:\cygwin64\bin\bash.exe -e -u -o pipefail -c "cp C:\Users\sebastien\AppData\Local\opam\sandbox\lib\jst-config\config.h config.h")
cp: cannot stat 'C:UserssebastienAppDataLocalopamsandboxlibjst-configconfig.h': No such file or directory

core_unix-5316-92da34.env.txt
core_unix-5316-92da34.info.txt
core_unix-5316-92da34.out.txt

Compilation error on macOS

The current trunk of core_unix fails to compile on macOS as it attempts to use clock_getcpuclockid which is missing on macOS.

File "core_unix/src/dune", line 5, characters 45-65:
5 |  (c_names nss_stubs timespec core_unix_stubs core_unix_time_stubs)
                                                 ^^^^^^^^^^^^^^^^^^^^
core_unix_time_stubs.c:57:13: error: implicit declaration of function 'clock_getcpuclockid' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
  int ret = clock_getcpuclockid(pid, &clock);
            ^

macOS version: 12.2.1 (Monterey)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.