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 Cannot Find Multiple Source Files #9389

Open
abdelrahmanhussein opened this issue Aug 20, 2023 · 2 comments
Open

CMake Cannot Find Multiple Source Files #9389

abdelrahmanhussein opened this issue Aug 20, 2023 · 2 comments

Comments

@abdelrahmanhussein
Copy link

abdelrahmanhussein commented Aug 20, 2023

Hi,

I am new to HHVM. I am using it to run OSS-Performance. I am in the phase of building HHVM from the source code. CMake cannot find the following files.

/home/user/new_workspace/hhvm/hphp/runtime/ext/gd/libgd/gd_webp.cpp
/home/user/new_workspace/hhvm/hphp/runtime/ext/gd/libgd/webpimg.cpp
/home/user/new_workspace/hhvm/hphp/runtime/ext/std/ext_std_closure.cpp
/home/user/new_workspace/hhvm/hphp/runtime/ext/std/ext_std_intrinsics.cpp
/home/user/new_workspace/hhvm/hphp/runtime/ext/fb/FBSerialize/FBSerialize.h

These errors were generated one at a time, meaning I get an error only for a certain file. I tried to locate it online where I would find it in an older branch then I copy it to the location where CMake is expecting to find this file.

This works then it gives me the error for the second file and so on..

Is this a bug or am I just doing something wrong?

Standalone code, or other way to reproduce the problem

This should not depend on installing any libraries or frameworks. Ideally, it should be possible to copy-paste this into a single file and reproduce the problem by running hhvm and/or hh_client

Steps to reproduce the behavior:

  1. Go to 'hhvm/build'
  2. run the following command:
cmake  -DMYSQL_UNIX_SOCK_ADDR=/var/run/mysqld/mysqld.sock ..

Expected behavior

Cmake to work.

Actual behavior

-- -latomic is required to link hhvm
CMake Deprecation Warning at CMake/HPHPFunctions.cmake:2 (cmake_policy):
  The OLD behavior for policy CMP0026 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.
Call Stack (most recent call first):
  CMake/HHVMExtensionConfig.cmake:72 (include)
  hphp/runtime/ext/CMakeLists.txt:23 (include)


-- -latomic is required to link hhvm
-- Found LibNuma: /usr/lib/x86_64-linux-gnu/libnuma.so  
CMake Deprecation Warning at CMake/HPHPFunctions.cmake:2 (cmake_policy):
  The OLD behavior for policy CMP0026 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.
Call Stack (most recent call first):
  CMake/HHVMExtensionConfig.cmake:72 (include)
  hphp/hhvm/CMakeLists.txt:1 (include)


-- Found gold: /usr/bin/gold
-- -latomic is required to link hhvm
CMake Warning (dev) at hphp/hhvm/CMakeLists.txt:47 (target_sources):
  Policy CMP0076 is not set: target_sources() command converts relative paths
  to absolute.  Run "cmake --help-policy CMP0076" for policy details.  Use
  the cmake_policy command to set the policy and suppress this warning.

  An interface source of target "hhvm" has a relative path.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Configuring done
CMake Error at CMake/HPHPFunctions.cmake:406 (add_library):
  Cannot find source file:

    /home/user/new_workspace/hhvm/hphp/runtime/ext/fb/FBSerialize/FBSerialize.h

  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
  .hpp .hxx .in .txx
Call Stack (most recent call first):
  hphp/runtime/ext/CMakeLists.txt:41 (add_object_library)


CMake Error at CMake/HPHPFunctions.cmake:406 (add_library):
  No SOURCES given to target: hphp_runtime_ext
Call Stack (most recent call first):
  hphp/runtime/ext/CMakeLists.txt:41 (add_object_library)


CMake Generate step failed.  Build files cannot be regenerated correctly.

Environment

  • Operating system : Ubuntu 20.04.6 LTS
  • Installation method: Build from Source
  • Built from Source :n/A
@lexidor
Copy link
Collaborator

lexidor commented Aug 24, 2023

Hi, I can give you some pointers, but I am also not able to build hhvm near master.

The hhvm/packaging repo is able to build hhvm as it was at the start of this year. If you don't need the latest and greatest, you can build from source using that. It builds in a Docker container, so no special setup is required.

I am hoping for either the ci in facebook/hhvm or hhvm/packaging to be updated to work with master.

@lexidor
Copy link
Collaborator

lexidor commented Nov 14, 2023

One of the files that CMake can't find is:
ext_std_closure.cpp
Which has been renamed to:
ext_core_closure.cpp and moved to the core directory "next door".

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