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

Does not build on Ubuntu Focal Fossa #9

Open
Kramerican opened this issue Apr 30, 2020 · 3 comments
Open

Does not build on Ubuntu Focal Fossa #9

Kramerican opened this issue Apr 30, 2020 · 3 comments

Comments

@Kramerican
Copy link

Howdy

Love Frequent Cron. Anyway, it no longer builds on the latest Ubuntu:

# cd /root/frequent-cron; cmake .; make;
CMake Warning (dev) at src/CMakeLists.txt:3 (add_executable):
  Policy CMP0037 is not set: Target names should not be reserved and should
  match a validity pattern.  Run "cmake --help-policy CMP0037" for policy
  details.  Use the cmake_policy command to set the policy and suppress this
  warning.

  The target name "../frequent-cron" is reserved or not valid for certain
  CMake features, such as generator expressions, and may result in undefined
  behavior.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- GCC detected, adding compile flags
-- Configuring done
-- Generating done
-- Build files have been written to: /root/frequent-cron
[ 50%] Linking CXX executable ../frequent-cron
/usr/bin/ld: CMakeFiles/../frequent-cron.dir/frequent.cc.o: undefined reference to symbol 'pthread_condattr_setclock@@GLIBC_2.3.3'
/usr/bin/ld: /lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [src/CMakeFiles/../frequent-cron.dir/build.make:86: src/../frequent-cron] Error 1
make[1]: *** [CMakeFiles/Makefile2:94: src/CMakeFiles/../frequent-cron.dir/all] Error 2
make: *** [Makefile:84: all] Error 2

Googling reveals this seems to be Boost related. apt reports:

# apt-get install libboost-all-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
libboost-all-dev is already the newest version (1.71.0.0ubuntu2).
0 upgraded, 0 newly installed, 0 to remove and 12 not upgraded.

Thanks :)

@Kramerican
Copy link
Author

Without knowing what the hell I'm doing, I figured I'd try the suggestion from here:

facebookarchive/Surround360#3

And added SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -pthread") to CMakeLists.txt so it becomes:

cmake_minimum_required(VERSION "2.8.0")
set(MAIN_EXECUTABLE frequent-cron)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -pthread")

project(${MAIN_EXECUTABLE} CXX C)
add_subdirectory(src)

Seems to totally work. But I'd love to get confirmation that it is OK/correct to do this :D

@homer6
Copy link
Owner

homer6 commented May 11, 2020

Thanks for this @Kramerican !

Yeah, I think I'll remove the boost dependency. It's a bit of an overkill to require it for this and it causes headaches with newer versions.

Any thoughts on the oldest linux versions that we should support? I was thinking support for Ubuntu 14 and newer is probablly fine.

@Kramerican
Copy link
Author

My two cents would be that Ubuntu 14+ is plenty conservative enough :)

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

2 participants