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

Compilation on Mac #69

Closed
mobiliodevelopment opened this issue Mar 2, 2020 · 2 comments
Closed

Compilation on Mac #69

mobiliodevelopment opened this issue Mar 2, 2020 · 2 comments

Comments

@mobiliodevelopment
Copy link

Hello there!

I've run compilation and got error:
rm -f libbrotli.a
ar -crs libbrotli.a bin/obj/c/common/dictionary.o bin/obj/c/common/transform.o bin/obj/c/dec/bit_reader.o bin/obj/c/dec/decode.o bin/obj/c/dec/huffman.o bin/obj/c/dec/state.o bin/obj/c/enc/backward_references.o bin/obj/c/enc/backward_references_hq.o bin/obj/c/enc/bit_cost.o bin/obj/c/enc/block_splitter.o bin/obj/c/enc/brotli_bit_stream.o bin/obj/c/enc/cluster.o bin/obj/c/enc/compress_fragment.o bin/obj/c/enc/compress_fragment_two_pass.o bin/obj/c/enc/dictionary_hash.o bin/obj/c/enc/encode.o bin/obj/c/enc/encoder_dict.o bin/obj/c/enc/entropy_encode.o bin/obj/c/enc/histogram.o bin/obj/c/enc/literal_cost.o bin/obj/c/enc/memory.o bin/obj/c/enc/metablock.o bin/obj/c/enc/static_dict.o bin/obj/c/enc/utf8_util.o
c++ -Wl,-gc-sections bin/obj/c/common/ans_params.o bin/obj/c/common/constants.o bin/obj/c/common/context.o bin/obj/c/common/huffman_tree.o bin/obj/c/common/lehmer_code.o bin/obj/c/common/platform.o bin/obj/c/common/predict.o bin/obj/c/common/quant_matrix.o bin/obj/c/dec/ans_decode.o bin/obj/c/dec/brunsli_decode.o bin/obj/c/dec/context_map_decode.o bin/obj/c/dec/decode.o bin/obj/c/dec/histogram_decode.o bin/obj/c/dec/huffman_decode.o bin/obj/c/dec/huffman_table.o bin/obj/c/dec/jpeg_data_writer.o bin/obj/c/dec/state.o bin/obj/c/enc/ans_encode.o bin/obj/c/enc/brunsli_encode.o bin/obj/c/enc/context_map_encode.o bin/obj/c/enc/encode.o bin/obj/c/enc/histogram_encode.o bin/obj/c/enc/jpeg_data_reader.o bin/obj/c/enc/jpeg_huffman_decode.o bin/obj/c/enc/write_bits.o bin/obj/c/tools/cbrunsli.o
-lm -Lthird_party/brotli -lbrotli -o bin/cbrunsli
ld: unknown option: -gc-sections
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [cbrunsli] Error 1

@mobiliodevelopment
Copy link
Author

Update - i edit Makefile and this is original line N:18:
LDFLAGS += -Wl,-gc-sections

If i edit it as:
LDFLAGS += -Wl

Then ld can finish linking without issue.

@eustas
Copy link
Collaborator

eustas commented Mar 3, 2020

Hello. Please consider using CMake / Bazel instead of plain make.

@eustas eustas closed this as completed Mar 3, 2020
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