facebook / wdt

Warp speed Data Transfer (WDT) is an embeddedable library (and command line tool) aiming to transfer data between 2 systems as fast as possible over multiple TCP paths.
https://www.facebook.com/WdtOpenSource
Other
2.86k stars 391 forks source link

Incorrect path for Checksum.cpp, while -DFOLLY_SOURCE_DIR is set #177

Closed kees-closed closed 3 years ago

kees-closed commented 6 years ago

When I use the following cmake -DBUILD_SHARED_LIBS=on -DFOLLY_SOURCE_DIR=/usr/src/debug/folly-2017.12.18.00-1.fc27.x86_64

I stumble upon the following error:

-- Looking for C++ include bits/c++config.h - found                                        
-- Looking for C++ include bits/functexcept.h                                              
-- Looking for C++ include bits/functexcept.h - found                                      
-- Looking for C++ include linux/sockios.h   
-- Looking for C++ include linux/sockios.h - found                                         
-- Performing Test FOLLY_USE_LIBCPP          
-- Performing Test FOLLY_USE_LIBCPP - Failed 
-- Performing Test FOLLY_HAVE_WEAK_SYMBOLS   
-- Performing Test FOLLY_HAVE_WEAK_SYMBOLS - Success                                       
-- Configuring done                          
CMake Error at CMakeLists.txt:207 (add_library):                                           
  Cannot find source file:                   
    /usr/src/debug/folly-2017.12.18.00-1.fc27.x86_64/folly/Checksum.cpp                    
  Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp                 
  .hxx .in .txx                              
CMake Error: CMake can not determine linker language for target: folly4wdt                 
CMake Error: Cannot determine link language for target "folly4wdt".                        
-- Generating done                           
-- Build files have been written to: /builddir/build/BUILD/wdt-1.27.1612021

As you can see in the CMakeLists.txt, the path should include "${FOLLY_SOURCE_DIR}/folly/hash/Checksum.cpp", while the error states that the path is /usr/src/debug/folly-2017.12.18.00-1.fc27.x86_64/folly/Checksum.cpp. In other words, it doesn't include the /hash directory during the build process.

The file is included in the folly-debugsource package I built:

$ rpm -qpl repo/results/fedora-27-x86_64/folly-2017.12.18.00-1.fc27/folly-debugsource-2017.12.18.00-1.fc27.x86_64.rpm | grep Checksum.cpp           
/usr/src/debug/folly-2017.12.18.00-1.fc27.x86_64/folly/hash/Checksum.cpp

Is this an issue on my side? In case the viewer knows something about RPM building, this is the spec file I'm using:

Name:           wdt                                                              
Version:        1.27.1612021                                                     
Release:        1%{?dist}                                                        
Summary:        WDT is aiming to transfer data between 2 systems as fast as possible

License:        BSD3                                                             
URL:            https://www.facebook.com/WdtOpenSource                           
Source0:        https://github.com/facebook/wdt/archive/v%{version}.tar.gz       

BuildRequires:  libunwind, gflags-devel, double-conversion-devel, jemalloc-devel 
BuildRequires:  cmake, boost-devel, glog-devel, double-conversion-devel,         
BuildRequires:  jemalloc-devel, gtest-devel, folly-debugsource, openssl-devel    

%description                                                                     
Just a test                                                                      

%prep                                                                            
%autosetup                                                                       

%build                                                                           
#cmake -DBUILD_SHARED_LIBS=on -DFOLLY_SOURCE_DIR=/usr/include -DBUILD_TESTING=on 
cmake -DBUILD_SHARED_LIBS=on -DFOLLY_SOURCE_DIR=/usr/src/debug/folly-2017.12.18.00-1.fc27.x86_64
make -j                                                                          

%install                                                                         
%make_install                                                                    

#%check                                                                          
#ctest -V %{?_smp_mflags}                                                        

%files                                                                           
%doc README.md build/BUILD.md                                                    
%license LICENSE                                                                 

%changelog                                                                       
* Tue Dec 19 2017 Kees de Jong <keesdejong@fedoraproject.org>                    
- Initial package
kees-closed commented 6 years ago

If someone can fix this bug within 14 days then I might be able to include it in my research paper which touches this subject: https://www.surf.nl/en/100-g-air-france-klm

kwizart commented 6 years ago

@AquaL1te If you have built folly as an external library, you will probably need to patch wdt's cmake to detect it. Right now wdt expects folly to be built-in, so you need to checkout folly within the wdt tree. This can be done easily with RPM using folly as Source1...

davide125 commented 3 years ago

This should have been fixed with #197