-
Notifications
You must be signed in to change notification settings - Fork 176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[cmake] bdb53: disable error for implicit-int with gcc #2767
Conversation
using -Werror=implicit-int is now default in gcc 14 see: https://gcc.gnu.org/gcc-14/porting_to.html This fixes the following issue: configure:20682: cc -o conftest -O3 -D_GNU_SOURCE -D_REENTRANT conftest.c -lpthread >&5 conftest.c:46:1: error: return type defaults to 'int' [-Wimplicit-int] 46 | main() { | ^~~~ configure:20682: 0 = 1 configure: program exited with status 1 Signed-off-by: Lukas Rusak <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK - Would you mind adding this to automake side as well?
Gridcoin-Research/configure.ac
Line 1421 in 2c25758
AX_SUBDIRS_CONFIGURE([src/bdb53], [[CFLAGS="-Wno-error=implicit-function-declaration"], [CXXFLAGS="-Wno-error=implicit-function-declaration"], [--disable-java], [--disable-jdbc], [--disable-replication], [--enable-cxx], [$ADDITIONAL_BDB_FLAGS]], [], [], []) |
->
- AX_SUBDIRS_CONFIGURE([src/bdb53], [[CFLAGS="-Wno-error=implicit-function-declaration"], [CXXFLAGS="-Wno-error=implicit-function-declaration"], [--disable-java], [--disable-jdbc], [--disable-replication], [--enable-cxx], [$ADDITIONAL_BDB_FLAGS]], [], [], [])
+ AX_SUBDIRS_CONFIGURE([src/bdb53], [[CFLAGS=-Wno-error=implicit-function-declaration -Wno-error=implicit-int], [CXXFLAGS=-Wno-error=implicit-function-declaration -Wno-error=implicit-int], [--disable-java], [--disable-jdbc], [--disable-replication], [--enable-cxx], [$ADDITIONAL_BDB_FLAGS]], [], [], [])
I pushed a fixup to add this. I can remove "cmake" from the commit message if you are happy with the change. |
Sure, you can also keep it as two separate commits. |
Can we fix the CI errors please? @div72 this does not look specific to this PR. |
@jamescowens Can you cherry-pick 35eccfd? |
Ok. |
a3dafe6
into
gridcoin-community:development
[cmake] bdb53: disable error for implicit-int with gcc
Added - depends: add cross arm64-darwin support #2775 (@div72) - build: add missing randomness checks #2772 (@div72) - init, registry: Support -clearallregistryhistory startup parameter #2773 (@jamescowens) Changed - build: omit _FORTIFY_SOURCE on debug #2793 (@div72) - doc: cmake is required for Windows depends #2791 (@barton2526) - CMake: Set maximum supported Boost version #2788 (@CyberTailor) - ci: bump to MacOS 13 #2784 (@div72) - build/cmake: disable LevelDB tests #2776 (@div72) - util: use XDG_STATE_HOME for datadir on Flatpak #2774 (@div72) - util, build: Support miniupnp API version 18+ #2771 (@jamescowens) - build: explicitly include FindPkgConfig for CMake #2769 (@jamescowens) - ci, cd: bump action versions #2763 (@div72) - Sync CMake CI #2762 (@CyberTailor) - cpid: Modify CPID local hasher to eliminate compiler warnings on 32 bit archs #2760 (@jamescowens) Removed - refactor, misc: remove CBitcoin(Address|Secret) #2634 (@div72) Fixed - poll, gui: Disable choice add button in poll wizard when choice limit is reached #2792 (@jamescowens) - diagnose, rpc: fix compilation with boost 1.87 #2786 (@div72) - node: fix build with GCC 15 #2783 (@CyberTailor) - ci: use overwrite with brew install on MacOS CMake #2782 (@div72) - scraper: Protect access to ConvergedStats.csv.gz with a lock #2779 (@jamescowens) - fix build on FreeBSD #2770 (@wilkart) - rpc/server: fix removing deprecated commands from command list #2768 (@lrusak) - cmake bdb53: disable error for implicit-int with gcc #2767 (@lrusak)
Hello!
I noticed that on fedora 40 (using gcc 14),
gridcoinresearchd
fails to compile to an implicit-int conversion.This happens in the bdb53 dependency build. I didn't want to change the source code there so I just disabled the error so it would only be a warning. I also only made this change for GNU compiler, I'm not sure if it effects others.
The actual error is in the config.log of bdb53:
This cause the mutex detection to fail and ultimately fail the build. In the actual build log this looks like:
This can be seen in the aarch64 build here -> https://build.opensuse.org/package/live_build_log/home:theMarix/gridcoin/Fedora_40/aarch64
This comes down to the fact that implicit-int was promoted to an error by default in gcc 14
see: https://gcc.gnu.org/gcc-14/porting_to.html