Giter VIP home page Giter VIP logo

oplot's People

Contributors

sanette avatar

Stargazers

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

Watchers

 avatar  avatar

oplot's Issues

"dlopen(libSDL2_image-2.0.0.dylib, 0x0002): tried: 'libSDL2_image-2.0.0.dylib' (no such file)

I tried the new version: opam pin oplot https://github.com/sanette/oplot.git#0.6

It seemed to install ok:

Do you want to continue? [Y/n] y

The following system packages will first need to be installed:
    sdl2_image sdl2_ttf

<><> Handling external dependencies <><><><><><><><><><><><><><><><><><><><>  ๐Ÿซ
Let opam run your package manager to install the required system packages?
(answer 'n' for other options) [Y/n] y
+ /opt/homebrew/bin/brew "install" "sdl2_image" "sdl2_ttf"
- ==> Downloading https://ghcr.io/v2/homebrew/core/sdl2_image/manifests/2.6.2
- ==> Downloading https://ghcr.io/v2/homebrew/core/sdl2_image/blobs/sha256:c9fa27615fee118666ea9f72fbbd12dd56b834196fc097f81ee2fb3d6ac134f2
- ==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:c9fa27615fee118666ea9f72fbbd12dd56b834196fc097f81ee2fb3d6ac134f2?se=2022-11-26T12%3A30%3A00Z&sig=zA1PjmgDgCoqHEokkssk15DHt%2F5iMygN0mNnHckbKOk%3D&sp=r&spr=https&sr=b&sv=2019-12-12
- ==> Downloading https://ghcr.io/v2/homebrew/core/libx11/manifests/1.8.2
- ==> Downloading https://ghcr.io/v2/homebrew/core/libx11/blobs/sha256:996724436ae47440832ffe2caa9bec0d0f374f8885f83925453895fcfc80d8c2
- ==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:996724436ae47440832ffe2caa9bec0d0f374f8885f83925453895fcfc80d8c2?se=2022-11-26T12%3A30%3A00Z&sig=iOGSTNHtmssKAGmvjtPw7Mk9mI3waPvga4wZUiXmv6k%3D&sp=r&spr=https&sr=b&sv=2019-12-12
- ==> Downloading https://ghcr.io/v2/homebrew/core/sdl2_ttf/manifests/2.20.1
- ==> Downloading https://ghcr.io/v2/homebrew/core/sdl2_ttf/blobs/sha256:965b06109282c56c513b3836bdced71d34c7b532b42a5a0fad1188cb171f12f1
- ==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:965b06109282c56c513b3836bdced71d34c7b532b42a5a0fad1188cb171f12f1?se=2022-11-26T12%3A30%3A00Z&sig=Nz16FisllYs8jbePIBrRrGGVNas6R2ee0f6UJhHzyvg%3D&sp=r&spr=https&sr=b&sv=2019-12-12
                                                                                                                      - ==> Pouring sdl2_image--2.6.2.arm64_ventura.bottle.tar.gz
                               - ๐Ÿบ  /opt/homebrew/Cellar/sdl2_image/2.6.2: 12 files, 349.4KB
- ==> Running `brew cleanup sdl2_image`...
- Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
- Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
- ==> Installing dependencies for sdl2_ttf: libx11
- ==> Installing sdl2_ttf dependency: libx11
- ==> Pouring libx11--1.8.2.arm64_ventura.bottle.tar.gz
- ๐Ÿบ  /opt/homebrew/Cellar/libx11/1.8.2: 1,054 files, 7MB
                                                         - ==> Installing sdl2_ttf
                                                                                  - ==> Pouring sdl2_ttf--2.20.1.arm64_ventura.bottle.tar.gz
                                                                                                                                            - ๐Ÿบ  /opt/homebrew/Cellar/sdl2_ttf/2.20.1: 12 files, 255.2KB
- ==> Running `brew cleanup sdl2_ttf`...

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><>  ๐Ÿซ
...
Done.

Trying the example in utop I get the following:

utop # #use "topfind";;
- : unit = ()
Findlib has been successfully loaded.

utop # #thread;;

utop # #require "oplot";;
Exception:
Dl.DL_error
 "dlopen(libSDL2_image-2.0.0.dylib, 0x0002): tried: 'libSDL2_image-2.0.0.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OSlibSDL2_image-2.0.0.dylib' (no such file), '/usr/lib/libSDL2_image-2.0.0.dylib' (no such file, not in dyld cache), 'libSDL2_image-2.0.0.dylib' (no such file), '/usr/lo"... (* string length 419; truncated *).
Raised at Dl._report_dl_error in file "src/ctypes-foreign/dl.ml", line 44, characters 20-44
Called from Tsdl_image.Image.dllib in file "src/tsdl_image.ml", line 38, characters 13-47
Called from unknown location

Exception:
Dl.DL_error
 "dlopen(libSDL2_ttf-2.0.0.dylib, 0x0002): tried: 'libSDL2_ttf-2.0.0.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OSlibSDL2_ttf-2.0.0.dylib' (no such file), '/usr/lib/libSDL2_ttf-2.0.0.dylib' (no such file, not in dyld cache), 'libSDL2_ttf-2.0.0.dylib' (no such file), '/usr/local/lib/li"... (* string length 405; truncated *).
Error: Reference to undefined global `Tsdl_ttf'

Convert to SDL2

sdl1.2 is now very old and minimally updated. It should be relatively easy to convert everything to SDL2.

ld: library not found for -llablgl

I can run the example code in an ocaml shell now

i.e.

#use "topfind"
#thread
#require "oplot"

open Oplot.Plt

let p = plot sin (-2.) 20.
let a = axis 0. 0.;;

display [ Color red; p; Color black; a ]

But if I add (libraries oplot) to the dune file of my project, when I dune build I get:

ld: library not found for -llablgl
clang: error: linker command failed with exit code 1 (use -v to see invocation)
File "_none_", line 1:
Error: Error while building custom runtime system

...this is without yet having any oplot (or lablgl) code of my own, just adding the library.

I can #require "lablgl" and open modules from it in an ocaml shell, so it seems installed ok.

Any ideas?

macos: oplot window doesn't close

When I press esc to close the oplot window:

  • fps logging stops and it returns to a fresh utop prompt, but the window stays open (and I get 'rainbow wheel' busy mouse pointer if I move it over the window)
  • if I look in the task bar there are two items: "XQuartz" and "ocamlrun"
  • I can "quit" XQuartz but nothing happens. I have to "force quit" ocamlrun, at this point the oplot window closes (and also utop crashes with "Fatal error: exception UTop_main.Term(-11)")

I've mostly been testing from utop, but same behaviour in ocaml shell.

We tried a few tweaks already, see here #2 (comment) but so far this behaviour persists

Feasibility of headless mode

Hello,
First off; thanks for such a useful package! Plotting with this package feels surprisingly expressive and modular.

Is there any possibility of using the module to create plots in a file (lets say, using the png user device) on a headless machine? i.e. via an ssh shell, or Linux's VT100, etc.

I tried on another machine over ssh recently, but receive this error:

INFO: Loading Sdl_image, Target = linux
INFO: Loading Sdl_ttf, Target = linux
xdpyinfo:  unable to open display "".
Can't open display
Can't open display

I assume it's just passing some errors from SDL along, but I haven't read into the internals; just curious about the practicality of this request!

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.