A few rough edges building on linux - clang

Discuss issues related to installing or building

Re: A few rough edges building on linux - clang

Postby marlowa » Mon Sep 26 2016 10:00 am

ansel wrote:
I have followed these instructions but it still doesn't build. I still get the same error. The header file Index.h is not under /usr/lib/llvm-3.7/include. What am I doing wrong?


Can you let us know which platform and version you are building on?

I managed to almost completely trash my debian env this weekend so will be doing a complete rebuild next weekend. Then I will have a fresh go with a doxypress build.
marlowa
 
Posts: 52
Joined: Sun Oct 25 2015 10:52 am

Re: A few rough edges building on linux - clang

Postby barbara » Fri Nov 11 2016 7:22 pm

We would like to follow up and find out what issues, if any, you are having when building DoxyPress.

Thanks,

Barbara
barbara
 
Posts: 57
Joined: Sat Apr 04 2015 2:32 am

Re: A few rough edges building on linux - clang

Postby marlowa » Sun Dec 03 2017 8:45 pm

barbara wrote:I have added a link to our documentation in the README files for DoxyPress and DoxyPressApp. The documentation explains how to build from source. The following is the same link you will find in the README:
http://www.copperspice.com/docs/doxypress/build-doxypress.html
The documentation for the clang specific information is located on the following documentation page:
http://www.copperspice.com/docs/doxypress/parsing.html
Barbara

I am still struggling with the above, where it fails to find that clang header. I am trying to build doxypress 1.2.11 and configure still says all is well then make goes on to fail to compile. The HTML help pages do not talk about this. They just say that you run configure then make. The page http://www.copperspice.com/docs/doxypress/parsing.html does talk a little bit about clang but it talks about the build settings tab under source code. What's that about, please? I am trying to build via the command line. There is no source tab.
marlowa
 
Posts: 52
Joined: Sun Oct 25 2015 10:52 am

Re: A few rough edges building on linux - clang

Postby marlowa » Sun Apr 01 2018 3:35 pm

ansel wrote:
I have followed these instructions but it still doesn't build. I still get the same error. The header file Index.h is not under /usr/lib/llvm-3.7/include. What am I doing wrong?

Can you let us know which platform and version you are building on?

Hello. Yes. I have setup a VirtualBox environment for Ubuntu 14 so that I will be able to be on an officially supported platform. I managed to build copperspice from source. It took *hours*. I build version 1.4.5. Now I come to build doxypress and I am still running into problems. I am using the latest zip from the github site.

The webpage at http://www.copperspice.com/docs/doxypress/parsing.html#parsing-clang has some errors. When llvm-config is invoked the options have a single hyphen when a double hyphen is required.

There is no mention at http://www.copperspice.com/docs/doxypress/build-doxypress.html of the need to set CS_HOME.

I am still getting the error clang-c/Index.h not found. This is despite using apt install to install llvm and llvm-dev. The web pages could mention that these are needed so that the llvm-config command is found.
marlowa
 
Posts: 52
Joined: Sun Oct 25 2015 10:52 am

Re: A few rough edges building on linux - clang

Postby marlowa » Sun Apr 01 2018 4:08 pm

marlowa wrote:
ansel wrote:
I have followed these instructions but it still doesn't build. I still get the same error. The header file Index.h is not under /usr/lib/llvm-3.7/include. What am I doing wrong?

Can you let us know which platform and version you are building on?

[snip]
I am still getting the error clang-c/Index.h not found. This is despite using apt install to install llvm and llvm-dev. The web pages could mention that these are needed so that the llvm-config command is found.

I think part of the problem is that the instructions to augment CXXFLAGS and LDFLAGS are insufficient (as well as the bugs I mentioned earlier). In the end I installed libclang-dev (which could also do with being mentioned) and hacked the Makefile in bin, adding -I/usr/lib/llvm-3.8/include. This enabled me to compile at long last. But then it failed to link. I presume that it might link if I hacked the Makefile in a similar way for linking the clang library.

IMO the build process is quite fragile unless one is in-the-know. And the building doxypress from source web site is failing to put me in-the-know. I think it needs to call out the crucial dependencies on copperspice and libclang-dev and explain how to add the relevant compiler and linker options into the build. For copperspice this is relatively easy, just define CS_HOME. If only it was as easy for clang, e.g. defining CLANGLIB_HOME.
marlowa
 
Posts: 52
Joined: Sun Oct 25 2015 10:52 am

Re: A few rough edges building on linux - clang

Postby ansel » Tue Apr 10 2018 4:35 am

In the end I installed libclang-dev (which could also do with being mentioned) and hacked the Makefile in bin, adding -I/usr/lib/llvm-3.8/include. This enabled me to compile at long last. But then it failed to link.


If you look at our DoxyPress documentation for "Building DoxyPress with libClang" (http://www.copperspice.com/docs/doxypress/parsing.html#parsing-clang) you will see instructions for the supported platforms.

You mention libclang-dev, which makes me think you are most likely using a debian-based distribution of Linux. If so, as mentioned on the link above, you will need to build your own copy of the appropriate version of clang. Although you did not mention the exact linker errors you received, it was most likely a result of the vendor version of clang being built without RTTI and therefore being ABI incompatible with the DoxyPress build.

The exact commands required to build clang and all the linker flags required are documented on the above page. Alternately, we have binary distributions for most versions of Debian and Ubuntu as well as many other platforms.
ansel
 
Posts: 59
Joined: Fri Apr 10 2015 8:23 am

Previous

Return to Installation

cron