Skip to content

Problems with install.sh (-Wnarrowing) #37

Description

@danielsaad

Dear all,
I'm having a problem when building sdsl by executing install.sh.
There is a compilation error due -Wnarrowing

The compilation log is attached:

/home/danielsaad/Desktop/sdsl-master/lib/bwt_construct.cpp: In function ‘bool sdsl::construct_bwt(sdsl::tMSS&, const string&, const string&)’:
/home/danielsaad/Desktop/sdsl-master/lib/bwt_construct.cpp:65:38: error: narrowing conversion of ‘-1’ from ‘int’ to ‘size_type {aka long unsigned int}’ inside { } [-Wnarrowing]
size_type to_add[2] = {-1,n-1};
^
/home/danielsaad/Desktop/sdsl-master/lib/bwt_construct.cpp: In function ‘bool sdsl::construct_bwt2(sdsl::tMSS&, const string&, const string&)’:
/home/danielsaad/Desktop/sdsl-master/lib/bwt_construct.cpp:137:34: error: narrowing conversion of ‘-1’ from ‘int’ to ‘size_type {aka long unsigned int}’ inside { } [-Wnarrowing]
size_type to_add[2] = {-1,n-1};
^
make[2]: *** [lib/CMakeFiles/sdsl.dir/build.make:135: lib/CMakeFiles/sdsl.dir/bwt_construct.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:122: lib/CMakeFiles/sdsl.dir/all] Error 2
make: *** [Makefile:128: all] Error 2
[ 5%] Building CXX object lib/CMakeFiles/sdsl.dir/bwt_construct.cpp.o
/home/danielsaad/Desktop/sdsl-master/lib/bwt_construct.cpp: In function ‘bool sdsl::construct_bwt(sdsl::tMSS&, const string&, const string&)’:
/home/danielsaad/Desktop/sdsl-master/lib/bwt_construct.cpp:65:38: error: narrowing conversion of ‘-1’ from ‘int’ to ‘size_type {aka long unsigned int}’ inside { } [-Wnarrowing]
size_type to_add[2] = {-1,n-1};
^
/home/danielsaad/Desktop/sdsl-master/lib/bwt_construct.cpp: In function ‘bool sdsl::construct_bwt2(sdsl::tMSS&, const string&, const string&)’:
/home/danielsaad/Desktop/sdsl-master/lib/bwt_construct.cpp:137:34: error: narrowing conversion of ‘-1’ from ‘int’ to ‘size_type {aka long unsigned int}’ inside { } [-Wnarrowing]
size_type to_add[2] = {-1,n-1};
^
make[2]: *** [lib/CMakeFiles/sdsl.dir/build.make:135: lib/CMakeFiles/sdsl.dir/bwt_construct.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:122: lib/CMakeFiles/sdsl.dir/all] Error 2
make: *** [Makefile:128: all] Error 2

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions