Error assigning to non-lvalue 'uxCurrentEventBits' event_groups.c - c

I am trying to run a FreeRTOS project on mikroC for ARM, but I get an assigning to non-lvalue 'uxCurrentEventBits' error. Please help fix it.
I downloaded an example from this source https://libstock.mikroe.com/projects/view/2083/freertos-v9-0-0-mikroc-examples
Where the error occurs:
const EventBits_t uxCurrentEventBits = pxEventBits->uxEventBits;

The problem was solved by installing the latest version of the compiler.

Related

crosstool-NG ct-ng build step=libc_main issue w/GCC 11

Thanks to anyone who may be able to help sort out an issue I am having building the toolchain. I am in a Docker container (provisioned w/Ubuntu 'jammy' and am at the build phase.
My .config set to armv6-rpi-linux-gnueabihf and makes it to libc_main before failing with the following:
[EXTRA] Building C library localedef
[ERROR] ../sysdeps/nptl/pthread.h:744:47: error: argument 1 of type 'struct __jmp_buf_tag *' declared as a pointer [-Werror=array-parameter=]
Reading up on the issue, it seems gcc added some additional sanity check(s) for mis-matched array declarations - gcc.
I have tried a couple of times to change the extern declaration in ../sysdeps/nptl/pthread.h alas this seems to cause other issues in setjmp.h or it gets reverted by ct-ng.
I am wondering if I need to go to an older 8.x revision of gcc, to remove this issue.
Any insights greatly appreciated!

mlpack error while building

I get the following error after I install libmlpack-dev, include it in my program and compile it.
/usr/include/mlpack/methods/kmeans/kmeans_impl.hpp: In member function ‘void mlpack::kmeans::KMeans<MetricType, InitialPartitionPolicy, EmptyClusterPolicy, LloydStepType, MatType>::Cluster(const MatType&, size_t, arma::mat&, bool)’:
/usr/include/mlpack/methods/kmeans/kmeans_impl.hpp:178:20: error: call of overloaded ‘isnan(double&)’ is ambiguous
if (isnan(cNorm) || isinf(cNorm))
^
/usr/include/mlpack/methods/kmeans/kmeans_impl.hpp:178:20: note: candidates are:
In file included from /usr/include/features.h:374:0,
from /usr/include/x86_64-linux-gnu/sys/types.h:25
Can someone suggest how to solve this.
P.S : I had asked this in
https://askubuntu.com/questions/847048/mlpack-error-while-building
This is an issue with mlpack on older versions of Ubuntu. If you upgrade Ubuntu to a newer version and update the mlpack package the issue should be solved. But if you are unable to do that, you can directly edit the file /usr/include/mlpack/methods/kmeans/kmeans_impl.hpp so that the line
if (isnan(cNorm) || isinf(cNorm))
is changed to
if (std::isnan(cNorm) || std::isinf(cNorm))
and this should fix the issue.

Error while building gcc cross compiler for i686-elf on ubuntu16.04

bash screenshot
/osd-src/gcc-6.1.0/isl/include/isl/ctx.h:108:8: error: attempt to use poisoned "malloc"
malloc(size)))
^
/home/desai/osd-src/gcc-6.1.0/isl/include/isl/ctx.h:112:8: error: attempt to use poisoned "realloc"
realloc(ptr,size)))
this is the error msg while i am performing this command
$ make all-target-libgcc
I am following this link for installation http://wiki.osdev.org/GCC_Cross-Compiler
I am new to Linux and stack-overflow, guide me.
Somewhere in your code (or included code ) there is a poison pragma which was put in place to prevent you from using these identifiers.
There was version of ILS-0.12 which was not supported with cloog-v0.18 . I updated new version and reinstalled it. Works now.

Static Analyzer error with iOS8 SDK

Recently I updated to Xcode 6 beta 6 with iOS 8 SDK. And while running static analyser I jumped into a problem with the following errors.
error: error reading 'pic'
error: no analyzer checkers are associated with '-mrelocation-model'
2 errors generated.
Command /Applications/Xcode6-Beta6.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1
Any Idea what is these errors and how to fix it. Thanks.
It´s a issue with the clang static analyzer.
Add to your existing analyzer entry under "Target" -> "Build Phases" -> "Compiler Flags" the suffix -Xanalyzer deadcode.
Complete entry should read as follows:
-w -Xanalyzer -analyzer-disable-checker -Xanalyzer deadcode
I have solve this problem recently you can solve using go to Xcode > Preferences > Location and remove all derived data in derived data folder and then clean and analyze
With the above answers in Xcode 8, I noticed build errors when using Swift compilation. Here's what Compiler Flags worked for me:
-w -Xanalyzer -analyzer-disable-all-checks

Compiling with OpenSSL ssl_conn errors

I am trying to compile a small .c file which uses OpenSSL includes, at first I had problems compiling but I solved it installing libssl-dev and that solved the include errors.
But now when I try to compile I get:
‘ssl_conn’ has no member named ‘encrypted’
‘ssl_conn’ has no member named ‘write_seq’
‘ssl_conn’ has no member named ‘read_seq’
The code for the lines of the error is:
ssl_conn* sslCon;
sslCon->encrypted = 0;
sslCon->write_seq = 0;
sslCon->read_seq = 0;
A friend told me it could be because the .c file was coded for an old version of OpenSSL, but I am not sure. Does someone knows what could be causing this and how to solve it?
ssl_conn is not part of the OpenSSL API and never was. I only found reference to it in some sample code exploiting OpenSSL, and it was defining it itself. Assuming you aren't trying to use that exploit code, my guess is there's an example floating around online from which you got the code you are trying to compile. So check your definition of ssl_conn and ensure it has the fields that are missing.

Resources