Cyan4973 / FiniteStateEntropy

New generation entropy codecs : Finite State Entropy and Huff0
BSD 2-Clause "Simplified" License
1.34k stars 144 forks source link

Build fails with link errors #9

Closed NealBurns-AchieveInternet closed 10 years ago

NealBurns-AchieveInternet commented 10 years ago

I fetched the latest code today and tried to cd test ; make, but this failed with undefined symbol errors:

~/git/FiniteStateEntropy/test$ make
gcc      -O3 -I. -std=c99 -Wall -W -Wundef bench.c commandline.c fileio.c lz4hce.c xxhash.c ../fse.c -o fse
Undefined symbols:
  "_FSED_compressU16", referenced from:
      _BMK_benchMemU16 in ccynhgmC.o
  "_FSED_decompressU16", referenced from:
      _BMK_benchMemU16 in ccynhgmC.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [fse] Error 1

This change seems to resolve the problem:

diff --git a/test/Makefile b/test/Makefile
index bd63dcc..089c55e 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -40,10 +40,10 @@ default: fse

 all: fse fse32 probagen

-fse: bench.c commandline.c fileio.c lz4hce.c xxhash.c ../fse.c
+fse: bench.c commandline.c fileio.c lz4hce.c xxhash.c fseDist.c ../fse.c
        $(CC)      -O3 $(CFLAGS) $^ -o $@$(EXT)

-fse32: bench.c commandline.c fileio.c lz4hce.c xxhash.c ../fse.c
+fse32: bench.c commandline.c fileio.c lz4hce.c xxhash.c fseDist.c ../fse.c
        $(CC) -m32 -O3 $(CFLAGS) $^ -o $@$(EXT)

 probagen: probaGenerator.c
Cyan4973 commented 10 years ago

Thanks for the notice. Indeed, the current version is a bit messy. I'll clean that during the week-end.

Best Regards

Cyan4973 commented 10 years ago

solved into latest commit to master