Eclipse: Cannot install CDT because of a conflicting dependency - c

my eclipse has been configured for Java and pydev, now i want to configure C/C++ development tools with Eclipse. i dont want to download the whole Eclipse IDE for C/C++ Developers, for it is not convenient. so i decided to install CDT in my Eclipse.
Help ==> Install New Software, then input http://download.eclipse.org/tools/cdt/releases/indigo, waited for a while, and chose the following CDT Main Features, CDT Optional Features, and Next, then an error occurred.
Cannot complete the install because of a conflicting dependency.
Software being installed: C/C++ DSF GDB Debugger Integration 4.0.0.201106081058 (org.eclipse.cdt.gnu.dsf.feature.group 4.0.0.201106081058)
Software being installed: C/C++ Development Tools SDK 8.0.2.201202111925 (org.eclipse.cdt.sdk.feature.group 8.0.2.201202111925)
Only one of the following can be installed at once:
GDB DSF Debugger Integration Core 4.0.0.201106081058 (org.eclipse.cdt.dsf.gdb 4.0.0.201106081058)
GDB DSF Debugger Integration Core 4.0.2.201202111925 (org.eclipse.cdt.dsf.gdb 4.0.2.201202111925)
GDB DSF Debugger Integration Core 4.0.1.201109151620 (org.eclipse.cdt.dsf.gdb 4.0.1.201109151620)
Cannot satisfy dependency:
From: C/C++ Development Tools 8.0.2.201202111925 (org.eclipse.cdt.feature.group 8.0.2.201202111925)
To: org.eclipse.cdt.gnu.dsf.feature.group [4.0.1.201202111925]
Cannot satisfy dependency:
From: C/C++ DSF GDB Debugger Integration 4.0.0.201106081058 (org.eclipse.cdt.gnu.dsf.feature.group 4.0.0.201106081058)
To: org.eclipse.cdt.dsf.gdb [4.0.0.201106081058]
Cannot satisfy dependency:
From: C/C++ DSF GDB Debugger Integration 4.0.1.201202111925 (org.eclipse.cdt.gnu.dsf.feature.group 4.0.1.201202111925)
To: org.eclipse.cdt.dsf.gdb [4.0.2.201202111925]
Cannot satisfy dependency:
From: C/C++ Development Tools SDK 8.0.2.201202111925 (org.eclipse.cdt.sdk.feature.group 8.0.2.201202111925)
To: org.eclipse.cdt.feature.group [8.0.2.201202111925]
i have googled for a lot of time, but still cannot find a valid solution. can anyone give a hand to me? thanks a lot!

I faced with this problem, too. I just download the c/c++ mode of eclipse which already includes CDT. It works. If you couldn't fix it, you can try this way. It is better than nothing.

Normally if I see this many errors, it's because I have picked the wrong update site... maybe a silly question, but do you actually have the Eclipse Indigo base version installed? You can check with Help->About Eclipse, second line down.

That answer referring to Help->About was a HUGE help. Once there I clicked on the Installation Details button, checked everything CDT/C++ related and clicked Uninstall. Once Eclipse restarted, I was able to install CDT without any problems whatsoever.
TH

this looks very similar to a problem I had. In my case it was that some of the packages in the Optional Extras are already implicitly included in the CDT (such as the GDB DSF packages) and so there are conflicts when you try to install both packages.
If you highlight each package you want in the optional extras it will say in the short comment line describing the package weather or not a version of that package is included by default in the CDT, if it is deselect. Hope this is helpful.

This may be a little late, but try installing the base CDT package by itself first. Restart Eclipse and then install the CDT Optional Features, this time ticking the "Hide items that are already installed" checkbox. This solved the issue for me.

I had a similar dilemma as you did. In my case, I downloaded CDT Main Features first and had all the boxes checked in the window. Especially the box that said, "Contact all update sites during install to find required software." Afterwards, I installed "CDT Optional Features" with all the boxes checked as well.

I'm running Kepler Service Release 1 on Windows 8.1, 64-bit.
I encountered this exact behaviour when I tried installing CDT by using these options:
Do not select both C/C++ Development Tools and C/C++ Development Tools SDK. This will result in the CDT help files being available, but the C/C++ perspective and C/C++ project type being unavailable, due to probably a package collision (although strangely, nothing was showing up in my workspace .log file).
The correct configuration is to select just the C/C++ Development Tools, unless of course you want to contribute to CDT, in which case you'd select the C/C++ Development Tools SDK. Most users will be content with just the development tools. The following selection worked for me.

Now i use ubuntu, and using the command sudo apt-get install eclipse-cdt directly solves the problem. It's a little strange that why there is a conflict when installs CDT using eclipse'sInstall New Software.

Related

Conan cannot find a certain package for the specified settings, options and dependencies

I am working on a small C executable project using Jetbrains CLion 2019.3, MinGW 8.1, and also the Conan C/C++ Package Manager 1.21.1. I am refreshing my knowledge about C and want to learn about new tools like Conan. My main development environment is Windows, but this project is intended to be cross-platform; I would like to be able to build and run the application on Linux/Unix as well.
Since my application needs to compute signatures using HMACSHA1, I want to use the OpenSSL library, so I added the OpenSSL/1.1.1a#conan/stable package to the requires section of my conanfile.txt file, and I also created a Conan profile for MinGW that has the following options:
toolchain=$MINGW64_PATH
target_host=x86_64-w64-mingw32
cc_compiler=gcc
cxx_compiler=g++
[env]
CONAN_CMAKE_FIND_ROOT_PATH=$toolchain
CHOST=$target_host
AR=$target_host-ar
AS=$target_host-as
RANLIB=$target_host-ranlib
CC=$target_host-$cc_compiler
CXX=$target_host-$cxx_compiler
STRIP=$target_host-strip
RC=$target_host-windres
[settings]
os_build=Windows
arch_build=x86_64
# We are cross-building to Windows
os=Windows
arch=x86_64
compiler=gcc
# Adjust to the gcc version of your MinGW package
compiler.version=8.1
compiler.libcxx=libstdc++11
build_type=Release
The MINGW64_PATH points to my MinGW installation folder.
When running conan install it complains about a missing package (obviously a dependency package of OpenSSL) that does not exist:
zlib/1.2.11#conan/stable: WARN: Can't find a 'zlib/1.2.11#conan/stable' package for the specified settings, options and dependencies:
- Settings: arch=x86_64, build_type=Release, compiler=gcc, compiler.version=8.1, os=Windows
- Options: minizip=False, shared=False
- Dependencies:
- Package ID: eb34f13b437ddfd63abb1f884c4b8886c48b74cd
ERROR: Missing prebuilt package for 'zlib/1.2.11#conan/stable'
Try to build it from sources with "--build zlib"
Or read "http://docs.conan.io/en/latest/faq/troubleshooting.html#error-missing-prebuilt-package"
Since I am a noob using Conan, I have no clue how I can fix this problem. What needs to be done to fix this issue, and also can I fix this on my own, or do I need help from the package author?
I found a description of the Missing prebuilt package error at https://docs.conan.io/en/latest/faq/troubleshooting.html#error-missing-prebuilt-package, but it does not help much.
so I added the OpenSSL/1.1.1a#conan/stable package to the requires
That package is obsolete, you can check it on Conan Community repository. You should try openssl/1.1.1a# instead, which is maintained by the new Conan Center Index.
conan install openssl/1.1.1d#
Where is the namespace? It has been removed, take a look on more information about recipes.
Since I am a noob using Conan, I have no clue how I can fix this problem. What needs to be done to fix this issue, and also can I fix this on my own, or do I need help from the package author?
As the FAQ recommends, you should build by yourself, running the command proposed by the error message:
conan install openssl/1.1.1a# --build zlib
But I'm sure it won't be enough, you will need to build OpenSSL too. So, the best approach in your situation is:
conan install openssl/1.1.1a# --build missing
Now, Conan will build from sources anything which is not pre-built on server side.
To summarize, this is not an error, like something is broken.
When you asked for OpenSSL 1.1.1a, Conan found the recipe on Conan Center, which explain how to build OpenSSL, however it didn't find your pre-built package, following your settings and options.
Well, MingW is not used in Conan Center Index, because there is no enough demand, all supported platforms and configurations are listed in the Wiki. But this specific recipe should support MingW, since when it was part of Conan Community, MingW was present in package lists for building.
I would say, you can use 1.1.1d instead, which newer and safer than 1.1.1a.

Where do g++, make and GDB get installed with MinGW?

Please note: Although I'm specifically talking about the Eclipse CDT plugin, I'm almost 100% confident that any Windows/C/MinGW programmer can answer this question.
I'm on Windows 7 and am trying to write and compile a simple "Hello, C!" C application using Eclipse's CDT plugin. I'm reading their docs which state that having GCC installed is a prerequisite.
I just installed MinGW, making sure to include the following packages:
mingw-developer-toolkit
mingw32-base
mingw32-gcc-g++
msys-base
Back in the CDT docs (under the section titled Windows configuration), it states that I need to add g++, make and GDB to my PATH.
I'm wondering where MinGW installs these utilities, so that I can add them to my system PATH, and make the Eclipse CDT recognize their location at startup.
When using the Eclipse CDT plugin, you need GCC and its 3 specific utilities installed locally. These three utilities are: g++, make and gdb.
On Windows you can choose to install these utilities via Cygwin or MinGW. For a MinGW-based solution, go to their site and download the MinGW Package Manager. Then open the manager and install the following packages:
mingw-developer-toolkit
mingw32-base
mingw32-gcc-g++
msys-base
Then go to File >> Apply Updates and apply them. This will install the 3 utilities to the following directories on your machine:
C:\MinGW\bin\g++
C:\MinGW\bin\gdb
C:\MinGW\msys\1.0\make
Add these 3 binaries to your system PATH, restart Eclipse and you are all set.

How to install CDT to Eclipse Luna

I am trying to install the C/C++ development tools for Eclipse Luna.
Taking reference from this page here, I navigated to Help> Install New Software> and placed http://download.eclipse.org/tools/cdt/releases/8.4
in the "Works with" section.
I got the options for C/C++ Development Tools and C/C++ Development Tools SDK which I downloaded and restarted Eclipse. However, on restarting eclipse I cannot find any place/interface to create C programs or files. The tools are showing up in the installed softwares list(screen attached).
I have also installed MinGw as instructed here.
Have I missed any step? How can I start C development in Luna. Please advice.
I had the same issue with Luna. I installed Java 1.7.0_80, which then allowed me to change to the C/C++ Perspective and create new C/C++ projects.
My system previously only had Java 1.6.0_45, which was sufficient to run Luna but apparently insufficient to run CDT in its entirety.
Your JDK version is below 1.6 which is too old. You should upgrade it to 1.7 or higher.
I had the same problem - installing java 8 helped.
I had exactly the same problem, using Luna SR 1a on Ubuntu 12.04 LTS.
Switching from Java 1.6.0_34 to 1.7.0_75 fixed the issue - everything works now

C/C++ Run/Debug configuration in Eclipse

I am new to C/C++ development in Eclipse and trying to configure Eclipse. I'm working in a Linux environment with GNU GCC and my toolchain is detected by Eclipse. As given in the Eclipse documentation 1, I opened Run>>Run configurations. But the C/C++ Local tab is not there.
This is all I get.
But when I build a sample helloworld program, it's being built correctly.
Any idea why this happens?
1 http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.cdt.doc.user%2Ftasks%2Fcdt_t_run_com.htm
I faced same issue as you. I was able to create and build one c/c++ project, but I couldn't run/debug it. Actually, I installed wrong CDT (CDT Visual C++ Support). Next I installed correct CDT (c/c++ development tools) and after one eclipse restart I had c/c++ application inside of Run Configuration.

program g++ not found in path

I am using Eclipse for a C project. I created a new Project by going to New->C project->Executable->Empty Project, Linux gcc toolchain.
When I add a new .c file, I get "program 'g++' not found in path".
How do I get rid of this? I'm not even using C++.
I had similar problem and it is solved by
Installing g++ The GNU C++ complier using ubuntu software centre and
Changing in -
Window -> Preferences -> C/C++ -> Build -> Settings -> Discovery -> CDT GCC Build in Complier Settings [Shared]
From: ${COMMAND} -E -P -v -dD "${INPUTS}"
To : /usr/bin/${COMMAND} -E -P -v -dD "${INPUTS}"
I hope it helps.
For posterity I'm going to post my own solution to this problem. None of the answers above or on related StackOverflow questions helped; most referred to menu entries that didn't exist, and the ones I could try did nothing. I searched other sites as well; there were about 6 different answers repeated many times, and none helped.
Short answer: I blew away the Eclipse install and replaced it. Then it worked. For me at least it wasn't a project or configuration option (at least not one I could get to from the GUI); something in the Eclipse program folder had gotten tweaked and only a new install could repair the problem.
I'm doing Android development using the "ADT" (Android Developer Tools) build of Eclipse. I did something to the configuration that made it start giving the above error (actually two errors, for gcc and g++ both). And I tried plenty of potential solutions (in addition to my own searching for options that might help) with no success.
Thing is, I didn't NEED gcc or g++ in the path. I'm doing Android development, and while both are used in the build process, I'm not using Eclipse to do the builds; I use the Android build system. And the C/C++ Build/Discovery options didn't even give me an option for setting paths for gcc or g++. Other answers I found elsewhere referenced menu entries that don't exist, and most seemed to be about helping people to use the normal C/C++ build within Eclipse, which I didn't need to do.
So I used this opportunity to download the latest ADT package from Google, and then I ran the new one, importing the existing project into a new workspace (just in case the old workspace was corrupted or otherwise part of the problem). No more annoying gcc/g++ error.
I got the same error while I was using "Eclipse IDE for C/C++ Developers."
Install Eclipse from Ubuntu Software Center and then download and install Eclipse CDT.
To install CDT, open Eclipse -> Help -> Install New Software -> Add -> Archieve...
Then give CDT path to there. That's all
I was able to fix the problem by selecting
project(right click in Project Explorer on your project)->properties->Tool Chain Editor
and switching the Current Toolchain: to Android GCC and Current Buolder: to Android Builder
I also had the same problem. I did not have this error running my program but after a adding, including different Api and paths , probably unintentionally some changes happened in my Path that I could not fix it.
I could fix this error by going to Properties and just restore default for all the Tabs.

Resources