You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Been trying for a couple hours hunting down where a particular define gets introduced that is forcing a preprocessor conditional to immediately halt the build as as failure. I'll try to keep this brief.
Currently, with no modification to source code or Makefile, building openocd errors out with:
Infileincludedfromsrc/helper/options.c:38:
/usr/include/x86_64-linux-gnu/sys/sysctl.h:21:2: error: #warning "The <sys/sysctl.h> header is deprecated and will be removed." [-Werror=cpp]
21 | #warning "The <sys/sysctl.h> header is deprecated and will be removed."
| ^~~~~~~
cc1: all warnings being treated as errors
That particular line it mentions causing the error is because we have #include <sys/sysctl.h>, which is where the deprecation warning ultimately appears..
Doing some cursory Google research, I've found others with similar problems. They conditionally #include <sys/sysctl,h> only if HAVE_SYSCONF is NOT true,
The problem is, at least for Ubuntu, probably others in the very near future, the openocd project isn't including the necessary files that would export that HAVE_SYSCONF macro. And I am not familiar enough with the project to understand the requirements for using sys/sysctl.h, or what it would take to replace it.
In any case, the obvious workaround for now is to disable -Werror, and pray
The text was updated successfully, but these errors were encountered:
For what it is worth, there is probably not much need to use this repository any more, as upstream openocd has finally integrated stm32g4 support. I just need to verify that it works before I change instructions in things like moteus.
Ah, good to hear. I noticed in the docs for my distro's (Ubuntu 20.04) openocd package that the stm32l4x driver supports the G4 and the G0, which seemed weird, since those chips have some very different IPs (e.g. USB PD isn't supported by the L4, but is by G0/G4).
Is G0/G4 support realized through the stm32l4x driver in your patched fork too? Guess I just need to check whats in upstream
Been trying for a couple hours hunting down where a particular define gets introduced that is forcing a preprocessor conditional to immediately halt the build as as failure. I'll try to keep this brief.
Currently, with no modification to source code or
Makefile
, buildingopenocd
errors out with:That particular line it mentions causing the error is because we have
#include <sys/sysctl.h>
, which is where the deprecation warning ultimately appears..Doing some cursory Google research, I've found others with similar problems. They conditionally
#include <sys/sysctl,h>
only ifHAVE_SYSCONF
is NOT true,The problem is, at least for Ubuntu, probably others in the very near future, the
openocd
project isn't including the necessary files that would export thatHAVE_SYSCONF
macro. And I am not familiar enough with the project to understand the requirements for usingsys/sysctl.h
, or what it would take to replace it.In any case, the obvious workaround for now is to disable
-Werror
, and prayThe text was updated successfully, but these errors were encountered: