You are not logged in.

#1 2013-12-12 13:06:39

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,893
Website

Building 32 bits packages under 64bit [Solved]

Followed wiki guide

https://wiki.archlinux.org/index.php/Bu … bit_system

But am getting an error when trying to build packages.

[~]$ sudo makechrootpkg -r /aur/root/dmenu-xft/dmenu-xft/
==> ERROR: This must be run in a directory containing a PKGBUILD.

Contents of dmenu-xft are

[dmenu-xft]$ ls
PKGBUILD  dmenu-4.5-xft.diff

Am I doing something wrong? or do I need a different guide?

Last edited by Mr Green (2013-12-12 15:20:27)


Mr Green

Offline

#2 2013-12-12 13:08:38

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

Re: Building 32 bits packages under 64bit [Solved]

Try clean-chroot-manager from the AUR.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#3 2013-12-12 13:10:49

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,365
Website

Re: Building 32 bits packages under 64bit [Solved]

No....    -r specifies where the chroots created with mkarchroot are.

Just use "extra-i686-build" in the directory with the PKGBUILD.  Add -r /different/path/to/chroot if /var/lib is not suitable.

Offline

#4 2013-12-12 14:56:45

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,893
Website

Re: Building 32 bits packages under 64bit [Solved]

@graysky am going to try ccm

Ceate a clean 32-bit chroot under the path defined in the aforementioned config file:

Might be going about this completely the wrong way but I want to build i686 packages under x86_64. At the moment I use a virtual machine to create i686 packages as I did not really want multi-libs on my system. Having a chroot environment seems to be the answer just got to figure out the mechanics of it.

@ Allan need to read up more on extra-i686-build

Thanks for your help


Mr Green

Offline

#5 2013-12-12 15:01:21

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,365
Website

Re: Building 32 bits packages under 64bit [Solved]

Nothing to read....    cd /dir/with/pkgbuild;  sudo extra-i686-build     done!

Offline

#6 2013-12-12 15:11:06

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

Re: Building 32 bits packages under 64bit [Solved]

Just configure ccm or ccm32 (in this case you want ccm32) in ~/.config/clean-chroot-manager.conf then cd /path/with/PKGBUILD and run `sudo ccm32 s`


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#7 2013-12-12 15:16:38

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,893
Website

Re: Building 32 bits packages under 64bit [Solved]

@Allan why did you not say that in the first place wink

@graysky will give it a go thanks again


Mr Green

Offline

#8 2013-12-12 15:28:16

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

Re: Building 32 bits packages under 64bit [Solved]

If you look at the source for ccm, it is just a wrapper for the underlying tools Allan mentions except that it maintains a nice local repo in the chroot which is very useful when building packages that have deps from the AUR.  It's also pretty easy to use I think tongue  I wrote a nice man page for it if you haven't seen it yet, `man ccm` ... enjoy.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#9 2013-12-12 16:08:44

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,893
Website

Re: Building 32 bits packages under 64bit [Solved]

Did read the man page, had never heard of extra-i686-build. Been using a long winded way to build i686 for a certain distro I will not mention. Got plenty of ram so could could build in tmpfs (for speed) but a local repo would be a better option for testing iso purposes.


Mr Green

Offline

#10 2013-12-12 16:15:46

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,893
Website

Re: Building 32 bits packages under 64bit [Solved]

This does not look good when running

sudo ccm32 s

I get....

sudo: effective uid is not 0, is /usr/bin/sudo on a file system with the 'nosuid' option set or an NFS file system without root privileges?

Mr Green

Offline

#11 2013-12-12 16:17:30

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Building 32 bits packages under 64bit [Solved]

@Mr Green, see the Developer Wiki on Building in a Clean Chroot.

Offline

#12 2013-12-12 16:25:56

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,893
Website

Re: Building 32 bits packages under 64bit [Solved]

Ah ha that is what I am looking for... thank you


Mr Green

Offline

#13 2013-12-12 16:27:14

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

Re: Building 32 bits packages under 64bit [Solved]

Mr Green wrote:

This does not look good when running

sudo ccm32 s

I get....

sudo: effective uid is not 0, is /usr/bin/sudo on a file system with the 'nosuid' option set or an NFS file system without root privileges?

If you're building in tmpfs you probably want to have an /etc/fstab entry that looks like this:

tmpfs         /scratch              tmpfs nodev,size=14G                  0 0

I'm guessing you have some option on there that is preventing the script (not ccm32 but the underlying arch build script) from running.

Adjust the size= part to meet your RAM config.  You can likely just reset the mount options without a reboot:

sudo mount -o remount,nodev,size=14G /mountpoint

Try that.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#14 2013-12-12 16:29:16

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,893
Website

Re: Building 32 bits packages under 64bit [Solved]

I changed path

CHROOTPATH32=/tmp/chroot32

Will try it with default (ie create /scratch)


Mr Green

Offline

#15 2013-12-12 16:33:02

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,893
Website

Re: Building 32 bits packages under 64bit [Solved]

Reset config file and created directories and works a treat....that is so cool wink


Mr Green

Offline

#16 2013-12-12 16:37:51

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

Re: Building 32 bits packages under 64bit [Solved]

Enjoy.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#17 2013-12-12 16:53:15

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,893
Website

Re: Building 32 bits packages under 64bit [Solved]

broadcom-wl does not build but it is looking for kernel modules ... will look into that

==> Starting build()...
make: *** /usr/lib/modules//build: No such file or directory.  Stop.
==> ERROR: A failure occurred in build().
    Aborting...
==> ERROR: Build failed, check /scratch/chroot32/mrgreen/build


_kernmajor="$(pacman -Q linux | awk '{print $2}' | cut -d - -f1 | cut -d . -f1,2)"
_extramodules="extramodules-${_kernmajor}-ARCH"
_kernver="$(cat /usr/lib/modules/${_extramodules}/version)"

From PKGBUILD

prepare() {
  cd "${srcdir}"

  patch -p1 -i linux-recent.patch
  patch -p1 -i license.patch
}

build() {
  cd "${srcdir}"

  make -C /usr/lib/modules/${_kernver}/build M=`pwd`

But that is not ccm problem


Mr Green

Offline

#18 2013-12-12 17:26:58

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

Re: Building 32 bits packages under 64bit [Solved]

EDIT: Manually assign the _kernver variable; works for me:

_kernver="3.12.4-1-ARCH"

or have a look at broadcom-wl-ck wherein I do:

_extramodules="extramodules-3.12-ck"
_kernver="$(cat /usr/lib/modules/${_extramodules}/version)"

Last edited by graysky (2013-12-12 17:35:28)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#19 2013-12-12 18:08:56

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,893
Website

Re: Building 32 bits packages under 64bit [Solved]

That is weird, works fine now... might be thinking out loud but why not just use something like

_kernver=$(uname -r)

Mr Green

Offline

#20 2013-12-12 18:12:00

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

Re: Building 32 bits packages under 64bit [Solved]

Dunno smile


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#21 2013-12-12 18:30:03

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,893
Website

Re: Building 32 bits packages under 64bit [Solved]

Anyway I can work with it, .... will post a comment on aur more to ask why than anything else

Thanks again wink


Mr Green

Offline

Board footer

Powered by FluxBB