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: MacOS XCode build fail #3909

Closed
Mizux opened this issue Sep 5, 2023 · 0 comments
Closed

cmake: MacOS XCode build fail #3909

Mizux opened this issue Sep 5, 2023 · 0 comments
Assignees
Labels
Bug Build: CMake CMake based build issue Solver: MathOpt MathOpt related issue
Milestone

Comments

@Mizux
Copy link
Collaborator

Mizux commented Sep 5, 2023

Relevant trace

tools/or-tools/build/RELEASE/lib/libortools.9.7.dylib
2023-09-04T15:27:59.6971070Z clang: error: no such file or directory: '/Users/runner/work/or-tools/or-tools/build/build/ortools_proto.build/Release/Objects-normal/x86_64/parameters.pb.o'
2023-09-04T15:27:59.7093790Z clang: error: no such file or directory: '/Users/runner/work/or-tools/or-tools/build/build/ortools_math_opt.build/Release/Objects-normal/x86_64/storage.o'
2023-09-04T15:27:59.7213560Z clang: error: no such file or directory: '/Users/runner/work/or-tools/or-tools/build/build/ortools_math_opt.build/Release/Objects-normal/x86_64/validator.o'
2023-09-04T15:27:59.7260130Z Command Ld failed with a nonzero exit code

Please notice xcode don't add directory path to compiled file and since we have:

[0]─[~/work/main]-[mizux/dev]
[^u^]─mizux@nuc10i7 %find ortools -type f -iname "storage*"
ortools/math_opt/constraints/sos/storage.h
ortools/math_opt/constraints/indicator/storage.cc
ortools/math_opt/constraints/indicator/storage.h
ortools/math_opt/constraints/quadratic/storage.cc
ortools/math_opt/constraints/quadratic/storage.h
ortools/math_opt/constraints/second_order_cone/storage.cc
ortools/math_opt/constraints/second_order_cone/storage.h

note:
To compare to Unix Makefile generator

2023-09-04T15:35:53.1353870Z [ 77%] Building CXX object ortools/math_opt/CMakeFiles/ortools_math_opt.dir/constraints/indicator/storage.cc.o
...
ortools/math_opt/CMakeFiles/ortools_math_opt.dir/constraints/indicator/storage.cc.o ortools/math_opt/CMakeFiles/ortools_math_opt.dir/constraints/quadratic/storage.cc.o ortools/math_opt/CMakeFiles/ortools_math_opt.dir/constraints/second_order_cone/storage.cc.o
@Mizux Mizux added Bug Build: CMake CMake based build issue Solver: MathOpt MathOpt related issue labels Sep 5, 2023
@Mizux Mizux self-assigned this Sep 5, 2023
@Mizux Mizux added this to the v9.8 milestone Sep 5, 2023
Mizux referenced this issue Sep 27, 2023
XCode do not support object library with several file with the same name
since it use a flat directory, Xcode "fix" using a UID but CMake can't catch it.

math_opt also use a parameters.proto which conflict with the
glop/parameters.proto -> need to split the proto to .cc generation in
two libraries
@Mizux Mizux closed this as completed Sep 27, 2023
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 Solver: MathOpt MathOpt related issue
Projects
None yet
Development

No branches or pull requests

1 participant