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

make: *** No rule to make target '<command>'. Stop. #2294

Closed
danwt opened this issue Aug 12, 2020 · 1 comment
Closed

make: *** No rule to make target '<command>'. Stop. #2294

danwt opened this issue Aug 12, 2020 · 1 comment

Comments

@danwt
Copy link

danwt commented Aug 12, 2020

Please check the FAQ documentation before raising an issue

Please check the FAQ documentation and old issues before raising an issue in case someone has asked the same question that you are asking.

Describe the bug (must be provided)

When trying to follow these instructions here, make does not find any rules.

Instructions:

cd nebula
$ mkdir build
$ cd build
$ cmake -DENABLE_TESTING=OFF -DCMAKE_BUILD_TYPE=Release ..
# Assuming cores is the number of cores and mem_gb is the memory size (in GB), the value of N is recommended to select the smaller one from cores and mem_gb / 2
# We suggest choosing release build type to speed up compilation
$ make -jN
# The default installation directory is /usr/local/nebula
$ sudo make install

except modified, so

cd nebula
cd build
cmake -DENABLE_TESTING=ON -DCMAKE_BUILD_TYPE=Debug -DENABLE_ASAN=ON ..

That command has output:

-- NEBULA_USE_LINKER: bfd
-- ENABLE_ASAN: ON
-- ENABLE_TESTING: ON
-- ENABLE_UBSAN: OFF
-- ENABLE_FUZZ_TEST: OFF
-- ENABLE_TSAN: OFF
-- ENABLE_STATIC_ASAN : OFF
-- ENABLE_STATIC_UBSAN : OFF
-- ENABLE_WERROR: ON
-- ENABLE_STRICT_ALIASING: OFF
-- ENABLE_PCH: OFF
-- ENABLE_FRAME_POINTER: ON
-- ENABLE_CCACHE: ON
-- CCACHE_DIR: /home/vscode/.ccache
-- CMAKE_BUILD_TYPE = Debug (Options are: Debug, Release, RelWithDebInfo, MinSizeRel)
-- CMAKE_INSTALL_PREFIX: /usr/local/nebula
-- Specified NEBULA_THIRDPARTY_ROOT: /workspaces/nebula-contribute2/nebula/build/third-party/install
-- CMAKE_INCLUDE_PATH: /workspaces/nebula-contribute2/nebula/build/third-party/install/include
-- CMAKE_LIBRARY_PATH: /workspaces/nebula-contribute2/nebula/build/third-party/install/lib64:/workspaces/nebula-contribute2/nebula/build/third-party/install/lib
-- CMAKE_PROGRAM_PATH: /workspaces/nebula-contribute2/nebula/build/third-party/install/bin
-- Mstch_INCLUDE_DIR = /workspaces/nebula-contribute2/nebula/build/third-party/install/include , Mstch_LIBRARY = /workspaces/nebula-contribute2/nebula/build/third-party/install/lib/libmstch.a
-- found krb5-config here /workspaces/nebula-contribute2/nebula/build/third-party/install/bin/krb5-config
-- Found kerberos 5 headers: /workspaces/nebula-contribute2/nebula/build/third-party/install/include
-- Found kerberos 5 libs:    /workspaces/nebula-contribute2/nebula/build/third-party/install/lib/libgssapi_krb5.a;/workspaces/nebula-contribute2/nebula/build/third-party/install/lib/libkrb5.a;/workspaces/nebula-contribute2/nebula/build/third-party/install/lib/libk5crypto.a;/workspaces/nebula-contribute2/nebula/build/third-party/install/lib/libcom_err.a;/workspaces/nebula-contribute2/nebula/build/third-party/install/lib/libkrb5support.a
-- Glibc version is 2.31
-- Create the pre-commit hook
-- Creating pre-commit hook done
-- ENABLE_PACK_ONE: ON
-- is_one is ON
-- Configuring done
-- Generating done
-- Build files have been written to: /workspaces/nebula-contribute2/nebula/build

Then doing any of

make <clean>
make <install>
make <-j3>
make

gives make: *** No rule to make target '<command>'. Stop.

  • OS: Linux docker-desktop 4.19.76-linuxkit Parser framework #1 SMP Tue May 26 11:42:35 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
  • Compliler: g++ 9.3.0
  • CPU: Architecture: x86_64
    CPU op-mode(s): 32-bit, 64-bit
    Byte Order: Little Endian
    Address sizes: 39 bits physical, 48 bits virtual
    CPU(s): 6
    On-line CPU(s) list: 0-5
    Thread(s) per core: 1
    Core(s) per socket: 1
    Socket(s): 6
    Vendor ID: GenuineIntel
    CPU family: 6
    Model: 158
    Model name: Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Stepping: 10
    CPU MHz: 2600.000
    BogoMIPS: 5184.00
    L1d cache: 192 KiB
    L1i cache: 192 KiB
    L2 cache: 1.5 MiB
    L3 cache: 72 MiB
    Vulnerability L1tf: Mitigation; PTE Inversion
    Vulnerability Mds: Vulnerable: Clear CPU buffers attempted, no microcode; SMT Host state unknown
    Vulnerability Meltdown: Mitigation; PTI
    Vulnerability Spec store bypass: Vulnerable
    Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization
    Vulnerability Spectre v2: Mitigation; Full generic retpoline, STIBP disabled, RSB filling
    Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht pbe syscall nx pdpe1gb lm constant_tsc rep_good nopl xtopology nonstop_tsc cpuid tsc_known_freq pni pclmulqdq
    dtes64 ds_cpl ssse3 sdbg fma cx16 xtpr pcid sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch pti fsgsbase bmi1 avx2 bmi2 erms xsaveopt arat
  • Commit id: commit a5275b

Steps to reproduce the behavior:

  1. Use VSCode remote docker container with
{
	"name": "Microsoft C++ for Nebula",
	"build": {
		"dockerfile": "../docker/Dockerfile",
		"args": {
			"VSCODE": "true",
			"IMAGE": "mcr.microsoft.com/vscode/devcontainers/base:0-ubuntu20.04",
		}
	},
	"runArgs": [
		"--cap-add=SYS_PTRACE",
		"--security-opt",
		"seccomp=unconfined",
		// Container shares the host’s networking namespace
		"--net=host"
	],
	// Set *default* container specific settings.json values on container create.
	"settings": {
		"terminal.integrated.shell.linux": "/bin/bash"
	},
	// Add the IDs of extensions you want installed when the container is created.
	"extensions": [
		"ms-vscode.cpptools",
		"llvm-vs-code-extensions.vscode-clangd",
		"twxs.cmake",
		"webfreak.debug",
		"matepek.vscode-catch2-test-adapter",
		"hbenl.vscode-test-explorer",
		"ryanluker.vscode-coverage-gutters",
		"jeff-hykin.xd-theme",
		"sanaajani.taskrunnercode"
	],

	"remoteUser": "vscode"
}
ARG IMAGE="ubuntu:20.04"
FROM $IMAGE


ARG USERNAME=vscode
ARG USER_UID=1000
ARG USER_GID=$USER_UID

# Configure apt and install packages
RUN apt-get update \
    && export DEBIAN_FRONTEND=noninteractive \
    #
    # Install C++ tools
    && apt-get -y install build-essential cmake cppcheck valgrind \
    #
    # [Optional] Update UID/GID if needed
    && if [ "$USER_GID" != "1000" ] || [ "$USER_UID" != "1000" ]; then \
        groupmod --gid $USER_GID $USERNAME \
        && usermod --uid $USER_UID --gid $USER_GID $USERNAME \
        && chown -R $USER_UID:$USER_GID /home/$USERNAME; \
    fi \
    #
    # Clean up
    && apt-get autoremove -y \
    && apt-get clean -y \
    && rm -rf /var/lib/apt/lists/*


# Copied from github example
ARG VSCODE="false"

RUN set -eux; \
    if [ "$VSCODE" = "true" ]; then \
        echo "Installing extra IDE tools ..."; \
        apt-get update; \
        export DEBIAN_FRONTEND=noninteractive; \
        apt-get -y install --no-install-recommends clangd-10 gdb; \
        update-alternatives --install /usr/bin/clangd clangd /usr/bin/clangd-10 100; \
        echo "Set disable_coredump false" >> /etc/sudo.conf; \
    fi

# My addition - nebula specific
RUN export DEBIAN_FRONTEND=noninteractive \
    && apt-get install -y make \
    m4 \
    git \
    wget \
    unzip \
    xz-utils \
    curl \
    lsb-core \
    build-essential \
    libreadline-dev \
    ncurses-dev \
    cmake \
    gettext \
    ninja-build \
    ccache;

``
2. Perform instructions described at the start

**Expected behavior**

Expected make command to run

**Additional context**

Provide logs and configs, or any other context to trace the problem.

I was able to build using

pwd #nebula/
cmake --build build -- -j3

@danwt danwt closed this as completed Aug 12, 2020
@danwt
Copy link
Author

danwt commented Aug 12, 2020

It's possible to install with

sudo cmake --install build

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

1 participant