Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 731848 - dev-embedded/sdcc-4.0.0 -: not all necessary libraries for pic14 and pic16 ports are built
Summary: dev-embedded/sdcc-4.0.0 -: not all necessary libraries for pic14 and pic16 po...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal with 1 vote (vote)
Assignee: Embedded Gentoo Team
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2020-07-09 11:30 UTC by Torsten Kurbad
Modified: 2021-07-21 01:55 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
sdcc-4.4.0.ebuild.patch (sdcc-4.0.0.ebuild.patch,446 bytes, patch)
2020-07-09 11:31 UTC, Torsten Kurbad
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Torsten Kurbad 2020-07-09 11:30:10 UTC
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.
Comment 1 Torsten Kurbad 2020-07-09 11:31:35 UTC
Created attachment 648474 [details, diff]
sdcc-4.4.0.ebuild.patch

Patch to enable building all necessary .lib files
Comment 2 Daniel M. Weeks 2020-08-25 02:14:09 UTC
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.)
Comment 3 Torsten Kurbad 2020-09-15 08:41:39 UTC
(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.