Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Make errors #54

Closed
johughes99 opened this issue May 18, 2020 · 11 comments
Closed

Make errors #54

johughes99 opened this issue May 18, 2020 · 11 comments
Assignees

Comments

@johughes99
Copy link

Just trying to build the source and examples - but using make - get the following error:

johughes@ubuntu:~/Downloads/indicators-master/build$ make
[ 3%] Building CXX object demo/CMakeFiles/demo.dir/demo.cpp.o
/home/johughes/Downloads/indicators-master/demo/demo.cpp:1:10: fatal error: indicators.hpp: No such file or directory
#include "indicators.hpp"
^~~~~~~~~~~~~~~~
compilation terminated.
demo/CMakeFiles/demo.dir/build.make:62: recipe for target 'demo/CMakeFiles/demo.dir/demo.cpp.o' failed
make[2]: *** [demo/CMakeFiles/demo.dir/demo.cpp.o] Error 1
CMakeFiles/Makefile2:85: recipe for target 'demo/CMakeFiles/demo.dir/all' failed
make[1]: *** [demo/CMakeFiles/demo.dir/all] Error 2
Makefile:151: recipe for target 'all' failed
make: *** [all] Error 2

the previous cmake did not report any errors.

@p-ranav
Copy link
Owner

p-ranav commented May 18, 2020

Sorry about that. Must've happened while testing the single_include version of the library. Should be fixed now.

@johughes99
Copy link
Author

Just downloaded the new distribution. Don't see that error - but lots more. Below is a sample of them from the beginning. (BTW included the cmake command as well)

johughes@ubuntu:/Downloads/indicators-master/build$ cmake -DINDICATORS_SAMPLES=ON -DINDICATORS_DEMO=ON ..
-- The CXX compiler identification is GNU 8.4.0
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for C++ include pthread.h
-- Looking for C++ include pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Configuring done
-- Generating done
-- Build files have been written to: /home/johughes/Downloads/indicators-master/build
johughes@ubuntu:
/Downloads/indicators-master/build$ make
[ 3%] Building CXX object demo/CMakeFiles/demo.dir/demo.cpp.o
In file included from /home/johughes/Downloads/indicators-master/demo/demo.cpp:1:
/home/johughes/Downloads/indicators-master/include/indicators/progress_bar.hpp: In member function ‘void indicators::ProgressBar::set_option(const indicators::details::Setting<std::__cxx11::basic_string, (indicators::details::ProgressBarOption)2>&)’:
/home/johughes/Downloads/indicators-master/include/indicators/progress_bar.hpp:93:57: error: no matching function for call to ‘indicators::ProgressBar::get_value<postfix_text>()’
get_valuedetails::ProgressBarOption::postfix_text() = setting.value;
^
/home/johughes/Downloads/indicators-master/include/indicators/progress_bar.hpp:142:8: note: candidate: ‘template<indicators::details::ProgressBarOption id> decltype (get_value(declvalindicators::ProgressBar::Settings&()).value) indicators::ProgressBar::get_value()’
auto get_value() -> decltype((details::get_value(std::declval<Settings &>()).value)) {
^~~~~~~~~
/home/johughes/Downloads/indicators-master/include/indicators/progress_bar.hpp:142:8: note: template argument deduction/substitution failed:
/home/johughes/Downloads/indicators-master/include/indicators/progress_bar.hpp: In substitution of ‘template<indicators::details::ProgressBarOption id> decltype (get_value(declvalindicators::ProgressBar::Settings&()).value) indicators::ProgressBar::get_value() [with indicators::details::ProgressBarOption id = (indicators::details::ProgressBarOption)2]’:
/home/johughes/Downloads/indicators-master/include/indicators/progress_bar.hpp:93:57: required from here

@p-ranav p-ranav reopened this May 19, 2020
@p-ranav
Copy link
Owner

p-ranav commented May 19, 2020

I'd like to recreate your environment. Can you tell me what OS + compiler you are using?

@johughes99
Copy link
Author

Most of the info is provided below. Not sure there is anything unusual about it:-)

johughes@ubuntu:/Downloads/indicators-master/build$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/8/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 8.4.0-1ubuntu1
18.04' --with-bugurl=file:///usr/share/doc/gcc-8/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-8 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 8.4.0 (Ubuntu 8.4.0-1ubuntu1~18.04)

@p-ranav p-ranav added the bug Something isn't working label May 19, 2020
@p-ranav
Copy link
Owner

p-ranav commented May 19, 2020

I was able to reproduce this problem with CI: https://travis-ci.com/github/p-ranav/indicators

Oddly, it builds fine with clang and errors with g++. I'll investigate shortly and try to figure out what's happening.

@p-ranav p-ranav self-assigned this May 19, 2020
@johughes99
Copy link
Author

Looking at your CI output you are getting the exact errors I'm seeing

@p-ranav p-ranav added the help wanted Extra attention is needed label May 21, 2020
@p-ranav
Copy link
Owner

p-ranav commented May 22, 2020

@dawidpilarski Can you help me with this?

@dawidpilarski
Copy link
Contributor

@p-ranav thanks for pointing out. I will fix that one.

@dawidpilarski
Copy link
Contributor

#57

@p-ranav
Copy link
Owner

p-ranav commented May 22, 2020

All that noise for a missing header 😭

Thanks a lot @dawidpilarski.

@johughes99 Please confirm on your end and close this issue. CI looks good.

@p-ranav p-ranav removed help wanted Extra attention is needed bug Something isn't working labels May 22, 2020
@johughes99
Copy link
Author

Builds successfully now.

I notice that there is a make install (which is not mentioned in the readme). Might be useful to mention this

p-ranav added a commit that referenced this issue May 25, 2020
* Fixed build issues in g++ caused by missing header #54
* Using terminal width to fill the remainder of the progress bar with empty spaces #56
* Previously this was hard-coded to 10 spaces
* Fixed multiple definitions in helper functions, e.g., cursor control #58
* Implemented option::ProgressType which can be incremental or decremental - Provides an easy interface to implement decremental progress (a regressing bar) #59
* Updated to latest version of termcolor #60
@p-ranav p-ranav reopened this Jun 17, 2020
@p-ranav p-ranav closed this as completed Jun 17, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants