[SOLVED] package architecture is not valid

This forum is for topics specific to the Raspberry Pi and Arch Linux ARM

[SOLVED] package architecture is not valid

Postby cyring » Sat Dec 08, 2012 5:30 pm

I try, for instance to build icecream (distcc) from AUR, which ends to :
Code: Select all
...
loading packages...
error: failed to prepare transaction (package architecture is not valid)
:: package icecream-0.9.7-5-armv6l does not have a valid architecture
...


It is not specific to this package, it also fails to whatever package built with yaourt and PKGBUILD modified to
Code: Select all
arch=('armv6h')


However I do get a pkg.tar.xz in /tmp but no way to install it with
Code: Select all
# pacman -U pkgname-armv6l.pkg.tar.xz
loading packages...
error: failed to prepare transaction (package architecture is not valid)
:: package icecream-0.9.7-5-armv6l does not have a valid architecture

Or
Code: Select all
$ yaourt -U pkgname-armv6l.pkg.tar.xz
loading packages...
error: failed to prepare transaction (package architecture is not valid)
:: package icecream-0.9.7-5-armv6l does not have a valid architecture


By the way
* Arch
Code: Select all
$ uname -a
Linux RPi 3.2.27-17-ARCH+ #1 PREEMPT Thu Dec 6 17:29:12 UTC 2012 armv6l GNU/Linux

* CFlags
Code: Select all
$ cat /etc/makepkg.conf
#
CARCH="armv6l"
CHOST="armv6l-unknown-linux-gnueabihf"
#
CFLAGS="-march=armv6 -mfloat-abi=hard -mfpu=vfp -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2"
CXXFLAGS="-march=armv6 -mfloat-abi=hard -mfpu=vfp -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2"
LDFLAGS=""
#-- Make Flags: change this for DistCC/SMP systems
MAKEFLAGS="-j3"
#
BUILDENV=(fakeroot distcc color !ccache check !sign)
# The rest is default


Please, let me know what's wrong, I'm stuck :cry:
-----------------------

EDIT : the solution is to change in /etc/makepkg.conf
Code: Select all
CARCH="armv6h"
Last edited by cyring on Sun Dec 09, 2012 12:19 am, edited 3 times in total.
cyring
 
Posts: 9
Joined: Sat Dec 08, 2012 4:50 pm
Location: Paris FR

Re: package architecture is not valid

Postby pepedog » Sat Dec 08, 2012 5:34 pm

Have you messed with /etc/makepkg.conf?
armv6l, would that be armv6h needed?
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: package architecture is not valid

Postby cyring » Sat Dec 08, 2012 5:40 pm

pepedog wrote:Have you messed with /etc/makepkg.conf?
armv6l, would that be armv6h needed?

I just updated my post above with /etc/makepkg.conf

However it used to make before a Full System Upgrade, but I don't remember when it started :o
cyring
 
Posts: 9
Joined: Sat Dec 08, 2012 4:50 pm
Location: Paris FR

Re: package architecture is not valid

Postby cyring » Sat Dec 08, 2012 6:18 pm

pepedog wrote:Have you messed with /etc/makepkg.conf?
armv6l, would that be armv6h needed?


I tried armv6h or armv6 in PKGBUILD and it fails with :
Code: Select all
==> ERROR: icecream is not available for the 'armv6l' architecture.
    Note that many packages may need a line added to their PKGBUILD
    such as arch=('armv6l').


In the gcc manual -march is one of these " armv6, armv6j, armv6t2, armv6z, armv6zk, armv6-m " so why it has been v6l or v6h :roll:

I'm pretty confused (coming from Arch x86_64 ;) )
cyring
 
Posts: 9
Joined: Sat Dec 08, 2012 4:50 pm
Location: Paris FR

Re: package architecture is not valid

Postby pepedog » Sat Dec 08, 2012 7:43 pm

See if it's yaourt getting in the way
wget https://aur.archlinux.org/packages/ic/i ... eam.tar.gz
tar xf icecream.tar.gz
cd icecream
makepkg -Acs
Don't edit arch in PKGBUILD.
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: package architecture is not valid

Postby cyring » Sat Dec 08, 2012 9:51 pm

pepedog wrote:See if it's yaourt getting in the way
wget https://aur.archlinux.org/packages/ic/i ... eam.tar.gz
tar xf icecream.tar.gz
cd icecream
makepkg -Acs
Don't edit arch in PKGBUILD.

Thanks for the help but nothing better
Code: Select all
wget https://aur.archlinux.org/packages/ic/icecream/icecream.tar.gz
tar -zxvf icecream.tar.gz
cd icecream
makepkg -Acs
sudo pacman -U icecream-0.9.7-5-armv6l.pkg.tar.xz
loading packages...
error: failed to prepare transaction (package architecture is not valid)
:: package icecream-0.9.7-5-armv6l does not have a valid architecture

So far, I give up :(
cyring
 
Posts: 9
Joined: Sat Dec 08, 2012 4:50 pm
Location: Paris FR

Re: package architecture is not valid

Postby pepedog » Sat Dec 08, 2012 11:25 pm

I just built this on a fresh install,following my instructions, and package created was icecream-0.9.7-5-armv6h.pkg.tar.xz
Code: Select all
cat /etc/makepkg.conf
#
# /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 -z %u %o'
          'scp::/usr/bin/scp -C %u %o')

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

#########################################################################
# ARCHITECTURE, COMPILE FLAGS
#########################################################################
#
CARCH="armv6h"
CHOST="armv6l-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
CFLAGS="-march=armv6 -mfloat-abi=hard -mfpu=vfp -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2"
CXXFLAGS="-march=armv6 -mfloat-abi=hard -mfpu=vfp -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2"
LDFLAGS=""
#-- Make Flags: change this for DistCC/SMP systems
#MAKEFLAGS="-j2"

#########################################################################
# BUILD ENVIRONMENT
#########################################################################
#
# Defaults: BUILDENV=(fakeroot !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=(fakeroot !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 emptydirs zipman purge !upx)
#  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
#-- 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
#
OPTIONS=(strip docs libtool emptydirs zipman purge !upx)

#-- 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
#-- 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=""

#########################################################################
# EXTENSION DEFAULTS
#########################################################################
#
# WARNING: Do NOT modify these variables unless you know what you are
#          doing.
#
PKGEXT='.pkg.tar.xz'
SRCEXT='.src.tar.gz'
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: package architecture is not valid

Postby cyring » Sat Dec 08, 2012 11:40 pm

pepedog wrote:I just built this on a fresh install,following my instructions, and package created was icecream-0.9.7-5-armv6h.pkg.tar.xz
...

So the keys are armv6h and a fresh install ;)

I wonder why it happens : I received in november my RPi-B, downloaded ArchLinux ARM (systemd) @ official repository, did, since, every Full System Upgrades, and now my system is based on armv6l

Please let me know what's your repository to get packages in armv6h ?

EDIT : I will again just by changing to CARCH="armv6h"
cyring
 
Posts: 9
Joined: Sat Dec 08, 2012 4:50 pm
Location: Paris FR

Re: package architecture is not valid

Postby cyring » Sun Dec 09, 2012 12:13 am

pepedog wrote:I just built this on a fresh install,following my instructions, and package created was icecream-0.9.7-5-armv6h.pkg.tar.xz
...


:D BRAVO :D

It is solved by changing in /etc/makepkg.conf
Code: Select all
CARCH="armv6h"


Folks downloading archlinux-hf-2012-09-18.zip must be aware about that ;)

Cheers
cyring
 
Posts: 9
Joined: Sat Dec 08, 2012 4:50 pm
Location: Paris FR


Return to Raspberry Pi

Who is online

Users browsing this forum: Exabot [Bot] and 4 guests