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

[BUG] Unable to build from source #289

Open
3 tasks done
HyunyoungJung opened this issue Dec 5, 2023 · 6 comments
Open
3 tasks done

[BUG] Unable to build from source #289

HyunyoungJung opened this issue Dec 5, 2023 · 6 comments
Assignees

Comments

@HyunyoungJung
Copy link

HyunyoungJung commented Dec 5, 2023

Describe the bug

Hi, I tried to build the source code but failed even though I followed the instructions with the error message.

gcc failed: error executing command (from target //envpool/mujoco:mujoco_dmc_env) /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer '-std=c++17' -MD -MF ... (remaining 60 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
gcc: error: envpool/mujoco/dmc/utils.cc: Permission denied
gcc: fatal error: no input files
compilation terminated.
Target //:setup failed to build
Use --verbose_failures to see the command lines of failed build steps.

To Reproduce

The same as instruction.

System info

Describe the characteristic of your environment:

  • Python version: 3.10
import envpool, numpy, sys
print(envpool.__version__, numpy.__version__, sys.version, sys.platform)

Checklist

  • I have checked that there is no similar issue in the repo (required)
  • I have read the documentation (required)
  • I have provided a minimal working example to reproduce the bug (required)
@Trinkle23897
Copy link
Collaborator

could you repro the same issue inside docker container?

@HyunyoungJung
Copy link
Author

Unfortunately, I am not using docker and am not familiar with it.
Would there be another way that I can build the source code locally?

@Trinkle23897
Copy link
Collaborator

need to make sure envpool/mujoco/dmc/utils.cc has the correct permission. What does ls -lh envpool/mujoco/dmc/utils.cc give?

@HyunyoungJung
Copy link
Author

The permission of the file is -rw-rw-r--

@Trinkle23897
Copy link
Collaborator

Trinkle23897 commented Dec 5, 2023

could you try BAZELOPT=--verbose_failures make bazel-build? See Makefile for actual command.

@HyunyoungJung
Copy link
Author

SHELL          = /bin/bash
PROJECT_NAME   = envpool
PROJECT_FOLDER = $(PROJECT_NAME) third_party examples benchmark
PYTHON_FILES   = $(shell find . -type f -name "*.py")
CPP_FILES      = $(shell find $(PROJECT_NAME) -type f -name "*.h" -o -name "*.cc")
BAZEL_FILES    = $(shell find . -type f -name "*BUILD" -o -name "*.bzl")
COMMIT_HASH    = $(shell git log -1 --format=%h)
COPYRIGHT      = "Garena Online Private Limited"
BAZELOPT       =
DATE           = $(shell date "+%Y-%m-%d")
DOCKER_TAG     = $(DATE)-$(COMMIT_HASH)
DOCKER_USER    = trinkle23897
PATH           := $(HOME)/go/bin:$(PATH)

# installation

check_install = python3 -c "import $(1)" || (cd && pip3 install $(1) --upgrade && cd -)
check_install_extra = python3 -c "import $(1)" || (cd && pip3 install $(2) --upgrade && cd -)

flake8-install:
        $(call check_install, flake8)
        $(call check_install_extra, bugbear, flake8_bugbear)

py-format-install:
        $(call check_install, isort)
        $(call check_install, yapf)

mypy-install:
        $(call check_install, mypy)

cpplint-install:
        $(call check_install, cpplint)

clang-format-install:
        command -v clang-format || sudo apt-get install -y clang-format

clang-tidy-install:
        command -v clang-tidy || sudo apt-get install -y clang-tidy

go-install:
        # requires go >= 1.16
        command -v go || (sudo apt-get install -y golang-1.18 && sudo ln -sf /usr/lib/go-1.18/bin/go /usr/bin/go)

bazel-install: go-install
        command -v bazel || (go install github.com/bazelbuild/bazelisk@latest && ln -sf $(HOME)/go/bin/bazelisk $(HOME)/go/bin/bazel)

buildifier-install: go-install
        command -v buildifier || go install github.com/bazelbuild/buildtools/buildifier@latest

addlicense-install: go-install
        command -v addlicense || go install github.com/google/addlicense@latest

doc-install:
        $(call check_install, pydocstyle)
        $(call check_install_extra, doc8, "doc8<1")
        $(call check_install, sphinx)
        $(call check_install, sphinx_rtd_theme)
        $(call check_install_extra, sphinxcontrib.spelling, sphinxcontrib.spelling pyenchant)

auditwheel-install:
        $(call check_install_extra, auditwheel, auditwheel typed-ast patchelf)

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