inikep / lzbench

lzbench is an in-memory benchmark of open-source LZ77/LZSS/LZMA compressors
885 stars 179 forks source link

fails to compile on Fedora 32 #69

Closed cmurf closed 4 years ago

cmurf commented 4 years ago

gcc-10.0.1-0.11.fc32.x86_64

$ make
...
/usr/bin/ld: glza/GLZAdecode.o:(.bss+0x1b20bb): multiple definition of `prior_is_cap'; glza/GLZAencode.o:(.bss+0x21275): first defined here
/usr/bin/ld: glza/GLZAdecode.o:(.bss+0x1b20be): multiple definition of `cap_encoded'; glza/GLZAcompress.o:(.bss+0x1ec91): first defined here
/usr/bin/ld: glza/GLZAdecode.o:(.bss+0x1cf128): multiple definition of `symbol'; glza/GLZAencode.o:(.bss+0xd838): first defined here
/usr/bin/ld: glza/GLZAdecode.o:(.bss+0x1cf108): multiple definition of `symbol_to_move'; glza/GLZAencode.o:(.bss+0x1c1cc): first defined here
/usr/bin/ld: glza/GLZAdecode.o:(.bss+0x1cf10c): multiple definition of `symbol_index'; glza/GLZAencode.o:(.bss+0x1c1d4): first defined here
/usr/bin/ld: tornado/tor_test.o: in function `GetTempDir':
tor_test.cpp:(.text+0x4295): warning: the use of `tempnam' is dangerous, better use `mkstemp'
collect2: error: ld returned 1 exit status
make: *** [Makefile:310: lzbench] Error 1
cmurf commented 4 years ago
$ make DONT_BUILD_TORNADO=1
...
/usr/bin/ld: glza/GLZAdecode.o:(.bss+0x1cf10c): multiple definition of `symbol_index'; glza/GLZAencode.o:(.bss+0x1c1d4): first defined here
/usr/bin/ld: _lzbench/compressors.o:(.rodata+0x70): multiple definition of `g_Alloc'; lzma/Alloc.o:(.rodata+0x30): first defined here
/usr/bin/ld: _lzbench/compressors.o: in function `lzbench_tornado_compress(char*, unsigned long, char*, unsigned long, unsigned long, unsigned long, char*)':
compressors.cpp:(.text+0x1c17): undefined reference to `tor_compress(unsigned char, unsigned char*, unsigned int, unsigned char*, unsigned int)'
/usr/bin/ld: _lzbench/compressors.o: in function `lzbench_tornado_decompress(char*, unsigned long, char*, unsigned long, unsigned long, unsigned long, char*)':
compressors.cpp:(.text+0x1c35): undefined reference to `tor_decompress(unsigned char*, unsigned int, unsigned char*, unsigned int)'
collect2: error: ld returned 1 exit status
make: *** [Makefile:310: lzbench] Error 1
cmurf commented 4 years ago

This succeeds.

$ make DONT_BUILD_CSC=1 DONT_BUILD_DENSITY=1 DONT_BUILD_GLZA=1 DONT_BUILD_LZHAM=1 DONT_BUILD_LZSSE=1 DONT_BUILD_BZIP2=1 DONT_BUILD_FASTLZMA2=1 DONT_BUILD_SNAPPY=1 DONT_BUILD_TORNADO=1 DONT_BUILD_XPACK=1 DONT_BUILD_YAPPY=1 DONT_BUILD_ZLING=1
frankspace commented 4 years ago

I am encountering the same problem on Artix linux. The workaround noted by @cmurf works for me as well.

inikep commented 4 years ago

The issue should be fixed with https://github.com/inikep/lzbench/releases/tag/v1.8.1