Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
kees-closed opened this issue Dec 19, 2017 · 3 comments
Closed

Comments

@kees-closed
Copy link

kees-closed commented Dec 19, 2017

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
Copy link
Author

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
Copy link
Contributor

kwizart commented Jan 8, 2018

@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
Copy link
Member

This should have been fixed with #197

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants