Skip to content

Installation errors related to backend GCC version #8

@atsukoba

Description

@atsukoba

On installation with gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.11),
I faced the error below when I run pip install torchwordemb inside of the docker container of the image nvidia/cuda:10.0-cudnn7-devel-ubuntu16.04

    src/loadwordemb.cpp: In function ‘VocabAndTensor load_word2vec_bin(const char*)’:
    src/loadwordemb.cpp:139:52: warning: narrowing conversion of ‘n_word’ from ‘size_t {aka long unsigned int}’ to ‘long int’ inside { } [-Wnarrowing]
             dest.resize_(torch::IntArrayRef{n_word, dim});
                                                        ^
    src/loadwordemb.cpp:139:52: warning: narrowing conversion of ‘n_word’ from ‘size_t {aka long unsigned int}’ to ‘long int’ inside { } [-Wnarrowing]
    src/loadwordemb.cpp:139:52: warning: narrowing conversion of ‘dim’ from ‘size_t {aka long unsigned int}’ to ‘long int’ inside { } [-Wnarrowing]
    src/loadwordemb.cpp:139:52: warning: narrowing conversion of ‘dim’ from ‘size_t {aka long unsigned int}’ to ‘long int’ inside { } [-Wnarrowing]
    src/loadwordemb.cpp:157:24: error: converting to ‘VocabAndTensor {aka std::tuple<pybind11::dict, at::Tensor>}’ from initializer list would use explicit constructor ‘constexpr std::tuple<_T1, _T2>::tuple(_U1&&, _U2&&) [with _U1 = pybind11::dict&; _U2 = at::Tensor&; <template-parameter-2-3> = void; _T1 = pybind11::dict; _T2 = at::Tensor]’
         return {vocab, dest};
                            ^
    error: command 'gcc' failed with exit status 1
    ----------------------------------------

but I succeeded to install with gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1).

Is this error due to the conflict of gcc versions?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions