Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Unsupported Software
  • Search

[SOLVED] fix ebuild ( -Wimplicit-function-declaration )

This forum covers all Gentoo-related software not officially supported by Gentoo. Ebuilds/software posted here might harm the health and stability of your system(s), and are not supported by Gentoo developers. Bugs/errors caused by ebuilds from overlays.gentoo.org are covered by this forum, too.
Post Reply
Advanced search
4 posts • Page 1 of 1
Author
Message
sdauth
l33t
l33t
User avatar
Posts: 770
Joined: Wed Sep 19, 2018 2:48 am
Location: Ásgarðr

[SOLVED] fix ebuild ( -Wimplicit-function-declaration )

  • Quote

Post by sdauth » Tue Jun 24, 2025 4:37 pm

Hello,
I need help to solve a compilation issue for this little tool: https://github.com/Network-BEncode-inside/torrentcheck

With gcc 14.3.0, here is the error :

Code: Select all

~ make
cc -c -O -DICONV_IMPLEMENTATION src/torrentcheck.c -o src/torrentcheck.o
src/torrentcheck.c: In function 'beFindInDict':
src/torrentcheck.c:207:28: error: implicit declaration of function 'beStepOver' [-Wimplicit-function-declaration]
  207 |             benstrOffset = beStepOver(benstr,benstrLen,benstrOffset);
      |                            ^~~~~~~~~~
make: *** [Makefile:12: src/torrentcheck.o] Error 1
I don't have gcc 12 anymore installed on my system and it's a bit overkill to emerge it
so I tried to compile this tool in a debian bookworm chroot (it uses gcc 12)
And it compiles just fine with gcc 12 (and works fine too)

Is there a way to compile it (maybe a patch is needed ?) with gcc 14 so I can write a little ebuild for it ?
Thanks!
Last edited by sdauth on Tue Jun 24, 2025 5:33 pm, edited 1 time in total.
Top
Anon-E-moose
Watchman
Watchman
User avatar
Posts: 6566
Joined: Fri May 23, 2008 7:31 pm
Location: Dallas area

  • Quote

Post by Anon-E-moose » Tue Jun 24, 2025 5:06 pm

Code: Select all

--- a/src/torrentcheck.c        2025-06-24 12:04:13.158083308 -0500
+++ b/src/torrentcheck.c        2025-06-24 12:03:33.332535609 -0500
@@ -40,6 +40,8 @@
 #define SHA1_LEN 20
 // End required for SHA1

+int beStepOver(BYTE* benstr,int benstrLen,int benstrOffset);
+
 // For filter mode only, torrent buffer length depends on the torrent
 #define inputBufLen 262144
UM780 xtx, 6.18 zen kernel, gcc 15, openrc, wayland
minixforum m1-s1 max -- same software as above but used for ai learning


Zealots are gonna be zealots, just like haters are gonna be haters
Top
grknight
Retired Dev
Retired Dev
Posts: 2556
Joined: Fri Feb 20, 2015 9:36 pm

  • Quote

Post by grknight » Tue Jun 24, 2025 5:26 pm

If you don't want to fix the source, add -std=gnu90 to the gcc call. Newer standards need explicit function definitions and this was the old gcc default.
Top
sdauth
l33t
l33t
User avatar
Posts: 770
Joined: Wed Sep 19, 2018 2:48 am
Location: Ásgarðr

  • Quote

Post by sdauth » Tue Jun 24, 2025 5:33 pm

Anon-E-moose wrote:

Code: Select all

--- a/src/torrentcheck.c        2025-06-24 12:04:13.158083308 -0500
+++ b/src/torrentcheck.c        2025-06-24 12:03:33.332535609 -0500
@@ -40,6 +40,8 @@
 #define SHA1_LEN 20
 // End required for SHA1

+int beStepOver(BYTE* benstr,int benstrLen,int benstrOffset);
+
 // For filter mode only, torrent buffer length depends on the torrent
 #define inputBufLen 262144
Perfect, thank you very much Anon-E-moose!

I leave the ebuild here for others :

app-misc/torrentcheck-1.20_p20230129.ebuild

Code: Select all

# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

DESCRIPTION="Command line torrent viewer and hash checker"
HOMEPAGE="
	https://sourceforge.net/projects/torrentcheck
	https://github.com/Network-BEncode-inside/torrentcheck"

if [[ "${PV}" == "9999" ]]; then
	inherit git-r3
	EGIT_REPO_URI="https://github.com/Network-BEncode-inside/${PN}.git"
else
	COMMIT="50d11d401476fff9c1745e8d76dd0da0c4484422"
	SRC_URI="https://github.com/Network-BEncode-inside/${PN}/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
	KEYWORDS="~amd64"
	S="${WORKDIR}/${PN}-${COMMIT}"
fi

LICENSE="GPL-3"
SLOT="0"
PATCHES=( "${FILESDIR}/implicit_function.patch" )

src_install() {
	dobin "${PN}"
}
Top
Post Reply

4 posts • Page 1 of 1

Return to “Unsupported Software”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy