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

CMake Error: CMake can not determine linker language for target: ortools_init #2526

Closed
yurivict opened this issue May 2, 2021 · 6 comments
Closed
Assignees
Labels
Bug Build: CMake CMake based build issue
Projects
Milestone

Comments

@yurivict
Copy link

yurivict commented May 2, 2021

What version of OR-Tools and what language are you using?
Version: 9.0
Language: C++

Problem description
cmake-3.19.6 fails:

-- Configuring done
CMake Error: CMake can not determine linker language for target: ortools_init
-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.
*** Error code 1

on FreeBSD 12.2

@Mizux Mizux self-assigned this May 2, 2021
@Mizux Mizux added Bug Build: CMake CMake based build issue labels May 2, 2021
@Mizux Mizux added this to To do in ToDo via automation May 2, 2021
@Mizux Mizux added this to the v9.1 milestone May 2, 2021
@Mizux Mizux moved this from To do to In progress in ToDo May 5, 2021
@tpimh
Copy link

tpimh commented Aug 1, 2021

I have solved it with simple sed -i '11i \ \ LINKER_LANGUAGE Cxx' ortools/init/CMakeLists.txt.

@Mizux Mizux closed this as completed Sep 13, 2021
ToDo automation moved this from In progress to Done Sep 13, 2021
@yurivict
Copy link
Author

yurivict commented Oct 4, 2021

@Mizux The problem is still present in 9.1 released 4 days ago.

@tpimh
Copy link

tpimh commented Oct 5, 2021

@yurivict My workaround should still work, I can create a pull request fixing this issue.

@Mizux
Copy link
Collaborator

Mizux commented Oct 5, 2021

Seems to work with FreeBSD 13 (vagrant box)
https://github.com/google/or-tools/runs/3788581120?check_suite_focus=true

I'll try to see if I can test locally on a FreeBSD 12 VM.
Otherwise @yurivict could you test with CMake 3.21.3 to see if it's an error fixed in CMake ?

@Mizux Mizux reopened this Oct 5, 2021
ToDo automation moved this from Done to In progress Oct 5, 2021
@Mizux Mizux modified the milestones: v9.1, v9.2 Oct 5, 2021
@yurivict
Copy link
Author

yurivict commented Oct 5, 2021

The workaround works on FreeBSD. It should just be committed.

@Mizux Mizux closed this as completed Oct 5, 2021
ToDo automation moved this from In progress to Done Oct 5, 2021
@Mizux
Copy link
Collaborator

Mizux commented Oct 5, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Build: CMake CMake based build issue
Projects
ToDo
  
Done
Development

No branches or pull requests

3 participants