facebook / ThreatExchange

Trust & Safety tools for working together to fight digital harms.
https://developers.facebook.com/docs/threat-exchange
Other
1.17k stars 321 forks source link

missing ./tmk-two-level-score file #225

Closed jcohenho closed 4 years ago

jcohenho commented 4 years ago

Hello! I've made it to the step where I need to look at all pair-scores, however I cannot find the .tmk-two-level-score file. After running

$ cd cpp
$ make

I can only see

./tmk-clusterize
./tmk-compare-two-tmks
./tmk-hash-video
./tmk-query
./tmk-show-pair-offsets
./tmkdump

Is there something I'm missing?

johnkerl commented 4 years ago

Hmm, this is weird. What's the parent directory of your cd cpp?

The source file is here and it's referenced in the hashing/tmk/cpp/Makefile here ...

jcohenho commented 4 years ago

My full path is ThreatExchange/hashing/tmk/cpp. When I try running make from here now, I get fatal error: 'IndexIVFPQ.h' file not found. FYI I'm on mac OS 10.15.3.

Here is the full output from a fresh install:

git:master~/projects/ThreatExchange/hashing/tmk/cpp$ make 
g++ -O2 -std=c++14 -I../.. -c ../../pdq/cpp/downscaling/downscaling.cpp -o ../../pdq/cpp/downscaling/downscaling.o
g++ -O2 -std=c++14 -I../.. -c ../../pdq/cpp/hashing/pdqhashing.cpp -o ../../pdq/cpp/hashing/pdqhashing.o
g++ -O2 -std=c++14 -I../.. -c ../../pdq/cpp/hashing/torben.cpp -o ../../pdq/cpp/hashing/torben.o
g++ -O2 -std=c++14 -I../.. -c ./lib/vec.cpp -o ./lib/vec.o
g++ -O2 -std=c++14 -I../.. -c ./algo/tmkfv.cpp -o ./algo/tmkfv.o
g++ -O2 -std=c++14 -I../.. -c ./hashing/bufferhashers.cpp -o ./hashing/bufferhashers.o
g++ -O2 -std=c++14 -I../.. -c ./hashing/filehasher.cpp -o ./hashing/filehasher.o
g++ -O2 -std=c++14 -I../.. -c ./io/tmkio.cpp -o ./io/tmkio.o
g++ -O2 -std=c++14 -I../.. -c ./raster/rasterwriters.cpp -o ./raster/rasterwriters.o
g++ -O2 -std=c++14 -I../.. -c ./raster/timeresamplers.cpp -o ./raster/timeresamplers.o
ar r libtmk.a ../../pdq/cpp/downscaling/downscaling.o ../../pdq/cpp/hashing/pdqhashing.o ../../pdq/cpp/hashing/torben.o ./lib/vec.o ./algo/tmkfv.o ./hashing/bufferhashers.o ./hashing/filehasher.o ./io/tmkio.o ./raster/rasterwriters.o ./raster/timeresamplers.o
ar: creating archive libtmk.a
g++ -O2 -std=c++14 -I../.. bin/tmk-hash-video.cpp -o tmk-hash-video -L. -ltmk
g++ -O2 -std=c++14 -I../.. bin/feat2tmk.cpp -o feat2tmk -L. -ltmk
g++ -O2 -std=c++14 -I../.. bin/vstr2feat.cpp -o vstr2feat -L. -ltmk
g++ -O2 -std=c++14 -I../.. bin/featdump.cpp -o featdump -L. -ltmk
g++ -O2 -std=c++14 -I../.. bin/tmkdump.cpp -o tmkdump -L. -ltmk
g++ -O2 -std=c++14 -I../.. bin/tmk-compare-two-tmks.cpp -o tmk-compare-two-tmks -L. -ltmk
g++ -O2 -std=c++14 -I../.. bin/tmk-show-pair-offsets.cpp -o tmk-show-pair-offsets -L. -ltmk
g++ -O2 -std=c++14 -I../.. bin/tmk-clusterize.cpp -o tmk-clusterize -L. -ltmk
g++ -O2 -std=c++14 -I../.. bin/tmk-query.cpp -o tmk-query -L. -ltmk
g++ -O2 -std=c++14 -I../.. -I/usr/local/include/faiss bin/tmk-query-with-faiss.cpp -o tmk-query-with-faiss -L. -L/usr/local/lib -ltmk -lfaiss -Wl,-rpath=/usr/local/lib
bin/tmk-query-with-faiss.cpp:24:10: fatal error: 'IndexIVFPQ.h' file not found
#include <IndexIVFPQ.h>
         ^~~~~~~~~~~~~~
1 error generated.
make: *** [tmk-query-with-faiss] Error 1
johnkerl commented 4 years ago

Ah, sorry about that. Let me put up a change. (That's a remnant of incomplete work on https://github.com/facebook/ThreatExchange/issues/197 -- my apologies.)

johnkerl commented 4 years ago

https://github.com/facebook/ThreatExchange/commit/0eac5ba47cd87116a0129f4ddb2cb1e51d0254ca fixes this.

jcohenho commented 4 years ago

@johnkerl thank you! I can successfully run make and I now see the ./tmk-two-level-score file now.

johnkerl commented 4 years ago

Sorry about that @jcohenho and thanks!! :)