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!
Related
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.
I'm new to Arduino. When Arduino verifies this sketch https://github.com/MediaTek-Labs/Real-Time-Bicycle-Tracking-Map-using-PubNub throws the following:
Build options changed, rebuilding all
BikeTracker.ino: In function 'void setup()':
BikeTracker.ino:45:5: error: 'PubNub' was not declared in this scope
BikeTracker.ino: In function 'void loop()':
BikeTracker.ino:91:14: error: 'PubNub' was not declared in this scope
I've read most answers are pointing out to https://www.arduino.cc/en/Guide/Libraries some people say it's common Arduino linking issue (easy to fix) after tried out multiple approaches with no dice.
I've also followed PubNub customer support advice (with list of steps below) but no avail:
I got this from our hardware/IoT/embedded engineer:
You are probably not including all the libraries, or has the wrong
path for them.
When you download the source at
MediaTek-Labs/Real-Time-Bicycle-Tracking-Map-using-PubNub on GitHub:
Click .ino file and a pop up will ask if you need a new folder for the
sketch – click Yes.
Then copy the rest of the files from the source to
this new folder.
Compile it and see if you get any library path errors
that you need to provide. Let me know if you require further
assistance.
BTW this is my PubNub.h. Hope someone can shed some lights.
It turns out my Arduino IDE could not find PubNub.* files until I manually added them as Library.
I'm working in visual studio 2010 and I have code written in C.
If i run in 'Debug' mode, the code will run without any error or warning.
But if I run the same in 'Release' mode, errors and warning will appear.
Error List:
warning C4013:'fprintf' undefined; assuming extern returning int
error C2065: 'stdout': undeclared identifier
What is the reason? please help
warning C4013:'fprintf' undefined; assuming extern returning int
It looks like you didn't include stdio.h.
Seems like a difference in configuration between Release and Debug.
Check the values for "Whole Program Optimization", they may differ between the two build configurations.
I had the same problem in reverse: In Release mode everything was fine, but in Debug mode some functions like 'ext' (FFTW library) were reported as "undefined; assuming extern returning int".
The failing build configuration (Release in my case) had under project properties Configuration Properties > General the option "Whole Program Optimization" set to No Whole Program Optimization.
The successful build configuration had this set to Use Link Time Code Generation. When I set that option in my failing target as well, everything worked fine.
I'm starting development, and yet having lots of problems coming out from the moment I 'm trying to go a little bit out of bounds.
I usually work with CodeBlocks and just tried once to compile using MinGW.
I'm just starting to do program with the GTK library, my other programs were console applications.
So I've downloaded MiniFMOD 1.70 and 1.60 on http://www.fmod.org/index.php/download.
When I compile the main.cpp on a C++ console application project
I get this message (for both MiniFMOD versions).
||=== tryfmod170, Debug ===|
C:\Documents and Settings\Vincent\Bureau\minifmod170\lib\music.h|266|error: redefinition of typedef 'FMUSIC_MODULE'|
C:\Documents and Settings\Vincent\Bureau\minifmod170\lib\minifmod.h|26|note: previous declaration of 'FMUSIC_MODULE' was here|
C:\Documents and Settings\Vincent\Bureau\minifmod170\lib\Fmusic.c|117|error: conflicting types for 'FMUSIC_LoadSong'|
C:\Documents and Settings\Vincent\Bureau\minifmod170\lib\minifmod.h|56|note: previous declaration of 'FMUSIC_LoadSong' was here|
||=== Build finished: 2 errors, 0 warnings ===|
I'm sure it is a pretty simple error but I assume I'm quickly getting confused between all the file types,variables,structures and platforms...a
If somebody could help me I would be very grateful
It looks like you are including music.h and minifmod.h both of which have typedefs for FMUSIC_MODULE. I think you just need minifmod.h as it is the interface header, music.h is an internal header.
Im trying to compile z/lib on z/OS USS(thats right a mainframe). ive got gmake and the c89 compiler (which im assuming is c89 standards compliant) and USS is supposed to be POSIX compliant.
But zlib seems to be tripping up on
struct internal_state FAR *state; /* not visible by applications */
with the following error(s)
c89 -O3 -DUSE_MMAP -D_XOPEN_SOURCE_EXTENDED=1 -D_POSIX_SOURCE -c -o example.o example.c
ERROR CCN3277 ./zlib.h:92 Syntax error: possible missing ';' or ','?
ERROR CCN3007 ./zlib.h:92 "struct internal_state" is undefined.
ERROR CCN3166 ./zlib.h:103 Definition of function FAR requires parentheses.
ERROR CCN3276 ./zlib.h:103 Syntax error: possible missing '{'?
ERROR CCN3273 ./zlib.h:124 Missing type in declaration of gz_header.
ERROR CCN3166 ./zlib.h:126 Definition of function gz_header requires parentheses.
ERROR CCN3276 ./zlib.h:126 Syntax error: possible missing '{'?
WARNING CCN3137 ./zlib.h:1346 Declaration must declare at least one declarator, tag, or the members of an enumeration.
ERROR CCN3275 ./zlib.h:1350 Unexpected text z encountered.
ERROR CCN3282 ./zlib.h:1350 The type of the parameters must be specified in a prototype.
ERROR CCN3275 ./example.c:95 Unexpected text file encountered.
ERROR CCN3045 ./example.c:95 Undeclared identifier gzFile.
ERROR CCN3046 ./example.c:96 Syntax error.
ERROR CCN3045 ./example.c:98 Undeclared identifier file.
ERROR CCN3019 ./example.c:523 Expecting an array or a pointer to object type.
ERROR CCN3280 ./example.c:527 Function argument assignment between types "const char*" and "int" is not allowed.
CCN0793(I) Compilation failed for file ./example.c. Object file not created.
FSUM3065 The COMPILE step ended with return code 12.
FSUM3017 Could not compile example.c. Correct the errors and try again.
gmake: *** [example.o] Error 3
when i progressively take out the FAR * (i think its a far pointer but im really not that sure) the errors go away. But as this is a library, im not sure what other artifacts are going to be produced by removing this.
has anybody got any ideas?
any old mainframe heads out there?
it turns out there is a previous version of zlib that compiles on USS, version 1.1.4 or close to that. Its a back level, but i presume this works because it is before the implementation of the FAR pointer in the latest code. So atm i think ive got it to work.
thanks for all your help.
Regards
Mark.
FAR is not a C89 keyword, it is a Microsoft/Intelism and is probably #defined somewhere. If not, you need to define it as nothing:
#define FAR
However, this will probably only fix one of many problems. I would guess that the library uses some form of conditional compilation to handle things like FAR pointers - you need to read the docs to find which configuration is most suitabkle for your platform.
I'd use xlc instead of c89 since xlc is your system default compiler but you'll still probably have issues. I'd subscribe to the MVS-OE email list, the people on it are quite helpful. The link to info about the list appears to be down now so send email to
LISTSERV#VM.MARIST.EDU
with the message: INFO MVS-OE
FWIW, IBM provides a prebuilt version of zlib that includes support for the compression hardware (so-called zEDC) available on recent-vintage mainframes. See zlib for zEnterprise Data Compression