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

Kira installation issue on Mac #6

Closed
raydsameshima opened this issue Mar 15, 2018 · 5 comments
Closed

Kira installation issue on Mac #6

raydsameshima opened this issue Mar 15, 2018 · 5 comments

Comments

@raydsameshima
Copy link
Contributor

Dear Ueda-san,

(Sorry for my miss-placing this issue on another issue's comment.)
Even if I install pkg-config by following http://macappstore.org/pkg-config/, I still have a trouble on kira installation.

macOS Sierra (10.12.6)
MacBook Pro (Retina, 13-inch, Early 2015)

Here is the error message of my terminal:

$ brew install kira
==> Installing kira from tueda/loops
==> Downloading https://www.physik.hu-berlin.de/de/pep/tools/kira-1.0.tar.gz
Already downloaded: /Users/rds/Library/Caches/Homebrew/kira-1.0.tar.gz
==> ./configure --prefix=/usr/local/Cellar/kira/1.0 --disable-silent-rules
==> make
Last 15 lines from /Users/rds/Library/Logs/Homebrew/kira/02.make:
In file included from connect2kira.cpp:21:
In file included from ./connect2kira.h:20:
./integral.h:19:10: fatal error: 'omp.h' file not found
#include <omp.h>
         ^~~~~~~
1 error generated.
make[2]: *** [kira-connect2kira.o] Error 1
In file included from createSeeds.cpp:19:
./integral.h:19:10: fatal error: 'omp.h' file not found
#include <omp.h>
         ^~~~~~~
1 error generated.
make[2]: *** [kira-createSeeds.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
https://github.com/tueda/homebrew-loops/issues
@tueda
Copy link
Owner

tueda commented Mar 15, 2018

Did you get errors like "unsupported option '-fopenmp'" in your log file Users/rds/Library/Logs/Homebrew/kira/02.make? It seems that Sierra doesn't have OpenMP by default (e.g., microsoft/LightGBM#3). Maybe you need to install gcc via Homebrew and use it for kira.

It is strange to me that kira assumes the compiler implements OpenMP but there is no documentation mentioning it.

@raydsameshima
Copy link
Contributor Author

Yes, when I tried to install from scratch, I mean, using the usual

./configure
make
make install

procedures, I've seen the following error message:

rds:kira-1.0 rds$ make
/Library/Developer/CommandLineTools/usr/bin/make  all-recursive
Making all in src
g++ -DHAVE_CONFIG_H -I. -I..  -I/usr/local/Cellar/ -I/usr/local/Cellar/cln/1.3.4/include -I/usr/local/Cellar/yaml-cpp/0.6.2/include   -Wall -O2 -fopenmp -std=c++11 -pthread -g -O2 -MT kira-main.o -MD -MP -MF .deps/kira-main.Tpo -c -o kira-main.o `test -f 'main.cpp' || echo './'`main.cpp
clang: error: unsupported option '-fopenmp'
make[2]: *** [kira-main.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

I'll try later on from gcc installation, thank you ueda-san!

@raydsameshima
Copy link
Contributor Author

Even though I installed gcc-4.9 and gcc-6, make command does not work.

rds:kira-1.0 rds$ CC=gcc-4.9 CXX=gcc-4.9 ./configure --prefix=/Users/rds/local
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether gcc-4.9 accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of gcc-4.9... gcc3
checking dependency style of gcc-4.9... (cached) gcc3
checking for gcc... gcc-4.9
checking whether we are using the GNU C compiler... yes
checking whether gcc-4.9 accepts -g... yes
checking for gcc-4.9 option to accept ISO C89... none needed
checking whether gcc-4.9 understands -c and -o together... yes
checking dependency style of gcc-4.9... gcc3
checking dependency style of gcc-4.9... (cached) gcc3
checking for main in -ldl... yes
checking for pkg-config... /usr/local/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for GINAC... yes
checking for CLN... yes
checking for YAML_CPP... yes
checking for ZLIB... yes
checking how to run the C preprocessor... gcc-4.9 -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking for inttypes.h... (cached) yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking malloc.h usability... no
checking malloc.h presence... no
checking for malloc.h... no
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking for stdint.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking sys/file.h usability... yes
checking sys/file.h presence... yes
checking for sys/file.h... yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/mount.h usability... yes
checking sys/mount.h presence... yes
checking for sys/mount.h... yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking sys/statvfs.h usability... yes
checking sys/statvfs.h presence... yes
checking for sys/statvfs.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking utime.h usability... yes
checking utime.h presence... yes
checking for utime.h... yes
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
checking for uid_t in sys/types.h... yes
checking for inline... inline
checking for int32_t... yes
checking for int64_t... yes
checking for mode_t... yes
checking for off_t... yes
checking for pid_t... yes
checking for size_t... yes
checking for ssize_t... yes
checking for struct stat.st_blksize... yes
checking for uint32_t... yes
checking for uint64_t... yes
checking for uint8_t... yes
checking for ptrdiff_t... yes
checking vfork.h usability... no
checking vfork.h presence... no
checking for vfork.h... no
checking for fork... yes
checking for vfork... yes
checking for working fork... yes
checking for working vfork... (cached) yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible realloc... yes
checking whether strerror_r is declared... yes
checking for strerror_r... yes
checking whether strerror_r returns char *... no
checking for working strtod... yes
checking for clock_gettime... yes
checking for dup2... yes
checking for fdatasync... yes
checking for getpagesize... yes
checking for gettimeofday... yes
checking for localtime_r... yes
checking for memmove... yes
checking for memset... yes
checking for mkdir... yes
checking for pow... yes
checking for select... yes
checking for strchr... yes
checking for strerror... yes
checking for strstr... yes
checking for strtol... yes
checking for utime... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
rds:kira-1.0 rds$ make
/Library/Developer/CommandLineTools/usr/bin/make  all-recursive
Making all in src
gcc-4.9 -DHAVE_CONFIG_H -I. -I..  -I/usr/local/Cellar/ -I/usr/local/Cellar/cln/1.3.4/include -I/usr/local/Cellar/yaml-cpp/0.6.2/include   -Wall -O2 -fopenmp -std=c++11 -pthread -g -O2 -MT kira-main.o -MD -MP -MF .deps/kira-main.Tpo -c -o kira-main.o `test -f 'main.cpp' || echo './'`main.cpp
In file included from interface.h:33:0,
                 from kira.h:23,
                 from main.cpp:17:
coeff_int.h:42:58: error: 'uint' has not been declared
   static void init(const std::vector<std::string>& = {}, uint = 1,
                                                          ^
In file included from interface.h:34:0,
                 from kira.h:23,
                 from main.cpp:17:
coeff_vec.h:39:10: error: 'uint' does not name a type
   static uint ncoeffs; // number of coefficients in coefficient vector
          ^
coeff_vec.h:45:58: error: 'uint' has not been declared
   static void init(const std::vector<std::string>& = {}, uint = 1,
                                                          ^
coeff_vec.h: In constructor 'pyred::Coeff_vec::Coeff_vec(T)':
coeff_vec.h:70:14: error: 'ncoeffs' was not declared in this scope
     c.resize(ncoeffs, a);
              ^
coeff_vec.h:74:15: error: 'ncoeffs' was not declared in this scope
     c.reserve(ncoeffs);
               ^
In file included from interface.h:35:0,
                 from kira.h:23,
                 from main.cpp:17:
gauss.h: In function 'bool pyred::cmp_eqn(const pyred::EquationPyred<Coeff>&, const pyred::EquationPyred<Coeff>&)':
gauss.h:77:8: error: 'uint' was not declared in this scope
   for (uint i = 1; i < uint(a.size()); ++i) {
        ^
gauss.h:77:20: error: 'i' was not declared in this scope
   for (uint i = 1; i < uint(a.size()); ++i) {
                    ^
gauss.h: In function 'bool pyred::cmp_eqn_psolve(const pyred::EquationPyred<Coeff>&, const pyred::EquationPyred<Coeff>&)':
gauss.h:104:8: error: 'uint' was not declared in this scope
   for (uint i = 1; i < uint(a.size()); ++i) {
        ^
gauss.h:104:20: error: 'i' was not declared in this scope
   for (uint i = 1; i < uint(a.size()); ++i) {
                    ^
gauss.h: In member function 'bool pyred::cmp_eqn_heap<Coeff>::operator()(const std::shared_ptr<pyred::EquationPyredSolver<Coeff> >&, const std::shared_ptr<pyred::EquationPyredSolver<Coeff> >&)':
gauss.h:134:12: error: 'uint' was not declared in this scope
       for (uint i = 1; i < uint(a->eq.size()); ++i) {
            ^
gauss.h:134:24: error: 'i' was not declared in this scope
       for (uint i = 1; i < uint(a->eq.size()); ++i) {
                        ^
make[2]: *** [kira-main.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
rds:kira-1.0 rds$ gcc-6
gcc-6: fatal error: no input files
compilation terminated.
rds:kira-1.0 rds$ CC=gcc-6 CXX=gcc-6 ./configure --prefix=/Users/rds/local
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether gcc-6 accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of gcc-6... gcc3
checking dependency style of gcc-6... (cached) gcc3
checking for gcc... gcc-6
checking whether we are using the GNU C compiler... yes
checking whether gcc-6 accepts -g... yes
checking for gcc-6 option to accept ISO C89... none needed
checking whether gcc-6 understands -c and -o together... yes
checking dependency style of gcc-6... gcc3
checking dependency style of gcc-6... (cached) gcc3
checking for main in -ldl... yes
checking for pkg-config... /usr/local/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for GINAC... yes
checking for CLN... yes
checking for YAML_CPP... yes
checking for ZLIB... yes
checking how to run the C preprocessor... gcc-6 -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking for inttypes.h... (cached) yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking malloc.h usability... no
checking malloc.h presence... no
checking for malloc.h... no
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking for stdint.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking sys/file.h usability... yes
checking sys/file.h presence... yes
checking for sys/file.h... yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/mount.h usability... yes
checking sys/mount.h presence... yes
checking for sys/mount.h... yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking sys/statvfs.h usability... yes
checking sys/statvfs.h presence... yes
checking for sys/statvfs.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking utime.h usability... yes
checking utime.h presence... yes
checking for utime.h... yes
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
checking for uid_t in sys/types.h... yes
checking for inline... inline
checking for int32_t... yes
checking for int64_t... yes
checking for mode_t... yes
checking for off_t... yes
checking for pid_t... yes
checking for size_t... yes
checking for ssize_t... yes
checking for struct stat.st_blksize... yes
checking for uint32_t... yes
checking for uint64_t... yes
checking for uint8_t... yes
checking for ptrdiff_t... yes
checking vfork.h usability... no
checking vfork.h presence... no
checking for vfork.h... no
checking for fork... yes
checking for vfork... yes
checking for working fork... yes
checking for working vfork... (cached) yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible realloc... yes
checking whether strerror_r is declared... yes
checking for strerror_r... yes
checking whether strerror_r returns char *... no
checking for working strtod... yes
checking for clock_gettime... yes
checking for dup2... yes
checking for fdatasync... yes
checking for getpagesize... yes
checking for gettimeofday... yes
checking for localtime_r... yes
checking for memmove... yes
checking for memset... yes
checking for mkdir... yes
checking for pow... yes
checking for select... yes
checking for strchr... yes
checking for strerror... yes
checking for strstr... yes
checking for strtol... yes
checking for utime... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
rds:kira-1.0 rds$ make
/Library/Developer/CommandLineTools/usr/bin/make  all-recursive
Making all in src
gcc-6 -DHAVE_CONFIG_H -I. -I..  -I/usr/local/Cellar/ -I/usr/local/Cellar/cln/1.3.4/include -I/usr/local/Cellar/yaml-cpp/0.6.2/include   -Wall -O2 -fopenmp -std=c++11 -pthread -g -O2 -MT kira-main.o -MD -MP -MF .deps/kira-main.Tpo -c -o kira-main.o `test -f 'main.cpp' || echo './'`main.cpp
In file included from interface.h:33:0,
                 from kira.h:23,
                 from main.cpp:17:
coeff_int.h:42:58: error: 'uint' has not been declared
   static void init(const std::vector<std::string>& = {}, uint = 1,
                                                          ^~~~
In file included from interface.h:34:0,
                 from kira.h:23,
                 from main.cpp:17:
coeff_vec.h:39:10: error: 'uint' does not name a type
   static uint ncoeffs; // number of coefficients in coefficient vector
          ^~~~
coeff_vec.h:45:58: error: 'uint' has not been declared
   static void init(const std::vector<std::string>& = {}, uint = 1,
                                                          ^~~~
coeff_vec.h: In constructor 'pyred::Coeff_vec::Coeff_vec(T)':
coeff_vec.h:70:14: error: 'ncoeffs' was not declared in this scope
     c.resize(ncoeffs, a);
              ^~~~~~~
coeff_vec.h:74:15: error: 'ncoeffs' was not declared in this scope
     c.reserve(ncoeffs);
               ^~~~~~~
In file included from interface.h:35:0,
                 from kira.h:23,
                 from main.cpp:17:
gauss.h: In function 'bool pyred::cmp_eqn(const pyred::EquationPyred<Coeff>&, const pyred::EquationPyred<Coeff>&)':
gauss.h:77:8: error: 'uint' was not declared in this scope
   for (uint i = 1; i < uint(a.size()); ++i) {
        ^~~~
gauss.h:77:20: error: 'i' was not declared in this scope
   for (uint i = 1; i < uint(a.size()); ++i) {
                    ^
gauss.h: In function 'bool pyred::cmp_eqn_psolve(const pyred::EquationPyred<Coeff>&, const pyred::EquationPyred<Coeff>&)':
gauss.h:104:8: error: 'uint' was not declared in this scope
   for (uint i = 1; i < uint(a.size()); ++i) {
        ^~~~
gauss.h:104:20: error: 'i' was not declared in this scope
   for (uint i = 1; i < uint(a.size()); ++i) {
                    ^
gauss.h: In member function 'bool pyred::cmp_eqn_heap<Coeff>::operator()(const std::shared_ptr<pyred::EquationPyredSolver<Coeff> >&, const std::shared_ptr<pyred::EquationPyredSolver<Coeff> >&)':
gauss.h:134:12: error: 'uint' was not declared in this scope
       for (uint i = 1; i < uint(a->eq.size()); ++i) {
            ^~~~
gauss.h:134:24: error: 'i' was not declared in this scope
       for (uint i = 1; i < uint(a->eq.size()); ++i) {
                        ^
make[2]: *** [kira-main.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Is there anybody who successfully compiled on your mac?

@tueda
Copy link
Owner

tueda commented Mar 30, 2018

I think uint is not in the standard but some systems define it. I have it in Ubuntu xenial:

$ grep -n uint /usr/include/x86_64-linux-gnu/sys/types.h
152:typedef unsigned int uint;

You may define it, maybe by modifying CFLAGS/CXXFLAGS.

@tueda
Copy link
Owner

tueda commented Mar 30, 2018

I'm not sure whether the authors want to support macOS, but maybe worth reporting/asking it to them.

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