Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kyotocabinet make error #32

Open
francicco opened this issue Sep 17, 2019 · 10 comments
Open

Kyotocabinet make error #32

francicco opened this issue Sep 17, 2019 · 10 comments

Comments

@francicco
Copy link

Hi,

I'm trying to compile kyoto. All dependencies are installed. Unfortunately the configure cannot find the lzo libraries with I linked in LD_LIBRARY_PATH, C_INCLUDE_PATH, LD_RUN_PATH and LIBRARY_PAT.

checking for zlib.h... yes
checking lzo/lzo1x.h usability... no
checking lzo/lzo1x.h presence... no
checking for lzo/lzo1x.h... no
configure: error: lzo/lzo1x.h is required
make: *** [kyotocabinet/Makefile] Error 1

How do I solve this?

Thanks a lot
F

@carlosefr
Copy link
Contributor

carlosefr commented Sep 17, 2019

You will need to use CPPFLAGS and LDFLAGS.

See: kyotocabinet/configure --help

@francicco
Copy link
Author

Hi @carlosefr,

now it's running like this:

[tk19812@bc4login5 kyoto-stable-20170410]$ make
test -x kyotocabinet/configure && cd kyotocabinet && ./configure --prefix="/mnt/storage/home/tk19812/scratch/software/kyoto-stable-20170410" --enable-lzo LDFLAGS="-L/mnt/storage/home/tk19812/scratch/software/lzo-2.10/lib" CPPFLAGS="-I/mnt/storage/home/tk19812/scratch/software/lzo-2.10/insclude"

But I'm getting the same error.

[tk19812@bc4login5 kyoto-stable-20170410]$ ll /mnt/storage/home/tk19812/scratch/software/lzo-2.10/lib
total 1.0M
-rw-r--r-- 1 tk19812 bisc 801K Sep 17 12:54 liblzo2.a
-rwxr-xr-x 1 tk19812 bisc  909 Sep 17 12:54 liblzo2.la
drwxr-xr-x 2 tk19812 bisc 4.0K Sep 17 12:54 pkgconfig
drwxr-xr-x 2 tk19812 bisc 4.0K Sep 17 12:54 pkgconfig
[tk19812@bc4login5 kyoto-stable-20170410]$ ll /mnt/storage/home/tk19812/scratch/software/lzo-2.10/include/
total 0
drwxr-xr-x 2 tk19812 bisc 4.0K Mar  1  2017 lzo
[tk19812@bc4login5 kyoto-stable-20170410]$ ll /mnt/storage/home/tk19812/scratch/software/lzo-2.10/include/lzo/
total 1.8M
-rw-r--r-- 1 tk19812 bisc 2.6K Mar  1  2017 lzo1.h
-rw-r--r-- 1 tk19812 bisc 2.6K Mar  1  2017 lzo1a.h
-rw-r--r-- 1 tk19812 bisc 5.3K Mar  1  2017 lzo1b.h
-rw-r--r-- 1 tk19812 bisc 5.3K Mar  1  2017 lzo1c.h
-rw-r--r-- 1 tk19812 bisc 3.1K Mar  1  2017 lzo1f.h
-rw-r--r-- 1 tk19812 bisc 5.8K Mar  1  2017 lzo1x.h
-rw-r--r-- 1 tk19812 bisc 4.6K Mar  1  2017 lzo1y.h
-rw-r--r-- 1 tk19812 bisc 3.7K Mar  1  2017 lzo1z.h
-rw-r--r-- 1 tk19812 bisc 2.5K Mar  1  2017 lzo2a.h
-rw-r--r-- 1 tk19812 bisc 5.5K Mar  1  2017 lzo_asm.h
-rw-r--r-- 1 tk19812 bisc  16K Mar  1  2017 lzoconf.h
-rw-r--r-- 1 tk19812 bisc 125K Mar  1  2017 lzodefs.h
-rw-r--r-- 1 tk19812 bisc 1.8K Mar  1  2017 lzoutil.h

What am I doing wrong?

Thanks
F

@francicco
Copy link
Author

works, there was a typo

@francicco
Copy link
Author

I'm having this error now:

ar: creating libkyotocabinet.a
a - kcutil.o
a - kcthread.o
a - kcfile.o
a - kccompress.o
a - kccompare.o
a - kcmap.o
a - kcregex.o
a - kcdb.o
a - kcplantdb.o
a - kcprotodb.o
a - kcstashdb.o
a - kccachedb.o
a - kchashdb.o
a - kcdirdb.o
a - kctextdb.o
a - kcpolydb.o
a - kcdbext.o
a - kclangc.o
/mnt/storage/easybuild/software/binutils/2.27-GCCcore-6.3.0/bin/ld.gold: error: /mnt/storage/home/tk19812/scratch/software/lzo-2.10/lib/liblzo2.a(lzo1x_1.o): requires dynamic R_X86_64_PC32 reloc against 'memset' which may overflow at runtime; recompile with -fPIC
/mnt/storage/easybuild/software/binutils/2.27-GCCcore-6.3.0/bin/ld.gold: error: /mnt/storage/home/tk19812/scratch/software/lzo-2.10/lib/liblzo2.a(lzo_crc.o): requires dynamic R_X86_64_32 reloc which may overflow at runtime; recompile with -fPIC

F

@francicco
Copy link
Author

Solved, now I got this.

g++ -c -I/mnt/storage/home/tk19812/scratch/software/lzo-2.10/include -I/mnt/storage/home/tk19812/scratch/software/kyoto-stable-20170410/kyotocabinet -I. -I/mnt/storage/home/tk19812/scratch/software/kyoto-stable-20170410/include -I/usr/local/include -DNDEBUG -D_GNU_SOURCE=1 -D_FILE_OFFSET_BITS=64 -D_REENTRANT -D__EXTENSIONS__ -D_MYLUA -I/mnt/storage/home/tk19812/scratch/software/kyoto-stable-20170410/include -D_KT_PREFIX="\"/mnt/storage/home/tk19812/scratch/software/kyoto-stable-20170410\"" -D_KT_INCLUDEDIR="\"/mnt/storage/home/tk19812/scratch/software/kyoto-stable-20170410/include\"" -D_KT_LIBDIR="\"/mnt/storage/home/tk19812/scratch/software/kyoto-stable-20170410/lib\"" -D_KT_BINDIR="\"/mnt/storage/home/tk19812/scratch/software/kyoto-stable-20170410/bin\"" -D_KT_LIBEXECDIR="\"/mnt/storage/home/tk19812/scratch/software/kyoto-stable-20170410/libexec\"" -D_KT_APPINC="\"-I/mnt/storage/home/tk19812/scratch/software/kyoto-stable-20170410/include\"" -D_KT_APPLIBS="\"-L/mnt/storage/home/tk19812/scratch/software/kyoto-stable-20170410/lib -lkyototycoon -llzma -llzo2 -lz -lstdc++ -lresolv -lnsl -ldl -lrt -lpthread -lm -lc \"" -g -O2 -Wall -fPIC -fsigned-char -g0 -O2 -Wno-unused-but-set-variable -Wno-unused-but-set-parameter kttimeddb.cc
In file included from ktulog.cc:16:0:
ktulog.h:51:35: error: 'constexpr' needed for in-class initialization of static data member 'const double kyototycoon::UpdateLogger::FLUSHWAIT' of non-integral type [-fpermissive]
   static const double FLUSHWAIT = 0.1;
                                   ^~~
make[1]: *** [ktulog.o] Error 1
make[1]: *** Waiting for unfinished jobs....
In file included from kttimeddb.h:21:0,
                 from kttimeddb.cc:16:
./ktulog.h:51:35: error: 'constexpr' needed for in-class initialization of static data member 'const double kyototycoon::UpdateLogger::FLUSHWAIT' of non-integral type [-fpermissive]
   static const double FLUSHWAIT = 0.1;
                                   ^~~
make[1]: *** [kttimeddb.o] Error 1
make[1]: Leaving directory `/mnt/storage/scratch/tk19812/software/kyoto-stable-20170410/kyototycoon'
make: *** [tycoon] Error 2

and for this I have no idea. Sorry for all these emails.

F

@carlosefr
Copy link
Contributor

For this last error you'll have to use my fork instead: https://github.com/carlosefr/kyoto

@francicco
Copy link
Author

francicco commented Sep 17, 2019 via email

@carlosefr
Copy link
Contributor

Instead of using the code in this repo, use the code at https://github.com/carlosefr/kyoto

This repo (alticelabs/kyoto) is no longer maintained.

@francicco
Copy link
Author

@carlosefr I'm getting problems with kyoto again:

/usr/bin/ld: /home/tk19812/software/lzo-2.10/lib/liblzo2.a(lzo_crc.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /home/tk19812/software/lzo-2.10/lib/liblzo2.a(lzo1x_1.o): relocation R_X86_64_PC32 against symbol `memset@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value

How can I fix this?
Thanks a lot
F

@carlosefr
Copy link
Contributor

The issue is with the liblzo you're using. As the message says, it doesn't look like it was compiled with -fPIC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants