Giter Club home page Giter Club logo

jvm-toxcore-c's Introduction

Tox4j (C backend)

This repository contains the c-toxcore backed implementation of the generic backend-agnostic JVM toxcore-api.

Contributing

We're using the standard Github workflow for our code reviews. Just open Pull Requests and the reviewer will guide you through the process.

Build status

Build Status
Travis CI Travis Build Status
Coverage Coverage Status
Android arm64 Android arm64 Status
Android armeabi Android armeabi Status
Android x86 Android x86 Status

Building Tox4j

Dependencies: compile

To build the package itself, the following dependencies are required:

  • com.chuusai:shapeless_2.11:2.3.3
  • com.google.code.findbugs:jsr305:3.0.0
  • com.google.guava:guava:19.0
  • com.google.protobuf:protobuf-java:3.5.0
  • com.intellij:annotations:12.0
  • com.lihaoyi:fastparse-utils_2.11:0.3.7
  • com.lihaoyi:fastparse_2.11:0.3.7
  • com.lihaoyi:sourcecode_2.11:0.1.1
  • com.trueaccord.lenses:lenses_2.11:0.4.7
  • com.trueaccord.scalapb:scalapb-runtime-grpc_2.11:0.5.43
  • com.trueaccord.scalapb:scalapb-runtime_2.11:0.5.43
  • com.typesafe.scala-logging:scala-logging_2.11:3.7.2
  • io.grpc:grpc-context:1.0.1
  • io.grpc:grpc-core:1.0.1
  • io.grpc:grpc-stub:1.0.1
  • org.scala-lang.modules:scala-parser-combinators_2.11:1.0.4
  • org.scala-lang.modules:scala-xml_2.11:1.0.5
  • org.scala-lang:scala-compiler:2.11.12
  • org.scala-lang:scala-reflect:2.11.12
  • org.slf4j:slf4j-api:1.7.25
  • org.toktok:macros_2.11:0.1.1
  • org.toktok:tox4j-api_2.11:0.1.4
  • org.toktok:tox4j-c_2.11:0.1.4
  • org.typelevel:macro-compat_2.11:1.1.1

Dependencies: test

For testing, the following additional dependencies are required:

  • com.fasterxml.jackson.core:jackson-annotations:2.5.2
  • com.fasterxml.jackson.core:jackson-core:2.5.2
  • com.fasterxml.jackson.core:jackson-databind:2.5.2
  • com.fasterxml.jackson.module:jackson-module-scala_2.11:2.5.2
  • com.github.wookietreiber:scala-chart_2.11:0.4.2
  • com.storm-enroute:scalameter-core_2.11:0.7
  • com.storm-enroute:scalameter_2.11:0.7
  • com.thoughtworks.paranamer:paranamer:2.6
  • jline:jline:2.14.2
  • junit:junit:4.12
  • log4j:log4j:1.2.17
  • org.apache.commons:commons-lang3:3.4
  • org.apache.commons:commons-math3:3.2
  • org.hamcrest:hamcrest-core:1.3
  • org.jfree:jcommon:1.0.21
  • org.jfree:jfreechart:1.0.17
  • org.ow2.asm:asm:5.0.4
  • org.scala-lang.modules:scala-swing_2.11:1.0.1
  • org.scala-sbt:test-interface:1.0
  • org.scala-tools.testing:test-interface:0.5
  • org.scalacheck:scalacheck_2.11:1.13.4
  • org.scalactic:scalactic_2.11:3.0.1
  • org.scalatest:scalatest_2.11:3.0.1
  • org.scalaz:scalaz-concurrent_2.11:7.2.8
  • org.scalaz:scalaz-core_2.11:7.2.8
  • org.scalaz:scalaz-effect_2.11:7.2.8
  • org.slf4j:slf4j-log4j12:1.7.22
  • xml-apis:xml-apis:1.3.04

C/C++ dependencies

Native code

  • Toxcore
  • Toxav
    • We require the latest git version of these libraries, so you will need to build them yourself.
  • CMake (>= 2.8.7)
    • Debian/Ubuntu: cmake
  • protobuf 3.0.0
    • Debian/Ubuntu: You need to build this from source.
  • Clang 3.5 or newer (older versions of clang segfault. G++ support is untested, the build script enforces clang-3.5 for now. If you do not have clang 3.5 installed, your build may fail.)
    • Debian/Ubuntu: clang-3.5

Building

  • Build and install toxcore and toxav.
  • Run the sbt console with sbt.

Now you can use compile to build, test to run unit tests (these are a lot of tests with high timeouts, might take 10 minutes or longer), and package to create a jar and the native library.

Developing on Mac OS X

Getting the required tools for development on OS X is very easy. If you have XCode installed, you will already be able to compile the C++ part of tox4j,

Importing in IDEA

To import the project in IDEA, launch IDEA and:

  • On the "Welcome to IntelliJ IDEA" screen, select "Import Project".
  • Select the directory jvm-toxcore-c (this git repository).
  • Press "OK".
  • Select "Import project from external model".
  • Select "SBT".
  • Press "Next".
  • Select "Use auto-import", "Download sources and docs", and "Download SBT sources and docs".
  • Create and select a JDK if you don't have one, yet.
  • Press "Finish".

Now you need to wait while IDEA builds the project info from the SBT project. When it is done, it shows a list of modules, all are selected. Leave them selected and press "OK". After IDEA opens, it will say "Unregistered VCS root detected". Press "Add root" so you can use git from IDEA. If you have the protobuf extension installed, you can register the proto files with that as well (another notification will show for that).

jvm-toxcore-c's People

Contributors

anonymouscommitter avatar btbn avatar flakebi avatar iphydf avatar restyled-commits avatar robinlinden avatar silviabear avatar sonofra avatar subliun avatar zoff99 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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

jvm-toxcore-c's Issues

failed to build i686-linux-android

following is the log hope for you help...thanks
/home/ubuntu/toxapp/jvm-toxcore-c/_build/i686-linux-android/protobuf/src/.libs/libprotobuf.a(arena.o):/home/ubuntu/toxapp/jvm-toxcore-c/_git/protobuf/src/google/protobuf/arena.cc:function google::protobuf::internal::ArenaImpl::Init(): error: undefined reference to '__atomic_fetch_add_8'

clang38++: error: linker command failed with exit code 1 (use -v to see invocation)

make[3]: *** [protoc] Error 1

make[3]: Leaving directory `/home/ubuntu/toxapp/jvm-toxcore-c/_build/i686-linux-android/protobuf/src'

make[2]: *** [install-recursive] Error 1

missing dependency: protobuf 3.5.0.1

Tired to run scripts/build-aarch64-linux-android (v0.2.0) and encountered this error:

git clone --depth=1 --branch=3.5.0.1 https://github.com/google/protobuf build/srclib/jvm-toxcore-c/_git/protobuf
Cloning into 'build/srclib/jvm-toxcore-c/_git/protobuf'...
warning: Could not find remote branch 3.5.0.1 to clone.
fatal: Remote branch 3.5.0.1 not found in upstream origin

Error: key can't be empty

I wonder use the tox in my own written chat. Firstly, I use maven but it can't find any resources. Then I come here and git clone the whole repository. I wonder how to add it in my project. I try to build it on my PC, but it seems failed.

I use the command

sbt -D java.security.manager compile

The result is as the following. I don't know what the error and why this error happend.

java.lang.IllegalArgumentException: key can't be empty
        at java.base/java.lang.System.checkKey(System.java:1098)
        at java.base/java.lang.System.setProperty(System.java:1041)
        at scala.sys.SystemProperties.$anonfun$addOne$1(SystemProperties.scala:53)
        at scala.sys.SystemProperties.wrapAccess(SystemProperties.scala:56)
        at scala.sys.SystemProperties.addOne(SystemProperties.scala:53)
        at scala.sys.SystemProperties.addOne(SystemProperties.scala:30)
        at scala.collection.mutable.Growable.$plus$eq(Growable.scala:36)
        at scala.collection.mutable.Growable.$plus$eq$(Growable.scala:36)
        at scala.collection.mutable.AbstractMap.$plus$eq(Map.scala:265)
        at xsbt.boot.Configuration$.setProperty(Configuration.scala:52)
        at xsbt.boot.Configuration$.find(Configuration.scala:39)
        at xsbt.boot.Launch$.apply(Launch.scala:30)
        at xsbt.boot.Launch$.apply(Launch.scala:21)
        at xsbt.boot.Boot$.runImpl(Boot.scala:78)
        at xsbt.boot.Boot$.run(Boot.scala:73)
        at xsbt.boot.Boot$.main(Boot.scala:21)
        at xsbt.boot.Boot.main(Boot.scala)
[error] [launcher] error during sbt launcher: java.lang.IllegalArgumentException: key can't be empty

toxcore version information

is there a function to get the used toxcore version info? or if not a release then the commit hash of toxcore?
would be useful for highlevel to display this info in "about" pages and crash reports

same goes for jvm-toxcore version used

jni tools to generate xxx.h

i am reading the code of jvm-toxcore-c, but i donot know how to get the folder named "generated", this folder contains the XXX.h file created by javah.

1
is there any tools to got them ?
"jvm-toxcore-c\cpp\src\ToxAv\generated"
"jvm-toxcore-c\cpp\src\ToxCore\generated"

2 i am so confused about this file "jvm-toxcore-c\cpp\src\ToxAv\generated\natives.h"
JAVA_METHOD_REF (toxavAnswer)
CXX_FUNCTION_REF (toxav_answer)

could you explain them for me or give me some reference?
thanks!

Compile Error: non-deducible template parameter 'Args'

Error Message

make[4]: *** [CMakeFiles/tox4j-c.dir/src/tox/core.cpp.o] Error 1
[ 48%] Building CXX object CMakeFiles/tox4j-c.dir/src/util/debug_log.cpp.o
In file included from /Users/ttd/jvm-toxcore-c/cpp/src/util/debug_log.cpp:3:
In file included from /Users/ttd/jvm-toxcore-c/cpp/src/tox/core.h:3:
/Users/ttd/jvm-toxcore-c/cpp/src/tox/common.h:51:12: error: class
template partial specialization contains a template parameter that cannot be
deduced; this partial specialization will never be used
[-Wunusable-partial-specialization]
struct mk_tox_cb<Subsystem, void (Subsystem *, Args..., void *)>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/ttd/jvm-toxcore-c/cpp/src/tox/common.h:50:46: note:
non-deducible template parameter 'Args'
template<typename Subsystem, typename ...Args>

Compiler

Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/c++/4.2.1
Apple LLVM version 10.0.1 (clang-1001.0.46.4)
Target: x86_64-apple-darwin18.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

Usage example / documentation

Hi !

First thank you for the project, i have troubles making a working application using Tox4J, where i can find documentation ? An "EchoBot" example would be perfect ! :)

Thank you.

list of dependencies to use jvm-toxcore-c

with android studio i used it and compiled antox. it compiles without error.
but on runtime crashes with class not found.
seems it needs some specific dependencies installed (with specific version), but you can not see it anywhere.

is there a list what libs are needed as dependencies for jvm-toxcore-c?

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.