zh99998 / sigmavpn

Automatically exported from code.google.com/p/sigmavpn
0 stars 0 forks source link

Doesn't compile on FreeBSD 9.0 (AMD64) #1

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Remove -ldl and change path for bash to /usr/local/bin/bash although it doesn't 
compile successfully.

%./build.sh --with-nacl
modules.c:89:2: warning: no newline at end of file
types.c:51:2: warning: no newline at end of file
Building nacl; this will take a while...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  159k  100  159k    0     0   404k      0 --:--:-- --:--:-- --:--:--  486k
/usr/bin/ld: lib/libnacl.a(crypto_box_curve25519xsalsa20poly1305_ref-after.o): 
relocation R_X86_64_32 against `a local symbol' can not be used when making a 
shared object; recompile with -fPIC
lib/libnacl.a: could not read symbols: Bad value
/usr/bin/ld: lib/libnacl.a(crypto_scalarmult_curve25519_donna_c64-base.o): 
relocation R_X86_64_32 against `a local symbol' can not be used when making a 
shared object; recompile with -fPIC
lib/libnacl.a: could not read symbols: Bad value
naclkeypair.c:54:2: warning: no newline at end of file

Original issue reported on code.google.com by diiz...@gmail.com on 13 Feb 2012 at 1:18

GoogleCodeExporter commented 9 years ago
I've recreated the problem in a 64-bit FreeBSD 9.0 virtual machine and found 
that the problem was that NaCl was not being compiled as relocatable code (for 
some reason this was not a problem on Linux?). I'm trying to patch the NaCl 
library so that it builds as relocatable code which should prevent these errors.

Original comment by neilalex...@frozenriver.net on 15 Feb 2012 at 7:36

GoogleCodeExporter commented 9 years ago
I've discovered that one of the NaCl primitives doesn't like being built using 
-fPIC on amd64, so I've patched the build script to not use that primitive. It 
seems to be working properly for me now in my FreeBSD 9.0 container; can you 
please pull the latest code from git and try building, and see if it is fixed?

rm -rf build include lib
git pull
sh build.sh --with-nacl

Original comment by neilalex...@frozenriver.net on 17 Feb 2012 at 11:53

GoogleCodeExporter commented 9 years ago
Seems to work fine, thanks!

Original comment by diiz...@gmail.com on 19 Feb 2012 at 9:48

GoogleCodeExporter commented 9 years ago

Original comment by neilalex...@frozenriver.net on 19 Feb 2012 at 1:59