I tried both beginning and ending and i'm still getting the same problem.
I also ran: make VERBOSE=1 to capture the command that caused the errors:
/usr/bin/c++ -O2 -g -DNDEBUG CMakeFiles/bts_server.dir/server.cpp.o CMakeFiles/bts_server.dir/chain_connection.cpp.o CMakeFiles/bts_server.dir/chain_server.cpp.o -o bts_server -rdynamic ../libbshare.a -lrt -ldl ../fc/libfc.a ../fc/vendor/easylzma/src/libeasylzma_static.a -Wl,-Bstatic -lboost_thread-mt -lboost_date_time-mt -lboost_system-mt -lboost_filesystem-mt -lboost_program_options-mt -lboost_signals-mt -lboost_serialization-mt -lboost_chrono-mt -lboost_unit_test_framework-mt -lboost_context-mt -lboost_coroutine -lssl -lcrypto ../vendor/miniupnp/miniupnpc/libminiupnpc.a ../vendor/leveldb-1.12.0/libleveldb.a -Wl,-Bdynamic -ldb_cxx -lz
but the command doesn't even have -lpthread in it, so it doesn't seem like my changing the CMakeLists.txt had any effect. I even tried adding -lpthread to the command manually (both at the beginning and end) and that didn't help... still the same error