Coder Social home page Coder Social logo

Comments (7)

ogoffart avatar ogoffart commented on August 25, 2024

Hi, thanks for the bug report.
I have not been testing OSX for a long time.
I just made a commit that might solve your problems.

What version of libclang do you have?

from codebrowser.

Sumenia avatar Sumenia commented on August 25, 2024

long_y@yoanns-macbook-pro ~/D/woboq_codebrowser-master> make
Scanning dependencies of target codebrowser_generator
[ 9%] Building CXX object generator/CMakeFiles/codebrowser_generator.dir/main.cpp.o
/Users/Sumenia/Downloads/woboq_codebrowser-master/generator/main.cpp:333:39: error: no matching function for call to 'is_directory'
} else if (Sources.size() == 1 && llvm::sys::fs::is_directory(Sources.front())) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/llvm33/3.3_1/lib/llvm-3.3/include/llvm/Support/FileSystem.h:388:6: note: candidate function not viable: no known conversion from 'const std::__1::basic_string' to 'llvm::sys::fs::file_status' for 1st argument
bool is_directory(file_status status);
^
/usr/local/Cellar/llvm33/3.3_1/lib/llvm-3.3/include/llvm/Support/FileSystem.h:397:12: note: candidate function not viable: requires 2 arguments, but 1 was provided
error_code is_directory(const Twine &path, bool &result);
^
1 error generated.
make[2]: *** [generator/CMakeFiles/codebrowser_generator.dir/main.cpp.o] Error 1
make[1]: *** [generator/CMakeFiles/codebrowser_generator.dir/all] Error 2
make: *** [all] Error 2

Almost =D

long_y@yoanns-macbook-pro ~/D/woboq_codebrowser-master> clang -v
Apple LLVM version 7.0.0 (clang-700.1.76)
Target: x86_64-apple-darwin14.5.0
Thread model: posix

from codebrowser.

ogoffart avatar ogoffart commented on August 25, 2024

You have libclang 3.3. (one can see that in your path: llvm33 )

This is way too old. (The OSX instructions are actually terribly outdated. I should fix that.)

I recommand that you get clang 3.7.

from codebrowser.

Sumenia avatar Sumenia commented on August 25, 2024

Ok Ok i was blind enough not to notice that.

Step 1 : brew remove llvm33
Step 2 : brew install -vd llvm --with-libcxx --with-clang --with-rtti ( --with-rtti because " --rtti" is deprecated" ) (12 min to compile all llvm .... something i won't do again..... OS X (rather Xcode), come with latest llvm build )
Step 3 : cmake . -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DLLVM_CONFIG_EXECUTABLE=/usr/local/opt/llvm/bin/llvm-config -DCMAKE_BUILD_TYPE=Release
( correct llvm-config path)

Step 4 : make

Step 5 :
screen shot 2015-11-11 at 21 00 47

from codebrowser.

ogoffart avatar ogoffart commented on August 25, 2024

Oh, this is a link error.
I have no idea what the problem is. But it looks related to exceptions.

Can you try adding this line to generator/CMakeFiles.txt

SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions")

Normaly I would expect the flag to be detected but perhaps it's not.

otherwise, please do

VERBOSE=1  make

so we can see what exact options are passed to the command line

from codebrowser.

Sumenia avatar Sumenia commented on August 25, 2024

Ok i did not notice that "brew install llvm" downloaded and compiled "LLVM 3.6.2".
I just downloaded the LLVM 3.7.0 Pre-Built Binaries for Mac OS X from their website , changed the path in CMake and it compiled flawlessly

screen shot 2015-11-11 at 21 27 52

from codebrowser.

Sumenia avatar Sumenia commented on August 25, 2024

I tested what you suggested and added :

SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions")

in generator/CMakeFiles.txt

and tried to compile again (fresh git clone) with "LLVM 3.6.2" and no more link error and compiled !

I think we're done here. Thx

from codebrowser.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.