ESP-IDF: idf.py build fails with cmake error (unknown cmake command idf_component_register) - c

idf.py build consistently fails on my windows install of esp-idf, I installed it using the tools provided in espressif's documentation, here are the logs:
Logs
I tried reinstalling to no avail. Other than that I don't know what to do exactly since it always just worked when I used it on linux

As you are use old SDK version please re-clone new sdk and compile it will work fine.
I suggest you to use V4.4 as this sdk is more stable then V5

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.

using 'brew install avr-libc' command on Mac produces error 'no formulae found in taps'

I am running MacOS Mojave Version 10.14.1. I am attempting to install the avr embedded development environment.
The command 'brew tap osx-cross/avr' works correctly however when the command 'brew install avr-libc' is used the following error is produced error
This produces a problem as files in c cannot be compiled due to avr-gcc being unavailable.
Any help and advice would be appreciated.
as #nos said, you need to run brew install avr-gcc.
More info here: https://github.com/osx-cross/homebrew-avr#installing-homebrew-avr-formulae
This worked for me: brew tap osx-cross/avr && brew install avr-gcc
Needed to expand brew's options of available software, as well as reference the updated avr-gcc instead of avr-libc.

How do I statically link to a lib when creating a command line program in xcode?

I'm new to OSX and XCode and I'm trying to statically link to a C app. I downloaded and installed libconfig and I link to the installed libconfig.a. It works great on my machine but when I run my binary on another machine I get an error that says libconfig.dylib can't be found. Naturally, I don't want to have to install libconfig everywhere I use my app.
I've scoured through the xcode build settings and the only reference I see is the one for libconfig.a. What am I doing wrong?
I got this to work. This seems to be a libconfig build issue, maybe expected behavior but it surprised me. I was linking to libconfig.a, but it appears that libconfig.a was linking to libconfig.dylib. I reconfigure libconfig and reinstalled it.
./configure --disable-shared
make clean
make
make install

How do I fix a "version `GLIBC_2.14' not found" error?

I've compiled a C program under Ubuntu 12.04, built a Debian package out of it, and want to install it on a server running Debian Lenny.
Last time I did that (about two months ago) it worked: I could install the package and run the binary. But now I get the following error message:
(binary's name): /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.14' not found (required by (binary's name))
Other than upgrading my machine to Ubuntu 12.4, the only significant change we've brought to the code is a call to strdup(), for which I had to enable the _POSIX_C_SOURCE=200809L feature test macro.
Upgrading the server to the latest Debian version is not my preferred option as it is not under my direct control.
How do I fix this problem?
I think the critical bit of info here is 'upgrading my machine'. So when this worked before, you were building and packaging on something earlier than 12.04? If so, then the issue is that 12.04 now ships with a newer version of libc (apparently 2.14), and your binary now records a dependency on that version of libc. When you try to run on Lenny, which likely uses an older version of libc, the linker detects that the Lenny version does not support the 2.14 API, and fails.
I think the best way forward is probably to do your development and testing on 12.04, and then when you want to create packages for a specific Debian release, use pbuilder or similar to create debs. This will ensure that the libraries used for the packaging build match the target platform.

Eclipse: Cannot install CDT because of a conflicting dependency

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.

Resources