View previous topic :: View next topic |
Author |
Message |
honeymak Guru
Joined: 30 Dec 2002 Posts: 586
|
Posted: Tue Nov 26, 2024 12:48 am Post subject: gcc-14 - cannot build dev-db/cdb |
|
|
https://h0n3ym4k.github.io/build.log.html
i guess not just one pkg may encounter this
should i wait for gcc-14 compliant from gentoo pkg?
Code: |
> rts
chmod 755 rts
./compile testzero.c
testzero.c:17:1: error: return type defaults to ‘int’ [-Wimplicit-int]
17 | main(int argc,char **argv)
| ^~~~
testzero.c: In function ‘main’:
testzero.c:22:15: error: implicit declaration of function ‘_exit’ [-Wimplicit-function-declaration]
22 | if (!*argv) _exit(0);
| ^~~~~
testzero.c:22:15: warning: incompatible implicit declaration of built-in function ‘_exit’ [-Wbuiltin-declaration-mismatch]
testzero.c:23:17: warning: incompatible implicit declaration of built-in function ‘_exit’ [-Wbuiltin-declaration-mismatch]
23 | if (!*++argv) _exit(0);
| ^~~~~
testzero.c:34:3: warning: incompatible implicit declaration of built-in function ‘_exit’ [-Wbuiltin-declaration-mismatch]
34 | _exit(0);
| ^~~~~
make: *** [Makefile:299: testzero.o] Error 1
make: *** Waiting for unfinished jobs....
./compile install.c
install.c: In function ‘h’:
install.c:20:7: error: implicit declaration of function ‘mkdir’ [-Wimplicit-function-declaration]
20 | if (mkdir(home,0700) == -1)
| ^~~~~
install.c:23:7: error: implicit declaration of function ‘chown’ [-Wimplicit-function-declaration]
23 | if (chown(home,uid,gid) == -1)
| ^~~~~
install.c:25:7: error: implicit declaration of function ‘chmod’ [-Wimplicit-function-declaration]
25 | if (chmod(home,mode) == -1)
| ^~~~~
install.c: In function ‘d’:
install.c:36:7: error: implicit declaration of function ‘chdir’ [-Wimplicit-function-declaration]
36 | if (chdir(home) == -1)
| ^~~~~
install.c: In function ‘c’:
install.c:63:7: error: implicit declaration of function ‘fchdir’ [-Wimplicit-function-declaration]
63 | if (fchdir(fdsourcedir) == -1)
| ^~~~~~
install.c:88:3: error: implicit declaration of function ‘close’ [-Wimplicit-function-declaration]
88 | close(fdin);
| ^~~~~
install.c:91:7: error: implicit declaration of function ‘fsync’ [-Wimplicit-function-declaration]
91 | if (fsync(fdout) == -1)
| ^~~~~
install.c: At top level:
install.c:140:1: error: return type defaults to ‘int’ [-Wimplicit-int]
140 | main()
| ^~~~
install.c: In function ‘main’:
install.c:146:3: error: implicit declaration of function ‘umask’ [-Wimplicit-function-declaration]
146 | umask(077);
| ^~~~~
make: *** [Makefile:196: install.o] Error 1
* ERROR: dev-db/cdb-0.75-r4::gentoo failed (compile phase):
* emake failed
*
* If you need support, post the output of `emerge --info '=dev-db/cdb-0.75-r4::gentoo'`,
* the complete build log and the output of `emerge -pqv '=dev-db/cdb-0.75-r4::gentoo'`.
* The complete build log is located at '/var/log/portage/build/dev-db/cdb-0.75-r4:20241126-001437.log'.
* For convenience, a symlink to the build log is located at '/var/tmp/portage/dev-db/cdb-0.75-r4/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/dev-db/cdb-0.75-r4/temp/environment'.
* Working directory: '/var/tmp/portage/dev-db/cdb-0.75-r4/work/cdb-0.75'
* S: '/var/tmp/portage/dev-db/cdb-0.75-r4/work/cdb-0.75'
g64 ~ #
|
Code: |
g64 ~ # emerge --info dev-db/cdb
Portage 3.0.66.1 (python 3.12.7-final-0, default/linux/amd64/23.0/split-usr/desktop/gnome, gcc-14, glibc-2.40-r5, 6.6.62-gentoo-x86_64 x86_64)
=================================================================
System Settings
=================================================================
System uname: Linux-6.6.62-gentoo-x86_64-x86_64-Intel-R-_Core-TM-_i7-8550U_CPU_@_1.80GHz-with-glibc2.40
KiB Mem: 16389464 total, 5870384 free
KiB Swap: 16777212 total, 16777212 free
Timestamp of repository gentoo: Sun, 24 Nov 2024 23:50:32 +0000
Head commit of repository gentoo: eb65bf7df4f898e146d6a3064f6dbefda2b1e13b
Timestamp of repository arrans-overlay: Sun, 24 Nov 2024 16:18:33 +0000
Head commit of repository arrans-overlay: d186379618d5e50c205e0afef46e3c817a22309a
Timestamp of repository pentoo: Fri, 22 Nov 2024 20:33:59 +0000
Head commit of repository pentoo: 5c24b4cfda4ceee8420a139d50c8694184f10ebc
sh bash 5.2_p37
ld GNU ld (Gentoo 2.42 p6) 2.42.0
app-misc/pax-utils: 1.3.8::gentoo
app-shells/bash: 5.2_p37::gentoo
dev-build/autoconf: 2.13-r8::gentoo, 2.72-r1::gentoo
dev-build/automake: 1.16.5-r2::gentoo
dev-build/cmake: 3.30.5::gentoo
dev-build/libtool: 2.4.7-r4::gentoo
dev-build/make: 4.4.1-r100::gentoo
dev-build/meson: 1.5.2::gentoo
dev-java/java-config: 2.3.4::gentoo
dev-lang/perl: 5.40.0::gentoo
dev-lang/python: 3.11.10_p1::gentoo, 3.12.7_p1::gentoo, 3.13.0::gentoo
dev-lang/rust-bin: 1.81.0-r100::gentoo
sys-apps/baselayout: 2.17::gentoo
sys-apps/openrc: 0.54.2::gentoo
sys-apps/sandbox: 2.39::gentoo
sys-devel/binutils: 2.42-r2::gentoo
sys-devel/binutils-config: 5.5.2::gentoo
sys-devel/clang: 18.1.8::gentoo
sys-devel/gcc: 14.2.1_p20241116::gentoo
sys-devel/gcc-config: 2.11::gentoo
sys-devel/llvm: 18.1.8-r1::gentoo
sys-kernel/linux-headers: 6.6-r1::gentoo (virtual/os-headers)
sys-libs/glibc: 2.40-r5::gentoo
Repositories:
gentoo
location: /var/db/repos/gentoo
sync-type: git
sync-uri: https://github.com/gentoo-mirror/gentoo.git
priority: -1000
volatile: False
sync-git-verify-commit-signature: yes
arrans-overlay
location: /var/db/repos/arrans-overlay
sync-type: git
sync-uri: https://github.com/gentoo-mirror/arrans-overlay.git
masters: gentoo
volatile: False
pentoo
location: /var/db/repos/pentoo
sync-type: git
sync-uri: https://github.com/gentoo-mirror/pentoo.git
masters: gentoo
volatile: False
Binary Repositories:
gentoobinhost
priority: 1
sync-uri: https://gentoo.osuosl.org/releases/amd64/binpackages/23.0/x86-64-v3
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O3 -march=native -mtune=native -fomit-frame-pointer -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php8.2/ext-active/ /etc/php/cgi-php8.2/ext-active/ /etc/php/cli-php8.2/ext-active/ /etc/php/fpm-php8.2/ext-active/ /etc/php/phpdbg-php8.2/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O3 -march=native -mtune=native -fomit-frame-pointer -pipe"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS="-O3 -march=native -mtune=native -fomit-frame-pointer -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync merge-wait multilib-strict network-sandbox news parallel-fetch pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms split-log strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O3 -march=native -mtune=native -fomit-frame-pointer -pipe"
GENTOO_MIRRORS="http://gentoo.aditsu.net:8000/"
LANG="C.UTF8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs"
LEX="flex"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
RUSTFLAGS="-C target-cpu=native"
SHELL="/bin/bash"
USE="X a52 aac acl acpi alsa amd64 bluetooth branding bzip2 cairo cdda cdr cet colord crypt cups dbus dri dts dvd dvdr eds egl elogind encode evo exif flac gdbm gdk-pixbuf gif gnome gnome-keyring gnome-online-accounts gnome-shell gpm gstreamer gtk gui iconv icu introspection ipv6 jpeg keyring kf6compat lcms libnotify libtirpc mad mng mp3 mp4 mpeg multilib nautilus ncurses networkmanager nls ogg opengl openmp pam pango pcre pdf png policykit ppds pulseaudio qml qt5 qt6 readline sdl seccomp sound spell split-usr ssl startup-notification svg sysprof test-rust tiff tracker truetype udev udisks unicode upower usb vorbis vulkan wayland wxwidgets x264 xattr xcb xft xml xv xvid zlib" ABI_X86="64" ADA_TARGET="gcc_12" APACHE2_MODULES="actions alias auth_basic authn_anon authn_core authn_dbm authn_file authz_core authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers http2 include info log_config logio mime mime_magic negotiation rewrite setenvif socache_shmcb speling status unique_id unixd userdir usertrack vhost_alias access_compat asis auth_digest auth_form authn_dbd authz_dbd cern_meta dbd dumpio ident imagemap lbmethod_bybusyness lbmethod_byrequests lbmethod_bytraffic lbmethod_heartbeat log_forensic proxy proxy_ajp proxy_balancer proxy_connect proxy_fcgi proxy_ftp proxy_hcheck proxy_html proxy_http proxy_http2 proxy_scgi proxy_uwsgi proxy_wstunnel ratelimit remoteip reqtimeout session session_cookie session_crypto session_dbd slotmem_shm substitute version watchdog xml2enc" APACHE2_MPMS="event" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 mmx mmxext pclmul popcnt rdrand sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" GUILE_SINGLE_TARGET="3-0" GUILE_TARGETS="3-0" INPUT_DEVICES="libinput evdev synaptics vmmouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LLVM_TARGETS="WebAssembly DirectX" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-2" POSTGRES_TARGETS="postgres16" PYTHON_SINGLE_TARGET="python3_12" PYTHON_TARGETS="python3_12" RUBY_TARGETS="ruby32" VIDEO_CARDS="amdgpu dummy fbdev intel nouveau radeon radeonsi vesa i915 qxl vmware d3d12 virgl" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto logmark ipmark dhcpmac delude chaos account"
Unset: ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, MAKEOPTS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, RANLIB, READELF, SIZE, STRINGS, STRIP, YACC, YFLAGS
=================================================================
Package Settings
=================================================================
dev-db/cdb-0.75-r4::gentoo was built with the following:
USE="" ABI_X86="(64)"
|
_________________ hackers - make sth real
academics - read sth said to be real |
|
Back to top |
|
|
JimRockford74 n00b
Joined: 26 Nov 2024 Posts: 6
|
Posted: Tue Nov 26, 2024 7:46 pm Post subject: |
|
|
Re: dev-db/cdb-0.75-r4 build failures with GCC 14
The build failures you're seeing are due to GCC 14's stricter requirements around implicit function declarations and return types. These are now treated as errors rather than warnings.
The fixes needed are relatively straightforward - we need to add the appropriate header includes and explicit return types. Here are the specific changes needed:
For testzero.c:
Code: | #include <unistd.h> // for exit()
int main(int argc,char argv) // explicit return type
|
For install.c:
Code: | #include <sys/types.h>
#include <sys/stat.h> // for mkdir(), chmod()
#include <unistd.h> // for chdir(), fchdir(), close(), fsync(), umask()
#include <fcntl.h> // for file operations
int main() // explicit return type |
You have several options:
1. Wait for an official package update from the maintainer (recommended)
2. Temporarily switch back to GCC 13:
```bash
gcc-config x86_64-pc-linux-gnu-13.2.0
source /etc/profile
```
3. Create a local overlay with these patches if you need the package immediately
I recommend option 1 or 2 since this is a known issue with the GCC 14 transition, and many packages are being updated to handle these stricter requirements. |
|
Back to top |
|
|
CaptainBlood Advocate
Joined: 24 Jan 2010 Posts: 3977
|
Posted: Tue Nov 26, 2024 7:54 pm Post subject: |
|
|
Throwing patch at /etc/portage/patches/.... is an alternative way to avoid overlay management.
A simple way when dealing with an ebuild from the portage tree while not changing its version.
The only drawback is when upstream updates the same ebuild without versionning in a way that overlaps your patch.
In such a case, you're likely to face an at early stage rebuild failure that rejects your patch.
Renaming your.patch file to your.patch.any_extension_but_patch would free the way for a rebuild.
Thks 4 ur attention, interest & support. _________________ USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. " |
|
Back to top |
|
|
no101 n00b
Joined: 10 Oct 2022 Posts: 14 Location: Piney Woods
|
Posted: Wed Nov 27, 2024 1:48 am Post subject: |
|
|
gcc 14 no longer compiles c89 by default: now you have to specify the standard to use.
I can compile dev-db/cdb by adding -std=gnu89 via package.env
I created /etc/portage/env/gnu89
Code: |
CFLAGS="${CFLAGS} -std=gnu89"
|
then I added an entry in /etc/portage/package.env
I don't have an easy way to test the results but I believe this workaround will work correctly. If so, the real fix is to file a bug for dev-db/cdb requesting that the ebuild be modified to include the standard in CFLAGS.
https://wiki.gentoo.org/wiki//etc/portage/package.env |
|
Back to top |
|
|
logrusx Advocate
Joined: 22 Feb 2018 Posts: 2504
|
Posted: Wed Nov 27, 2024 6:25 am Post subject: |
|
|
no101 wrote: | gcc 14 no longer compiles c89 by default: now you have to specify the standard to use.
I can compile dev-db/cdb by adding -std=gnu89 via package.env
I created /etc/portage/env/gnu89
Code: |
CFLAGS="${CFLAGS} -std=gnu89"
|
then I added an entry in /etc/portage/package.env
I don't have an easy way to test the results but I believe this workaround will work correctly. If so, the real fix is to file a bug for dev-db/cdb requesting that the ebuild be modified to include the standard in CFLAGS.
https://wiki.gentoo.org/wiki//etc/portage/package.env |
I tested it by putting CFLAGS="${CFLAGS} -std=gnu89" on the command line and it worked.
Best Regards,
Georgi |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|