You are not logged in.

#1 2013-09-18 14:46:58

nos09
Member
Registered: 2011-09-09
Posts: 107

[SOLVED] cant install acpi_call-git

cant install acpi_call-git from aur here is the output

Comment by CIB  (2013-08-02 13:22)
Getting errors when trying to build this, it seems to rely on something already being in /usr/lib/modules/3.10.3-1-ARCH/build

Does this rely on some kernel source package or something?

Comment by CIB  (2013-08-02 14:02)
Looks like it: linux-headers package. Could that be added to the dependencies, please?

Comment by vadimk  (2013-08-17 01:00)
I just tried to makepkg for acpi_call-git package and it fails because
of rejected acpi_call-x86_64.patch. I compared the patch and original file
and they are with the same changes. As a local fix I used:

--- PKGBUILD    2013-08-17 03:36:47.690127666 +0300
+++ PKGBUILD    2013-08-17 03:37:31.380127165 +0300
@@ -46,12 +46,6 @@
sed -i 's|/lib/modules/|/usr/lib/modules/|g' ./Makefile || return 1
fi

- ## x86_64 Patch
-  if [ "$CARCH" = "x86_64" ]; then
-      msg "Patching for x86_64 systems"
-      patch -p1 -i ${srcdir}/acpi_call-x86_64.patch
-  fi
-
## Build
make
}

I think that patch should be removed too.

Comment by jlgaddis  (2013-08-19 15:43)
Confirming `makepkg` fails and flagging as out-of-date due to contents of acpi_call-x86_64.patch being included in upstream as of 02-Jun-2013:

https://github.com/mkottman/acpi_call/commit/b41b5d9c3e309a207547eb2b3e45237fbadd0bbc

Comment by veroke  (2013-09-10 21:58)
i Just removed these lines, and it built..

## x86_64 Patch
if [ "$CARCH" = "x86_64" ]; then
msg "Patching for x86_64 systems"
patch -p1 -i ${srcdir}/acpi_call-x86_64.patch
fi  

acpi_call-git 20121230-2  (Sat Aug  7 15:33:04 IST 2010)
( Unsupported package: Potentially dangerous ! )

 - git (already installed)




Cloning into 'acpi_call'...
Checking connectivity... done
patching file acpi_call.c
Reversed (or previously applied) patch detected!  Assume -R? [n] 
Apply anyway? [n] 
Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file acpi_call.c.rej

Last edited by nos09 (2013-09-18 15:48:08)

Offline

#2 2013-09-18 14:53:31

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] cant install acpi_call-git

Post the PKGBUILD you're using.


Please don't lump AUR comments with the compilation output, it's pretty confusing.

Last edited by karol (2013-09-18 14:53:44)

Offline

#3 2013-09-18 14:57:47

nos09
Member
Registered: 2011-09-09
Posts: 107

Re: [SOLVED] cant install acpi_call-git

this is the default PKGBUILD

# Contributor: fnord0 <fnord0 AT riseup DOT net>

pkgname=acpi_call-git
pkgver=20121230
pkgrel=2
pkgdesc="kernel module that enables calls to ACPI methods through /proc/acpi/call. e.g. to turn off discrete graphics card in a dual graphics environment (like NVIDIA Optimus)"
arch=('i686' 'x86_64')
url=("http://github.com/mkottman/acpi_call")
license=('GPL')
provides=('acpi_call')
makedepends=('git')
optdepends=('linux-headers: needed if using archlinux default kernel'
	    'linux-lts-headers: needed if using the archlinux lts kernel')
install=acpi_call.install
_gitroot=("https://github.com/mkottman/acpi_call.git")
_gitname=("acpi_call")

if [ "$CARCH" = "x86_64" ]; then
  source=('acpi_call-x86_64.patch')
  sha1sums=('2cfb22deca7687b87d3cbd06dbd1d59e73210f62')
fi

build() {
  warning "Please make sure linux kernel headers are built/installed for the kernel acpi_call will be used with ::"
  warning "example #1: 'pacman -S linux-headers'"
  warning "example #2: 'pacman -S linux-lts-headers'"
  cd ${srcdir}

 ## Git checkout
  if [ -d ${srcdir}/${_gitname} ] ; then
    msg "Git checkout:  Updating existing tree"
    cd ${_gitname} && git pull origin
    msg "Git checkout:  Tree has been updated"
  else
    msg "Git checkout:  Retrieving sources"
    git clone ${_gitroot}
  fi
  msg "Checkout completed"

 ## Create an 'acpi_call-build' Directory
  rm -rf ${srcdir}/${_gitname}-build
  cp -r ${srcdir}/${_gitname} ${srcdir}/${_gitname}-build
  cd ${srcdir}/${_gitname}-build

  if [ -d /usr/lib/modules ] ; then
     sed -i 's|/lib/modules/|/usr/lib/modules/|g' ./Makefile || return 1
  fi

 ## x86_64 Patch
  if [ "$CARCH" = "x86_64" ]; then
      msg "Patching for x86_64 systems"
      patch -p1 -i ${srcdir}/acpi_call-x86_64.patch
  fi  

 ## Build
  make
}
package() {
  cd ${srcdir}/${_gitname}-build
  install -d ${pkgdir}/usr/share/${_gitname} || return 1
  install -d ${pkgdir}/usr/bin || return 1
  install -Dm755  ${srcdir}/${_gitname}-build/examples/asus1215n.sh \
    ${pkgdir}/usr/share/${_gitname} || return 1
  install -Dm755 ${srcdir}/${_gitname}-build/examples/dellL702X.sh \
    ${pkgdir}/usr/share/${_gitname} || return 1
  install -Dm755  ${srcdir}/${_gitname}-build/examples/m11xr2.sh \
    ${pkgdir}/usr/share/${_gitname} || return 1
  install -Dm755  ${srcdir}/${_gitname}-build/examples/turn_off_gpu.sh \
    ${pkgdir}/usr/share/${_gitname} || return 1
  ln -s /usr/share/${_gitname}/turn_off_gpu.sh \
    ${pkgdir}/usr/bin/turn_off_gpu.sh || return 1
  install -Dm755  ${srcdir}/${_gitname}-build/support/query_dsdt.pl \
    ${pkgdir}/usr/share/${_gitname} || return 1
  cp -R support/windump_hack \
    ${pkgdir}/usr/share/${_gitname}/
  install -Dm644 README.md \
    ${pkgdir}/usr/share/${_gitname}/README.md

  warning "The following kernel module build procedure *will fail* if your kernel headers are not built/installed!"

 ## the following code was reused from the 'bbswitch-git' PKGBUILD
  _PACKAGES=`pacman -Qsq linux`
  _KERNELS=`pacman -Ql $_packages | grep /modules.alias.bin | sed 's/.*\/lib\/modules\/\(.*\)\/modules.alias.bin/\1/g'`

   # Find all extramodules directories
  _EXTRAMODULES=`find /usr/lib/modules -name version | sed 's|\/usr\/lib\/modules\/||; s|\/version||'`

  # Loop through all detected kernels
  for _kernver in $_KERNELS; do
    msg2 "Building module for $_kernver..."

    # Loop through all detected extramodules directories
    for _moduledirs in $_EXTRAMODULES; do
      # Check which extramodules directory corresponds with the built module
      if [ `cat "/usr/lib/modules/${_moduledirs}/version"` = $_kernver ]; then
        mkdir -p "${pkgdir}/usr/lib/modules/${_moduledirs}/"
        install -D -m644 acpi_call.ko "${pkgdir}/usr/lib/modules/${_moduledirs}/"
        gzip "${pkgdir}/usr/lib/modules/${_moduledirs}/acpi_call.ko"
      fi
    done
  done
}

Offline

#4 2013-09-18 14:59:55

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] cant install acpi_call-git

Try removing

 ## x86_64 Patch
  if [ "$CARCH" = "x86_64" ]; then
      msg "Patching for x86_64 systems"
      patch -p1 -i ${srcdir}/acpi_call-x86_64.patch
  fi  

as veroke suggested in the AUR comments and try again.

Offline

#5 2013-09-18 15:12:13

nos09
Member
Registered: 2011-09-09
Posts: 107

Re: [SOLVED] cant install acpi_call-git

removed it but still not working

 makepkg PKGBUILD
==> Making package: acpi_call-git 20121230-2 (Thu Sep 19 02:08:56 IST 2013)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found acpi_call-x86_64.patch
==> Validating source files with sha1sums...
    acpi_call-x86_64.patch ... Passed
==> Extracting sources...
==> Removing existing pkg/ directory...
==> Starting build()...
==> WARNING: Please make sure linux kernel headers are built/installed for the kernel acpi_call will be used with ::
==> WARNING: example #1: 'pacman -S linux-headers'
==> WARNING: example #2: 'pacman -S linux-lts-headers'
==> Git checkout:  Updating existing tree
Already up-to-date.
==> Git checkout:  Tree has been updated
==> Checkout completed
make -C /usr/lib/modules/3.10.10-1-ARCH/build M=/home/hades/Downloads/acpi_call-git/src/acpi_call-build modules
make: *** /usr/lib/modules/3.10.10-1-ARCH/build: No such file or directory.  Stop.
make: *** [default] Error 2
==> ERROR: A failure occurred in build().
    Aborting...

Offline

#6 2013-09-18 15:13:04

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] cant install acpi_call-git

I've used the default PKGBUILD on my 32-bit system and it went just fine:

$ makepkg -si
==> Making package: acpi_call-git 20121230-2 (Wed Sep 18 17:02:03 CEST 2013)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
==> Extracting sources...
==> Removing existing pkg/ directory...
==> Starting build()...
==> WARNING: Please make sure linux kernel headers are built/installed for the kernel acpi_call will be used with ::
==> WARNING: example #1: 'pacman -S linux-headers'
==> WARNING: example #2: 'pacman -S linux-lts-headers'
==> Git checkout:  Updating existing tree
Already up-to-date.
==> Git checkout:  Tree has been updated
==> Checkout completed
make -C /usr/lib/modules/3.11.1-1-ARCH/build M=/home/karol/apps/acpi_call-git/src/acpi_call-build modules
make[1]: Entering directory `/usr/src/linux-3.11.1-1-ARCH'
  CC [M]  /home/karol/apps/acpi_call-git/src/acpi_call-build/acpi_call.o
/home/karol/apps/acpi_call-git/src/acpi_call-build/acpi_call.c: In function ‘acpi_proc_write’:
/home/karol/apps/acpi_call-git/src/acpi_call-build/acpi_call.c:273:9: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘size_t’ [-Wformat=]
         printk(KERN_ERR "acpi_call: Input too long! (%lu)\n", len);
         ^
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /home/karol/apps/acpi_call-git/src/acpi_call-build/acpi_call.mod.o
  LD [M]  /home/karol/apps/acpi_call-git/src/acpi_call-build/acpi_call.ko
make[1]: Leaving directory `/usr/src/linux-3.11.1-1-ARCH'
==> Entering fakeroot environment...
==> Starting package()...
==> WARNING: The following kernel module build procedure *will fail* if your kernel headers are not built/installed!
  -> Building module for 3.11.1-1-ARCH...
==> Tidying install...
  -> Purging unwanted files...
  -> Compressing man and info pages...
  -> Stripping unneeded symbols from binaries and libraries...
==> Creating package "acpi_call-git"...
  -> Generating .PKGINFO file...
  -> Adding install file...
  -> Generating .MTREE file...
  -> Compressing package...
==> Leaving fakeroot environment.
==> Finished making: acpi_call-git 20121230-2 (Wed Sep 18 17:02:20 CEST 2013)
==> Installing package acpi_call-git with pacman -U...
loading packages...
resolving dependencies...
looking for inter-conflicts...

Packages (1):

Name           New Version  Net Change

acpi_call-git  20121230-2     0.06 MiB

Total Installed Size:   0.06 MiB

:: Proceed with installation? [Y/n] 
(1/1) checking keys in keyring                                                                  [########################################################] 100%
(1/1) checking package integrity                                                                [########################################################] 100%
(1/1) loading package files                                                                     [########################################################] 100%
(1/1) checking for file conflicts                                                               [########################################################] 100%
(1/1) checking available disk space                                                             [########################################################] 100%
(1/1) installing acpi_call-git                                                                  [########################################################] 100%

[+] use the module -> 'modprobe acpi_call'

>>> run '/usr/bin/turn_off_gpu.sh' to test/view different acpi_call functions to see if it disables your secondary/hybrid video card
>>> FYI: there are a few scripts in '/usr/share/acpi_call/' - some for specific laptops => asus1215n.sh, dellL702X.sh, m11xr2.sh
Optional dependencies for acpi_call-git
    linux-headers: needed if using archlinux default kernel [installed]
    linux-lts-headers: needed if using the archlinux lts kernel

Are you sure you have linux-headers installed?

Offline

#7 2013-09-18 15:14:15

nos09
Member
Registered: 2011-09-09
Posts: 107

Re: [SOLVED] cant install acpi_call-git

yes i have linux-haders installed. and i have a 64-bit system

Offline

#8 2013-09-18 15:18:11

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] cant install acpi_call-git

Update your system, reboot and try again.
You should be using version 3.11.1-1 not 3.10.10-1.

Offline

#9 2013-09-18 15:47:43

nos09
Member
Registered: 2011-09-09
Posts: 107

Re: [SOLVED] cant install acpi_call-git

it installed perfectly. thank you.

Offline

#10 2013-09-18 15:59:35

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] cant install acpi_call-git

Maybe you had the current kernel already installed but you forgot to reboot?

Offline

#11 2013-09-18 21:19:14

nos09
Member
Registered: 2011-09-09
Posts: 107

Re: [SOLVED] cant install acpi_call-git

yup. i forgot to reboot. since this was the fresh installation i was installing other apps as well so it sliped my mind ... lol

Last edited by nos09 (2013-09-18 21:19:41)

Offline

Board footer

Powered by FluxBB