When building dev-embedded/sdcc for pic14 and/or pic16 ports, most of the necessary .lib files (most notably libsdcc.lib and libsdcce.lib) are neither built nor installed. This is due to a variable name clash between sdcc's build system and Gentoo's portage. This is addressed in the original ebuild, but not completely. In particular, sdcc uses a variable named ARCH across its libraries' Makefiles and configure scripts that gets filled with the architecture shortcut of the building host (in my case: amd64) instead of the name of the PIC MCU the libraries should be compiled for. I'll attach a patch for the ebuild that mitigates the problem. For completeness' sake, here's my emerge --info: Portage 2.3.103 (python 3.7.7-final-0, default/linux/amd64/17.1/desktop/gnome/systemd, gcc-10.1.0, glibc-2.31-r5, 5.7.6-gentoo x86_64) ================================================================= System uname: Linux-5.7.6-gentoo-x86_64-Intel-R-_Xeon-R-_CPU_X5450_@_3.00GHz-with-gentoo-2.7 KiB Mem: 16437172 total, 5163160 free KiB Swap: 31250424 total, 31250424 free Timestamp of repository gentoo: Thu, 25 Jun 2020 13:00:01 +0000 Head commit of repository gentoo: 900059bdcf052b592e9e25844d02ffe49103f7c8 sh bash 5.0_p17 ld GNU ld (Gentoo 2.34 p4) 2.34.0 distcc 3.3.3 x86_64-pc-linux-gnu [disabled] ccache version 3.7.10 [disabled] app-shells/bash: 5.0_p17::gentoo dev-java/java-config: 2.3.1::gentoo dev-lang/perl: 5.30.3-r1::gentoo dev-lang/python: 2.7.18::gentoo, 3.6.10-r2::gentoo, 3.7.7-r2::gentoo, 3.8.3::gentoo, 3.9.0_beta3::gentoo dev-util/ccache: 3.7.10::gentoo dev-util/cmake: 3.17.3::gentoo dev-util/pkgconfig: 0.29.2::gentoo sys-apps/baselayout: 2.7::gentoo sys-apps/sandbox: 2.20::gentoo sys-devel/autoconf: 2.13-r1::gentoo, 2.69-r5::gentoo sys-devel/automake: 1.13.4-r2::gentoo, 1.16.2::gentoo sys-devel/binutils: 2.34-r1::gentoo sys-devel/gcc: 10.1.0-r1::gentoo sys-devel/gcc-config: 2.3.1::gentoo sys-devel/libtool: 2.4.6-r6::gentoo sys-devel/make: 4.3::gentoo sys-kernel/linux-headers: 5.7::gentoo (virtual/os-headers) sys-libs/glibc: 2.31-r5::gentoo Repositories: gentoo location: /usr/portage sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 sync-rsync-verify-max-age: 24 sync-rsync-extra-opts: sync-rsync-verify-jobs: 1 sync-rsync-verify-metamanifest: yes local location: /usr/local/portage masters: gentoo tkurbad priority: 0 iwm location: /var/lib/layman/iwm sync-type: laymansync sync-uri: http://svnintern.kmrc.de/projects/gentoo/iwm-overlay masters: gentoo priority: 50 seden location: /var/lib/layman/seden sync-type: laymansync sync-uri: https://anongit.gentoo.org/git/user/seden.git masters: gentoo priority: 50 tkurbad location: /var/lib/layman/tkurbad sync-type: laymansync sync-uri: https://github.com/tkurbad/tkurbad-overlay.git masters: gentoo priority: 50 ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="@FREE" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -march=core2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /etc/stunnel/stunnel.conf /usr/lib64/libreoffice/program/sofficerc /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php7.4/ext-active/ /etc/php/cgi-php7.4/ext-active/ /etc/php/cli-php7.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-O2 -march=core2 -pipe" DISTDIR="/usr/portage/distfiles" ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY 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" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo ftp://ftp.informatik.rwth-aachen.de/pub/Linux/gentoo http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo" LANG="de_DE.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LINGUAS="de" MAKEOPTS="-j5" 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="/virtual/portage" USE="7zip X a52 aac acl acpi additions ads alsa amd64 amr apache2 apng arping artworkextra asf asm aspell async atk audacious autoipd avahi ayatana bash-completion beagle berkdb bluetooth branding browserplugin bzip2 cairo caps capslib cdda cddb cdparanoia cdr cli colord colordiff crypt css cups curl daap dbus device-mapper djvu dns dri dts dvd dvdr dvi eds emboss encode evdev evo exif expat faad fam fbcon ffmpeg fftw flac fluidsynth fontconfig foomaticdb fortran freetts ftdi fuse gcj gd gdbm gif gimp gimpprint gles gles2 glitz gmp gnome gnome-keyring gnome-online-accounts gnutls gphoto2 gpm graphicsmagick graphviz gs gstreamer gtk gtk3 gtkhtml guile gzip h323 hddtemp hvm ical iconv icu id3tag imlib introspection ipv6 jack jadetex java java6 javafx jce jit jpeg jpeg2k kdrive kerberos keyring kpathsea lame lash latex lcms ldap libgcrypt libnotify libsecret libtirpc lm_sensors logrotate lzo mad matroska mbrola mdnsresponder-compat mikmod minizip mjpeg mmap mng mono mp2 mp3 mp4 mpeg mplayer mpm-worker mtp multilib musepack musicbrainz mysql nautilus ncurses network networkmanager nls nptl nptlonly nsplugin nvidia offensive ogg opengl openmp openrc pae pam pango pcre pdf perl pidgin pipechan plotutils png pnm policykit postgres postproc postscript ppds pulseaudio pygrub python qmail qt3support qt5 quicktime quota quotas rar readline real rle rrdcgi rtsp samba samba4 sasl screen sdl seamonkey seccomp sensord shibboleth shout sip slang smp sms smt sndfile sound spell split-usr sqlite ssl startup-notification stream subtitles subversion suid svg swat sylpheed systemd t1lib taglib tagwriting tcl tcltk tcpd tetex tga theora threads tidy tiff tk tracker truetype tta udev udisks unicode upower urandom usb v4l v4l2 vcd vde vditool vdpau vlm vorbis wav wavpack wayland webdav webkit webrtc widevine win32codecs wma wmf wrapper wxwidgets wxwindows x264 xattr xcb xcomposite xetex xine xml xml2 xosd xpm xprint xscreensaver xulrunner xv xvid xvmc xxmc zlib" ABI_X86="64 32" ADA_TARGET="gnat_2018" ALSA_CARDS="hda-intel" APACHE2_MODULES="actions alias auth_basic auth_digest authn_alias authn_anon authn_core authn_dbm authn_default authn_file authz_core authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_connect proxy_ftp proxy_http rewrite setenvif socache_shmcb speling status unique_id unixd userdir usertrack vhost_alias" APACHE2_MPMS="prefork" CALLIGRA_FEATURES="author braindump flow karbon kexi krita sheets stage words" CAMERAS="canon ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 sse3 sse4_1 ssse3" CURL_SSL="openssl" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev wacom" KERNEL="linux" L10N="de" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="nlpsolver pdfimport presenter-console presenter-minimizer scripting-javascript wiki-publisher" LLVM_TARGETS="BPF NVPTX X86 AArch64" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_7" PYTHON_TARGETS="python2_7 python3_6 python3_7 python3_8" QEMU_SOFTMMU_TARGETS="arm i386 m68k ppc ppc64 x86_64" QEMU_USER_TARGETS="arm i386 m68k ppc ppc64 x86_64" RUBY_TARGETS="ruby26 ruby27" USERLAND="GNU" VIDEO_CARDS="nouveau" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS Reproducible: Always Steps to Reproduce: 1. Compile sdcc with USE=pic14 2. Try to compile PIC C source using sdcc 3. Actual Results: sdcc complains about missing libsdcc.lib or libsdcce.lib Expected Results: sdcc should link the object to said libs successfully.
Created attachment 648474 [details, diff] sdcc-4.4.0.ebuild.patch Patch to enable building all necessary .lib files
This /may/ be a dupe of #730484. Torsten, there is an ebuild in my junkdrawer overlay that should fix this. (Please let me know if this does or does not fix pic14. I have only tested with pic16.)
(In reply to Daniel M. Weeks from comment #2) > This /may/ be a dupe of #730484. Torsten, there is an ebuild in my > junkdrawer overlay that should fix this. (Please let me know if this does or > does not fix pic14. I have only tested with pic16.) Sorry for the late reply. Your ebuild works for me, so just unsetting ARCH before compilation does the trick.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ec9f33c18f0621452246ff37762a42485ad050ca commit ec9f33c18f0621452246ff37762a42485ad050ca Author: Esteve Varela Colominas <esteve.varela@gmail.com> AuthorDate: 2022-12-01 18:49:37 +0000 Commit: Viorel Munteanu <ceamac@gentoo.org> CommitDate: 2023-03-05 10:14:21 +0000 dev-embedded/sdcc: Bump to 4.2.0 This update also fixes a long-standing bug with regards to the pic14 and pic16 ports. Be sure to build with USE="pic14 pic16 non-free device-lib" (all linked bugs are a copy of this, can be closed when this package goes stable) Bug: https://bugs.gentoo.org/682086 Bug: https://bugs.gentoo.org/730484 Bug: https://bugs.gentoo.org/731848 Closes: https://bugs.gentoo.org/844925 Signed-off-by: Esteve Varela Colominas <esteve.varela@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/28496 Signed-off-by: Viorel Munteanu <ceamac@gentoo.org> dev-embedded/sdcc/Manifest | 2 + .../sdcc/files/sdcc-4.2.0-link-tinfo.patch | 24 +++ dev-embedded/sdcc/metadata.xml | 17 ++- dev-embedded/sdcc/sdcc-4.2.0.ebuild | 167 +++++++++++++++++++++ dev-embedded/sdcc/sdcc-9999.ebuild | 134 +++++++++-------- 5 files changed, 276 insertions(+), 68 deletions(-)