Coder Social home page Coder Social logo

opam-android-repository's People

Contributors

dsheets avatar protz avatar vouillon 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

Watchers

 avatar  avatar  avatar  avatar

opam-android-repository's Issues

Error while compiling arm-lwt

Hello,

I'm derived arm-lwt from your repository, but I trying to cross-compile it by other suite (Yocto's arm-oe-linux-gnueabi).
I see the following error:

- + /mnt/opam/4.02.1/bin/arm-oe-linux-gnueabi-ocamlfind ocamlc -ccopt -I/usr/include -ccopt -I/usr/include -ccopt -Isrc/unix -c src/unix/lwt_unix_stubs.c
- cc1: warning: include location "/usr/include" is unsafe for cross-compilation [-Wpoison-system-directories]
- In file included from /usr/include/netdb.h:27:0,
-                  from src/unix/lwt_unix_stubs.c:70:
- /usr/include/netinet/in.h:536:21: error: field 'ipi6_addr' has incomplete type
-      struct in6_addr ipi6_addr; /* src/dst IPv6 address */
-                      ^~~~~~~~~
- /usr/include/netinet/in.h:543:25: error: field 'ip6m_addr' has incomplete type
-      struct sockaddr_in6 ip6m_addr; /* dst address including zone ID */
-                          ^~~~~~~~~
- In file included from src/unix/lwt_unix_stubs.c:97:0:
- src/unix/lwt_unix_unix.c:192:23: error: field 's_inet6' has incomplete type
-    struct sockaddr_in6 s_inet6;
-                        ^~~~~~~
- In file included from src/unix/lwt_unix_stubs.c:97:0:
- src/unix/lwt_unix_unix.c: In function 'alloc_one_addr6':
- src/unix/lwt_unix_unix.c:1727:19: error: storage size of 'addr' isn't known
-    struct in6_addr addr;
-                    ^~~~
- src/unix/lwt_unix_unix.c:1727:19: warning: unused variable 'addr' [-Wunused-variable]
- src/unix/lwt_unix_unix.c:1730:1: warning: control reaches end of non-void function [-Wreturn-type]
-  }
-  ^
- Command exited with code 2.

Setting environment variables CC,LD and CPP to point to correct programs with "--sysroot=..." has ho effect for setup.ml.
How can I set something like "--sysroot=..."option for gcc in opam file (i.e. sa setup.ml's command line argument) or maybe in ocamlfind arguments?
Also, setting environment variables CC,LD and CPP to point to correct programs with added "--sysroot=..." has ho effect for arm-lwt's setup.ml.
I.e. I see in config output:

- bytecomp_c_compiler: ................................. gcc -fno-defer-pop -Wall -D_FILE_OFFSET_BITS=64 -D_REENTRANT -fPIC
- native_c_compiler: ................................... gcc -Wall -D_FILE_OFFSET_BITS=64 -D_REENTRANT

Is it right, that in your environment with NDK, gcc uses "--sysroot=..." to correctly cross compile stubs?
Can you point me to some way how you solved such problems with stubs?

Packages required to compile on Ubuntu 13.04

I recommend putting in the Readme that installing ia32-libs can help with installing some of the OPAM packages in this repository on 64-bit Ubuntu installations. The compilation was failing with a "libz.so.1 not found" error before I installed ia32-libs.

How to compile for x86?

I was able to build shared objects for ARM architecture. I use the following commands (sort of):

ocamlfind -toolchain android ocamlopt -c prog.ml
ocamlfind -toolchain android ocamlopt -o libprog-jni.so -shared prog.o prog-jni.c

I pack libprog-jni.so in *.apk and Dalvik loads it and everything is fine.
However, I can't build the object for x86 CPU because my system is AMD64.
Is it possible to do using your tool?

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.