potatosalad / erlang-libdecaf

ed448goldilocks (libdecaf) NIF with timeslice reductions for Erlang and Elixir.
MIT License
29 stars 16 forks source link

Problem compiling #4

Closed jargote closed 5 years ago

jargote commented 8 years ago

Hi,

I'm trying to compile libdecaf but I keep getting this error. Any idea what it could be?

Compiling libdecaf make: Entering directory /mnt/hgfs/DevArena/athena/deps/libdecaf/c_src' make[1]: Entering directory/mnt/hgfs/DevArena/athena/deps/libdecaf/.ed448goldilocks' gcc-4.7 -std=c99 -fno-strict-aliasing -pedantic -Wall -Wextra -Werror -Wunreachable-code -Wmissing-declarations -Wunused-function -Wno-overlength-strings -Isrc/include -Isrc/GENERATED/include -Isrc/GENERATED/c -O2 -maes -mavx2 -mbmi2 -ffunction-sections -fdata-sections -fvisibility=hidden -fomit-frame-pointer -fPIC -c -o build/obj/strobe.o src/strobe.c src/strobe.c: In function ‘get_cpu_entropy’: src/strobe.c:43:38: error: initialization from incompatible pointer type [-Werror] cc1: all warnings being treated as errors make[1]: [build/obj/strobe.o] Error 1 make[1]: Leaving directory `/mnt/hgfs/DevArena/athena/deps/libdecaf/.ed448goldilocks' make: [/mnt/hgfs/DevArena/athena/deps/libdecaf/.ed448goldilocks/build/lib/libdecaf.so.1] Error 2 make: Leaving directory `/mnt/hgfs/DevArena/athena/deps/libdecaf/c_src' ===> Hook for compile failed!

I'm running my code on a Virtual Machine.

Linux javiervm 3.2.0-4-686-pae #1 SMP Debian 3.2.63-2 i686 GNU/Linux gcc 4.7 g++ 4.7 clang version 3.0-6.2 (tags/RELEASE_30/final) (based on LLVM 3.0)

Cheers, Javier A

potatosalad commented 8 years ago

Hey Javier,

So, two issues from first glance:

  1. Your version of clang might be too old (clang 3.7 and newer have been shown to work properly).
  2. I haven't tried building on a 32-bit system before, so the compilation error you're seeing might need to be submitted as an issue upstream to ed448goldilocks for Mike Hamburg to take a look at.

I'm assuming that this line just needs to be changed from uint64_t to uint32_t, but I'd want Mike to take a look at it, too.

Are you able to try building with a newer version of clang (>= 3.7)?

potatosalad commented 8 years ago

@jargote Could you try rebuilding using the develop branch? It should be fixed upstream.