cruppstahl / upscaledb-mysql

Upscaledb storage backend for MySQL
GNU General Public License v3.0
27 stars 2 forks source link

/usr/bin/ld: cannot find -lupsserver #2

Open yut148 opened 7 years ago

yut148 commented 7 years ago

To Mr. Christoph Rupp and upscaledb-mysql contributors. I tried upscaledb-mysql Installation to CentOS7.1  (centos-release-7-1.1503.el7.centos.2.8.x86_64)

I tried the following https://github.com/cruppstahl/upscaledb-mysql/wiki/Installation

Where is upsserver? install to /usr/local/upscaledb-2.2.1

ls -laR /usr/local/upscaledb-2.2.1

/usr/local/upscaledb-2.2.1: total 8 drwxr-xr-x. 5 root root 40 Oct 5 20:26 . drwxr-xr-x. 15 root root 4096 Oct 5 21:00 .. drwxr-xr-x. 2 root root 70 Oct 5 20:26 bin drwxr-xr-x. 3 root root 16 Oct 5 20:26 include drwxr-xr-x. 2 root root 4096 Oct 5 20:26 lib

/usr/local/upscaledb-2.2.1/bin: total 6472 drwxr-xr-x. 2 root root 70 Oct 5 20:26 . drwxr-xr-x. 5 root root 40 Oct 5 20:26 .. -rwxr-xr-x. 1 root root 6565009 Oct 5 20:26 ups_bench -rwxr-xr-x. 1 root root 19110 Oct 5 20:26 ups_dump -rwxr-xr-x. 1 root root 23350 Oct 5 20:26 ups_info -rwxr-xr-x. 1 root root 14187 Oct 5 20:26 ups_recover

/usr/local/upscaledb-2.2.1/include: total 4 drwxr-xr-x. 3 root root 16 Oct 5 20:26 . drwxr-xr-x. 5 root root 40 Oct 5 20:26 .. drwxr-xr-x. 2 root root 4096 Oct 5 20:26 ups

/usr/local/upscaledb-2.2.1/include/ups: total 164 drwxr-xr-x. 2 root root 4096 Oct 5 20:26 . drwxr-xr-x. 3 root root 16 Oct 5 20:26 .. -rw-r--r--. 1 root root 8101 Oct 5 20:26 msstdint.h -rw-r--r--. 1 root root 3265 Oct 5 20:26 types.h -rw-r--r--. 1 root root 101284 Oct 5 20:26 upscaledb.h -rw-r--r--. 1 root root 18075 Oct 5 20:26 upscaledb.hpp -rw-r--r--. 1 root root 11807 Oct 5 20:26 upscaledb_int.h -rw-r--r--. 1 root root 3791 Oct 5 20:26 upscaledb_srv.h -rw-r--r--. 1 root root 11991 Oct 5 20:26 upscaledb_uqi.h

/usr/local/upscaledb-2.2.1/lib: total 25580 drwxr-xr-x. 2 root root 4096 Oct 5 20:26 . drwxr-xr-x. 5 root root 40 Oct 5 20:26 .. -rw-r--r--. 1 root root 16751982 Oct 5 20:26 libupscaledb.a -rwxr-xr-x. 1 root root 1018 Oct 5 20:26 libupscaledb.la lrwxrwxrwx. 1 root root 21 Oct 5 20:26 libupscaledb.so -> libupscaledb.so.0.1.0 lrwxrwxrwx. 1 root root 21 Oct 5 20:26 libupscaledb.so.0 -> libupscaledb.so.0.1.0 -rwxr-xr-x. 1 root root 9431286 Oct 5 20:26 libupscaledb.so.0.1.0

cmake -DCMAKE_BUILD_TYPE=Release -DDOWNLOAD_BOOST=1 -DWITH_BOOST=/usr/local/boost_1_59_0 -DENABLE_DOWNLOADS=1 && make -j 3

(omit messeage) Linking CXX shared module ha_upscaledb.so [ 52%] Built target binlog /usr/bin/ld: cannot find -lupsserver collect2: error: ld returned 1 exit status make[2]: * [storage/upscaledb/ha_upscaledb.so] Error 1 [ 52%] make[1]: * [storage/upscaledb/CMakeFiles/upscaledb.dir/all] Error 2 make[1]: * Waiting for unfinished jobs.... Built target audit_null [ 58%] Built target perfschema make: * [all] Error 2

cruppstahl commented 7 years ago

You can find the upsserver library in upscaledb/src/5server/.libs. If it's not there (and if it wasn't installed with make install) then it was not built because of missing dependencies. Make sure that you have protobuf-devel and protobuf-compiler installed, then run ./configure once more.

yut148 commented 7 years ago

Thank you reply. I was able to install. My procedure was insufficient. It was solved by installing the protobuf-devel.

yum --disablerepo=* --enablerepo=base install protobuf-devel

However, I also need to change the Makefile. What how to update the CMakeLists.txt is correct ? change include_directories and link_directories.

cat storage/upscaledb/CMakeLists.txt

include_directories("/home/ruppc/prj/upscaledb/include")

include_directories("/usr/local/upscaledb-2.2.1/include") link_directories("/usr/local/src/upscaledb/src/.libs") link_directories("/usr/local/src/upscaledb/src/5server/.libs")

link_directories("/home/ruppc/prj/upscaledb/src/.libs")

link_directories("/home/ruppc/prj/upscaledb/src/5server/.libs")

find_library(upscaledb UPSCALEDB_LIBRARY)

cruppstahl commented 7 years ago

I think if you run make install(in the upscaledb directory) then upscaledb-mysql should compile. If not then you have to change the CMakeLists.txt file. Thanks for the heads up - there shouldn't be any absolute paths. I will fix this for the next release.