question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fail to install in Ubuntu 14.04

See original GitHub issue

Hi. Thanks for your effort.

I fail to install your library on my machine (Ubuntu 14.04, CUDA 8.0, python3 with anaconda).

$ python setup.py install
-- The C compiler identification is GNU 4.9.4
-- The CXX compiler identification is GNU 4.9.4
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/gcc
-- Check for working CXX compiler: /usr/bin/gcc -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- TORCH_BUILD_DIR: /home/rcvlab/anaconda3/lib/python3.5/site-packages/torch/lib
-- Found CUDA: /usr/local/cuda (found suitable version "8.0", minimum required is "6.5")
-- Autodetected CUDA architecture(s): 6.1 6.1
-- Torch_INSTALL_INCLUDE:/home/rcvlab/anaconda3/lib/python3.5/site-packages/torch/lib/include/home/rcvlab/anaconda3/lib/python3.5/site-packages/torch/lib/include/TH/home/rcvlab/anaconda3/lib/python3.5/site-packages/torch/lib/include/THC
-- Configuring done
-- Generating done
-- Build files have been written to: /media/rcvlab/soonmin2017/pytorch.segmentation/semantic/external/PyTorch-Encoding/encoding/lib
[100%] Building NVCC (Device) object CMakeFiles/ENCODING.dir/kernel/./ENCODING_generated_thc_encoding.cu.o
CMake Warning at /usr/share/cmake-2.8/Modules/FindCUDA/make2cmake.cmake:66 (message):
   Removing non-existent dependency file: generic/THStorage.h

CMake Warning at /usr/share/cmake-2.8/Modules/FindCUDA/make2cmake.cmake:66 (message):
   Removing non-existent dependency file: generic/THStorageCopy.h

CMake Warning at /usr/share/cmake-2.8/Modules/FindCUDA/make2cmake.cmake:66 (message):
   Removing non-existent dependency file: generic/THCStorage.h

CMake Warning at /usr/share/cmake-2.8/Modules/FindCUDA/make2cmake.cmake:66 (message):
   Removing non-existent dependency file: generic/THCStorageCopy.h

CMake Warning at /usr/share/cmake-2.8/Modules/FindCUDA/make2cmake.cmake:66 (message):
   Removing non-existent dependency file: generic/THTensor.h

CMake Warning at /usr/share/cmake-2.8/Modules/FindCUDA/make2cmake.cmake:66 (message):
   Removing non-existent dependency file: generic/THTensorCopy.h
...

/usr/lib/gcc/x86_64-linux-gnu/4.9/include/stddef.h(432): error: identifier "nullptr" is undefined
/usr/lib/gcc/x86_64-linux-gnu/4.9/include/stddef.h(432): error: expected a ";"
/usr/include/x86_64-linux-gnu/c++/4.9/bits/c++config.h(192): error: expected a ";"
/usr/include/c++/4.9/exception(63): error: expected a ";"

And finally,

/usr/include/c++/4.9/cmath(240): error: inline specifier allowed on function declarations only

/usr/include/c++/4.9/cmath(240): error: variable "std::constexpr" has already been defined

/usr/include/c++/4.9/cmath(240): error: expected a ";"

Error limit reached.
100 errors detected in the compilation of "/tmp/tmpxft_0000331f_00000000-7_thc_encoding.cpp1.ii".
Compilation terminated.
CMake Error at ENCODING_generated_thc_encoding.cu.o.cmake:264 (message):
  Error generating file
  /media/rcvlab/soonmin2017/pytorch.segmentation/semantic/external/PyTorch-Encoding/encoding/lib/CMakeFiles/ENCODING.dir/kernel/./ENCODING_generated_thc_encoding.cu.o


make[2]: *** [CMakeFiles/ENCODING.dir/kernel/./ENCODING_generated_thc_encoding.cu.o] Error 1
make[1]: *** [CMakeFiles/ENCODING.dir/all] Error 2
make: *** [all] Error 2
Traceback (most recent call last):
  File "setup.py", line 69, in <module>
    'install': install,
  File "/home/rcvlab/anaconda3/lib/python3.5/distutils/core.py", line 108, in setup
    _setup_distribution = dist = klass(attrs)
  File "/home/rcvlab/anaconda3/lib/python3.5/site-packages/setuptools/dist.py", line 338, in __init__
    _Distribution.__init__(self, attrs)
  File "/home/rcvlab/anaconda3/lib/python3.5/distutils/dist.py", line 281, in __init__
    self.finalize_options()
  File "/home/rcvlab/anaconda3/lib/python3.5/site-packages/setuptools/dist.py", line 471, in finalize_options
    ep.load()(self, ep.name, value)
  File "/home/rcvlab/anaconda3/lib/python3.5/site-packages/cffi/setuptools_ext.py", line 188, in cffi_modules
    add_cffi_module(dist, cffi_module)
  File "/home/rcvlab/anaconda3/lib/python3.5/site-packages/cffi/setuptools_ext.py", line 49, in add_cffi_module
    execfile(build_file_name, mod_vars)
  File "/home/rcvlab/anaconda3/lib/python3.5/site-packages/cffi/setuptools_ext.py", line 25, in execfile
    exec(code, glob, glob)
  File "/media/rcvlab/soonmin2017/pytorch.segmentation/semantic/external/PyTorch-Encoding/build.py", line 36, in <module>
    subprocess.check_call(build_all_cmd, env=dict(os.environ))
  File "/home/rcvlab/anaconda3/lib/python3.5/subprocess.py", line 581, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['bash', 'encoding/make.sh']' returned non-zero exit status 2

I guess it’s a gcc compiler issue, but I’m not sure. Could you give me a hint for it?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
liruilong940607commented, Jan 15, 2018

I also got this issue, but I seem to find a solution.

change line 5 in encoding/make.sh from cmake .. to cmake -DCUDA_NVCC_FLAGS='-std=c++11' .. works for me.

reference: https://github.com/ComputationalRadiationPhysics/picongpu/issues/1147

0reactions
zhanghang1989commented, Mar 21, 2018

Thanks for the efforts and comments! This has been addressed in PR https://github.com/zhanghang1989/PyTorch-Encoding/pull/27 . Feel free to reopen it if still getting the trouble.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Failed to install Ubuntu 14.04 64 bit
I was trying to install Ubuntu 14.04 64 bit on my acer aspire e15. it has intel pentium quad core processor N3540. Inserted...
Read more >
Onboarding Ubuntu 14.04 failing to install.
I went throught the detailsed steps and still cant get mdatp to install in Ubuntu 14.04. $ cat /etc/apt/sources.list.d/*
Read more >
I'm trying to install packages in Ubuntu 14.04 LTS but ... - Quora
I'm trying to install packages in Ubuntu 14.04 LTS but it shows me error E: Unable to correct problems, you have held broken...
Read more >
Failed to install on Ubuntu 14.04 - 01.org
Hi. I'm trying to install the Intel Graphics Driver on my Ubuntu 14.04 machine (which has the Intel HD 4600 graphics).
Read more >
Problem with pip installation on Ubuntu 14.04 #2382 - GitHub
Hi, The newset version of pytorch is not working with wheel and pip on ubuntu 14.04 and cuda 7.5. The following error occurs:....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found