[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Compiling on Synology



I'm still not sure what is happening here.  I do already have these exported:

export LDFLAGS='-Wl,-rpath=/opt/lib -Wl,--dynamic-linker=/opt/lib/ld-linux-x86-64.so.2 -L/opt/lib'
export CFLAGS='-O2 -pipe -fomit-frame-pointer -fno-caller-saves '

I added these and tried again but I got the same result:

export LD_LIBRARY_PATH='/opt/lib'
export LIBRARY_PATH='/opt/lib'

There are mostly 64 bit libraries on the system, but there are 32 bit ones as well:

Locate doesn't exist on this machine, but 3 libcryptos are in hints:

DiskStation> ldconfig -p | grep libcrypto
        libcrypto.so.1.0.0 (libc6,x86-64) => /opt/lib/libcrypto.so.1.0.0
        libcrypto.so.1.0.0 (libc6) => /lib/libcrypto.so.1.0.0
        libcrypto.so (libc6) => /lib/libcrypto.so
DiskStation> 

How can I get configure to check for the library in the correct place?  I'm digging through the configure script.  I don't find the variables for LIBRARY_PATH or LD_LIBRARY_PATH anywhere, so i'm not sure how they would influence things.

BTW, here is what ldd says about libcrypto.  I think that does not matter, as we just want configure to verify that it has found the correct libcrypto.

DiskStation> ldd /opt/lib/libcrypto.so.1.0.0 
ldd: $warning: you do not have execution permission for `/opt/lib/libcrypto.so.1.0.0'
        linux-vdso.so.1 (0x00007fffedb11000)
        libdl.so.2 => /opt/lib/libdl.so.2 (0x00007f0a72aeb000)
        libc.so.6 => /opt/lib/libc.so.6 (0x00007f0a7274c000)
        /opt/lib/ld-linux-x86-64.so.2 (0x00007f0a73139000)


On Wed, Jul 27, 2016 at 3:18 PM, Graham Percival <gperciva@tarsnap.com> wrote:
I see these lines in your config.log:

configure:6048: checking for RSA_private_encrypt in -lcrypto
configure:6073: gcc -o conftest -O2 -pipe -fomit-frame-pointer
-fno-caller-saves   -Wl,-rpath=/opt/lib
-Wl,--dynamic-linker=/opt/lib/ld-linux-x86-64.so.2 -L/opt/lib conftest.c
-lcrypto  -lz -lrt  >&5
/opt/bin/ld: skipping incompatible /lib/libcrypto.so when searching for
-lcrypto
/opt/bin/ld: skipping incompatible /usr/lib/libcrypto.so when searching for
-lcrypto
/opt/bin/ld: cannot find -lcrypto


I'm suspicious about your header being in /opt/include , but apparently either
/opt/lib/libcrypto* doesn't exist, or your system isn't looking there for some
reason?  Do you have LD_LIBRARY_PATH and/or LIBRARY_PATH set to include
/opt/lib ?

I have no experience with these systems, but it looks like that warning is
commonly used for the wrong architecture (i.e. 32-bit vs. 64-bit).  What does
    locate libcrypto
give for you?  On my ubuntu 14.04 amd64 system, I see:
    /lib/i386-linux-gnu/libcrypto.so.1.0.0
    /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
    /usr/lib/i386-linux-gnu/libcrypto.so
    /usr/lib/x86_64-linux-gnu/libcrypto.so
so presumably I would get the same error message if my system looked at the
32-bit version.

Hope this helps,
- Graham


On Wed, Jul 27, 2016 at 02:50:42PM -0500, Justin Haynes wrote:
>    List, I am also trying to compile tarsnap for use on a Diskstation as the
>    last person successfully did in this thread.A  That person's machine was
>    Arm based.A  Mine is x64.A
>    Any ideas what I might try based on the following, or is there any more
>    information I should provide?
>    > The problem is that entware-ng doesn't create some of the lib symlinks
>
>  > properly creating configure problems when compiling tarsnap.  So you need to
>  > use "opkg install --force-reinstall" to reinstall openssl and other packages
>  > configure complains about.
>
>  > After, compiling is simple and everything works.
>
>  Actually, this didn't work so well for me, and I'm not sure of the cause.  I did opt to use entware-ng as Arun did, and I followed the instructionsA he indicated.
>
>  During ./configure I have an error in configuration for the OpenSSL on this Diskstation DL412+, which is an x64 based machine:
>
>
>
>  checking openssl/rsa.h usability... yes
>  checking openssl/rsa.h presence... yes
>  checking for openssl/rsa.h... yes
>  checking for RSA_private_encrypt in -lcrypto... no
>  configure: error: *** OpenSSL missing ***
>  DiskStation>
>
>    I suppose the following would be good to check:
>    DiskStation> cat /opt/include/openssl/crypto.h | grep RSA
>    A * apply to all code found in this distribution, be it the RC4, RSA,
>    # define CRYPTO_LOCK_RSA A  A  A  A  A  A  A  A  9
>    # define CRYPTO_LOCK_RSA_BLINDING A  A  A  A 25
>    # define CRYPTO_EX_INDEX_RSA A  A  A  A  A  A  6
>    DiskStation> opkg list libopenssl
>    libopenssl - 1.0.2h-1 - The OpenSSL Project is a collaborative effort to
>    develop a robust,
>    A commercial-grade, full-featured, and Open Source toolkit implementing
>    the Secure
>    A Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1)
>    protocols as well
>    A as a full-strength general purpose cryptography library.
>    A This package contains the OpenSSL shared libraries, needed by other
>    programs.
>    DiskStation> uname -a
>    Linux DiskStation 3.10.35 #5644 SMP Thu Nov 12 17:18:22 CST 2015 x86_64
>    GNU/Linux
>    DiskStation> pwd
>    /volume1/scratch/source/tarsnap-autoconf-1.0.37
>    config.log is here:
>    http://pastebin.com/d4bw6fY7