You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am attempting to run the unit tests within the repo using CLion IDE. To be more specific, I am trying to setting up pcf2's unit tests by extending the CMakeLists.txt file under fbpcs/docker/emp_games. Currently, I can successfully load CMakeLists.txt but keep having a linker error below. My understanding is the complier complains about the missing dependency of folly package within the fbpcf.
====================[ Build | pcf2_attribution_calculator_test | Debug - pcs ]====
/usr/bin/cmake --build /root/snap-int-fbpcs/cmake-build-debug---pcs --target pcf2_attribution_calculator_test -- -j 8
[ 13%] Built target empgamecommon
[ 33%] Built target gtest
[ 40%] Built target perftools
[ 53%] Built target gtest_main
[ 60%] Linking CXX executable bin/pcf2_attribution_calculator_test
/usr/bin/ld: /usr/local/lib/libfbpcf.a(S3Util.cpp.o): in function `fbpcf::aws::uriToObjectReference(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
S3Util.cpp:(.text+0x87d): undefined reference to `folly::Uri::Uri(folly::Range<char const*>)'
/usr/bin/ld: /usr/local/lib/libfbpcf.a(GCSUtil.cpp.o): in function `fbpcf::gcp::uriToObjectReference(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
GCSUtil.cpp:(.text+0x1dd): undefined reference to `folly::Uri::Uri(folly::Range<char const*>)'
/usr/bin/ld: CMakeFiles/pcf2_attribution_calculator_test.dir/fbpcs/emp_games/pcf2_attribution/test/AttributionAppTest.cpp.o: in function `pcf2_attribution::verifyOutput(pcf2_attribution::AttributionOutputMetrics, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
/root/snap-int-fbpcs/fbpcs/emp_games/pcf2_attribution/test/AttributionTestUtils.h:31: undefined reference to `folly::compareJson(folly::Range<char const*>, folly::Range<char const*>)'
collect2: error: ld returned 1 exit status
make[3]: *** [CMakeFiles/pcf2_attribution_calculator_test.dir/build.make:222: bin/pcf2_attribution_calculator_test] Error 1
make[2]: *** [CMakeFiles/Makefile2:226: CMakeFiles/pcf2_attribution_calculator_test.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:233: CMakeFiles/pcf2_attribution_calculator_test.dir/rule] Error 2
make: *** [Makefile:201: pcf2_attribution_calculator_test] Error 2
However, when I looked over this website and double-checked the common.cmake within the fbpcs repo, I believe the folly package has been already included in the common cmake. Furthermore, since the CMakeLists.txt I am using now has already include("common.cmake"), the Uri should have been included. Please feel free to correct me if I am wrong.
I also try copying the following block of code into the CMakeLists.txt but the same linker error still show up:
Hello Facebook team,
I am attempting to run the unit tests within the repo using CLion IDE. To be more specific, I am trying to setting up pcf2's unit tests by extending the
CMakeLists.txt
file underfbpcs/docker/emp_games
. Currently, I can successfully loadCMakeLists.txt
but keep having a linker error below. My understanding is the complier complains about the missing dependency of folly package within the fbpcf.However, when I looked over this website and double-checked the
common.cmake
within thefbpcs
repo, I believe the folly package has been already included in the common cmake. Furthermore, since theCMakeLists.txt
I am using now has alreadyinclude("common.cmake")
, theUri
should have been included. Please feel free to correct me if I am wrong.I also try copying the following block of code into the
CMakeLists.txt
but the same linker error still show up:The following represents my sample code for building a gtest target:
Could you please share any advice with me on how to proceed with setting up unit tests? Many thanks in advance!
Context:
CMakeLists.txt
file underfbpcs/docker/emp_games
to the root directory and then try extending files upon that.fbpcf
repo under the same directory asfbpcs
.Best regards,
Hokssey
The text was updated successfully, but these errors were encountered: