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.
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
failedI changed
if [ $1 -lt 4 -o $2 -lt 4 ]
toif [ $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
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)