conformal / cyphertite

A high-security scalable solution for online backups.
https://www.cyphertite.com/
46 stars 8 forks source link

Source won't compile on Gentoo: "Make failed for 'shrink'" #84

Closed waa closed 10 years ago

waa commented 10 years ago

Looking forward to using and recommending this open-source secure solution!

However, source will not compile on Gentoo. Below is the output:

--[snip]-- Building ==> shrink ===> libshrink make[1]: Entering directory /usr/local/src/cyphertite-2.0.2/shrink/libshrink' make[1]:obj' is up to date. make[1]: Leaving directory /usr/local/src/cyphertite-2.0.2/shrink/libshrink' ===> shrink make[1]: Entering directory/usr/local/src/cyphertite-2.0.2/shrink/shrink' make[1]: obj' is up to date. make[1]: Leaving directory/usr/local/src/cyphertite-2.0.2/shrink/shrink' ===> libshrink make[1]: Entering directory /usr/local/src/cyphertite-2.0.2/shrink/libshrink' Dependencies are automatically generated. This target is not necessary. make[1]: Leaving directory/usr/local/src/cyphertite-2.0.2/shrink/libshrink' ===> shrink make[1]: Entering directory /usr/local/src/cyphertite-2.0.2/shrink/shrink' Dependencies are automatically generated. This target is not necessary. make[1]: Leaving directory/usr/local/src/cyphertite-2.0.2/shrink/shrink' ===> libshrink make -C libshrink make[1]: Entering directory /usr/local/src/cyphertite-2.0.2/shrink/libshrink' Generating obj/shrink.pic_o.depend cc -I . -I /usr/local/include/clens -Wall -g -fPIC -D_GNU_SOURCE -DSUPPORT_LZW -DSUPPORT_LZO2 -DSUPPORT_LZMA -DNEED_LIBCLENS -o obj/shrink.pic_o -c shrink.c cc -shared -Wl,-soname=libshrink.so.3 -o obj/libshrink.so.3.0 obj/shrink.pic_o -L/usr/local/ssl/lib -lz -llzo2 -llzma -lbsd Generating obj/shrink.o.depend cc -I . -I /usr/local/include/clens -Wall -g -D_GNU_SOURCE -DSUPPORT_LZW -DSUPPORT_LZO2 -DSUPPORT_LZMA -DNEED_LIBCLENS -o obj/shrink.o -c shrink.c ar crs obj/libshrink.a obj/shrink.o make[1]: Leaving directory/usr/local/src/cyphertite-2.0.2/shrink/libshrink' ===> shrink make -C shrink make[1]: Entering directory /usr/local/src/cyphertite-2.0.2/shrink/shrink' Generating obj/shrink.o.depend cc -I ../libshrink -I /usr/local/include/clens -I /usr/local/ssl/include -Wall -Werror -g -D_GNU_SOURCE -DSUPPORT_LZW -DSUPPORT_LZO2 -DSUPPORT_LZMA -DNEED_LIBCLENS -o obj/shrink.o -c shrink.c cc -o obj/shrink obj/shrink.o -L/usr/local/ssl/lib -L../libshrink/obj -L../libshrink -lshrink -lclens -Wl,-Bstatic -lssl -lcrypto -Wl,-Bdynamic -ldl -lbsd -lz -llzo2 -llzma /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lssl /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lcrypto collect2: error: ld returned 1 exit status make[1]: *** [obj/shrink] Error 1 make[1]: Leaving directory/usr/local/src/cyphertite-2.0.2/shrink/shrink' make: *\ [shrink] Error 2


\ ERROR **


Make failed for 'shrink'. --[snip]--

Please let me know if there is anything else I can provide to help solve this.

Thanks!

Bill Arlofski http://www.revpol.com/

jcvernaleo commented 10 years ago

Hi @waa I haven't used gentoo myself in years, but hopefully I can still help. Looks like shrink can't find -lssl and -lcrypto. On Ubutnu/Debian or Redhat type distros, that would mean that you need to install a package such as openssl-dev or -devel.

On gentoo, I'm not sure what the appropriate thing to emerge for that is (or if there are some use flags you can try). But that is the first place to look. Also see if there are any use flags relate to it that seem relevant (maybe one controlling static or shared libs for openssl).

Let me know if you get any further based on that.

waa commented 10 years ago

On 06/25/14 09:15, John C. Vernaleo wrote:

Hi @waa https://github.com/waa I haven't used gentoo myself in years, but hopefully I can still help. Looks like shrink can't find -lssl and -lcrypto. On Ubutnu/Debian or Redhat type distros, that would mean that you need to install a package such as openssl-dev or -devel.

On gentoo, I'm not sure what the appropriate thing to emerge for that is (or if there are some use flags you can try). But that is the first place to look. Also see if there are any use flags relate to it that seem relevant (maybe one controlling static or shared libs for openssl).

Let me know if you get any further based on that.

Hi John!

Yeah, on Gentoo, when openssl is installed, so are the required headers and what other distros package as separate "development" packages.

My openssl install is not statically built, (e.g.: static-libs USE flag is not set) and the libs are:

locate libssl

/usr/lib32/libssl.so /usr/lib32/libssl.so.0.9.8 /usr/lib32/libssl.so.1.0.0 /usr/lib32/libssl3.so /usr/lib32/pkgconfig/libssl.pc /usr/lib64/libssl.so /usr/lib64/libssl.so.0.9.8 /usr/lib64/libssl.so.1.0.0 /usr/lib64/libssl3.so /usr/lib64/pkgconfig/libssl.pc

locate libcrypto

/usr/lib32/libcrypto.so /usr/lib32/libcrypto.so.0.9.8 /usr/lib32/libcrypto.so.1.0.0 /usr/lib32/pkgconfig/libcrypto.pc /usr/lib64/libcrypto++.so /usr/lib64/libcrypto++.so.0 /usr/lib64/libcrypto++.so.0.0.0 /usr/lib64/libcrypto.so /usr/lib64/libcrypto.so.0.9.8 /usr/lib64/libcrypto.so.1.0.0 /usr/lib64/libcryptopp.so /usr/lib64/libcryptopp.so.0 /usr/lib64/libcryptopp.so.0.0.0

Other apps that are compiled from source and installed outside of Gentoo's portage system which also require ssl find the ssl and crypto libraries OK.

Hope this helps...

Bill

Bill Arlofski Reverse Polarity, LLC 860-824-2433 Office 860-965-5110 Cell

http://www.revpol.com/

He picks up scraps of information He's adept at adaptation

Learn about strong cryptography and how it can protect your personal communications from the NSA's illegal spying programs here: https://en.wikipedia.org/wiki/Pretty_Good_Privacy

This communication may be unlawfully collected and stored by the National Security Agency (NSA) in secret. The parties to this email do not consent to the retrieving or storing of this communication and any related metadata, as well as printing, copying, re-transmitting, disseminating, or otherwise using it. If you have received this communication in error (or illegally - by mass collection and/or spying), you are required to delete it immediately.

jcvernaleo commented 10 years ago

Ah, I thought that was the case with Gentoo, but it has been enough years that I didn't remember for sure so I didn't want to assume. So cyphertite and its immediate dependencies all expect to link against static libs. Would it be possible for you to at least build those libs with the static-libs use flag? FYI, on my Ubuntu machine: john@yoshi ~ $ locate libcrypto /lib/i386-linux-gnu/libcrypto.so.1.0.0 /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 /usr/lib/x86_64-linux-gnu/libcrypto.a /usr/lib/x86_64-linux-gnu/libcrypto.so /usr/lib/x86_64-linux-gnu/pkgconfig/libcrypto.pc /var/lib/dpkg/info/libcrypto++9.list /var/lib/dpkg/info/libcrypto++9.postrm

waa commented 10 years ago

On 06/25/14 09:58, John C. Vernaleo wrote:

Ah, I thought that was the case with Gentoo, but it has been enough years that I didn't remember for sure so I didn't want to assume. So cyphertite and its immediate dependencies all expect to link against static libs. Would it be possible for you to at least build those libs with the static-libs use flag? FYI, on my Ubuntu machine: john@yoshi ~ $ locate libcrypto /lib/i386-linux-gnu/libcrypto.so.1.0.0 /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 /usr/lib/x86_64-linux-gnu/libcrypto.a /usr/lib/x86_64-linux-gnu/libcrypto.so /usr/lib/x86_64-linux-gnu/pkgconfig/libcrypto.pc /var/lib/dpkg/info/libcrypto++9.list /var/lib/dpkg/info/libcrypto++9.postrm

— Reply to this email directly or view it on GitHub https://github.com/conformal/cyphertite/issues/84#issuecomment-47103978.

Hi John...

OK, I rebuilt openssl with static-libs USE flag, then cyphertite compiled and installed without complaint.

However:

cyphertite --help

cyphertite: error while loading shared libraries: libexude.so.3: cannot open shared object file: No such file or directory

cyphertite-2.0.2 # ldd which cyphertite

linux-vdso.so.1 (0x00007fffda800000)
libassl.so.6 => /usr/local/lib64/libassl.so.6 (0x00007f097b688000)
libexude.so.3 => not found
libclog.so.2 => /usr/local/lib64/libclog.so.2 (0x00007f097b480000)
libshrink.so.3 => not found
libxmlsd.so.3 => /usr/local/lib64/libxmlsd.so.3 (0x00007f097b278000)
libevent_core-2.0.so.5 => /usr/lib64/libevent_core-2.0.so.5 (0x00007f097b048000)
libexpat.so.1 => /usr/lib64/libexpat.so.1 (0x00007f097ae18000)
libsqlite3.so.0 => /usr/lib64/libsqlite3.so.0 (0x00007f097ab58000)
liblzma.so.5 => /lib64/liblzma.so.5 (0x00007f097a930000)
liblzo2.so.2 => /usr/lib64/liblzo2.so.2 (0x00007f097a708000)
libidn.so.11 => /usr/lib64/libidn.so.11 (0x00007f097a4d0000)
libssh2.so.1 => /usr/lib64/libssh2.so.1 (0x00007f097a2a0000)
librtmp.so.0 => /usr/lib64/librtmp.so.0 (0x00007f097a080000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f0979e78000)
libedit.so.0 => /lib64/libedit.so.0 (0x00007f0979c38000)
libncurses.so.5 => /lib64/libncurses.so.5 (0x00007f09799e0000)
libz.so.1 => /lib64/libz.so.1 (0x00007f09797c8000)
libbsd.so.0 => /usr/lib64/libbsd.so.0 (0x00007f09795b8000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f0979398000)
libc.so.6 => /lib64/libc.so.6 (0x00007f0978fe8000)
librt.so.1 => /lib64/librt.so.1 (0x00007f0978de0000)
libssl.so.1.0.0 => /usr/lib64/libssl.so.1.0.0 (0x00007f0978b70000)
libcrypto.so.1.0.0 => /usr/lib64/libcrypto.so.1.0.0 (0x00007f0978798000)
/lib64/ld-linux-x86-64.so.2 (0x00007f097b898000)

Bill Arlofski Reverse Polarity, LLC 860-824-2433 Office 860-965-5110 Cell

http://www.revpol.com/

He picks up scraps of information He's adept at adaptation

Learn about strong cryptography and how it can protect your personal communications from the NSA's illegal spying programs here: https://en.wikipedia.org/wiki/Pretty_Good_Privacy

This communication may be unlawfully collected and stored by the National Security Agency (NSA) in secret. The parties to this email do not consent to the retrieving or storing of this communication and any related metadata, as well as printing, copying, re-transmitting, disseminating, or otherwise using it. If you have received this communication in error (or illegally - by mass collection and/or spying), you are required to delete it immediately.

jcvernaleo commented 10 years ago

Glad to hear it built. That is probably a consequence of ct installing things in /usr/local which is a bit less common on linux than on BSDs.

Can you try setting you LD_LIBRARY_PATH to include the location of the installed libs?

So in bash: export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib and then try again.

I think I saw a lib64 in there, so if your files went there instead of lib, you could replace with /usr/local/lib64

waa commented 10 years ago

On 06/25/14 12:56, John C. Vernaleo wrote:

Glad to hear it built. That is probably a consequence of ct installing things in /usr/local which is a bit less common on linux than on BSDs.

Can you try setting you LD_LIBRARY_PATH to include the location of the installed libs?

So in bash: export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib and then try again.

I think I saw a lib64 in there, so if your files went there instead of lib, you could replace with /usr/local/lib64

Yep, that gets it.

I forgot to run updatedb before running the previous locate command, otherwise I would have found those and would have tried setting the LD_LIBRARY_PATH.

OK, so I'll test this out, and cross my fingers and hope someone takes ownership of Gentoo ebuild for cyphertite. :)

Thanks!

Bill

Bill Arlofski Reverse Polarity, LLC 860-824-2433 Office 860-965-5110 Cell

http://www.revpol.com/

He picks up scraps of information He's adept at adaptation

Learn about strong cryptography and how it can protect your personal communications from the NSA's illegal spying programs here: https://en.wikipedia.org/wiki/Pretty_Good_Privacy

This communication may be unlawfully collected and stored by the National Security Agency (NSA) in secret. The parties to this email do not consent to the retrieving or storing of this communication and any related metadata, as well as printing, copying, re-transmitting, disseminating, or otherwise using it. If you have received this communication in error (or illegally - by mass collection and/or spying), you are required to delete it immediately.

jcvernaleo commented 10 years ago

@waa Great, glad things work. I'm going to close this issue (since we figured out the build problems) but please open another if you run into any other issues.

As for an ebuild, I'd love to see that too. If you or anyone else works on one, I'll provide whatever support I can, but it isn't really something I'll be able to go and do myself (between time and the lack of a gentoo box).