Redex: double-conversion has installed, but configure error

Created on 13 Apr 2016  Â·  33Comments  Â·  Source: facebook/redex

➜ redex git:(master) ✗ brew install double-conversion
Warning: double-conversion-1.1.5 already installed
// execute autoreconf -ivf && ./configure && make && make install
...msg...
configure: error: Please install double-conversion

Most helpful comment

@shanenay @sorab2142 as @bertmaher guessed it right, it's the issue with not having /usr/local/lib in the library search path. I ran xcode-select --install on terminal and after that everything worked and I could install redex. During installation I got another error which working through that now:

./../folly/io/async/ssl/OpenSSLPtrTypes.h:20:10: fatal error: 'openssl/evp.h' file not found

And I fixed that one with brew link --force openssl since I already had installed openssl through brew. Now I can run redex on Mac OSX

All 33 comments

Is double-conversion linked properly? I had to do:

brew link double-conversion --force

Facing the same issue. force linking it didn't help.

I should have a fix landing soon -- in the meantime try editing configure.ac to change:

AC_CHECK_LIB([double-conversion], [main], ...

into

AC_CHECK_LIB([double-conversion], [ceil], ...

That _should_ appease configure. (I hope.)

@bertmaher that doesn't work either

checking for ceil in -ldouble-conversion... no
configure: error: Please install double-conversion

It seems the mac osx build is broken, even removing that check in double-conversion, glog is complaining. Maybe they added OS X last minute, will wait till they checkin the remaining source.

I'm not really sure what's going on here. Can you post the output of:

g++ -E -x c++ - -v < /dev/null
clang -Xlinker -v

Sorry I couldn't help much, but here is the output, seems my sdk is missing?

mmansour ~/Code/redex (master)
$ g++ -E -x c++ - -v < /dev/null
Apple LLVM version 7.3.0 (clang-703.0.29)
Target: x86_64-apple-darwin15.4.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
 "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" -cc1 -triple x86_64-apple-macosx10.11.0 -Wdeprecated-objc-isa-usage -Werror=deprecated-objc-isa-usage -E -disable-free -disable-llvm-verifier -main-file-name - -mrelocation-model pic -pic-level 2 -mthread-model posix -mdisable-fp-elim -masm-verbose -munwind-tables -target-cpu core2 -target-linker-version 264.3.101 -v -dwarf-column-info -resource-dir /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/7.3.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -stdlib=libc++ -fdeprecated-macro -fdebug-compilation-dir /Users/mmansour/Code/redex -ferror-limit 19 -fmessage-length 80 -stack-protector 1 -fblocks -fobjc-runtime=macosx-10.11.0 -fencode-extended-block-signature -fcxx-exceptions -fexceptions -fmax-type-align=16 -fdiagnostics-show-option -fcolor-diagnostics -o - -x c++ -
clang -cc1 version 7.3.0 (clang-703.0.29) default target x86_64-apple-darwin15.4.0
ignoring nonexistent directory "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/c++/v1"
ignoring nonexistent directory "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/local/include"
ignoring nonexistent directory "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/Library/Frameworks"
#include "..." search starts here:
#include <...> search starts here:
 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1
 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/7.3.0/include
 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include
 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include
 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks (framework directory)
End of search list.
# 1 "<stdin>"
# 1 "<built-in>" 1
# 1 "<built-in>" 3
# 336 "<built-in>" 3
# 1 "<command line>" 1
# 1 "<built-in>" 2
# 1 "<stdin>" 2


mmansour ~/Code/redex (master)
$ clang -Xlinker -v
@(#)PROGRAM:ld  PROJECT:ld64-264.3.101
configured to support archs: armv6 armv7 armv7s arm64 i386 x86_64 x86_64h armv6m armv7k armv7m armv7em (tvOS)
Library search paths:
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/lib
Framework search paths:
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/
Undefined symbols for architecture x86_64:
  "_main", referenced from:
     implicit entry/start for main executable
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

mmansour ~/Code/redex (master)

I am compiling redex now in Ubuntu, and everything works there. So I have an alternate :)

I'm thinking the problem is that "Library search paths" doesn't include /usr/local/lib, which is where homebrew installs things, but I'm not quite sure how to convince clang to add that to the path (it was just there for me after installing Xcode)... will let you know if I come up with anything.

@bertmaher echo $PATH
/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

checking for ceil in -ldouble-conversion... no
configure: error: Please install double-conversion library

brew install double-conversion
Warning: double-conversion-1.1.5 already installed

why?

same problem here

Can you try deleting the AC_CHECK_LIB([double-conversion], ... ) line from configure.ac?

@bertmaher Deleting that line now gives the following error:
configure: error: Please install google-glog library

Heh, how about if you delete the AC_LIB_CHECK([glog]) line after that? (You'll probably just hit the same error in the folly configure, but humor me)

after disable double-conversion and glog

now ...

configure: error: Please install google-gflags library

@bertmaher checking for main in -lglog... no
configure: error: Please install google-flog library
......
checking for main in -lgflags... no
configure: error: Please install google-gflags library
configure: error: ./configure failed for third-party/folly/folly
......
no way!

Same output as @xiaomadada

@bertmaher :) Deleting them relies ... Seems something missing, getting late here in bay area, maybe will help you tomorrow.

checking for main in -lgflags... no
configure: error: Please install google-gulags library
configure: error: ./configure failed for third-party/folly/folly

same output as @xiaomadada
checking for main in -lgflags... no
configure: error: Please install google-gflags library
configure: error: ./configure failed for third-party/folly/folly

@mohamedmansour Most redex dev's mostly use OSX, so it wasn't a late-addition. Can't repro the issue locally after doing a brew update and then running through the brew installs on http://fbredex.com/.

@sorab2142 brew list gflags

@shanenay output of brew list gflags is:
usr/local/Cellar/gflags/2.1.2/bin/gflags_completions.sh
/usr/local/Cellar/gflags/2.1.2/include/gflags/ (4 files)
/usr/local/Cellar/gflags/2.1.2/lib/libgflags.2.1.2.dylib
/usr/local/Cellar/gflags/2.1.2/lib/libgflags_nothreads.2.1.2.dylib
/usr/local/Cellar/gflags/2.1.2/lib/cmake/ (4 files)
/usr/local/Cellar/gflags/2.1.2/lib/ (4 other files)

@sorab2142 g++ -E -x c++ - -v < /dev/null

We're thinking it could be an xtools issue. We're running older versions (6.0.1 for me yikes!, and Bert 7.0.1 IIRC). I'm doing some software updates so I can get up to 7.3.0 to see if I can repro it there.

I had to set this line back inside configure.ac:

AC_CHECK_LIB([double-conversion], [main], ...

in order to reach the compile step.

@shanenay @sorab2142 as @bertmaher guessed it right, it's the issue with not having /usr/local/lib in the library search path. I ran xcode-select --install on terminal and after that everything worked and I could install redex. During installation I got another error which working through that now:

./../folly/io/async/ssl/OpenSSLPtrTypes.h:20:10: fatal error: 'openssl/evp.h' file not found

And I fixed that one with brew link --force openssl since I already had installed openssl through brew. Now I can run redex on Mac OSX

@shanenay $ g++ -E -x c++ - -v < /dev/null
Apple LLVM version 7.0.0 (clang-700.1.76)
Target: x86_64-apple-darwin15.4.0
Thread model: posix
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" -cc1 -triple x86_64-apple-macosx10.11.0 -Wdeprecated-objc-isa-usage -Werror=deprecated-objc-isa-usage -E -disable-free -disable-llvm-verifier -main-file-name - -mrelocation-model pic -pic-level 2 -mthread-model posix -mdisable-fp-elim -masm-verbose -munwind-tables -target-cpu core2 -target-linker-version 253.6 -v -dwarf-column-info -resource-dir /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/7.0.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -stdlib=libc++ -fdeprecated-macro -fdebug-compilation-dir /Users/macminiserver/Documents/xmdd_android/redex -ferror-limit 19 -fmessage-length 80 -stack-protector 1 -mstackrealign -fblocks -fobjc-runtime=macosx-10.11.0 -fencode-extended-block-signature -fcxx-exceptions -fexceptions -fmax-type-align=16 -fdiagnostics-show-option -fcolor-diagnostics -o - -x c++ -
clang -cc1 version 7.0.0 based upon LLVM 3.7.0svn default target x86_64-apple-darwin15.4.0
ignoring nonexistent directory "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/c++/v1"
ignoring nonexistent directory "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/local/include"
ignoring nonexistent directory "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/Library/Frameworks"

include "..." search starts here:

include <...> search starts here:

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/7.0.0/include
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks (framework directory)
End of search list.

1 ""

1 "" 1

1 "" 3

332 "" 3

1 "" 1

1 "" 2

1 "" 2

baiyulindeMac-mini:redex macminiserver$

@maniramezan solution worked for me: xcode-select --install and brew link --force openssl. Thank you.

I also got this error: folly/portability/Malloc.h:28:12: error: unknown type name 'size_t'.
I solved it by adding the #include <stddef.h> line into third-party/folly/folly/portability/Malloc.h.

after xcode-select --install finished, attempting to compile now gives the following error:

In file included from ./../folly/io/async/AsyncTransport.h:26:
./../folly/io/async/ssl/OpenSSLPtrTypes.h:20:10: fatal error: 'openssl/evp.h'
      file not found
#include <openssl/evp.h>
         ^

@benoitletondor I added #include <stddef.h> to /third_party/folly/folly/portability/Malloc.h; seems to do the trick. I suppose one ought to fix that in Folly itself, and not here.

@xiaomadada didn't solve for me :(

Just for the record, here ( Ubuntu ), I had this error fixed after typing

git revert 2a1b9609f48ebd64def6260e2018b3d476c2d9f0

same issue here on mac :/

Could you please try compiling a test program with double-conversion? E.g.:

#include <stdio.h>
#include <double-conversion/double-conversion.h>

int main() {
  double_conversion::StringToDoubleConverter conv(0, 0.0, 0.0, "", "");
  int nchars;
  printf("%lf\n", conv.StringToDouble("3.14", 4, &nchars));
  return 0;
}

If this doesn't build OK with the command line:

g++ -ldouble-conversion test.cpp -o test && ./test

then the build environment isn't set up for command line builds anyways, and it's not a redex-specific problem.

@maniramezan: thanks! I had suspected that was the issue but didn't have a way to test. For those following along, the solution seems to be: xcode-select --install to get the command line tools set up.

I'll leave this issue open for a bit so others can find it.

Yep xcode-select --install did the trick @bertmaher , on 10.10.5 mac osx.

This is in the README now, thanks everybody who reported it!

Was this page helpful?
0 / 5 - 0 ratings