A few rough edges building on linux - clang
A few rough edges building on linux - clang
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 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.
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 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.
Re: A few rough edges building on linux - clang
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.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.
- 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.
Thanks for your report.
Ansel Sermersheim
CopperSpice Cofounder
CopperSpice Cofounder
Re: A few rough edges building on linux - clang
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?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.
- 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
Re: A few rough edges building on linux - clang
I am still stuck on the error:marlowa wrote: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?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.
- 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
./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.
Re: A few rough edges building on linux - clang
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:
We are working to make the detection of the clang libraries more automatic during the configuration process.
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"
Ansel Sermersheim
CopperSpice Cofounder
CopperSpice Cofounder
Re: A few rough edges building on linux - clang
Thanks Ansel, this is just the info I was looking for. I assumed that configure would somehow work this out.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:
We are working to make the detection of the clang libraries more automatic during the configuration process.Code: Select all
CXXFLAGS+=" -I/usr/lib/llvm-3.5/include" LDFLAGS+=" -L/usr/lib/llvm-3.5/lib -lclang"
Re: A few rough edges building on linux - clang
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: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"
Looks like it still needs to do this.marlowa wrote:Thanks Ansel, this is just the info I was looking for. I assumed that configure would somehow work this out.ansel wrote: We are working to make the detection of the clang libraries more automatic during the configuration process.
Re: A few rough edges building on linux - clang
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
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
Re: A few rough edges building on linux - clang
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?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
Re: A few rough edges building on linux - clang
Can you let us know which platform and version you are building on?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?
Ansel Sermersheim
CopperSpice Cofounder
CopperSpice Cofounder