Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] rts5229 fails to emerge while building 5.4.28.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
dewhite
Tux's lil' helper
Tux's lil' helper


Joined: 16 Mar 2003
Posts: 86
Location: Houston, Texas, USA

PostPosted: Wed Apr 15, 2020 12:25 am    Post subject: [SOLVED] rts5229 fails to emerge while building 5.4.28. Reply with quote

I've been trying to update from 4.19.97-gentoo to 5.4.28-gentoo for a couple of days and getting hung-up during the compile on an out-of-tree module for an sd card reader that's built into my Intel NUC.

The ebuild for the driver (rts5229) spews out a bunch of ACCESS DENIED errors for hidden files it expects to see in the main /usr/src/linux-5.4.28-gentoo/ directory and then the build terminates. Same behavior is observed if I try:
Code:
emerge -av1 rts5229
outside of compiling the kernel.

I've looked around and don't see anyone else having this problem, so I wanted to see if anyone has any troubleshooting ideas I can chase down, short of abandoning the card reader which I actually do use quite often...

Any thoughts, ideas, questions, references, etc are very much appreciated!

Code:
puck /usr/src/linux # emerge -pqv '=sys-block/rts5229-1.07-r6::gentoo'
[ebuild   R   ] sys-block/rts5229-1.07-r6


Code:
puck /usr/src/linux # emerge --info '=sys-block/rts5229-1.07-r6::gentoo'
Portage 2.3.89 (python 3.6.10-final-0, default/linux/amd64/17.0/desktop/plasma, gcc-9.2.0, glibc-2.29-r7, 4.19.97-gentoo-x86_64 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.19.97-gentoo-x86_64-x86_64-Intel-R-_Core-TM-_i5-7260U_CPU_@_2.20GHz-with-gentoo-2.6
KiB Mem:    16313016 total,    288628 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Sun, 12 Apr 2020 22:30:01 +0000
Head commit of repository gentoo: d134894c91acbc625e43158ed944057e93981d7c
sh bash 4.4_p23-r1
ld GNU ld (Gentoo 2.33.1 p2) 2.33.1
app-shells/bash:          4.4_p23-r1::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.30.1::gentoo
dev-lang/python:          2.7.17-r1::gentoo, 3.6.10::gentoo, 3.7.6::gentoo
dev-util/cmake:           3.16.5::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/openrc:          0.42.1::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.16.1-r1::gentoo
sys-devel/binutils:       2.33.1-r1::gentoo
sys-devel/gcc:            9.2.0-r2::gentoo
sys-devel/gcc-config:     2.2.1::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 4.19::gentoo (virtual/os-headers)
sys-libs/glibc:           2.29-r7::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-verify-jobs: 1
    sync-rsync-verify-metamanifest: yes
    sync-rsync-extra-opts:

crossdev
    location: /usr/local/portage-crossdev
    masters: gentoo
    priority: 10

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=skylake -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /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/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=skylake -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN 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://distfiles.gentoo.org"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en_US"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
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"
USE="X a52 aac acl acpi activities alsa amd64 berkdb bluetooth branding bzip2 cairo cdda cdr cli consolekit crypt cups dbus declarative dri dts dvd dvdr emboss encode exif flac fortran gdbm gif gpm gtk iconv icu ipv6 jpeg kde kipi kwallet lcms ldap libnotify libtirpc mad mng mp3 mp4 mpeg multilib ncurses nls nptl ogg opengl openmp pam pango pcre pdf phonon plasma png policykit ppds qml qt5 readline sdl seccomp semantic-desktop spell split-usr ssl startup-notification svg tcpd tiff truetype udev udisks unicode upower usb vorbis widgets wxwidgets x264 xattr xcb xcomposite xml xv xvid zlib" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid 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 rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" 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="libinput keyboard mouse" KERNEL="linux" L10N="en-US" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" RUBY_TARGETS="ruby24 ruby25" SANE_BACKENDS="pixma" USERLAND="GNU" VIDEO_CARDS="intel" 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

=================================================================
                        Package Settings
=================================================================

sys-block/rts5229-1.07-r6::gentoo was built with the following:
USE="(policykit) (split-usr)" ABI_X86="(64)"
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 sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"


Snippet from the Build Log:
Code:
 * ACCESS DENIED:  fopen_wr:     /usr/src/linux-5.4.28-gentoo/.518.tmp
 * ACCESS DENIED:  unlinkat:     /usr/src/linux-5.4.28-gentoo/.518.tmp
rm: cannot remove '.518.tmp': Permission denied
 * ACCESS DENIED:  unlinkat:     /usr/src/linux-5.4.28-gentoo/.518.o
rm: cannot remove '.518.o': Permission denied
 * ACCESS DENIED:  fopen_wr:     /usr/src/linux-5.4.28-gentoo/.524.tmp
 * ACCESS DENIED:  unlinkat:     /usr/src/linux-5.4.28-gentoo/.524.tmp
rm: cannot remove '.524.tmp': Permission denied
 * ACCESS DENIED:  unlinkat:     /usr/src/linux-5.4.28-gentoo/.524.o
rm: cannot remove '.524.o': Permission denied
 * ACCESS DENIED:  fopen_wr:     /usr/src/linux-5.4.28-gentoo/.530.tmp
 * ACCESS DENIED:  unlinkat:     /usr/src/linux-5.4.28-gentoo/.530.tmp
rm: cannot remove '.530.tmp': Permission denied
 * ACCESS DENIED:  unlinkat:     /usr/src/linux-5.4.28-gentoo/.530.o
rm: cannot remove '.530.o': Permission denied
  HOSTCC  scripts/basic/fixdep
 * ACCESS DENIED:  fopen_wr:     /usr/src/linux-5.4.28-gentoo/scripts/basic/.fixdep.d
scripts/basic/fixdep.c:410:1: fatal error: opening dependency file scripts/basic/.fixdep.d: Permission denied
  410 | }
      | ^
compilation terminated.
make[3]: *** [scripts/Makefile.host:107: scripts/basic/fixdep] Error 1
make[2]: *** [Makefile:500: scripts_basic] Error 2
make[1]: *** [Makefile:677: include/config/auto.conf.cmd] Error 2
make[1]: *** [include/config/auto.conf.cmd] Deleting file 'include/config/tristate.conf'
 * ACCESS DENIED:  unlink:       /usr/src/linux-5.4.28-gentoo/include/config/tristate.conf
make[1]: unlink: include/config/tristate.conf: Permission denied
make[1]: Leaving directory '/usr/src/linux-5.4.28-gentoo'
make: *** [Makefile:36: default] Error 2
 * ERROR: sys-block/rts5229-1.07-r6::gentoo failed (compile phase):
 *   emake failed


Complete Build Log:
http://dpaste.com/2A39KQT
_________________
Work WS: R7-1700x | 2x8Gb DDR4 | GT1030 | 275Gb & 1Tb SSD Root/Home
Work FS: i5-6500 | 8Gb DDR4 | 275Gb SSD | 3x 1TB RAID5
Home WS: NUC7i5BNH | 2x8Gb DDR4 | 275Gb SSD
Home FS: FX-8320e | 8Gb DDR3 | 8400GS | 4x 5TB RAID5


Last edited by dewhite on Wed Apr 15, 2020 3:03 pm; edited 1 time in total
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 24067
Location: here

PostPosted: Wed Apr 15, 2020 6:59 am    Post subject: Reply with quote

This package has no maintainer and it's broken.
The good news is that there is a package repository with fixes.
I create an ebuild for this package repository
rts5229-9999.ebuild:
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

inherit git-r3 linux-mod

DESCRIPTION="Linux driver for Realtek PCI-Express card reader chip"
HOMEPAGE="https://github.com/Zibri/Realtek-rts5229-linux-driver"
EGIT_REPO_URI="https://github.com/Zibri/Realtek-rts5229-linux-driver.git"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"

DEPEND="virtual/linux-sources"

MODULE_NAMES="rts5229(misc/drivers/scsi)"
BUILD_TARGETS="default"

src_prepare() {
        default
        sed -e 's/\/lib\/modules\/\$(KVERSION)\/build\//\$(KERNELDIR)/g' \
                -e 's/SUBDIRS/M/g' \
                -i Makefile || die "Sed failed!"
}

pkg_setup() {
        linux-mod_pkg_setup
        BUILD_PARAMS="KERNELDIR=${KERNEL_DIR}"
}

src_compile() {
        # packahe not support parallel make
        MAKEOPTS="-j1"
        linux-mod_src_compile
}

_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
dewhite
Tux's lil' helper
Tux's lil' helper


Joined: 16 Mar 2003
Posts: 86
Location: Houston, Texas, USA

PostPosted: Wed Apr 15, 2020 12:50 pm    Post subject: Reply with quote

Thanks for your helpful reply! I've been using Gentoo for a long time, but haven't installed a package in quite this way before. I looked at some documentation about 3rd party ebuilds (https://wiki.sabayon.org/index.php?title=HOWTO:_Example_of_Installing_3rd_Party_Ebuilds) and took a stab but I have failed thus far. Could you nudge me in the correct direction?

Code:
puck /usr/src/linux # mkdir -p /usr/local/portage/sys-block/rts5229
puck /usr/src/linux # nano /etc/portage/make.conf


Within my make.conf, I added /usr/local/portage to the PORTDIR= entry

Code:
puck /usr/src/linux # cd /usr/local/portage/sys-block/rts5229
puck /usr/local/portage/sys-block/rts5229 # nano rts5229-9999.ebuild


Within that new file I placed the text of your ebuild and saved it.

Code:
puck /usr/local/portage/sys-block/rts5229 # ebuild rts5229-9999.ebuild manifest
!!! Section 'gentoo' in repos.conf has location attribute set to nonexistent directory: '/usr/portage /usr/local/portage'
!!! Invalid Repository Location (not a dir): '/usr/portage /usr/local/portage'
Appending /usr/local/portage to PORTDIR_OVERLAY...
!!! Section 'gentoo' in repos.conf has location attribute set to nonexistent directory: '/usr/portage /usr/local/portage'
!!! Repository 'x-portage' is missing masters attribute in '/usr/local/portage/metadata/layout.conf'
!!! Set 'masters = gentoo' in this file for future compatibility
!!! Invalid Repository Location (not a dir): '/usr/portage /usr/local/portage'
 * ERROR: sys-block/rts5229-9999::x-portage failed (depend phase):
 *   git-r3.eclass could not be found by inherit()
 *
 * Call stack:
 *             ebuild.sh, line 609:  Called source '/usr/local/portage/sys-block/rts5229/rts5229-9999.ebuild'
 *   rts5229-9999.ebuild, line   6:  Called inherit 'git-r3' 'linux-mod'
 *             ebuild.sh, line 290:  Called die
 * The specific snippet of code:
 *              [[ -z ${location} ]] && die "${1}.eclass could not be found by inherit()"
 *
 * If you need support, post the output of `emerge --info '=sys-block/rts5229-9999::x-portage'`,
 * the complete build log and the output of `emerge -pqv '=sys-block/rts5229-9999::x-portage'`.
 * Working directory: '/usr/lib64/python3.6/site-packages'
 * S: '/var/tmp/portage/sys-block/rts5229-9999/work/rts5229-9999'

_________________
Work WS: R7-1700x | 2x8Gb DDR4 | GT1030 | 275Gb & 1Tb SSD Root/Home
Work FS: i5-6500 | 8Gb DDR4 | 275Gb SSD | 3x 1TB RAID5
Home WS: NUC7i5BNH | 2x8Gb DDR4 | 275Gb SSD
Home FS: FX-8320e | 8Gb DDR3 | 8400GS | 4x 5TB RAID5
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 24067
Location: here

PostPosted: Wed Apr 15, 2020 1:09 pm    Post subject: Reply with quote

See the official documentation for create custom repository
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
dewhite
Tux's lil' helper
Tux's lil' helper


Joined: 16 Mar 2003
Posts: 86
Location: Houston, Texas, USA

PostPosted: Wed Apr 15, 2020 3:02 pm    Post subject: Reply with quote

fedeliallalinea wrote:
See the official documentation for create custom repository


Good nudge.

Although I had already figured out the mistake I was making in following the other guide (I had modified the PORTDIR= line in make.conf instead of creating a PORTDIR_OVERLAY= entry), I took your advice to follow the official docs. After unwinding the work already done and following the procedure in your link, the package and my kernel compile without further issues:

Code:
dan@puck ~ $ uname -a
Linux puck 5.4.28-gentoo-x86_64 #1 SMP Wed Apr 15 08:43:20 CDT 2020 x86_64 Intel(R) Core(TM) i5-7260U CPU @ 2.20GHz GenuineIntel GNU/Linux


Thanks again for your assistance!
_________________
Work WS: R7-1700x | 2x8Gb DDR4 | GT1030 | 275Gb & 1Tb SSD Root/Home
Work FS: i5-6500 | 8Gb DDR4 | 275Gb SSD | 3x 1TB RAID5
Home WS: NUC7i5BNH | 2x8Gb DDR4 | 275Gb SSD
Home FS: FX-8320e | 8Gb DDR3 | 8400GS | 4x 5TB RAID5
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
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