Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 616764 - app-cdr/cdrtools-3.02_alpha06 and alpha07 do not build on ARMv7a
Summary: app-cdr/cdrtools-3.02_alpha06 and alpha07 do not build on ARMv7a
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: ARM Linux
: Normal major (vote)
Assignee: Daniel Pielmeier
URL:
Whiteboard:
Keywords:
: 616766 616768 616770 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-04-27 17:05 UTC by John Bowler
Modified: 2017-04-29 15:49 UTC (History)
1 user (show)

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


Attachments
/home/gentoo/build/portage/app-cdr/cdrtools-3.02_alpha06/temp/build.log (build.log,2.42 KB, text/plain)
2017-04-27 17:14 UTC, John Bowler
Details
/home/gentoo/build/portage/app-cdr/cdrtools-3.02_alpha06/temp/environment (environment,96.29 KB, text/plain)
2017-04-27 17:15 UTC, John Bowler
Details
RULES/rules.cnf (rules.cnf,2.66 KB, text/plain)
2017-04-27 17:30 UTC, John Bowler
Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Bowler 2017-04-27 17:05:12 UTC
+ mkdir -p incs/arm-linux-cc
        ==> CONFIGURING RULES "incs/arm-linux-cc/rules.cnf"
using gcc as compiler
configure: error: -march=armv7-a: invalid option; use --help to show usage
RULES/rules.cnf:71: incs/arm-linux-cc/rules.cnf: No such file or directory

That -march flag is valid for the installed GCC, I don't know why configure is complaining about it.  First detected with ~arm (alpha07) while trying to build KDE for this machine, I then masked alpha07 and reproed the problem with the supposedly stable alpha06:

utilite portage # emerge -pqv '=app-cdr/cdrtools-3.02_alpha06::gentoo'
[ebuild  N    ] app-cdr/cdrtools-3.02_alpha06  USE="acl filecaps nls unicode -caps" 

utilite portage # emerge --info '=app-cdr/cdrtools-3.02_alpha06::gentoo'
Portage 2.3.5 (python 3.4.6-final-0, default/linux/arm/13.0/armv7a, gcc-5.4.0, glibc-2.23-r3, 3.0.35-cm-fx6-6.4-dirty armv7l)
=================================================================
                         System Settings
=================================================================
System uname: Linux-3.0.35-cm-fx6-6.4-dirty-armv7l-with-gentoo-2.3
KiB Mem:     2006480 total,    438736 free
KiB Swap:    4193272 total,   4189160 free
Timestamp of repository gentoo: Thu, 27 Apr 2017 10:00:01 +0000
sh bash 4.4_p12
ld GNU ld (Gentoo 2.27 p1.0) 2.27
distcc 3.2rc1 armv7a-hardfloat-linux-gnueabi [enabled]
app-shells/bash:          4.4_p12::gentoo
dev-lang/perl:            5.24.1-r1::gentoo
dev-lang/python:          2.7.13::gentoo, 3.4.6::gentoo
dev-util/cmake:           3.8.0::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.3::gentoo
sys-apps/openrc:          0.25::gentoo
sys-apps/sandbox:         2.10-r4::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r2::gentoo
sys-devel/automake:       1.13.4-r1::gentoo, 1.14.1-r1::gentoo, 1.15-r2::gentoo
sys-devel/binutils:       2.27::gentoo
sys-devel/gcc:            5.4.0-r3::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r4::gentoo
sys-devel/make:           4.2.1-r1::gentoo                                       
sys-kernel/linux-headers: 4.10::gentoo (virtual/os-headers)                      
sys-libs/glibc:           2.23-r3::gentoo                                        
Repositories:                                                                    
                                                                                 
gentoo                                                                           
    location: /home/gentoo/portage                                               
    sync-type: rsync                                                             
    sync-uri: rsync://hippopopus.jbowler.com/gentoo-portage                      
    priority: -1000                                                              

utilite-jbowler-com
    location: /home/gentoo/overlay
    masters: gentoo
    priority: 0

ACCEPT_KEYWORDS="arm ~arm"
ACCEPT_LICENSE="* -@EULA"
CBUILD="armv7a-hardfloat-linux-gnueabi"
CC="gcc -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard"
CFLAGS="-march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard -Os -g -fexceptions"
CHOST="armv7a-hardfloat-linux-gnueabi"
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"
CXX="g++ -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard"
CXXFLAGS="-march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard -Os -g"
DISTDIR="/home/gentoo/distfiles"
FCFLAGS="-O2 -pipe -march=armv7-a"
FEATURES="assume-digests binpkg-logs buildpkg compressdebug config-protect-if-modified distcc distlocks ebuild-locks fixlafiles installsources merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe -march=armv7-a"
GENTOO_MIRRORS="ftp://hippopopus.jbowler.com/ http://lug.mtu.edu/gentoo/ ftp://lug.mtu.edu/gentoo/ ftp://gentoo.llarian.net/pub/gentoo http://gentoo.llarian.net/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="--jobs=8 --load-average=5.5"
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="/home/gentoo/build"
USE="X a52 aac acl acpi alsa arm armv5te armv6 armv6t2 berkdb bluetooth branding bzip2 cairo cdda cdr cli consolekit cracklib crypt cups cxx dbus declarative dri dts dvd dvdr emboss encode exif fam firefox flac fortran gdbm gif glamor gpm gtk iconv ipv6 jack jpeg jpeg2k kde kipi kwallet lcms ldap libnotify mad mng modules mp3 mp4 mpeg ncurses nls nptl ogg opengl openmp pam pango pcre pdf phonon plasma png policykit ppds qml qt3support qt4 qt5 readline sdl seccomp session spell ssl startup-notification svg tcpd threads tiff truetype udev udisks unicode upower usb vorbis widgets wxwidgets x264 xattr xcb xcomposite xinerama xml xscreensaver xv xvid zlib" 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="kexi words flow plan sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_ARM="edsp thumb thumb2 v4 v5 v6 v7 vfp" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock 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" LINGUAS="en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby21 ruby22 ruby24" USERLAND="GNU" VIDEO_CARDS="fbdev" 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:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Brian Evans Gentoo Infrastructure gentoo-dev 2017-04-27 17:08:59 UTC
*** Bug 616766 has been marked as a duplicate of this bug. ***
Comment 2 Brian Evans Gentoo Infrastructure gentoo-dev 2017-04-27 17:09:03 UTC
*** Bug 616768 has been marked as a duplicate of this bug. ***
Comment 3 Brian Evans Gentoo Infrastructure gentoo-dev 2017-04-27 17:09:07 UTC
*** Bug 616770 has been marked as a duplicate of this bug. ***
Comment 4 John Bowler 2017-04-27 17:14:47 UTC
Created attachment 471096 [details]
/home/gentoo/build/portage/app-cdr/cdrtools-3.02_alpha06/temp/build.log
Comment 5 John Bowler 2017-04-27 17:15:40 UTC
Created attachment 471098 [details]
/home/gentoo/build/portage/app-cdr/cdrtools-3.02_alpha06/temp/environment
Comment 6 John Bowler 2017-04-27 17:30:24 UTC
Created attachment 471100 [details]
RULES/rules.cnf

The bug is caused by bad quoting, this is the definition of CONFFLAGS in rules.cnf (a machine generated file):

CONFFLAGS +=    -cc=gcc -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard

The stuff after the '=' is the value of ${CC} from /etc/portage/make.conf; it should all be in ""

I'll test the workround of putting the options that select the C compiler into CFLAGS; this breaks on other projects.
Comment 7 John Bowler 2017-04-27 17:59:10 UTC
Using:

CC="gcc"
CXX="g++"

via package.env allows me to build and install cdrtools
Comment 8 Daniel Pielmeier gentoo-dev 2017-04-29 07:49:55 UTC
I am not familiar with the arm architecture but do you really need to define CC and CXX in make.conf?

Isn't it sufficient to define only CHOST CFLAGS and CXXFLAGS?

CHOST="armv7a-hardfloat-linux-gnueabi"
CFLAGS="-march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard -Os -g -fexceptions"
CXXFLAGS="-march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard -Os -g"
Comment 9 John Bowler 2017-04-29 15:49:43 UTC
With most packages architecture specific flags can be included in CFLAGS or CXXFLAGS, but some packages removed or objected to them or fail to build.  In the end my fix was to put them in both.  Note that the order is:

$(CC) $(AM_CFLAGS) $(CFLAGS)

So packages that insist on putting -mfpu=neon in AM_CFLAGS then assuming it is there (two big mistakes in my opinion) fail to build if the architecture flags (specifically the FPU target) are in CFLAGS.

Anyway, it's moot; it looks like a straightforward quoting bug in the cdrtools build mechanism.