[ODROID-C1] kernel compilation fails

This forum is for topics dealing with problems with software specifically in the ARMv7h repo.

[ODROID-C1] kernel compilation fails

Postby chjordan » Thu Apr 23, 2015 12:34 am

Hi,

I have an external xfs drive, and the ODROID-C1 kernel does not provide xfs support. So for a long time, I've cloned the PKGBUILDs repo and added in xfs support and compiled without issue. However, recently, this doesn't work anymore - vanilla or with xfs support added.

Running makepkg -si on the most recent commit eventually fails with:
$this->bbcode_second_pass_code('', '
CC [M] drivers/usb/serial/zte_ev.o
LD drivers/usb/serial/usbserial.o
LD drivers/usb/serial/built-in.o
LD drivers/usb/built-in.o
LD drivers/built-in.o
==> ERROR: A failure occurred in build().
Aborting...
')

Running makepkg -ei after this: reveals:
$this->bbcode_second_pass_code('', '
==> Making package: linux-odroid-c1 3.10.73-5 (Thu Apr 23 10:17:41 AEST 2015)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> WARNING: Using existing $srcdir/ tree
==> Removing existing $pkgdir/ directory...
==> Starting build()...
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
make[1]: 'include/generated/mach-types.h' is up to date.
CALL scripts/checksyscalls.sh
CHK include/generated/uapi/linux/version.h
CC scripts/mod/devicetable-offsets.s
GEN scripts/mod/devicetable-offsets.h
HOSTCC scripts/mod/file2alias.o
HOSTLD scripts/mod/modpost
CHK include/generated/utsrelease.h
DTC arch/arm/boot/dts/meson8b_odroidc.dtb
make[1]: 'include/generated/mach-types.h' is up to date.
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
CHK kernel/config_data.h
CC backports/compat/main.o
gcc: error: -mfloat-abi=soft and -mfloat-abi=hard may not be used together
scripts/Makefile.build:308: recipe for target 'backports/compat/main.o' failed
make[2]: *** [backports/compat/main.o] Error 1
scripts/Makefile.build:455: recipe for target 'backports/compat' failed
make[1]: *** [backports/compat] Error 2
Makefile:801: recipe for target 'backports' failed
make: *** [backports] Error 2
make: *** Waiting for unfinished jobs....
CC drivers/gpu/arm/ump/linux/ump_kernel_linux.o
CC drivers/gpu/arm/ump/linux/ump_memory_backend.o
LD drivers/gpu/arm/ump/ump.o
LD drivers/gpu/arm/ump/built-in.o
LD drivers/gpu/arm/built-in.o
LD drivers/gpu/built-in.o
LD drivers/built-in.o
==> ERROR: A failure occurred in build().
Aborting...
')

I'm curious why my build fails but the PKGBUILD is provided upstream, which presumably is the same one used to generate the binary in the repos. Also, I assume hard floats are being used everywhere? A grep of "float=hard" shows no instances in the unpacked kernel directory, but there's a few instances of "float=soft". At this point, I'm out of my depth.

Help is much appreciated.
chjordan
 
Posts: 5
Joined: Wed Jan 28, 2015 8:25 am

Re: [ODROID-C1] kernel compilation fails

Postby moonman » Thu Apr 23, 2015 7:38 am

1. a full log would be nice. You can use pastebin.
2. do remove src and pkg directories before trying to build each time
3. What is in /etc/makepkg.conf
copy paste output of "cat /etc/makepkg.conf" use code tags.

You can also submit a Pull Request on our github, but do it right and read https://github.com/archlinuxarm/PKGBUIL ... IBUTING.md first
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3388
Joined: Sat Jan 15, 2011 3:36 am

Re: [ODROID-C1] kernel compilation fails

Postby chjordan » Thu Apr 23, 2015 9:42 am

Thanks for your reply. From a completely clean "git pull" (except for the .tar.gz already downloaded), the full log of "makepkg -si" is: http://pastebin.com/Vib8c7pQ

To better highlight the (probable) problem, the log of "makepkg -ei" right after the above is:
$this->bbcode_second_pass_code('', '
==> Making package: linux-odroid-c1 3.10.73-5 (Thu Apr 23 19:41:02 AEST 2015)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> WARNING: Using existing $srcdir/ tree
==> Removing existing $pkgdir/ directory...
==> Starting build()...
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
make[1]: 'include/generated/mach-types.h' is up to date.
CALL scripts/checksyscalls.sh
CHK include/generated/uapi/linux/version.h
CC scripts/mod/devicetable-offsets.s
GEN scripts/mod/devicetable-offsets.h
HOSTCC scripts/mod/file2alias.o
HOSTLD scripts/mod/modpost
CHK include/generated/utsrelease.h
DTC arch/arm/boot/dts/meson8b_odroidc.dtb
make[1]: 'include/generated/mach-types.h' is up to date.
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
CHK kernel/config_data.h
CC backports/compat/main.o
gcc: error: -mfloat-abi=soft and -mfloat-abi=hard may not be used together
scripts/Makefile.build:308: recipe for target 'backports/compat/main.o' failed
make[2]: *** [backports/compat/main.o] Error 1
scripts/Makefile.build:455: recipe for target 'backports/compat' failed
make[1]: *** [backports/compat] Error 2
Makefile:801: recipe for target 'backports' failed
make: *** [backports] Error 2
make: *** Waiting for unfinished jobs....
CC drivers/gpu/arm/ump/linux/ump_kernel_linux.o
CC drivers/gpu/arm/ump/linux/ump_memory_backend.o
LD drivers/gpu/arm/ump/ump.o
LD drivers/gpu/arm/ump/built-in.o
LD drivers/gpu/arm/built-in.o
LD drivers/gpu/built-in.o
LD drivers/built-in.o
==> ERROR: A failure occurred in build().
Aborting...
')

I've tried removing src and pkg between alterations - no difference. Also, all packages are up to date, gcc is from the repos, nothing funky going on.

/etc/makepkg.conf - I believe this is vanilla (at least, I don't remember making alterations). No .pacnew either.
$this->bbcode_second_pass_code('', '
#
# /etc/makepkg.conf
#

#########################################################################
# SOURCE ACQUISITION
#########################################################################
#
#-- The download utilities that makepkg should use to acquire sources
# Format: 'protocol::agent'
DLAGENTS=('ftp::/usr/bin/curl -fC - --ftp-pasv --retry 3 --retry-delay 3 -o %o %u'
'http::/usr/bin/curl -fLC - --retry 3 --retry-delay 3 -o %o %u'
'https::/usr/bin/curl -fLC - --retry 3 --retry-delay 3 -o %o %u'
'rsync::/usr/bin/rsync --no-motd -z %u %o'
'scp::/usr/bin/scp -C %u %o')

# Other common tools:
# /usr/bin/snarf
# /usr/bin/lftpget -c
# /usr/bin/wget

#-- The the package required by makepkg to download VCS sources
# Format: 'protocol::package'
VCSCLIENTS=('bzr::bzr'
'git::git'
'hg::mercurial'
'svn::subversion')

#########################################################################
# ARCHITECTURE, COMPILE FLAGS
#########################################################################
#
CARCH="armv7h"
CHOST="armv7l-unknown-linux-gnueabihf"

#-- Compiler and Linker Flags
# -march (or -mcpu) builds exclusively for an architecture
# -mtune optimizes for an architecture, but builds for whole processor family
CPPFLAGS="-D_FORTIFY_SOURCE=2"
CFLAGS="-march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 -O2 -pipe -fstack-protector --param=ssp-buffer-size=4"
CXXFLAGS="-march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 -O2 -pipe -fstack-protector --param=ssp-buffer-size=4"
LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro"
#-- Make Flags: change this for DistCC/SMP systems
#MAKEFLAGS="-j2"
#-- Debugging flags
DEBUG_CFLAGS="-g -fvar-tracking-assignments"
DEBUG_CXXFLAGS="-g -fvar-tracking-assignments"

#########################################################################
# BUILD ENVIRONMENT
#########################################################################
#
# Defaults: BUILDENV=(!distcc color !ccache check !sign)
# A negated environment option will do the opposite of the comments below.
#
#-- fakeroot: Allow building packages as a non-root user
#-- distcc: Use the Distributed C/C++/ObjC compiler
#-- color: Colorize output messages
#-- ccache: Use ccache to cache compilation
#-- check: Run the check() function if present in the PKGBUILD
#-- sign: Generate PGP signature file
#
BUILDENV=(!distcc color !ccache check !sign)
#
#-- If using DistCC, your MAKEFLAGS will also need modification. In addition,
#-- specify a space-delimited list of hosts running in the DistCC cluster.
#DISTCC_HOSTS=""
#
#-- Specify a directory for package building.
#BUILDDIR=/tmp/makepkg

#########################################################################
# GLOBAL PACKAGE OPTIONS
# These are default values for the options=() settings
#########################################################################
#
# Default: OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !upx !debug)
# A negated option will do the opposite of the comments below.
#
#-- strip: Strip symbols from binaries/libraries
#-- docs: Save doc directories specified by DOC_DIRS
#-- libtool: Leave libtool (.la) files in packages
#-- staticlibs: Leave static library (.a) files in packages
#-- emptydirs: Leave empty directories in packages
#-- zipman: Compress manual (man and info) pages in MAN_DIRS with gzip
#-- purge: Remove files specified by PURGE_TARGETS
#-- upx: Compress binary executable files using UPX
#-- debug: Add debugging flags as specified in DEBUG_* variables
#
OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !upx !debug)

#-- File integrity checks to use. Valid: md5, sha1, sha256, sha384, sha512
INTEGRITY_CHECK=(md5)
#-- Options to be used when stripping binaries. See `man strip' for details.
STRIP_BINARIES="--strip-all"
#-- Options to be used when stripping shared libraries. See `man strip' for details.
STRIP_SHARED="--strip-unneeded"
#-- Options to be used when stripping static libraries. See `man strip' for details.
STRIP_STATIC="--strip-debug"
#-- Manual (man and info) directories to compress (if zipman is specified)
MAN_DIRS=({usr{,/local}{,/share},opt/*}/{man,info})
#-- Doc directories to remove (if !docs is specified)
DOC_DIRS=(usr/{,local/}{,share/}{doc,gtk-doc} opt/*/{doc,gtk-doc})
#-- Files to be removed from all packages (if purge is specified)
PURGE_TARGETS=(usr/{,share}/info/dir .packlist *.pod)

#########################################################################
# PACKAGE OUTPUT
#########################################################################
#
# Default: put built package and cached source in build directory
#
#-- Destination: specify a fixed directory where all packages will be placed
#PKGDEST=/home/packages
#-- Source cache: specify a fixed directory where source files will be cached
#SRCDEST=/home/sources
#-- Source packages: specify a fixed directory where all src packages will be placed
#SRCPKGDEST=/home/srcpackages
#-- Log files: specify a fixed directory where all log files will be placed
#LOGDEST=/home/makepkglogs
#-- Packager: name/email of the person or organization building packages
#PACKAGER="John Doe <john@doe.com>"
#-- Specify a key to use for package signing
#GPGKEY=""

#########################################################################
# COMPRESSION DEFAULTS
#########################################################################
#
COMPRESSGZ=(gzip -c -f -n)
COMPRESSBZ2=(bzip2 -c -f)
COMPRESSXZ=(xz -c -z -)
COMPRESSLRZ=(lrzip -q)
COMPRESSLZO=(lzop -q)
COMPRESSZ=(compress -c -f)


#########################################################################
# EXTENSION DEFAULTS
#########################################################################
#
# WARNING: Do NOT modify these variables unless you know what you are
# doing.
#
PKGEXT='.pkg.tar.xz'
SRCEXT='.src.tar.gz'

# vim: set ft=sh ts=2 sw=2 et:
')

I do have MAKEFLAGS=-j4 defined in my environment, but I think that's not the issue.

Finally, I did attempt a pull request for xfs support. In my incompetence, I chopped up the modified kernel config file, ignoring changes to container support (enabling xfs disables USER_NS). So the pull was rejected. xfs support will need to be added with some kind of patch: https://github.com/archlinuxarm/PKGBUILDs/pull/1124
chjordan
 
Posts: 5
Joined: Wed Jan 28, 2015 8:25 am

Re: [ODROID-C1] kernel compilation fails

Postby moonman » Fri Apr 24, 2015 6:18 am

Ah I see now. Yeah xfs needs to be backported from later kernels to support user_ns, which may not be trivial.

Did you re-use config from your previous builds or did you adjust the latest config available on our github to support xfs. The error is with backports and it seems config was adjusted in https://github.com/archlinuxarm/PKGBUIL ... 42a5996a3b

I'll try to build it with xfs.
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3388
Joined: Sat Jan 15, 2011 3:36 am

Re: [ODROID-C1] kernel compilation fails

Postby chjordan » Fri Apr 24, 2015 6:26 am

When I want to build with xfs, I just enable the ncurses option in the PKGBUILD, then enable:

CONFIG_XFS_FS=m
CONFIG_XFS_QUOTA=y
CONFIG_XFS_POSIX_ACL=y
CONFIG_XFS_RT=y

However, in my second post of this thread, everything is vanilla. So I'm wondering if it's my system or something else... Waiting for your build results :)
chjordan
 
Posts: 5
Joined: Wed Jan 28, 2015 8:25 am

Re: [ODROID-C1] kernel compilation fails

Postby moonman » Fri Apr 24, 2015 7:55 am

Tried building right on my system. No go, same error. Tried in clean chroot and it seems to have passed the point of the error. I haven't configured chroot in anyway so it is building on 1 core and without distcc - it will take a while.

But for reference: read this to build in clean chroot: https://wiki.archlinux.org/index.php/De ... ean_Chroot but use "devtools-alarm" instead of just "devtools".

EDIT: It built fine in clean chroot. To save you some time since I already built this package it is available here and headers here:

Don't know why and how it picks up soft float cflags without chroot though. The important thing is that alarm build system always builds in a clean chroot ;)
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3388
Joined: Sat Jan 15, 2011 3:36 am

Re: [ODROID-C1] kernel compilation fails

Postby chjordan » Tue Apr 28, 2015 11:34 am

Only just noticed the edit - thanks!
chjordan
 
Posts: 5
Joined: Wed Jan 28, 2015 8:25 am

Re: [ODROID-C1] kernel compilation fails

Postby thatonedude » Tue Jun 02, 2015 5:16 pm

Hey, sorry to bring up this old thread but I also have an external drive I would like to get to work on my odroid c1. How do i install arch with the files you posted below? Thanks for any help in advance.
thatonedude
 
Posts: 2
Joined: Tue Jun 02, 2015 5:13 pm

Re: [ODROID-C1] kernel compilation fails

Postby chjordan » Wed Jun 03, 2015 12:15 am

$this->bbcode_second_pass_quote('thatonedude', 'H')ey, sorry to bring up this old thread but I also have an external drive I would like to get to work on my odroid c1. How do i install arch with the files you posted below? Thanks for any help in advance.


I assume you have an xfs drive - that's the root of my problems in this thread.

If you want to install the kernel packages provided by moonman, just download them to your odroid and install with:

$this->bbcode_second_pass_code('', 'pacman -U <path to .xz files>')

I'm still using it just fine.
chjordan
 
Posts: 5
Joined: Wed Jan 28, 2015 8:25 am

Re: [ODROID-C1] kernel compilation fails

Postby thatonedude » Wed Jun 03, 2015 5:50 am

Hey, thanks for the quick reply but unfortunately that did not work for me I am still getting the error even after a fresh install and only installing the two xz files and a full update/reboot. Is there anything I am missing?

Thanks

edit: I figured out that I shouldn't do a full upgrade after downgrading the headers and got it to work thanks for all the help.
thatonedude
 
Posts: 2
Joined: Tue Jun 02, 2015 5:13 pm


Return to ARMv7h

Who is online

Users browsing this forum: No registered users and 18 guests