pcompress icon indicating copy to clipboard operation
pcompress copied to clipboard

Build failed on OS X

Open 191919 opened this issue 10 years ago • 1 comments

I had several problems when I tried to build pcompress on OS X with clang. Here is how I managed to build it.

(1) ./config failed

Checking for GCC ...
Checking for 32-bit/64-bit platform ...
Checking OS ...
Checking GCC version ...
ERROR:
GCC version 4.4 or above is required.

I changed if [ $1 -lt 4 -o $2 -lt 4 ] to if [ $1 -lt 4 -o $2 -lt 2 ].

(2) make failure

I removed from Makefile the -floop-interchange, -floop-block, fsched-spec-load and -pthread flags which all were gcc-flavored options but rejected by clang.

(3) link failure

Undefined symbols for architecture x86_64:
  "_archive_read_disk_set_behavior", referenced from:
      _archiver_thread_func in pc_archive.o
  "_archive_read_free", referenced from:
      _archiver_thread_func in pc_archive.o
      _extractor_thread_func in pc_archive.o
  "_archive_write_free", referenced from:
      _archiver_thread_func in pc_archive.o
      _extractor_thread_func in pc_archive.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

This is due to the old version of lib archive.2.dylib in /usr/lib. I changed it to /usr/local/lib/libarchive.dylib.

Then I changed

KECCAK_SRCS = $(KECCAK_SRC_ASM1)

to

KECCAK_SRCS = $(KECCAK_SRC_OPT64)

  1. Finally I have a succeeded build.

191919 avatar Aug 18 '14 05:08 191919

Thanks for the report. I do not yet have a config that can detect and handle clang compiler. Will update this soon.

moinakg avatar Aug 28 '14 17:08 moinakg