jessevdk / cldoc

clang based documentation generator for C and C++
GNU General Public License v2.0
552 stars 58 forks source link

Failed to run on Ubuntu 18.04 LTS #139

Open PanderMusubi opened 6 years ago

PanderMusubi commented 6 years ago

Version 1.11.2 of cldoc doesn't run on Ubuntu 18.04 LTS. The error is:

Fatal: Failed to run clang++ to obtain system include headers, please install clang++ to use cldoc
  Error message: [Errno 2] No such file or directory: 'clang++': 'clang++'

but running

sudo apt-get install clang++

results in

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'clang-modernize-5.0' for regex 'clang+'
...
Note, selecting 'clang-6.0-examples' for regex 'clang+'
libclang1-6.0 is already the newest version (1:6.0-1ubuntu2).
libclang1-6.0 set to manually installed.
clang-format-6.0 is already the newest version (1:6.0-1ubuntu2).
clang-format is already the newest version (1:6.0-41~exp5~ubuntu1).
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 python-clang-4.0 : Conflicts: python-clang-x.y
                    Breaks: python-clang-3.9 but 1:3.9.1-19ubuntu1 is to be installed
 python-clang-5.0 : Conflicts: python-clang-x.y
                    Breaks: python-clang-3.9 but 1:3.9.1-19ubuntu1 is to be installed
 python-clang-6.0 : Conflicts: python-clang-x.y
                    Breaks: python-clang-3.9 but 1:3.9.1-19ubuntu1 is to be installed
E: Unable to correct problems, you have held broken packages.

I have no idea how to continue from here. dpkg -l|grep -v ^ii did not report anything out of the ordinary. How can this be fixed?

dpkg -l|grep -i clang

reports

ii  clang-format                                                1:6.0-41~exp5~ubuntu1                             amd64        Tool to format C/C++/Obj-C code
ii  clang-format-6.0                                            1:6.0-1ubuntu2                                    amd64        Tool to format C/C++/Obj-C code
ii  libclang1-6.0:amd64                                         1:6.0-1ubuntu2                                    amd64        C interface to the clang library

I did not have python-clang installed. I have tried installing some versions of python-clang but without success of fixing the problem above.

SimonMa2000 commented 5 years ago

I have the same problem.System info: Linux me-VirtualBox 4.15.0-36-g-Ubuntu x86_64 x86_64 x86_64 GNU/Linux The only programme installed on is Julia and miniconda.

dpkg -l|grep -i clang don't return anything. It doesn't turn out success after instaling python-clang 3.9 as well.

python-clang-3.9 is already the newest version (1:3.9.1-19ubuntu1).
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies.
 python-clang-4.0 : Conflicts: python-clang-x.y
                    Breaks: python-clang-3.9 but 1:3.9.1-19ubuntu1 is to be installed
 python-clang-5.0 : Conflicts: python-clang-x.y
                    Breaks: python-clang-3.9 but 1:3.9.1-19ubuntu1 is to be installed
 python-clang-6.0 : Conflicts: python-clang-x.y
                    Breaks: python-clang-3.9 but 1:3.9.1-19ubuntu1 is to be installed
E: Unable to correct problems, you have held broken packages.
hedi-sel commented 4 years ago

So the issues haven't been addressed in a year, but I have the exact same error when I run sudo apt install clang++. Anybody knows what could be causing this?

PanderMusubi commented 4 years ago

Unfortunately, no news from this side.

lucasexe commented 4 years ago

Just install clang: sudo apt install clang

It will install clang++.

When you do sudo apt install clang++ you are asking to install a lot of packages (clang++ is interpreted as a pattern) and some of them are conflicting.

scaldwell-att commented 4 years ago

This issue can probably be closed. @lucasexe is right. 'apt-get install clang++' will be interpreted as a pattern and break things. Just using 'apt-get install clang' will install clang and clang++.

hedi-sel commented 4 years ago

It does work as a workaround. But the issue should probably be adressed at some point, rather than considered solved. I would have left it open.