Giter Club home page Giter Club logo

libhinoko's Introduction

The libhinoko project

2024/04/06 Takashi Sakamoto

Introduction

This is a sister project of libhinawa.

I design this library for userspace applications to transfer/receive isochronous packets on IEEE 1394 bus by any language binding of GObject Introspection. The applications is able to operate 1394 OHCI hardware for any isochronous context and isochronous resources. According to this design, this library is an application of Linux FireWire subsystem and GLib/GObject.

The latest release is 1.0.2

Example of Python 3 with PyGobject

See scripts under samples directory

Documentation

License

  • GNU Lesser General Public License version 2.1 or later

Repository location

Dependencies

  • Glib 2.44.0 or later
  • GObject Introspection 1.32.1 or later
  • Libhinawa 4.0 or later
  • Linux kernel 3.4 or later

Requirements to build

  • Meson 0.56.0 or later
  • Ninja
  • PyGObject (optional to run unit tests)
  • gi-docgen 2023.1 or later (optional to generate API documentation)

How to build

$ meson setup (--prefix=directory-to-install) build
$ meson compile -C build
$ meson install -C build
($ meson test -C build)

When working with gobject-introspection, Hinoko-1.0.typelib should be installed in your system girepository so that libgirepository can find it. Of course, your system LD should find ELF shared object for libhinoko1. Before installing, it's good to check path of the above and configure --prefix meson option appropriately. The environment variables, GI_TYPELIB_PATH and LD_LIBRARY_PATH are available for ad-hoc settings of the above as well.

How to refer document

$ meson configure (--prefix=directory-to-install) -Ddoc=true build
$ meson compile -C build
$ meson install -C build

You can see documentation files under (directory-to-install)/share/doc/hinoko/.

Supplemental information for language bindings

  • PyGObject is a dynamic loader in Python 3 language for libraries compatible with g-i.
  • hinoko-rs includes crates to use these libraries.

How to make DEB package

Meson subproject

This is a sample of wrap file to satisfy dependency on libhinoko by Meson subprojects.

$ cat subprojects/hinoko.wrap
[wrap-git]
directory = hinoko
url = https://git.kernel.org/pub/scm/libs/ieee1394/libhinoko.git
revision = v1.0.2
depth = 1

[provide]
dependency_names = hinoko

After installation of the wrap file, the dependency can be solved by hinoko name since it is common in both pkg-config and the wrap file. The implicit or explicit fallback to subproject is available.

$ cat meson.build
hinoko_dependency = dependency('hinoko',
  version: '>=1.0'
)

In the case of subproject, the wrap file for hinawa should be installed as well, since hinoko depends on it. For hinawa.wrap, please refer to README of [libhinawa](https://git.kernel.org/pub/scm/libs/ieee1394/libhinawa.git/).

About Hinoko

Hinoko is Japanese word which expresses quite a small piece of fire scattered from burning flame continuously. Hi (U+2F55 &#x2f55) and Ko (U+7C89 &#7c89) are connected by No (U+306E &#x306e) is case markers in Japanese particles. The former means fire. The latter means flour.

We can see Hinoko flying from burning fire consecutively, like a stream of isochronous packet in IEEE 1394 bus.

end

libhinoko's People

Contributors

ml-takashisakamoto avatar takaswie avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

libhinoko's Issues

GQuark is not exported.

Although GQuark is used to propagate error information for each GObject-derived object, the symbols are not exported yet. This issue brings inconvenience for Rust bindings to implement glib::error::ErrorDomain for the GQuark. The glib::error::ErrorDomain trait requires domain function implementation to return GQuark itself, however it's not exported and unable to access.

Namesapce error

Hi!, i'm trying to using this cool library for firewire.

But, i does not resolve some errors as follows:


Traceback (most recent call last):
  File "./iso-resource", line 5, in 
    gi.require_version('Hinoko', '0.0')
  File "/usr/lib/python3/dist-packages/gi/__init__.py", line 130, in require_version
    raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace Hinoko not available

How can i install the Hinoko-0.0.typelib for fixing it.

Thanks!

Use Hinawa.CycleTime object to express the content of CYCLE_TIME register

There is a plan to release libhinawa with support for hardware time stamp. It provides new Hinawa.CycleTime object to express the content of CYCLE_TIME register. The new object has duplicate function of Hinoko.CycleTimer object.

It is preferable to obsolete the duplication. It means that libhinoko uses the part of libhinawa and would have a new dependency.

Ubuntu - Namespace Hinoko not available - needs '--prefix /usr'

After building on Ubuntu 20:04 I found that I would get namespace issues, even though ninja test would pass OK.

simon@avid-test:~/libhinoko-github/samples$ ./iso-resource
Traceback (most recent call last):
  File "./iso-resource", line 5, in <module>
    gi.require_version('Hinoko', '0.0')
  File "/usr/lib/python3/dist-packages/gi/__init__.py", line 129, in require_version
    raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace Hinoko not available

Turns out that Python does not like binaries/libraies being placed under '/usr/local' and you need to specify a prefix to meson.
$ meson --prefix /usr build .

ERROR: gobject-introspection dependency was not found, gir cannot be generated.

Dependancy problems on Ubuntu 19:10. Originally I had

$ meson . build
The Meson build system
Version: 0.45.1
Source dir: /home/simon/libhinoko-github
Build dir: /home/simon/libhinoko-github/build
Build type: native build
Project name: hinoko
Native C compiler: cc (gcc 7.5.0 "cc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0")
Build machine cpu family: x86_64
Build machine cpu: x86_64
Found pkg-config: /usr/bin/pkg-config (0.29.1)
Native dependency gobject-2.0 found: YES 2.56.4
Native dependency glib-2.0 found: YES 2.56.4
Program glib-genmarshal found: YES (/usr/bin/glib-genmarshal)
Program glib-mkenums found: YES (/usr/bin/glib-mkenums)
Program g-ir-scanner found: NO

src/meson.build:82:8: ERROR: Target 'Gir' can't be generated as 'g-ir-scanner' could not be found

fixed with... $ sudo apt-get install gobject-introspection

But now stuck with

$ meson . build
The Meson build system
Version: 0.45.1
Source dir: /home/simon/libhinoko-github
Build dir: /home/simon/libhinoko-github/build
Build type: native build
Project name: hinoko
Native C compiler: cc (gcc 7.5.0 "cc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0")
Build machine cpu family: x86_64
Build machine cpu: x86_64
Found pkg-config: /usr/bin/pkg-config (0.29.1)
Native dependency gobject-2.0 found: YES 2.56.4
Native dependency glib-2.0 found: YES 2.56.4
Program glib-genmarshal found: YES (/usr/bin/glib-genmarshal)
Program glib-mkenums found: YES (/usr/bin/glib-mkenums)
Program g-ir-scanner found: YES (/usr/bin/g-ir-scanner)
Program g-ir-compiler found: YES (/usr/bin/g-ir-compiler)

src/meson.build:82:8: ERROR: gobject-introspection dependency was not found, gir cannot be generated.

A full log can be found at /home/simon/libhinoko-github/build/meson-logs/meson-log.txt

$ dpkg --list | grep gobject
ii  gobject-introspection                  1.56.1-1                                         amd64        Generate interface introspection data for GObject libraries
ii  libcairo-gobject-perl                  1.004-2build3                                    amd64        integrate Cairo into the Glib type system in Perl
ii  libcairo-gobject2:amd64                1.15.10-2ubuntu0.1                               amd64        Cairo 2D vector graphics library (GObject library)
ii  libglib-object-introspection-perl      0.044-2                                          amd64        Perl bindings for gobject-introspection libraries
ii  liblightdm-gobject-1-0:amd64           1.26.0-0ubuntu1                                  amd64        LightDM GObject client library
ii  libpolkit-gobject-1-0:amd64            0.105-20ubuntu0.18.04.5                          amd64        PolicyKit Authorization API
ii  python-gi                              3.26.1-2ubuntu1                                  amd64        Python 2.x bindings for gobject-introspection libraries
ii  python-gobject-2                       2.28.6-12ubuntu3                                 amd64        deprecated static Python bindings for the GObject library
ii  python-gobject-2-dev                   2.28.6-12ubuntu3                                 all          development headers for the static GObject Python bindings
ii  python3-gi                             3.26.1-2ubuntu1                                  amd64        Python 3 bindings for gobject-introspection libraries

I have not found the solution for this...

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.