A few rough edges building on linux - clang

Discuss issues related to installing or building

A few rough edges building on linux - clang

Postby marlowa » Sat Feb 20 2016 4:51 pm

I noticed a few rough edges when trying to build doxpress on linux. The first was that it doesn't do the simple check of seeing if CopperSpice is installed and that CS_HOEM is defined. The next problem was a compilation error because of a dependency on clang that isn't checked:

make[2]: Entering directory '/home/marlowa/Downloads/DoxyPress-1.2.0/bin'
depbase=`echo src/parser_clang.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
g++ -DPACKAGE_NAME=\"DoxyPress\" -DPACKAGE_TARNAME=\"doxypress\" -DPACKAGE_VERSION=\"1.2.0\" -DPACKAGE_STRING=\"DoxyPress\ 1.2.0\" -DPACKAGE_BUGREPORT=\"info@copperspice.com\" -DPACKAGE_URL=\"\" -DPACKAGE=\"doxypress\" -DVERSION=\"1.2.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_FORK=1 -DHAVE_GETPID=1 -DSIZEOF_SIZE_T=8 -I. -I/usr/local/include -I/usr/local/include/QtCore -I/usr/local/include/QtXml -I../src -g -O2 -std=c++11 -MT src/parser_clang.o -MD -MP -MF $depbase.Tpo -c -o src/parser_clang.o ../src/parser_clang.cpp &&\
mv -f $depbase.Tpo $depbase.Po
../src/parser_clang.cpp:25:27: fatal error: clang-c/Index.h: No such file or directory
#include <clang-c/Index.h>
^
compilation terminated.
Makefile:1059: recipe for target 'src/parser_clang.o' failed

The funny thing is, configure started off by detecting that gcc was being used. This made me think that it could be bult with gcc. Must it be built with clang instead? What is the dependency here? I think it should check for the dependency in configure rather than blowing up in the compile.
marlowa
 
Posts: 52
Joined: Sun Oct 25 2015 10:52 am

Re: A few rough edges building on linux - clang

Postby ansel » Sun Feb 21 2016 1:20 am

marlowa wrote:I noticed a few rough edges when trying to build doxpress on linux. The first was that it doesn't do the simple check of seeing if CopperSpice is installed and that CS_HOEM is defined. The next problem was a compilation error because of a dependency on clang that isn't checked:

The funny thing is, configure started off by detecting that gcc was being used. This made me think that it could be bult with gcc. Must it be built with clang instead? What is the dependency here? I think it should check for the dependency in configure rather than blowing up in the compile.


You raise a couple of good points here. I responded about the CS_HOME issue on your other post a few moments ago. As to your question about clang, it is a bit more involved.

  • DoxyPress definitely can be built with GCC, and is built this way in our CI system.
  • DoxyPress links with libClang, whose headers must be present on your development system
  • This issue should be diagnosed at configure time.

We will take steps to ensure this dependency is correctly diagnosed at configure time.

Thanks for your report.
ansel
 
Posts: 59
Joined: Fri Apr 10 2015 8:23 am

Re: A few rough edges building on linux - clang

Postby marlowa » Sun Feb 21 2016 10:18 am

ansel wrote:You raise a couple of good points here. I responded about the CS_HOME issue on your other post a few moments ago. As to your question about clang, it is a bit more involved.

[list]
[*] DoxyPress definitely can be built with GCC, and is built this way in our CI system.
[*] DoxyPress links with libClang, whose headers must be present on your development system

I tried to install the headers using synaptic package manager. It offered versions 3.4.0 and 3.5.0. Neither worked. I then tried building clang from source and installing. That didn't seem to install the Index.h header either. Which version of clang should I be using? Can you recommend a package for installing it please?
marlowa
 
Posts: 52
Joined: Sun Oct 25 2015 10:52 am

Re: A few rough edges building on linux - clang

Postby marlowa » Sun Mar 13 2016 3:22 pm

marlowa wrote:
ansel wrote:You raise a couple of good points here. I responded about the CS_HOME issue on your other post a few moments ago. As to your question about clang, it is a bit more involved.

[list]
[*] DoxyPress definitely can be built with GCC, and is built this way in our CI system.
[*] DoxyPress links with libClang, whose headers must be present on your development system

I tried to install the headers using synaptic package manager. It offered versions 3.4.0 and 3.5.0. Neither worked. I then tried building clang from source and installing. That didn't seem to install the Index.h header either. Which version of clang should I be using? Can you recommend a package for installing it please?


I am still stuck on the error:

./src/parser_clang.h:23:27: fatal error: clang-c/Index.h: No such file or directory

I tried installing c-clang. First I tried version 3.4, then 3.5. Neither worked. The header file is nowhere to be found.

I would really like to get doxypress built on linux. This would enable me to give a stack trace for when it core dumps when mis-handling the tab character in one of my files when the tabstop is set to 8. I have no hope of finding the cause on Windows where I first noticed the problem, but I thought I would be able to get more info on linux.
marlowa
 
Posts: 52
Joined: Sun Oct 25 2015 10:52 am

Re: A few rough edges building on linux - clang

Postby ansel » Sun Mar 13 2016 4:35 pm

Yes, these errors can be tough to find. We have found the problem and resolved this particular core dump issue. We have not cut a new release yet because we are tracking down some potentially related issues with the Markdown parser.

With respect to the clang headers, since you mention synaptic I am presuming you are building either on Debian or Ubuntu. For either OS the headers we are using are contained in package 'libclang-3.5-dev'. In both cases the compile and link flags should be appended to as follows:

Code: Select all
  CXXFLAGS+=" -I/usr/lib/llvm-3.5/include"
  LDFLAGS+=" -L/usr/lib/llvm-3.5/lib -lclang"


We are working to make the detection of the clang libraries more automatic during the configuration process.
ansel
 
Posts: 59
Joined: Fri Apr 10 2015 8:23 am

Re: A few rough edges building on linux - clang

Postby marlowa » Mon Mar 14 2016 3:00 pm

ansel wrote:With respect to the clang headers, since you mention synaptic I am presuming you are building either on Debian or Ubuntu. For either OS the headers we are using are contained in package 'libclang-3.5-dev'. In both cases the compile and link flags should be appended to as follows:

Code: Select all
  CXXFLAGS+=" -I/usr/lib/llvm-3.5/include"
  LDFLAGS+=" -L/usr/lib/llvm-3.5/lib -lclang"


We are working to make the detection of the clang libraries more automatic during the configuration process.

Thanks Ansel, this is just the info I was looking for. I assumed that configure would somehow work this out.
marlowa
 
Posts: 52
Joined: Sun Oct 25 2015 10:52 am

Re: A few rough edges building on linux - clang

Postby marlowa » Sat Sep 10 2016 5:14 pm

marlowa wrote:
ansel wrote:With respect to the clang headers, since you mention synaptic I am presuming you are building either on Debian or Ubuntu. For either OS the headers we are using are contained in package 'libclang-3.5-dev'. In both cases the compile and link flags should be appended to as follows:

Code: Select all
  CXXFLAGS+=" -I/usr/lib/llvm-3.5/include"
  LDFLAGS+=" -L/usr/lib/llvm-3.5/lib -lclang"


I just tried to build 1.2.4 from source on linux. It is still gaving the same problem. I find there is nothing about this in the README file and no INSTALL FILE. Without this information I think I am not the only one that would try to build it by spotting the configure script and just running it, followed by make.
marlowa wrote:
ansel wrote:We are working to make the detection of the clang libraries more automatic during the configuration process.

Thanks Ansel, this is just the info I was looking for. I assumed that configure would somehow work this out.

Looks like it still needs to do this.
marlowa
 
Posts: 52
Joined: Sun Oct 25 2015 10:52 am

Re: A few rough edges building on linux - clang

Postby barbara » Mon Sep 12 2016 2:50 pm

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/doxypre ... press.html


The documentation for the clang specific information is located on the following documentation page:

http://www.copperspice.com/docs/doxypress/parsing.html


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

Re: A few rough edges building on linux - clang

Postby marlowa » Sat Sep 17 2016 10:55 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/doxypre ... press.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 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?
marlowa
 
Posts: 52
Joined: Sun Oct 25 2015 10:52 am

Re: A few rough edges building on linux - clang

Postby ansel » Sun Sep 18 2016 4:50 pm

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?
ansel
 
Posts: 59
Joined: Fri Apr 10 2015 8:23 am

Next

Return to Installation

cron