facebook/hhvm — pull request #4302 by yaslama (2014-11-21 10:21:18+00:00)
Title: Fix build when using system installed lz4 library instead of third-party

Without this patch, the build fails with the following error:

```
+ /usr/bin/ocamlopt.opt heap/hh_shared.o utils/realpath.o inotify/inotify_stubs.o utils/nproc.o hhi/hhi_elf.o utils/get_build_id.gen.o utils/get_build_id.o -cclib -lelf -cclib -lpthread -cclib -L/usr/lib/x86_64-linux-gnu -cclib -L/usr/lib/x86_64-linux-gnu unix.cmxa str.cmxa avl/monoidAvl.cmx utils/hh_json.cmx utils/ident.cmx utils/sys_utils.cmx utils/utils.cmx utils/relative_path.cmx utils/pos.cmx deps/fileInfo.cmx deps/typing_graph.cmx deps/typing_deps.cmx inotify/inotify.cmx fsnotify_linux/fsnotify.cmx dfind/dfindEnv.cmx dfind/dfindMaybe.cmx dfind/dfindAddFile.cmx utils/sysConfig.cmx utils/tmp.cmx dfind/dfindServer.cmx dfind/dfindLib.cmx globals/autocomplete.cmx globals/find_refs.cmx globals/ide.cmx globals/serverConfig.cmx heap/globalStorage.cmx heap/prefix.cmx heap/value.cmx heap/sharedMem.cmx utils/path.cmx utils/shell.cmx hhi/hhi.cmx parsing/namespace_env.cmx parsing/ast.cmx utils/errors.cmx naming/naming_ast_helpers.cmx naming/naming_hooks.cmx naming/naming_special_names.cmx naming/nast.cmx parsing/namespaces.cmx naming/naming.cmx naming/naming_heap.cmx naming/nastVisitor.cmx parsing/lexer_hack.cmx parsing/parser_heap.cmx parsing/parser_hack.cmx parsing/parsing_hooks.cmx utils/lock.cmx utils/pidLog.cmx utils/fork.cmx utils/printSignal.cmx procs/worker.cmx procs/multiWorker.cmx parsing/parsing_service.cmx procs/bucket.cmx search/searchUtils.cmx search/fuzzySearchService.cmx utils/trie.cmx search/trieSearchService.cmx search/searchService.cmx search/hackSearchService.cmx typing/typing_reason.cmx typing/typing_defs.cmx typing/typing_env.cmx typing/typing_hooks.cmx typing/typing_print.cmx server/argumentInfoService.cmx typing/typeVisitor.cmx typing/typing_exts.cmx typing/typing_hint.cmx typing/typing_utils.cmx typing/typing_instantiate.cmx typing/typing_tdef.cmx typing/nastCheck.cmx typing/nast_terminality.cmx typing/typing_expand.cmx typing/typing_unification_env.cmx typing/typing_unify.cmx typing/typing_subtype.cmx typing/typing_ops.cmx typing/typing_suggest.cmx typing/nastInitCheck.cmx typing/typingEqualityCheck.cmx typing/typing_alias.cmx typing/typing_async.cmx typing/typing_dynamic_yield.cmx typing/typing_enum.cmx typing/typing_extends.cmx typing/typing_generic.cmx typing/typing_lenv.cmx typing/typing_variance.cmx typing/typing.cmx server/autocompleteService.cmx server/fileOutline.cmx server/find.cmx utils/build_id.cmx server/serverMsg.cmx typing/typing_inherit.cmx typing/typing_decl.cmx typing/typing_decl_service.cmx typing/typing_check_service.cmx server/serverIdeUtils.cmx typing/typing_compare.cmx server/findRefsService.cmx utils/wwwroot.cmx server/serverArgs.cmx server/serverEnv.cmx server/methodJumps.cmx server/serverArgumentInfo.cmx server/serverAutoComplete.cmx typing/coverage_level.cmx server/serverColorFile.cmx typing/typing_redecl_service.cmx server/serverTypeCheck.cmx typing/typing_suggest_service.cmx server/serverConvert.cmx server/serverCoverageMetric.cmx server/serverDfind.cmx server/serverEnvBuild.cmx server/serverError.cmx server/serverFileOutline.cmx server/serverFindRefs.cmx server/serverHealth.cmx server/serverPeriodical.cmx socket/socket.cmx stubs/eventLogger.cmx server/serverFunctors.cmx server/serverIdentifyFunction.cmx server/serverInferType.cmx server/serverInit.cmx server/serverMethodJumps.cmx server/serverRefactor.cmx server/serverSearch.cmx server/serverSign.cmx stubs/buildMain.cmx stubs/prologMain.cmx server/hackProgram.cmx hh_server.cmx -o hh_server.native
heap/hh_shared.o: In function `hh_save':
hh_shared.c:(.text+0x4dd): undefined reference to `LZ4_compressHC'
heap/hh_shared.o: In function `decompress':
hh_shared.c:(.text+0x67b): undefined reference to `LZ4_decompress_fast'
collect2: error: ld returned 1 exit status
File "caml_startup", line 1:
Error: Error during linking
Command exited with code 2.
Compilation unsuccessful after building 451 targets (0 cached) in 00:00:10.
Makefile:103: recipe for target 'build-hack' failed
make[3]: *** [build-hack] Error 10
hphp/hack/CMakeFiles/hack.dir/build.make:49: recipe for target 'hphp/hack/CMakeFiles/hack' failed
make[2]: *** [hphp/hack/CMakeFiles/hack] Error 2
CMakeFiles/Makefile2:1327: recipe for target 'hphp/hack/CMakeFiles/hack.dir/all' failed
make[1]: *** [hphp/hack/CMakeFiles/hack.dir/all] Error 2
Makefile:117: recipe for target 'all' failed
make: *** [all] Error 2
```