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

double-conversion has installed, but configure error #15

Closed
lovetuzitong opened this issue Apr 13, 2016 · 33 comments
Closed

double-conversion has installed, but configure error #15

lovetuzitong opened this issue Apr 13, 2016 · 33 comments

Comments

@lovetuzitong
Copy link

➜ 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

@antani
Copy link

antani commented Apr 13, 2016

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

brew link double-conversion --force

@srisa
Copy link

srisa commented Apr 13, 2016

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

@bertmaher
Copy link
Contributor

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.)

@mohamedmansour
Copy link

@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.

@bertmaher
Copy link
Contributor

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

@mohamedmansour
Copy link

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)

@mohamedmansour
Copy link

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

@bertmaher
Copy link
Contributor

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.

@xiaomadada
Copy link

@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?

@jsdevjournal
Copy link

same problem here

@bertmaher
Copy link
Contributor

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

@sorab2142
Copy link

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

@bertmaher
Copy link
Contributor

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)

@jsdevjournal
Copy link

after disable double-conversion and glog

now ...

configure: error: Please install google-gflags library

@xiaomadada
Copy link

@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!

@mohamedmansour
Copy link

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

@sorab2142
Copy link

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

@shanenay
Copy link
Contributor

@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

@sorab2142
Copy link

@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)

@shanenay
Copy link
Contributor

@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.

@bonnyfone
Copy link

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

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

in order to reach the compile step.

@maniramezan
Copy link

@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

@xiaomadada
Copy link

@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$

@benoitletondor
Copy link

@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.

@sorab2142
Copy link

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>
         ^

@xiaomadada
Copy link

@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.

@herberthamaral
Copy link

@xiaomadada didn't solve for me :(

@marcosdiez
Copy link

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

git revert 2a1b9609f48ebd64def6260e2018b3d476c2d9f0

@benju69
Copy link

benju69 commented Apr 13, 2016

same issue here on mac :/

@bertmaher
Copy link
Contributor

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.

@bertmaher
Copy link
Contributor

@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.

@stephanenicolas
Copy link

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

@bertmaher
Copy link
Contributor

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

facebook-github-bot pushed a commit that referenced this issue May 21, 2021
Summary:
Pull Request resolved: facebook/SPARTA#15

Following a recent Redex move to C++17.

Reviewed By: minjang

Differential Revision: D28612765

fbshipit-source-id: 270a45c571b2657589793ea360561bc1b327e837
facebook-github-bot pushed a commit that referenced this issue May 21, 2021
Summary:
Pull Request resolved: facebook/SPARTA#15

Following a recent Redex move to C++17.

Reviewed By: minjang

Differential Revision: D28612765

fbshipit-source-id: 270a45c571b2657589793ea360561bc1b327e837
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