Cross compiling Gnu Radio for Openwrt - swig

I'm attempting to install Gnu Radio on OpenWRT "Attittude Adjustment" (latest trunk sources). I've cross compiled GR and everything seems to have compiled and linked just fine. However, importing the module in Python results in the following:
root#OpenWrt:/usr/lib/python2.7/dist-packages/gnuradio/gr# python
Python 2.7.3 (default, Jul 21 2012, 17:36:54)
[GCC 4.6.3 20120201 (prerelease)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from gnuradio import gr
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/dist-packages/gnuradio/gr/__init__.py", line 43, in <module>
from gnuradio_core import *
File "/usr/lib/python2.7/dist-packages/gnuradio/gr/gnuradio_core.py", line 23, in <module>
from gnuradio_core_runtime import *
File "/usr/lib/python2.7/dist-packages/gnuradio/gr/gnuradio_core_runtime.py", line 26, in <module>
_gnuradio_core_runtime = swig_import_helper()
File "/usr/lib/python2.7/dist-packages/gnuradio/gr/gnuradio_core_runtime.py", line 22, in swig_import_helper
_mod = imp.load_module('_gnuradio_core_runtime', fp, pathname, description)
ImportError: File not found
>>>
Note that Python has been invoked in the directory containing the SWIG library. Here is ldd _gnuradio_core_runtime.so, running on the target system:
checking sub-depends for '/usr/lib/libgnuradio-core-3.6.2git.so.0.0.0'
checking sub-depends for '/usr/lib/libgruel-3.6.2git.so.0.0.0'
checking sub-depends for '/usr/lib/libboost_date_time.so.1.49.0'
checking sub-depends for '/usr/lib/libboost_program_options.so.1.49.0'
checking sub-depends for '/usr/lib/libboost_filesystem.so.1.49.0'
checking sub-depends for '/usr/lib/libboost_system.so.1.49.0'
checking sub-depends for '/usr/lib/libboost_thread.so.1.49.0'
checking sub-depends for '/lib/libpthread.so.0'
checking sub-depends for '/usr/lib/libstdc++.so.6'
checking sub-depends for '/lib/libm.so.0'
checking sub-depends for '/lib/libgcc_s.so.1'
checking sub-depends for '/lib/libc.so.0'
checking sub-depends for '/usr/lib/libfftw3f.so.3'
checking sub-depends for 'not found'
checking sub-depends for '/lib/librt.so.0'
checking sub-depends for '/usr/lib/libvolk.so.0.0.0'
checking sub-depends for '/lib/libdl.so.0'
libgnuradio-core-3.6.2git.so.0.0.0 => /usr/lib/libgnuradio-core-3.6.2git.so.0.0.0 (0x00000000)
libgruel-3.6.2git.so.0.0.0 => /usr/lib/libgruel-3.6.2git.so.0.0.0 (0x00000000)
libboost_date_time.so.1.49.0 => /usr/lib/libboost_date_time.so.1.49.0 (0x00000000)
libboost_program_options.so.1.49.0 => /usr/lib/libboost_program_options.so.1.49.0 (0x00000000)
libboost_filesystem.so.1.49.0 => /usr/lib/libboost_filesystem.so.1.49.0 (0x00000000)
libboost_system.so.1.49.0 => /usr/lib/libboost_system.so.1.49.0 (0x00000000)
libboost_thread.so.1.49.0 => /usr/lib/libboost_thread.so.1.49.0 (0x00000000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00000000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00000000)
libm.so.0 => /lib/libm.so.0 (0x00000000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00000000)
libc.so.0 => /lib/libc.so.0 (0x00000000)
libfftw3f.so.3 => /usr/lib/libfftw3f.so.3 (0x00000000)
libfftw3f_threads.so.3 => not found (0x00000000)
librt.so.0 => /lib/librt.so.0 (0x00000000)
libvolk.so.0.0.0 => /usr/lib/libvolk.so.0.0.0 (0x00000000)
libdl.so.0 => /lib/libdl.so.0 (0x00000000)
ld-uClibc.so.0 => ld-uClibc.so.0 (0x00000000)
Here is the output of file _gnuradio_core_runtime.so on the build system:
_gnuradio_core_runtime.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, not stripped
The target system runs on an Intel Atom. Finally, the last piece of useful information I can think of is that PYTHONPATH is set to /usr/lib/python2.7/dist-packages. I'm at a loss as to what the problem is. I hope the wonderful stack overflow community may help find a solution. Thank you in advance for any pointers!

The target was missing the libfftw3f_threads.so library. Since the system call dlopen() couldn't resolve the dependencies of _gnuradio_core_runtime.so, it told Python the file couldn't be found. I copied the library to the target, did ldconfig, and Python loaded the library correctly. (Solution credited to Flexo).

Related

How do I set which libstdc++.so to be linked with libarrow.so?

I built libarrow.so and pyarrow from source using gcc7.2 on Redhat 7.4.
Still, I am stuck with the following error, which seems to be caused by using different version of gcc (4.8.5 vs. 7.2.0).
[u0017649#sys-97675 ~]$ python
Python 3.7.1 (default, Dec 14 2018, 19:46:41)
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyarrow
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/u0017649/anaconda3/lib/python3.7/site-packages/pyarrow/__init__.py", line 47, in <module>
from pyarrow.lib import cpu_count, set_cpu_count
ImportError: /usr/local/lib64/libarrow.so.13: undefined symbol: _ZN5boost6system16generic_categoryEv
I checked with ldconfig, and it clearly shows that libarrow.so is linked with libstdc++.so from Redhat OS (built with gcc4.8.5), not with one from my own build with gcc7.2.0.
[u0017649#sys-97675 ~]$ sudo ldd /usr/local/lib64/libarrow.so.13
/usr/local/lib64/libarrow.so.13: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /usr/local/lib64/libarrow.so.13)
/usr/local/lib64/libarrow.so.13: /lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /usr/local/lib64/libarrow.so.13)
/usr/local/lib64/libarrow.so.13: /lib64/libstdc++.so.6: version `CXXABI_1.3.11' not found (required by /usr/local/lib64/libarrow.so.13)
/usr/local/lib64/libarrow.so.13: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.22' not found (required by /usr/local/lib64/libarrow.so.13)
/usr/local/lib64/libarrow.so.13: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /usr/local/lib64/libarrow.so.13)
linux-vdso64.so.1 => (0x00003fff92a70000)
libbrotlienc.so.1 => not found
libbrotlidec.so.1 => not found
libbrotlicommon.so.1 => not found
libdl.so.2 => /lib64/libdl.so.2 (0x00003fff924a0000)
librt.so.1 => /lib64/librt.so.1 (0x00003fff92470000)
liblz4.so.1 => /lib64/liblz4.so.1 (0x00003fff92430000)
libsnappy.so.1 => /lib64/libsnappy.so.1 (0x00003fff92400000)
libz.so.1 => /lib64/libz.so.1 (0x00003fff923c0000)
libzstd.so.1.3.7 => not found
libboost_system.so.1.68.0 => not found
libboost_filesystem.so.1.68.0 => not found
libboost_regex.so.1.68.0 => not found
libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00003fff92230000)
I re-checked my LD_LIBRARY_PATH, but it looks OK.
[u0017649#sys-97675 ~]$ env | grep LD_
LD_LIBRARY_PATH=/usr/local/cuda/lib64:/usr/local/lib64:/usr/local/lib:/usr/lib64:/usr/lib:/lib64:/lib:
What did I do wrong ? How do I fix this situation ? Pls help.
Never mind. I was stupid enough to use 'sudo' in front of ldd for nothing, which changed the environment variable of LD_LIBRARY_PATH. Without sudo, the proper LD_LIBRARY_PATH set, I could see everything was fine.

error ('datetime.datetime' object has no attribute 'split') in django 1.11.4

I am learning django version 1.11.4 through tutorial on the official documentation. I am using python 3.6.5 and mysql8 for database. I also use mysql.connector.django to connect to mysql database. I tried to do the first Django app, part 2.
This is the link of the example I used
everything works fine except when I run the this command:
Question.objects.all()
I got the following error:
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/django/db/models/query.py", line 226, in __repr__
data = list(self[:REPR_OUTPUT_SIZE + 1])
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/django/db/models/query.py", line 250, in __iter__
self._fetch_all()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/django/db/models/query.py", line 1118, in _fetch_all
self._result_cache = list(self._iterable_class(self))
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/django/db/models/query.py", line 62, in __iter__
for row in compiler.results_iter(results):
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/django/db/models/sql/compiler.py", line 839, in results_iter
for rows in results:
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/django/db/models/sql/compiler.py", line 1284, in cursor_iter
sentinel):
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/django/db/models/sql/compiler.py", line 1283, in <lambda>
for rows in iter((lambda: cursor.fetchmany(GET_ITERATOR_CHUNK_SIZE)),
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/django/db/utils.py", line 101, in inner
return func(*args, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/mysql/connector/cursor_cext.py", line 510, in fetchmany
rows.extend(self._cnx.get_rows(size))
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/mysql/connector/connection_cext.py", line 275, in get_rows
row[i])
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/mysql/connector/conversion.py", line 205, in to_python
return self._cache_field_types[vtype[1]](value, vtype)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/mysql/connector/django/base.py", line 119, in _DATETIME_to_python
dt = MySQLConverter._DATETIME_to_python(self, value)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/mysql/connector/conversion.py", line 506, in _DATETIME_to_python
(date_, time_) = value.split(b' ')
AttributeError: 'datetime.datetime' object has no attribute 'split'
the code used in the models file :
import datetime
from django.db import models
from django.utils import timezone
class Question(models.Model):
question_text = models.CharField(max_length=200)
pub_date = models.DateTimeField('date published')
def was_published_recently(self):
return self.pub_date >= timezone.now() -
datetime.timedelta(days=1)
def __str__(self):
return self.question_text
class Choice(models.Model):
question = models.ForeignKey(Question, on_delete=models.CASCADE)
choice_text = models.CharField(max_length=200)
votes = models.IntegerField(default=0)
def __str__(self):
return self.choice_text
the database setting:
DATABASES = {
'default': {
'NAME': 'mysite',
'ENGINE': 'mysql.connector.django',
'USER': 'root',
'PASSWORD': '********',
'OPTIONS': {
'autocommit': True,
},
}
}
any clue or help to fix this error will be appreciated.
I struggled for few hours to set up my Django project with python3 using MySQL DB on MacOS.
I was not able to install either mysqlclient and MySQL-Python by pip3 in a virtual environment created with virtualenv
error stacktrace was: something wrong due to configparser in python3
Jans-MacBook-Pro:~ jan$ /Library/Frameworks/Python.framework/Versions/3.3/bin/pip-3.3 install MySQL-python
Downloading/unpacking MySQL-python
Running setup.py egg_info for package MySQL-python
Traceback (most recent call last):
File "<string>", line 16, in <module>
File "/var/folders/lf/myf7bjr57_jg7_5c4014bh640000gn/T/pip-build/MySQL-python/setup.py", line 14, in <module>
from setup_posix import get_config
File "./setup_posix.py", line 2, in <module>
from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 16, in <module>
File "/var/folders/lf/myf7bjr57_jg7_5c4014bh640000gn/T/pip-build/MySQL-python/setup.py", line 14, in <module>
from setup_posix import get_config
File "./setup_posix.py", line 2, in <module>
from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
----------------------------------------
Command python setup.py egg_info failed with error code 1 in /var/folders/lf/myf7bjr57_jg7_5c4014bh640000gn/T/pip-build/MySQL-python
Storing complete log in /Users/jan/.pip/pip.log
Jans-MacBook-Pro:~ jan$
Now the SOLUTION which worked for me was
1) installing mysql with brew again
brew install mysql
2) upgrading mysql with brew to latest version (if required)
brew upgrade mysql
3) installing mysqlclient now with pip3 (installing globally without virtualenv)
pip3 install mysqlclient
4) now access virtualenv and instal the mysqlclient in it, it will install fine without any error for configparser
As can be seen in the bug report posted by #Alasdair, the solution is:
Set use_pure=True in DATABASES['default']['OPTIONS'].
I too went through this pain yesterday or 2 days ago and was able to get it running with the mysqlclient-1.3.12. I'm going from memory here so bear with me, I tried a lot of things but eventually I got it to work.
I installed mysql8 and mysql8connector from the mysql web site as you did but got no love. After much searching and many trial and errors I found an answer somewhere which I can't find my way back to but I ended up doing:
brew install mysql
pip install mysqlclient
I know that you already have mysql installed but brew install mysql seems to add client libraries that are used to compile the mysqlclient connector. Then my database in my settings file looks like:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'polls',
'USER': 'myuser',
'PASSWORD': 'password',
'HOST': 'localhost',
'PORT': '3306',
'OPTIONS': {
'charset': 'utf8mb4',
'autocommit': True,
},
}
}
Note the ENGINE is different. I can replicate your exact error if I change my ENGINE to mysql.connector.django.
However, using django.db.backends.mysql I still get the following warning:
lib/python3.6/site-packages/django/db/backends/mysql/base.py:71: Warning: (3719, "'utf8' is currently an alias for the character set UTF8MB3, which will be replaced by UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous."
which I can't figure out, but as it is only a warning the Django tutorial seems to be working fine.
Let me know if this helps or if you have other questions and I'll do my best to help.
This is mysql-connector-python data conversion issue. You can get around this by setting the database options parameter with use_pure=true. This issue is not fixed in the current version 8.0.11,8.0.12, and 8.0.13.
"OPTIONS":{
"use_pure":True
}
This is just a temporary solution. Refer here for more information: https://bugs.mysql.com/bug.php?id=90541

Qt5 MYSQL driver not loaded error

I have a Fedora 27 64bit OS, and am trying to run a Qt based app which is trying to access a MySQL server (which I can successfully reach from the command line). But my app shows these errors:
QSqlDatabase: QMYSQL driver not loaded
QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QODBC QODBC3 QPSQL QPSQL7
ERROR: DATABASE: Open failed with error code [-1]. Driver error [Driver not loaded]. Database error [Driver not loaded]
I've tried everything I could find online but can't solve this. When I check the libqsqlmysql.so dependencies I see:
[root#host lib64]# ldd /home/administrator/Qt/5.7/gcc_64/plugins/sqldrivers/libqsqlmysql.so
/home/administrator/Qt/5.7/gcc_64/plugins/sqldrivers/libqsqlmysql.so: /lib64/libmysqlclient_r.so.16: version `libmysqlclient_16' not found (required by /home/administrator/Qt/5.7/gcc_64/plugins/sqldrivers/libqsqlmysql.so)
linux-vdso.so.1 (0x00007fffde4ef000)
libmysqlclient_r.so.16 => /lib64/libmysqlclient_r.so.16 (0x00007f3188fd8000)
libz.so.1 => /lib64/libz.so.1 (0x00007f3188dc1000)
libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007f3188b8b000)
libnsl.so.1 => /lib64/libnsl.so.1 (0x00007f3188971000)
libssl.so.10 => /lib64/libssl.so.10 (0x00007f3188705000)
libcrypto.so.10 => /lib64/libcrypto.so.10 (0x00007f31882a7000)
libQt5Sql.so.5 => /home/administrator/Qt/5.7/gcc_64/plugins/sqldrivers/../../lib/libQt5Sql.so.5 (0x00007f3188062000)
libQt5Core.so.5 => /home/administrator/Qt/5.7/gcc_64/plugins/sqldrivers/../../lib/libQt5Core.so.5 (0x00007f3187944000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f3187725000)
libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f318739f000)
libm.so.6 => /lib64/libm.so.6 (0x00007f318704a000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f3186e33000)
libc.so.6 => /lib64/libc.so.6 (0x00007f3186a50000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f318684c000)
libssl.so.1.1 => /lib64/libssl.so.1.1 (0x00007f31865e0000)
libcrypto.so.1.1 => /lib64/libcrypto.so.1.1 (0x00007f3186158000)
libfreebl3.so => /lib64/libfreebl3.so (0x00007f3185f55000)
libicui18n.so.56 => /home/administrator/Qt/5.7/gcc_64/plugins/sqldrivers/../../lib/libicui18n.so.56 (0x00007f3185abb000)
libicuuc.so.56 => /home/administrator/Qt/5.7/gcc_64/plugins/sqldrivers/../../lib/libicuuc.so.56 (0x00007f3185703000)
libicudata.so.56 => /home/administrator/Qt/5.7/gcc_64/plugins/sqldrivers/../../lib/libicudata.so.56 (0x00007f3183d20000)
libgthread-2.0.so.0 => /lib64/libgthread-2.0.so.0 (0x00007f3183b1e000)
librt.so.1 => /lib64/librt.so.1 (0x00007f3183916000)
libglib-2.0.so.0 => /lib64/libglib-2.0.so.0 (0x00007f3183602000)
/lib64/ld-linux-x86-64.so.2 (0x00007f3189440000)
libpcre.so.1 => /lib64/libpcre.so.1 (0x00007f318338f000)
and sure enough there is no /lib64/libmysqlclient_r.so.16 on my system. And DNF says that nothing provides this file! So I tried to symlink /lib64/libmysqlclient_r.so to /lib64/libmysqlclient_r.so.16 but still no joy.
Can someone offer a solution?
After lots of searching on different sites, the consensus was to recompile the Qt sql drivers from source (which is installed with Qt Creator). Switch to the source directory for SQL drivers then 'make', and 'make install'
After that the error was gone.
Ignore all the suggestions about copying/symlinking different .so files. It doesn't work (anymore).

what's wrong with my keras.using theano backend

i am learning to use deeping learning to deal with physics problem.when i want to run my program by theano,there are some bad things happended.
~$ python
Python 2.7.13 (default, Jan 19 2017, 14:48:08)
[GCC 6.3.0 20170118] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import theano
Traceback (most recent call last):
File "", line 1, in
File "theano.py", line 1
%!PS-Adobe-3.0
^
SyntaxError: invalid syntax
import keras
Using Theano backend.
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python2.7/dist-packages/keras/init.py", line 3, in
from . import utils
File "/usr/local/lib/python2.7/dist-packages/keras/utils/init.py", line 6, in
from . import conv_utils
File "/usr/local/lib/python2.7/dist-packages/keras/utils/conv_utils.py", line 3, in
from .. import backend as K
File "/usr/local/lib/python2.7/dist-packages/keras/backend/init.py", line 80, in
from .theano_backend import *
File "/usr/local/lib/python2.7/dist-packages/keras/backend/theano_backend.py", line 3, in
import theano
File "theano.py", line 1
%!PS-Adobe-3.0
^
SyntaxError: invalid syntax

How to compile to avoid shared library errors?

I need to develop a program using MySQL C API. I will develop it on my CentOS virtual machine and run it on RedHat servers. I compiled a some kind of Hello World program and transferred it to the server. But I get an error about shared libraries.
$ ./test1
./test1: error while loading shared libraries: libssl.so.10: cannot open shared object file: No such file or directory
I see that this library exists but with a slightly different name:
$ ls -l /usr/lib/libssl*
-rw-r--r-- 1 root root 458752 Aug 13 17:27 /usr/lib/libssl.a
lrwxrwxrwx 1 root root 26 Sep 14 01:26 /usr/lib/libssl.so -> ../../lib/libssl.so.0.9.8er
-rwxr-xr-x 1 root root 217560 Nov 9 12:22 /usr/lib/libssl3.so
Since I am not root on the server, I can't simply make a symbolic link. I will distribute my program to many people without root privilege and system administration skills. Is there a safe way of compiling my program to avoid such errors?
here is my simple program:
#include <my_global.h>
#include <mysql.h>
int main(int argc, char **argv)
{
printf("MySQL client version: %s\n", mysql_get_client_info());
}
and, this is how I compiled it:
gcc version.c -o version `mysql_config --cflags --libs`
output of ldd ./test1:
linux-gate.so.1 => (0x00685000)
libmysqlclient.so.16 => /usr/lib/mysql/libmysqlclient.so.16 (0x00a8c000)
libz.so.1 => /lib/libz.so.1 (0x00110000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0x00240000)
libnsl.so.1 => /lib/libnsl.so.1 (0x002b7000)
libm.so.6 => /lib/libm.so.6 (0x00f5a000)
libssl.so.10 => /usr/lib/libssl.so.10 (0x00e0c000)
libcrypto.so.10 => /usr/lib/libcrypto.so.10 (0x002d1000)
libc.so.6 => /lib/libc.so.6 (0x004d3000)
libfreebl3.so => /lib/libfreebl3.so (0x00686000)
/lib/ld-linux.so.2 (0x00977000)
libgssapi_krb5.so.2 => /lib/libgssapi_krb5.so.2 (0x006ea000)
libkrb5.so.3 => /lib/libkrb5.so.3 (0x00123000)
libcom_err.so.2 => /lib/libcom_err.so.2 (0x00804000)
libk5crypto.so.3 => /lib/libk5crypto.so.3 (0x001f4000)
libresolv.so.2 => /lib/libresolv.so.2 (0x0021b000)
libdl.so.2 => /lib/libdl.so.2 (0x00dbf000)
libkrb5support.so.0 => /lib/libkrb5support.so.0 (0x00234000)
libkeyutils.so.1 => /lib/libkeyutils.so.1 (0x00f0b000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00e72000)
libselinux.so.1 => /lib/libselinux.so.1 (0x00862000)
output of mysql_config --cflags --libs:
-I/usr/include/mysql -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -fasynchronous-unwind-tables -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing -fwrapv -fPIC -DUNIV_LINUX
-rdynamic -L/usr/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm -lssl -lcrypto
Your binary is compiled against openssl version 1.0.x and therefore requires openssl major version 1. The target machine has version 0.9.8, which is major version 0. Different major versions are considered incompatible, hence the error.
Read up on ld.so and its variables such as LD_LIBRARY_PATH and LD_PRELOAD-- you can install, say libssl.so in your own ~/lib/ and have the dynamic linker find that.
Needless to say, you are much better off doing this via the package management system.