Error Installation of CAFE var 4.2 on Mac OS 10.13.5

36 views
Skip to first unread message

mirej...@gmail.com

unread,
Dec 31, 2018, 2:12:48 PM12/31/18
to hahnlab-cafe
My attempts to install CAFE var 4.2 on Mac OS 10.13.5 exits with two errors. I have attached the log from config and Make below.

Pauls-MBP:CAFE Paul$ ./configure

checking for pgc++... no

checking for icc... no

checking for g++... g++

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 g++ accepts -g... yes

checking for pgcc... no

checking for icc... no

checking for gcc... gcc

checking whether we are using the GNU C compiler... yes

checking whether gcc accepts -g... yes

checking for gcc option to accept ISO C89... none needed

checking for g++ option to support OpenMP... unsupported

checking for library containing sgemm... no

checking for library containing cblas_dgemm... no

checking how to run the C++ preprocessor... g++ -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 for dirent.h... yes

checking for ndir.h... no

checking for a readline compatible library... -lreadline

checking readline.h usability... no

checking readline.h presence... no

checking for readline.h... no

checking readline/readline.h usability... yes

checking readline/readline.h presence... yes

checking for readline/readline.h... yes

checking whether readline supports history... yes

checking history.h usability... no

checking history.h presence... no

checking for history.h... no

checking readline/history.h usability... yes

checking readline/history.h presence... yes

checking for readline/history.h... yes

configure: creating ./config.status

config.status: creating Makefile

config.status: creating config.h

Pauls-MBP:CAFE Paul$ make

gcc -c -Wall -std=c11 -I cafe -I libtree -I libcommon  -O3 -DNDEBUG -o release/cafe_family.o cafe/cafe_family.c

gcc -c -Wall -std=c11 -I cafe -I libtree -I libcommon  -O3 -DNDEBUG -o release/cafe_main.o cafe/cafe_main.c

gcc -c -Wall -std=c11 -I cafe -I libtree -I libcommon  -O3 -DNDEBUG -o release/cafe_report.o cafe/cafe_report.c

gcc -c -Wall -std=c11 -I cafe -I libtree -I libcommon  -O3 -DNDEBUG -o release/cafe_tree.o cafe/cafe_tree.c

gcc -c -Wall -std=c11 -I cafe -I libtree -I libcommon  -O3 -DNDEBUG -o release/cafe_shell.o cafe/cafe_shell.c

cafe/cafe_shell.c:605:7: warning: using integer absolute value function 'abs'

      when argument is of floating point type [-Wabsolute-value]

                if (abs(1 - columnsum) > 0.00000000000001) {

                    ^

cafe/cafe_shell.c:605:7: note: use function 'fabs' instead

                if (abs(1 - columnsum) > 0.00000000000001) {

                    ^~~

                    fabs

1 warning generated.

gcc -c -Wall -std=c11 -I cafe -I libtree -I libcommon  -O3 -DNDEBUG -o release/birthdeath.o libtree/birthdeath.c

gcc -c -Wall -std=c11 -I cafe -I libtree -I libcommon  -O3 -DNDEBUG -o release/chooseln_cache.o libtree/chooseln_cache.c

gcc -c -Wall -std=c11 -I cafe -I libtree -I libcommon  -O3 -DNDEBUG -o release/phylogeny.o libtree/phylogeny.c

gcc -c -Wall -std=c11 -I cafe -I libtree -I libcommon  -O3 -DNDEBUG -o release/tree.o libtree/tree.c

gcc -c -Wall -std=c11 -I cafe -I libtree -I libcommon  -O3 -DNDEBUG -o release/grpcmp.o libcommon/grpcmp.c

gcc -c -Wall -std=c11 -I cafe -I libtree -I libcommon  -O3 -DNDEBUG -o release/histogram.o libcommon/histogram.c

gcc -c -Wall -std=c11 -I cafe -I libtree -I libcommon  -O3 -DNDEBUG -o release/input_values.o libtree/input_values.c

gcc -c -Wall -std=c11 -I cafe -I libtree -I libcommon  -O3 -DNDEBUG -o release/matrix_exponential.o libcommon/matrix_exponential.c

gcc -c -Wall -std=c11 -I cafe -I libtree -I libcommon  -O3 -DNDEBUG -o release/regexpress.o libcommon/regexpress.c

gcc -c -Wall -std=c11 -I cafe -I libtree -I libcommon  -O3 -DNDEBUG -o release/utils_string.o libcommon/utils_string.c

gcc -c -Wall -std=c11 -I cafe -I libtree -I libcommon  -O3 -DNDEBUG -o release/gmatrix.o libcommon/gmatrix.c

gcc -c -Wall -std=c11 -I cafe -I libtree -I libcommon  -O3 -DNDEBUG -o release/hashtable.o libcommon/hashtable.c

gcc -c -Wall -std=c11 -I cafe -I libtree -I libcommon  -O3 -DNDEBUG -o release/mathfunc.o libcommon/mathfunc.c

libcommon/mathfunc.c:6:9: warning: 'M_PI' macro redefined [-Wmacro-redefined]

#define M_PI           3.14159265358979323846  /* pi */

        ^

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/math.h:703:9: note: 

      previous definition is here

#define M_PI        3.14159265358979323846264338327950288   /* pi             */

        ^

libcommon/mathfunc.c:7:9: warning: 'M_SQRT2' macro redefined [-Wmacro-redefined]

#define M_SQRT2    1.41421356237309504880   // sqrt(2)

        ^

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/math.h:709:9: note: 

      previous definition is here

#define M_SQRT2     1.41421356237309504880168872420969808   /* sqrt(2)        */

        ^

2 warnings generated.

gcc -c -Wall -std=c11 -I cafe -I libtree -I libcommon  -O3 -DNDEBUG -o release/memalloc.o libcommon/memalloc.c

gcc -c -Wall -std=c11 -I cafe -I libtree -I libcommon  -O3 -DNDEBUG -o release/utils.o libcommon/utils.c

g++ -c -Wall -std=c++11 -I cafe -I libtree -I libcommon  -O3 -DNDEBUG -o release/branch_cutting.o cafe/branch_cutting.cpp

In file included from cafe/branch_cutting.cpp:6:

cafe/branch_cutting.h:17:6: warning: private field 'node_count' is not used

      [-Wunused-private-field]

        int node_count;

            ^

1 warning generated.

g++ -c -Wall -std=c++11 -I cafe -I libtree -I libcommon  -O3 -DNDEBUG -o release/cafe_commands.o cafe/cafe_commands.cpp

cafe/cafe_commands.cpp:1065:12: error: call to 'abs' is ambiguous

    return std::abs(x - y) <= epsilon * std::abs(x);

           ^~~~~~~~

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/stdlib.h:129:6: note: 

      candidate function

int      abs(int) __pure2;

         ^

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstdlib:167:44: note: 

      candidate function

inline _LIBCPP_INLINE_VISIBILITY long      abs(     long __x) _NOEXCEPT ...

                                           ^

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstdlib:169:44: note: 

      candidate function

inline _LIBCPP_INLINE_VISIBILITY long long abs(long long __x) _NOEXCEPT ...

                                           ^

cafe/cafe_commands.cpp:1065:41: error: call to 'abs' is ambiguous

    return std::abs(x - y) <= epsilon * std::abs(x);

                                        ^~~~~~~~

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/stdlib.h:129:6: note: 

      candidate function

int      abs(int) __pure2;

         ^

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstdlib:167:44: note: 

      candidate function

inline _LIBCPP_INLINE_VISIBILITY long      abs(     long __x) _NOEXCEPT ...

                                           ^

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstdlib:169:44: note: 

      candidate function

inline _LIBCPP_INLINE_VISIBILITY long long abs(long long __x) _NOEXCEPT ...

                                           ^

2 errors generated.

make: *** [release/cafe_commands.o] Error 1

Pauls-MBP:CAFE Paul$ 

Fulton, Ben

unread,
Jan 2, 2019, 2:25:46 PM1/2/19
to mirej...@gmail.com, hahnlab-cafe

I think you can fix the problem by adding

 

#include <cstdlib>

 

Somewhere near the top of each file that is giving an error. I don’t have a Mac to test on however, so let me know what you find!

 

--

Ben Fulton

Research Applications and Deep Learning

Research Technologies

Indiana University

E-Mail: befu...@iu.edu

--
You received this message because you are subscribed to the Google Groups "hahnlab-cafe" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hahnlabcafe...@googlegroups.com.
To post to this group, send email to hahnl...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hahnlabcafe/9b8dd0fc-9518-405d-9485-558cdea77b78%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Catherine Linnen

unread,
Jan 14, 2019, 5:07:01 PM1/14/19
to hahnlab-cafe
I have been having what looks like a very similar (or the same) error on macs running El Capitan (10.11) and Yosemite (10.10). The contents of the log file are included below. I played around with the suggested fix below (#include <cstdlib>) on the 10.11 machine, but didn't get it working yet. Perhaps I did not add this line to the right files though. Can you clarify? Thanks!!
Catherine

Here is the output for configure and make:

Catherines-MacBook-Pro:CAFE-master Catherine$ cd /Applications/CAFE

Catherines-MacBook-Pro:CAFE Catherine$ ./configure

Catherines-MacBook-Pro:CAFE Catherine$ make

/usr/include/math.h:683:9: note: previous definition is here

#define M_PI        3.14159265358979323846264338327950288   /* pi             */

        ^

libcommon/mathfunc.c:7:9: warning: 'M_SQRT2' macro redefined [-Wmacro-redefined]

#define M_SQRT2    1.41421356237309504880   // sqrt(2)

        ^

/usr/include/math.h:689:9: note: previous definition is here

#define M_SQRT2     1.41421356237309504880168872420969808   /* sqrt(2)        */

        ^

2 warnings generated.

gcc -c -Wall -std=c11 -I cafe -I libtree -I libcommon  -O3 -DNDEBUG -o release/memalloc.o libcommon/memalloc.c

gcc -c -Wall -std=c11 -I cafe -I libtree -I libcommon  -O3 -DNDEBUG -o release/utils.o libcommon/utils.c

g++ -c -Wall -std=c++11 -I cafe -I libtree -I libcommon  -O3 -DNDEBUG -o release/branch_cutting.o cafe/branch_cutting.cpp

In file included from cafe/branch_cutting.cpp:6:

cafe/branch_cutting.h:17:6: warning: private field 'node_count' is not used

      [-Wunused-private-field]

        int node_count;

            ^

1 warning generated.

g++ -c -Wall -std=c++11 -I cafe -I libtree -I libcommon  -O3 -DNDEBUG -o release/cafe_commands.o cafe/cafe_commands.cpp

cafe/cafe_commands.cpp:1065:12: error: call to 'abs' is ambiguous

    return std::abs(x - y) <= epsilon * std::abs(x);

           ^~~~~~~~

/usr/include/stdlib.h:129:6: note: candidate function

int      abs(int) __pure2;

         ^

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstdlib:159:44: note: 

      candidate function

inline _LIBCPP_INLINE_VISIBILITY long      abs(     long __x) _NOEXCEPT ...

                                           ^

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstdlib:161:44: note: 

      candidate function

inline _LIBCPP_INLINE_VISIBILITY long long abs(long long __x) _NOEXCEPT ...

                                           ^

cafe/cafe_commands.cpp:1065:41: error: call to 'abs' is ambiguous

    return std::abs(x - y) <= epsilon * std::abs(x);

                                        ^~~~~~~~

/usr/include/stdlib.h:129:6: note: candidate function

int      abs(int) __pure2;

         ^

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstdlib:159:44: note: 

      candidate function

inline _LIBCPP_INLINE_VISIBILITY long      abs(     long __x) _NOEXCEPT ...

                                           ^

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstdlib:161:44: note: 

      candidate function

inline _LIBCPP_INLINE_VISIBILITY long long abs(long long __x) _NOEXCEPT ...

                                           ^

2 errors generated.

make: *** [release/cafe_commands.o] Error 1

Catherines-MacBook-Pro:CAFE Catherine$  

Dan Vanderpool

unread,
Jan 14, 2019, 5:55:20 PM1/14/19
to Catherine Linnen, hahnlab-cafe
Hi Catherine,

I think solved the issue on my Mac.  

If you open the cafe_commands.cpp file located in the cafe subdirectory (lowercase cafe) using a text editor of choice:

/Users/DanV/CAFE/cafe/cafe_commands.cpp


Add the line 

#include <cmath>

at around the top of the file (I added it at line 95 like the rest of the inclusion statements).


I was able to get it to compile after doing this.  I will have Ben update the code for other users.

Dan





For more options, visit https://groups.google.com/d/optout.

__________________________
Dan Vanderpool
Postdoctoral Scholar
Department of Biology
Indiana University
Hahn Lab, Jordan Hall 249B
1001 East Third Street
Bloomington, IN 47405
Email: ddvand...@gmail.com

Catherine Linnen

unread,
Jan 14, 2019, 6:07:57 PM1/14/19
to hahnlab-cafe
Woo hoo! It looks like it compiled successfully. 
Thanks so much!
Catherine
__________________________

Dan Vanderpool

unread,
Jan 14, 2019, 6:16:37 PM1/14/19
to Catherine Linnen, hahnlab-cafe
Great,

Yeah, I am not sure what changed in the new update of Mac OS, but this wasn’t an issue before.  Glad it worked out.

dv


For more options, visit https://groups.google.com/d/optout.

__________________________
Dan Vanderpool
Postdoctoral Scholar
Department of Biology
Indiana University
Hahn Lab, Jordan Hall 249B
1001 East Third Street
Bloomington, IN 47405
Reply all
Reply to author
Forward
0 new messages