Alcaro / Flips

Floating IPS is a patcher for IPS and BPS files.
Other
309 stars 45 forks source link

macOS build from source #34

Closed FrankKair closed 3 years ago

FrankKair commented 3 years ago

Hello there πŸ‘‹ I'm running macOS Catalina 10.15.5 and I'm trying to build Flips from src. This is the output from make:

Makefile:83: no libdivsufsort-2.x detected; switching to fallback SA-IS
Makefile:84: libdivsufsort is approximately twice as fast as SA-IS
g++ crc32.cpp flips-cli.cpp flips-gtk.cpp flips-w32.cpp flips.cpp libbps-suf.cpp libbps.cpp libips.cpp libups.cpp sais.cpp -std=c++98   -fno-rtti -fno-exceptions -DFLIPS_CLI  -oflips
libbps-suf.cpp:799:38: warning: function 'bps_create_suf_pick<unsigned long>' has internal
      linkage but is not defined [-Wundefined-internal]
template<typename T> static bpserror bps_create_suf_pick(file* source, file* target, boo...
                                     ^
libbps-suf.cpp:823:17: note: used here
        bpserror err = bps_create_suf_pick<size_t>(source, target, moremem, &bps);
                       ^
1 warning generated.
Undefined symbols for architecture x86_64:
  "bpserror bps_create_suf_pick<unsigned long>(file*, file*, bool, (anonymous namespace)::bps_creator*)", referenced from:
      _bps_create_delta in libbps-suf-44ed7c.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [flips] Error 1

And this is the output from clang++ *.cpp -O3 -o flips:

flips.cpp:9:7: warning: 'operator new' is missing exception specification 'throw(std::bad_alloc)'
      [-Wmissing-exception-spec]
void* operator new(size_t n) { return malloc(n); } // forget allocation failures, let the...
      ^
                             throw(std::bad_alloc)
flips.cpp:10:6: warning: 'operator delete' is missing exception specification 'throw()'
      [-Wmissing-exception-spec]
void operator delete(void * p) { free(p); }
     ^
                               throw()
2 warnings generated.
libbps-suf.cpp:799:38: warning: function 'bps_create_suf_pick<unsigned long>' has internal
      linkage but is not defined [-Wundefined-internal]
template<typename T> static bpserror bps_create_suf_pick(file* source, file* target, boo...
                                     ^
libbps-suf.cpp:823:17: note: used here
        bpserror err = bps_create_suf_pick<size_t>(source, target, moremem, &bps);
                       ^
1 warning generated.
Undefined symbols for architecture x86_64:
  "bpserror bps_create_suf_pick<unsigned long>(file*, file*, bool, (anonymous namespace)::bps_creator*)", referenced from:
      _bps_create_delta in libbps-suf-816ae6.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Am I missing anything?

Alcaro commented 3 years ago

I thought I fixed those bugs long ago, and the line numbers don't match anything. What version are you trying to compile?

FrankKair commented 3 years ago

@Alcaro Just realised I downloaded an older version from smwcentral, downloading the source from GitHub works for me πŸ‘ thanks!