Package Details: intel-power-gadget 2.5-3

Git Clone URL: https://aur.archlinux.org/intel-power-gadget.git (read-only, click to copy)
Package Base: intel-power-gadget
Description: Intel Power Gadget Linux Version
Upstream URL: https://software.intel.com/en-us/articles/intel-power-gadget-20
Licenses: custom
Submitter: bruceutut
Maintainer: bruceutut
Last Packager: bruceutut
Votes: 3
Popularity: 0.000000
First Submitted: 2016-10-29 16:03
Last Updated: 2020-02-27 02:17

Dependencies (1)

Required by (0)

Sources (1)

Latest Comments

aphirst commented on 2020-09-30 21:19

I seem to be getting the same issues as PythonNut. I'll try out using gcc-8 later on.

==> Starting build()...
gcc -g -fpic -c msr.c cpuid.c rapl.c 
rapl.c: In function ‘init_rapl’:
rapl.c:321:11: warning: implicit declaration of function ‘read_rapl_units’ [-Wimplicit-function-declaration]
  321 |     err = read_rapl_units();
      |           ^~~~~~~~~~~~~~~
gcc -g -shared -o librapl.so msr.o cpuid.o rapl.o
gcc -g -c msr.c cpuid.c rapl.c 
rapl.c: In function ‘init_rapl’:
rapl.c:321:11: warning: implicit declaration of function ‘read_rapl_units’ [-Wimplicit-function-declaration]
  321 |     err = read_rapl_units();
      |           ^~~~~~~~~~~~~~~
ar rcs librapl.a msr.o cpuid.o rapl.o
gcc -g power_gadget.c -I. -L. -lm -o power_gadget ./librapl.a
/usr/bin/ld: ./librapl.a(rapl.o):/home/adam/.cache/aurutils/sync/intel-power-gadget/src/power_gadget/rapl.h:48: multiple definition of `MAX_ENERGY_STATUS_JOULES'; /tmp/ccSObk9m.o:/home/adam/.cache/aurutils/sync/intel-power-gadget/src/power_gadget/rapl.h:48: first defined here
/usr/bin/ld: ./librapl.a(rapl.o):/home/adam/.cache/aurutils/sync/intel-power-gadget/src/power_gadget/rapl.h:49: multiple definition of `MAX_THROTTLED_TIME_SECONDS'; /tmp/ccSObk9m.o:/home/adam/.cache/aurutils/sync/intel-power-gadget/src/power_gadget/rapl.h:49: first defined here
collect2: error: ld returned 1 exit status
make: *** [Makefile:14: power_gadget_static] Error 1
==> ERROR: A failure occurred in build().
    Aborting...

lore96 commented on 2020-09-11 10:44

In my case the compilation fails if using the default gcc (which is gcc-10). Replacing "gcc" with "gcc-8" in the Makefile solves the problem.

PythonNut commented on 2020-06-25 18:54

Compilation fails again on an up-to-date system. I haven't figured out a fix yet.

gcc -g -fpic -c msr.c cpuid.c rapl.c
rapl.c: In function ‘init_rapl’:
rapl.c:321:11: warning: implicit declaration of function ‘read_rapl_units’ [-Wimplicit-function-declaration]
321 |     err = read_rapl_units();
    |           ^~~~~~~~~~~~~~~
gcc -g -shared -o librapl.so msr.o cpuid.o rapl.o
gcc -g -c msr.c cpuid.c rapl.c
rapl.c: In function ‘init_rapl’:
rapl.c:321:11: warning: implicit declaration of function ‘read_rapl_units’ [-Wimplicit-function-declaration]
321 |     err = read_rapl_units();
    |           ^~~~~~~~~~~~~~~
ar rcs librapl.a msr.o cpuid.o rapl.o
gcc -g power_gadget.c -I. -L. -lm -o power_gadget ./librapl.a
/usr/bin/ld: ./librapl.a(rapl.o):/home/pythonnut/.cache/yay/intel-power-gadget/src/power_gadget/rapl.h:48: multiple definition of `MAX_ENERGY_STATUS_JOULES'; /tmp/ccElD2b4.o:/home/pythonnut/.cache/yay/intel-power-gadget/src/power_gadget/rapl.h:48: first defined here
/usr/bin/ld: ./librapl.a(rapl.o):/home/pythonnut/.cache/yay/intel-power-gadget/src/power_gadget/rapl.h:49: multiple definition of `MAX_THROTTLED_TIME_SECONDS'; /tmp/ccElD2b4.o:/home/pythonnut/.cache/yay/intel-power-gadget/src/power_gadget/rapl.h:49: first defined here
collect2: error: ld returned 1 exit status
make: *** [Makefile:14: power_gadget_static] Error 1

hali commented on 2020-02-27 13:57

@bruceutut - 2.5-3 compiles fine, thanks!

bruceutut commented on 2020-02-27 02:21

@hali the upstream makefile dependency is not optimized for pararrel make. So i tried to fix this in prepare() please try 2.5-3.

hali commented on 2020-02-26 10:56

Compilation fails with error below for me if multiple compilation threads set in /etc/makepkg.conf (I have MAKEFLAGS="-j$(nproc)"). Worked if 'make' was changed to 'make -j1' in PKGBUILD.

==> Starting build()...
gcc -g -fpic -c msr.c cpuid.c rapl.c 
gcc -g -c msr.c cpuid.c rapl.c 
gcc -g power_gadget.c -I. -L. -lm -o power_gadget ./librapl.a
gcc: error: ./librapl.a: No such file or directory
make: *** [Makefile:14: power_gadget_static] Error 1
make: *** Waiting for unfinished jobs..