You are not logged in.

#1 2009-02-12 18:03:19

markp1989
Member
Registered: 2008-10-05
Posts: 431

help with PKGBUILD

trying to install lcdproc, and gnome global menu, and i get the same error for both of them.

[mark@markspc lcdproc]$ makepkg 
==> ERROR: lcdproc is not available for the '' architecture.
    Note that many packages may need a line added to their PKGBUILD
    such as arch=('').
[mark@markspc lcdproc]$

here is the PKGBUILD for lcdproc

# Contributor: Bernhard Walle <bernhard.walle@gmx.de>
pkgname=lcdproc
pkgver=0.5.2
pkgrel=0
pkgdesc="LCDproc is a utility to drive one or more LCD (and LCD-like) devices attached to a host."
url="http://lcdproc.omnipotent.net/"
license="GPL"
depends=(libusb serdisplib libftdi autoconf automake lirc libnxml libmrss pkgconfig)
backup=(etc/LCDd.conf)
arch=('x86_64')
source=(http://switch.dl.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz
        lcdd
        lcdproc-add-serdisplib
        )
md5sums=('860f192d061d87dda6512b11b79daac2'
         '56f52dcccd6e129a9cf84cd1a0452d56'
         '274322642740ad323c43ec5d324519d4')

build() {
  cd $startdir/src/$pkgname-$pkgver
  patch -p1 < ../lcdproc-add-serdisplib
  autoreconf
  ./configure --prefix=/usr --sysconfdir=/etc --enable-libusb --enable-lcdproc-menus --enable-stat-smbfs --enable-drivers=all
  make
  make DESTDIR=$startdir/pkg install
  sed -e "s/server\/drivers\//\/usr\/lib\/lcdproc\//g" LCDd.conf > $startdir/pkg/etc/LCDd.conf
  mkdir -p $startdir/pkg/etc/rc.d
  install -m 755 $startdir/src/lcdd $startdir/pkg/etc/rc.d
}

as you can see it has the arch set. and i dont know what to do now.

I am running 64bit.

this is driving me MAD, what do i do now?

thanks Markp1989

Last edited by markp1989 (2009-02-12 18:03:59)


Desktop: E8400@4ghz - DFI Lanparty JR P45-T2RS - 4gb ddr2 800 - 30gb OCZ Vertex - Geforce 8800 GTS - 2*19" LCD
Server/Media Zotac GeForce 9300-ITX I-E - E5200 - 4gb Ram - 2* ecogreen F2 1.5tb - 1* wd green 500gb - PicoPSU 150xt - rtorrent - xbmc - ipazzport remote - 42" LCD

Offline

#2 2009-02-12 18:10:45

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: help with PKGBUILD

First off, license should be

license=('GPL')

Everything in the depends array should be 'package' instead of unquoted.

--EDIT--

And moving...

Offline

#3 2009-02-12 18:18:41

markp1989
Member
Registered: 2008-10-05
Posts: 431

Re: help with PKGBUILD

i changed the PKGBUILD as you suggested, but i still get the same error about the arch .

I have never sucessfuly build a package using arch before. i always get the same error  message, is there another config file i have to change?

thanks markp1989


# Contributor: Bernhard Walle <bernhard.walle@gmx.de>
pkgname=lcdproc
pkgver=0.5.2
pkgrel=0
pkgdesc="LCDproc is a utility to drive one or more LCD (and LCD-like) devices attached to a host."
url="http://lcdproc.omnipotent.net/"
license=('GPL')
depends=('libusb' 'serdisplib' 'libftdi' 'autoconf' 'automake' 'lirc' 'libnxml' 'libmrss' 'pkgconfig')
backup=(etc/LCDd.conf)
arch=('x86_64')
source=(http://switch.dl.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz
        lcdd
        lcdproc-add-serdisplib
        )
md5sums=('860f192d061d87dda6512b11b79daac2'
         '56f52dcccd6e129a9cf84cd1a0452d56'
         '274322642740ad323c43ec5d324519d4')

build() {
  cd $startdir/src/$pkgname-$pkgver
  patch -p1 < ../lcdproc-add-serdisplib
  autoreconf
  ./configure --prefix=/usr --sysconfdir=/etc --enable-libusb --enable-lcdproc-menus --enable-stat-smbfs --enable-drivers=all
  make
  make DESTDIR=$startdir/pkg install
  sed -e "s/server\/drivers\//\/usr\/lib\/lcdproc\//g" LCDd.conf > $startdir/pkg/etc/LCDd.conf
  mkdir -p $startdir/pkg/etc/rc.d
  install -m 755 $startdir/src/lcdd $startdir/pkg/etc/rc.d
}

Desktop: E8400@4ghz - DFI Lanparty JR P45-T2RS - 4gb ddr2 800 - 30gb OCZ Vertex - Geforce 8800 GTS - 2*19" LCD
Server/Media Zotac GeForce 9300-ITX I-E - E5200 - 4gb Ram - 2* ecogreen F2 1.5tb - 1* wd green 500gb - PicoPSU 150xt - rtorrent - xbmc - ipazzport remote - 42" LCD

Offline

#4 2009-02-12 20:40:23

kludge
Member
Registered: 2008-08-03
Posts: 294

Re: help with PKGBUILD

makepkg relies on the variable CARCH to 'know' what your processor architecture is so it can (a) check if the PKGBUILD in question supports that architecture and (b) pass it on to the configure and make scripts.  makepkg will fail if the value of CARCH is not in the arch=() array (grep "not available" /usr/bin/makepkg... the code that produces your error starts at line 1456).    unless you're setting CARCH in your evironment somewhere, it needs to be set manually at each compile.  however, makepkg has a configuration file to maintain certain values across all compiles.  bet you a nickel you don't have CARCH set in your makepkg.conf.

Last edited by kludge (2009-02-12 20:44:43)


[23:00:16]    dr_kludge | i want to invent an olfactory human-computer interface, integrate it into the web standards, then produce my own forked browser.
[23:00:32]    dr_kludge | can you guess what i'd call it?
[23:01:16]    dr_kludge | nosilla.
[23:01:32]    dr_kludge | i really should be going to bed.  i'm giggling madly about that.

Offline

#5 2009-02-12 20:52:23

markp1989
Member
Registered: 2008-10-05
Posts: 431

Re: help with PKGBUILD

so i have to set "carch=('x86_64')" in the PKGBUILD?


Desktop: E8400@4ghz - DFI Lanparty JR P45-T2RS - 4gb ddr2 800 - 30gb OCZ Vertex - Geforce 8800 GTS - 2*19" LCD
Server/Media Zotac GeForce 9300-ITX I-E - E5200 - 4gb Ram - 2* ecogreen F2 1.5tb - 1* wd green 500gb - PicoPSU 150xt - rtorrent - xbmc - ipazzport remote - 42" LCD

Offline

#6 2009-02-12 20:55:23

markp1989
Member
Registered: 2008-10-05
Posts: 431

Re: help with PKGBUILD

here is my makepkg.conf

#
# /etc/makepkg.conf
#

#########################################################################
# SOURCE ACQUISITION
#########################################################################
#
#-- The download utilities that makepkg should use to acquire sources
#  Format: 'protocol::agent'
DLAGENTS=('ftp::/usr/bin/wget -c --passive-ftp -t 3 --waitretry=3 -O %o %u'
          'http::/usr/bin/wget -c -t 3 --waitretry=3 -O %o %u'
          'https::/usr/bin/wget -c -t 3 --waitretry=3 --no-check-certificate -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/curl

#########################################################################
# ARCHITECTURE, COMPILE FLAGS
#########################################################################
#
#CHOST="x86_64-pc-linux-gnu"
#CFLAGS="-march=nocona -O2 -pipe"
#CXXFLAGS="${CFLAGS}"

CHOST="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe -fomit-frame-pointer"
CXXFLAGS="${CFLAGS}"


#-- Exclusive: will only run on -march=x86-64 
# -march (or -mcpu) builds exclusively for an architecture
# -mtune optimizes for an architecture, but builds for whole processor family
CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe"
CXXFLAGS="-march=x86-64 -mtune=generic -O2 -pipe"
#-- Make Flags: change this for DistCC/SMP systems
#MAKEFLAGS="-j2"

#########################################################################
# BUILD ENVIRONMENT
#########################################################################
#
# Defaults: BUILDENV=(fakeroot !distcc color !ccache !xdelta)
#  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
#-- xdelta:   Generate delta patch from previous to current package
#
BUILDENV=(fakeroot !distcc color !ccache !xdelta)
#
#-- 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=""

#########################################################################
# GLOBAL PACKAGE OPTIONS
#   These are default values for the options=() settings
#########################################################################
#
# Default: OPTIONS=(strip docs libtool emptydirs zipman)
#  A negated option will do the opposite of the comments below.
#
#-- strip:     Strip symbols from binaries/libraries
#-- docs:      Save doc and info directories
#-- libtool:   Leave libtool (.la) files in packages
#-- emptydirs: Leave empty directories in packages
#-- zipman:    Compress manpages with gzip
#
OPTIONS=(strip docs libtool emptydirs zipman)

#-- File integrity checks to use. Valid: md5, sha1, sha256, sha384, sha512
INTEGRITY_CHECK=(md5)
#-- Info and doc directories to remove (if option set correctly above)
DOC_DIRS=(usr/{,share/}{info,doc,gtk-doc} opt/*/{info,doc,gtk-doc})
#-- Directories to be searched for the strip option (if option set correctly above)
STRIP_DIRS=(bin lib sbin usr/{bin,lib,sbin,local/{bin,lib,sbin}} opt/*/{bin,lib,sbin})

#########################################################################
# 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
#-- Packager: name/email of the person or organization building packages
#PACKAGER="John Doe <john@doe.com>"

#########################################################################
# BUILDSCRIPT/EXTENSION DEFAULTS
#########################################################################
#
# WARNING: Do NOT modify these variables unless you know what you are
#          doing.
#
BUILDSCRIPT='PKGBUILD'
PKGEXT='.pkg.tar.gz'
SRCEXT='.src.tar.gz'
DB_COMPRESSION='gz'
DB_CHECKSUMS=(md5)

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

Desktop: E8400@4ghz - DFI Lanparty JR P45-T2RS - 4gb ddr2 800 - 30gb OCZ Vertex - Geforce 8800 GTS - 2*19" LCD
Server/Media Zotac GeForce 9300-ITX I-E - E5200 - 4gb Ram - 2* ecogreen F2 1.5tb - 1* wd green 500gb - PicoPSU 150xt - rtorrent - xbmc - ipazzport remote - 42" LCD

Offline

#7 2009-02-12 20:55:55

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: help with PKGBUILD

execute this and see if it looks like mine:

$ grep CARCH /etc/makepkg.conf
CARCH="x86_64"

if not, then edit /etc/makepkg.conf and make it so smile

if so, then that's not your issue sad

edit: you answered before i could ask... you should know what to do now though...

Last edited by brisbin33 (2009-02-12 20:56:38)

Offline

#8 2009-02-12 20:56:12

kludge
Member
Registered: 2008-08-03
Posts: 294

Re: help with PKGBUILD

markp1989 wrote:

so i have to set "carch=('x86_64')" in the PKGBUILD?

no.  read my previous post again, and then 'man makepkg,' the CONFIGURATION section in particular.


[23:00:16]    dr_kludge | i want to invent an olfactory human-computer interface, integrate it into the web standards, then produce my own forked browser.
[23:00:32]    dr_kludge | can you guess what i'd call it?
[23:01:16]    dr_kludge | nosilla.
[23:01:32]    dr_kludge | i really should be going to bed.  i'm giggling madly about that.

Offline

#9 2009-02-12 20:59:56

markp1989
Member
Registered: 2008-10-05
Posts: 431

Re: help with PKGBUILD

kludge wrote:
markp1989 wrote:

so i have to set "carch=('x86_64')" in the PKGBUILD?

no.  read my previous post again, and then 'man makepkg,' the CONFIGURATION section in particular.

i just ran  export CARCH="x86_64" in terminal, and now makepkg starts to run, thanks for the help.


Desktop: E8400@4ghz - DFI Lanparty JR P45-T2RS - 4gb ddr2 800 - 30gb OCZ Vertex - Geforce 8800 GTS - 2*19" LCD
Server/Media Zotac GeForce 9300-ITX I-E - E5200 - 4gb Ram - 2* ecogreen F2 1.5tb - 1* wd green 500gb - PicoPSU 150xt - rtorrent - xbmc - ipazzport remote - 42" LCD

Offline

#10 2009-02-12 21:05:36

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: help with PKGBUILD

markp1989 wrote:
kludge wrote:
markp1989 wrote:

so i have to set "carch=('x86_64')" in the PKGBUILD?

no.  read my previous post again, and then 'man makepkg,' the CONFIGURATION section in particular.

i just ran  export CARCH="x86_64" in terminal, and now makepkg starts to run, thanks for the help.

that defined the CARCH variable for this session, it'll clear next time you logout; i suggest you take kludges advice and add it /etc/makepkg.conf; i dunno why it wasn't there already (it goes right above the CHOST line)

Offline

#11 2009-02-12 21:06:05

alienman
Member
From: Mexico
Registered: 2008-07-08
Posts: 106

Re: help with PKGBUILD

But export will not be saved trough reboots so preferably set that in the makepg.conf file as described before.


ISC - Ignacio Marmolejo
ArchLinux & GNOME User.

Offline

#12 2009-02-12 21:09:17

kludge
Member
Registered: 2008-08-03
Posts: 294

Re: help with PKGBUILD

@brisbin33 and alienman: aww, come on, you're *giving* the answers!


[23:00:16]    dr_kludge | i want to invent an olfactory human-computer interface, integrate it into the web standards, then produce my own forked browser.
[23:00:32]    dr_kludge | can you guess what i'd call it?
[23:01:16]    dr_kludge | nosilla.
[23:01:32]    dr_kludge | i really should be going to bed.  i'm giggling madly about that.

Offline

#13 2009-02-12 21:29:05

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: help with PKGBUILD

kludge wrote:

@brisbin33 and alienman: aww, come on, you're *giving* the answers!

i know, i know, i'm too nice.  i thought my grep suggestion was a good clue bat though wink

Offline

#14 2009-02-12 21:57:50

alienman
Member
From: Mexico
Registered: 2008-07-08
Posts: 106

Re: help with PKGBUILD

I'm sorry too I just wanted to point the difference between an export statement and saving configuration throughout files so they are loaded again when the system reboots.


Greetings everyone.


ISC - Ignacio Marmolejo
ArchLinux & GNOME User.

Offline

#15 2009-02-12 22:08:35

kludge
Member
Registered: 2008-08-03
Posts: 294

Re: help with PKGBUILD

oi... we've totally hijacked this thread.  i was (pretty much) just joking.

@markp1989: i'm glad you've got it working.  i did notice this about your PKGBUILD, tho:

pkgrel=0

if you ever want to release that into the wild, read the wiki page on PKGBUILDS, in particular:

pkgrel: This should be incremented each time you release a package, starting with 1. Its purpose is to differentiate consecutive builds of the same version of a package. Occasionally the first release of a package contains a problem or misfeature. When you make the second release, you increment the pkgrel variable so that pacman knows it needs to be reinstalled. When a new version of the package is released, you reset the pkgrel variable to 1.

Last edited by kludge (2009-02-12 22:09:09)


[23:00:16]    dr_kludge | i want to invent an olfactory human-computer interface, integrate it into the web standards, then produce my own forked browser.
[23:00:32]    dr_kludge | can you guess what i'd call it?
[23:01:16]    dr_kludge | nosilla.
[23:01:32]    dr_kludge | i really should be going to bed.  i'm giggling madly about that.

Offline

#16 2009-04-16 02:40:14

jspaces
Member
From: Canada
Registered: 2009-04-16
Posts: 21

Re: help with PKGBUILD

Excellent an easy fix. I was having the same problem with my new x86_64 Arch installation, (thinking what the <insert four letter word> did I do wrong roll & start over). Thankfully this post pointed to the changing the default ARCH line to CARCH in /etc/makepkg.conf. It was frustrating when nothing would makepkg. Every package would complain that "<package> is not available for the '' architecture" error.

Thank you to kludge, brisbin33 & alienman. wink

Last edited by jspaces (2009-04-16 02:40:59)


Knowledge is a beam of light in which humans can only see the reflection.

Offline

Board footer

Powered by FluxBB