IoTone / TheShellProject

The Shell Project aims to build a viable general purpose blockchain written in Dlang, with attributes of security, ease of deployment, clear specification, ease of use for DAPPs, and multiple implementation interop
1 stars 1 forks source link

Check the status of libsodium installation: should build on linux, win64, mac os x #42

Closed pedroalvesbatista closed 3 years ago

pedroalvesbatista commented 6 years ago
sudo make install
Making install in builds
make[1]: Entering directory '/home/devtroll/Downloads/libsodium-stable/builds'
make[2]: Entering directory '/home/devtroll/Downloads/libsodium-stable/builds'
make[2]: Nothing to be done for 'install-exec-am'.
make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '/home/devtroll/Downloads/libsodium-stable/builds'
make[1]: Leaving directory '/home/devtroll/Downloads/libsodium-stable/builds'
Making install in contrib
make[1]: Entering directory '/home/devtroll/Downloads/libsodium-stable/contrib'
make[2]: Entering directory '/home/devtroll/Downloads/libsodium-stable/contrib'
make[2]: Nothing to be done for 'install-exec-am'.
make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '/home/devtroll/Downloads/libsodium-stable/contrib'
make[1]: Leaving directory '/home/devtroll/Downloads/libsodium-stable/contrib'
Making install in dist-build
make[1]: Entering directory '/home/devtroll/Downloads/libsodium-stable/dist-build'
make[2]: Entering directory '/home/devtroll/Downloads/libsodium-stable/dist-build'
make[2]: Nothing to be done for 'install-exec-am'.
make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '/home/devtroll/Downloads/libsodium-stable/dist-build'
make[1]: Leaving directory '/home/devtroll/Downloads/libsodium-stable/dist-build'
Making install in msvc-scripts
make[1]: Entering directory '/home/devtroll/Downloads/libsodium-stable/msvc-scripts'
make[2]: Entering directory '/home/devtroll/Downloads/libsodium-stable/msvc-scripts'
make[2]: Nothing to be done for 'install-exec-am'.
make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '/home/devtroll/Downloads/libsodium-stable/msvc-scripts'
make[1]: Leaving directory '/home/devtroll/Downloads/libsodium-stable/msvc-scripts'
Making install in src
make[1]: Entering directory '/home/devtroll/Downloads/libsodium-stable/src'
Making install in libsodium
make[2]: Entering directory '/home/devtroll/Downloads/libsodium-stable/src/libsodium'
Making install in include
make[3]: Entering directory '/home/devtroll/Downloads/libsodium-stable/src/libsodium/include'
make[4]: Entering directory '/home/devtroll/Downloads/libsodium-stable/src/libsodium/include'
make[4]: Nothing to be done for 'install-exec-am'.
 /bin/mkdir -p '/usr/local/include'
 /bin/mkdir -p '/usr/local/include/sodium'
 /usr/bin/install -c -m 644  sodium/core.h sodium/crypto_aead_aes256gcm.h sodium/crypto_aead_chacha20poly1305.h sodium/crypto_aead_xchacha20poly1305.h sodium/crypto_auth.h sodium/crypto_auth_hmacsha256.h sodium/crypto_auth_hmacsha512.h sodium/crypto_auth_hmacsha512256.h sodium/crypto_box.h sodium/crypto_box_curve25519xchacha20poly1305.h sodium/crypto_box_curve25519xsalsa20poly1305.h sodium/crypto_core_ed25519.h sodium/crypto_core_hchacha20.h sodium/crypto_core_hsalsa20.h sodium/crypto_core_salsa20.h sodium/crypto_core_salsa2012.h sodium/crypto_core_salsa208.h sodium/crypto_generichash.h sodium/crypto_generichash_blake2b.h sodium/crypto_hash.h sodium/crypto_hash_sha256.h sodium/crypto_hash_sha512.h sodium/crypto_kdf.h sodium/crypto_kdf_blake2b.h sodium/crypto_kx.h sodium/crypto_onetimeauth.h sodium/crypto_onetimeauth_poly1305.h sodium/crypto_pwhash.h sodium/crypto_pwhash_argon2i.h sodium/crypto_pwhash_argon2id.h sodium/crypto_pwhash_scryptsalsa208sha256.h sodium/crypto_scalarmult.h sodium/crypto_scalarmult_curve25519.h sodium/crypto_scalarmult_ed25519.h sodium/crypto_secretbox.h sodium/crypto_secretbox_xchacha20poly1305.h sodium/crypto_secretbox_xsalsa20poly1305.h sodium/crypto_secretstream_xchacha20poly1305.h sodium/crypto_shorthash.h sodium/crypto_shorthash_siphash24.h '/usr/local/include/sodium'
 /bin/mkdir -p '/usr/local/include/sodium'
 /usr/bin/install -c -m 644  sodium/crypto_sign.h sodium/crypto_sign_ed25519.h sodium/crypto_sign_edwards25519sha512batch.h sodium/crypto_stream.h sodium/crypto_stream_chacha20.h sodium/crypto_stream_salsa20.h sodium/crypto_stream_salsa2012.h sodium/crypto_stream_salsa208.h sodium/crypto_stream_xchacha20.h sodium/crypto_stream_xsalsa20.h sodium/crypto_verify_16.h sodium/crypto_verify_32.h sodium/crypto_verify_64.h sodium/export.h sodium/randombytes.h sodium/randombytes_salsa20_random.h sodium/randombytes_sysrandom.h sodium/runtime.h sodium/utils.h '/usr/local/include/sodium'
 /usr/bin/install -c -m 644  sodium.h '/usr/local/include/.'
 /bin/mkdir -p '/usr/local/include'
 /bin/mkdir -p '/usr/local/include/sodium'
 /usr/bin/install -c -m 644  sodium/version.h '/usr/local/include/sodium'
make[4]: Leaving directory '/home/devtroll/Downloads/libsodium-stable/src/libsodium/include'
make[3]: Leaving directory '/home/devtroll/Downloads/libsodium-stable/src/libsodium/include'
make[3]: Entering directory '/home/devtroll/Downloads/libsodium-stable/src/libsodium'
make[4]: Entering directory '/home/devtroll/Downloads/libsodium-stable/src/libsodium'
 /bin/mkdir -p '/usr/local/lib'
 /bin/bash ../../libtool   --mode=install /usr/bin/install -c   libsodium.la '/usr/local/lib'
libtool: install: /usr/bin/install -c .libs/libsodium.so.23.1.0 /usr/local/lib/libsodium.so.23.1.0
libtool: install: (cd /usr/local/lib && { ln -s -f libsodium.so.23.1.0 libsodium.so.23 || { rm -f libsodium.so.23 && ln -s libsodium.so.23.1.0 libsodium.so.23; }; })
libtool: install: (cd /usr/local/lib && { ln -s -f libsodium.so.23.1.0 libsodium.so || { rm -f libsodium.so && ln -s libsodium.so.23.1.0 libsodium.so; }; })
libtool: install: /usr/bin/install -c .libs/libsodium.lai /usr/local/lib/libsodium.la
libtool: install: /usr/bin/install -c .libs/libsodium.a /usr/local/lib/libsodium.a
libtool: install: chmod 644 /usr/local/lib/libsodium.a
libtool: install: ranlib /usr/local/lib/libsodium.a
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/sbin" ldconfig -n /usr/local/lib
----------------------------------------------------------------------
Libraries have been installed in:
   /usr/local/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the '-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the 'LD_RUN_PATH' environment variable
     during linking
   - use the '-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to '/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
make[4]: Nothing to be done for 'install-data-am'.
make[4]: Leaving directory '/home/devtroll/Downloads/libsodium-stable/src/libsodium'
make[3]: Leaving directory '/home/devtroll/Downloads/libsodium-stable/src/libsodium'
make[2]: Leaving directory '/home/devtroll/Downloads/libsodium-stable/src/libsodium'
make[2]: Entering directory '/home/devtroll/Downloads/libsodium-stable/src'
make[3]: Entering directory '/home/devtroll/Downloads/libsodium-stable/src'
make[3]: Nothing to be done for 'install-exec-am'.
make[3]: Nothing to be done for 'install-data-am'.
make[3]: Leaving directory '/home/devtroll/Downloads/libsodium-stable/src'
make[2]: Leaving directory '/home/devtroll/Downloads/libsodium-stable/src'
make[1]: Leaving directory '/home/devtroll/Downloads/libsodium-stable/src'
Making install in test
make[1]: Entering directory '/home/devtroll/Downloads/libsodium-stable/test'
Making install in default
make[2]: Entering directory '/home/devtroll/Downloads/libsodium-stable/test/default'
make[3]: Entering directory '/home/devtroll/Downloads/libsodium-stable/test/default'
make[3]: Nothing to be done for 'install-exec-am'.
make[3]: Nothing to be done for 'install-data-am'.
make[3]: Leaving directory '/home/devtroll/Downloads/libsodium-stable/test/default'
make[2]: Leaving directory '/home/devtroll/Downloads/libsodium-stable/test/default'
make[2]: Entering directory '/home/devtroll/Downloads/libsodium-stable/test'
make[3]: Entering directory '/home/devtroll/Downloads/libsodium-stable/test'
make[3]: Nothing to be done for 'install-exec-am'.
make[3]: Nothing to be done for 'install-data-am'.
make[3]: Leaving directory '/home/devtroll/Downloads/libsodium-stable/test'
make[2]: Leaving directory '/home/devtroll/Downloads/libsodium-stable/test'
make[1]: Leaving directory '/home/devtroll/Downloads/libsodium-stable/test'
make[1]: Entering directory '/home/devtroll/Downloads/libsodium-stable'
make[2]: Entering directory '/home/devtroll/Downloads/libsodium-stable'
make[2]: Nothing to be done for 'install-exec-am'.
 /bin/mkdir -p '/usr/local/lib/pkgconfig'
 /usr/bin/install -c -m 644 libsodium.pc '/usr/local/lib/pkgconfig'
make[2]: Leaving directory '/home/devtroll/Downloads/libsodium-stable'
make[1]: Leaving directory '/home/devtroll/Downloads/libsodium-stable'

Is this and indicative that libsodium is ready to go ? Or did I have problems when trying to install ?

truedat101 commented 6 years ago

if you see libsodium in /usr/local/lib (check for libsodium.so) then you are set. It should work.

pedroalvesbatista commented 6 years ago

Thats it, its there, should I finish this issue ?

pedroalvesbatista commented 6 years ago

./shell-d ./shell-d: error while loading shared libraries: libsodium.so.23: cannot open shared object file: No such file or directory

truedat101 commented 5 years ago

I think the above issues have been resolved. I cannot build on the mac.

truedat101 commented 5 years ago

ld: library not found for -lsodium clang: error: linker command failed with exit code 1 (use -v to see invocation) Error: /usr/bin/gcc failed with status: 1 ldc2 failed with exit code 1.

truedat101 commented 5 years ago

I'm going to precompile this and look into the build issue, as I can't remember, but I think the wrapper lacks the precompiled binaries.

truedat101 commented 5 years ago

I've added an issue on sodium dlang project: https://github.com/carblue/sodium/issues/3

Document how to get this working. I recall one of our other module deps handles OS X the right way out of the box, so have a look at that. Also noting, that LD_LIBRARY_PATH doesn't seem to work on OS X (you can no longer set it in the shell, which sort of blew my mind).

truedat101 commented 5 years ago

We also need to document the linux use case.

truedat101 commented 5 years ago

I've verified that I can build if I build and install libsodium. For whatever reason, dyld or ldc2, or the deimos project only looks under: dyld: Library not loaded: /usr/local/lib/libsodium.23.dylib

It won't honor the lfags. Grr.

truedat101 commented 5 years ago

Verified I can run the test cases on Mac os x. Nice!

truedat101 commented 5 years ago

This builds and is fixed.

truedat101 commented 3 years ago

Reopening this, I don't think I got this documented properly. Mainly, I don't remember what I did to make this work.

truedat101 commented 3 years ago

Probably bump this thing forward to v1.0.18.

truedat101 commented 3 years ago

Just noting, no releases on libsodium since 2019 in terms of releases? Not sure what's up.

truedat101 commented 3 years ago

Also noting, that on the new M1 mac, the ldc2 still indicates it is x86_64

truedat101 commented 3 years ago

Noting, libsodium development looks very active, at least, commits and stuff, which I expect, just that the last tagged release wasn't for two years. See https://download.libsodium.org/libsodium/releases/

truedat101 commented 3 years ago

So move to this release I think: https://download.libsodium.org/libsodium/releases/libsodium-1.0.18-stable.tar.gz

truedat101 commented 3 years ago

Noting that we should also have the build instructions in the README in a bit more detail.

truedat101 commented 3 years ago

Noting: new mac m1 has 8 cores that are available on the mid-tier. Apparently the low end has 7?

truedat101 commented 3 years ago

the mac install will put this under /usr/local/lib as expected: /usr/bin/install -c .libs/libsodium.lai /usr/local/lib/libsodium.la

truedat101 commented 3 years ago

Ok, fixed this up.

pedroalvesbatista commented 3 years ago

Alright, lets check the last details of building, checking deps and etc, put it into README.

truedat101 commented 3 years ago

Yeah it's all there. I think what I had forgotten was that for mac/linux the libsodium dlang package doesn't have a prebuilt binary (only windows?) so you have to build it, and install it into /usr/lib or /usr/local/lib (any location automatically searched by the linker or at runtime. So I think everything is in the README now.