Skip to content

Cmake error in latest (the whereami git submodule) #1489

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

Closed
jtappin opened this issue Jan 23, 2023 · 8 comments
Closed

Cmake error in latest (the whereami git submodule) #1489

jtappin opened this issue Jan 23, 2023 · 8 comments

Comments

@jtappin
Copy link

jtappin commented Jan 23, 2023

When trying to build the latest GIT (b8aeafc), I get a failure during the cmake phase:

CMake Error at src/CMakeLists.txt:200 (add_library):
  Cannot find source file:

    /data/software/AUR/gnudatalanguage-git/src/gnudatalanguage-git/src/whereami/src/whereami.c

  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .mpp .m .M .mm .ixx .cppm .h
  .hh .h++ .hm .hpp .hxx .in .txx .f .F .for .f77 .f90 .f95 .f03 .hip .ispc


CMake Error at src/CMakeLists.txt:200 (add_library):
  No SOURCES given to target: whereami

There is an empty whereami directory in the src directory but nothing else.

Does anyone have any suggestions? (GDL's cmake code is way over my head).

@slayoo
Copy link
Member

slayoo commented Jan 23, 2023

Hello @jtappin, thanks for reporting.
This is caused by the introduction of a git submodule to gdl git repo (with the whereami lib source code).
One solution is to do git clone --recurse-submodules when cloning the repo.

@alaingdl
Copy link
Contributor

mandatory :(

I do consider this is a temporary work-around, too complex for new users (or very clear messages)

@slayoo
Copy link
Member

slayoo commented Jan 23, 2023

Certainly, we need to improve and clarify instructions for developers, but I'd say that with so many third-party files in the repo, we will greatly benefit from introducing multiple other submodules to keep track of the origins of these files, facilitate updates and make life easier for packagers who need to check licensing and often prefer to replace our convenience copies with upstream code dependencies.

@slayoo slayoo mentioned this issue Jan 23, 2023
@slayoo
Copy link
Member

slayoo commented Jan 23, 2023

If not cloning from scratch, but updating an existing clone, please try doing git submodule update --init --recursive after a pull/fetch.

@slayoo slayoo changed the title Cmake error in latest. Cmake error in latest (the whereami git submodule) Jan 23, 2023
@GillesDuvert
Copy link
Contributor

I've added last saturday the minimal documentation in the README.md and the WIKI.
But unless GH or git makes it easy, we're going to get many more remarks.

@slayoo
Copy link
Member

slayoo commented Jan 23, 2023

Perhaps we could make CMake issue a meaningful hint if any of the submodule files are not present?

@slayoo
Copy link
Member

slayoo commented Jan 23, 2023

Something like this: #1491 ?
(inspired by iree-org/iree#6434)

@GillesDuvert
Copy link
Contributor

yes, clever! (IMHO)

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

4 participants