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

MacOS CMake fails to load "Options" #8423

Closed
SJang1 opened this issue Dec 23, 2020 · 6 comments
Closed

MacOS CMake fails to load "Options" #8423

SJang1 opened this issue Dec 23, 2020 · 6 comments
Labels
OS: MacOS This issue is related to a Mac OS problem

Comments

@SJang1
Copy link

SJang1 commented Dec 23, 2020

Version of OpenTTD

2e6f37e (master)

Expected result

OpenTTD Builds correctly

Actual result

image

CMake Error at CMakeLists.txt:23 (include):
  include could not find load file:

    Options


CMake Error at CMakeLists.txt:24 (set_options):
  Unknown CMake command "set_options".


-- Configuring incomplete, errors occurred!

And it fails to build

Steps to reproduce

  1. clone or download source of openttd, and go into the folder
  2. mkdir build
  3. cd build
  4. cmake .. <--Error on this

Spec: Apple Silicon M1 Macbook Air / Big Sur 11.1
However, right now on JGRpatch it builds correctly, but same happened for the current release of that patch.

@glx22
Copy link
Contributor

glx22 commented Dec 24, 2020

Attached error message is from JGR source.
Anyway I don't see how CMake can't find a file present in source, and I don't see important changes in this area between both JGR revisions, or even between JGR and openttd master.

@SJang1
Copy link
Author

SJang1 commented Dec 24, 2020

Oh, attached one was a mistake, BTW error message is same.
I even can't see any important changes between both JGR revisions, but only current master of JGR version builds sucsessfully.

@TrueBrain
Copy link
Member

It seems CMake has issues finding our cmake folder. This will be a bit hard to debug for us, as it is possible it is only a local issue (we build Mac builds daily, so we know it should, in theory, work :P). So let us try to gather some information to help you further.

Options is included on line 32 of master, and used on line 33. Those are the two errors you are seeing. Line 22 extends the locations it looks for these files to include the local cmake folder. Could you tell us the output of the following commands (from the git clone root folder; so not inside the build folder):

ls -lh cmake/Options.cmake
find cmake

Next, we need to know a bit what CMake is doing. Could you add above line 22 something like:

message("${CMAKE_SOURCE_DIR}")
The line that follows should be:
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake")

and rerun cmake .. from your build folder, to let us know the first line CMake gives you back?

That info might help us a bit further along this venture, as a venture it will be! :)

@TrueBrain TrueBrain changed the title Can't build on Mac MacOS CMake files to load "Options" Dec 24, 2020
@TrueBrain TrueBrain added the OS: MacOS This issue is related to a Mac OS problem label Dec 24, 2020
@TrueBrain TrueBrain changed the title MacOS CMake files to load "Options" MacOS CMake fails to load "Options" Dec 24, 2020
@SJang1
Copy link
Author

SJang1 commented Dec 25, 2020

Hmmm.. It's weird.
I have downloaded source again and restarted my computer, it's working propually like others do.

But anyway, message comming from message("${CMAKE_SOURCE_DIR}") is NOT that.
Output was /Users/(my_username)/Downloads/OpenTTD on above line 22, and even below line 22.

(I git cloned on Downloads folder, so Downloads/OpenTTD is a local git repository)

@TrueBrain
Copy link
Member

TrueBrain commented Dec 25, 2020

Very odd; but I guess we can call this ticket resolved in that case? :)

If there is anything else we can help with, let us know!

@SJang1
Copy link
Author

SJang1 commented Dec 25, 2020

Of course why not? thanks for help :)

@SJang1 SJang1 closed this as completed Dec 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OS: MacOS This issue is related to a Mac OS problem
Projects
None yet
Development

No branches or pull requests

3 participants