Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a VAIO laptop (VPCS116FG, S series). Its keyboard has sensors that can detect how bright the surrounding is, so it automatically turns on the backlight in dark places such as airplane cabins. Since I've moved to Ubuntu from Windows 7, the backlight sensor doesn't work at all.

By googling the issue, I found this website and followed the instructions, but at the compilation step, I was met with the following errors:

sa/file_funcs.c: In function ‘get_first_backlight_device_name’:
sa/file_funcs.c:44:9: warning: format ‘%li’ expects argument of type ‘long int’, but argument 2 has type ‘unsigned int’ [-Wformat]
/tmp/ccIhKx5v.o: In function `handle_acpi_events':
acpi_funcs.c:(.text+0xf8): undefined reference to `log'
acpi_funcs.c:(.text+0x109): undefined reference to `log'
acpi_funcs.c:(.text+0x120): undefined reference to `pow'
collect2: ld returned 1 exit status

How do I make it work?

share|improve this question
up vote 5 down vote accepted

I finally managed to get the thing to compile by making one slight adjustment to the compile file:

Line 16 reads:


Change it to:


Alternatively, you can issue the following two commands right before running ./compile:

echo -e "16c16\n< \$CC \$CFLAGS \$LDFLAGS \$DEFINES -o \$OUTPUT \$SRC_DIR/*.c\n---\n> \$CC \$CFLAGS \$DEFINES -o \$OUTPUT \$SRC_DIR/*.c \$LDFLAGS" >compile.patch
patch compile compile.patch
share|improve this answer
The Makefile is non-standard which causes the problem with the order of the arguments. It invokes the compiler to compile all C files in one go, which it should compile them one at a time. – user4124 Nov 6 '11 at 20:28
@user4124: It's not using a makefile - it's just a really simple Bash script. Not a recommended practice of course. – Nathan Osman Nov 6 '11 at 20:32
@GeorgeEdison I did it but the sensor still doesn't work, I guess it's 'bin' which causes the problem, getting the error "no such file or directory". do you have any ideas? – user32459 Nov 7 '11 at 12:30
@Explorer: Try creating the 'bin' directory with mkdir bin and trying the ./compile command once more. – Nathan Osman Nov 7 '11 at 17:24
With @GeorgeEdison's help, I've realized that it's a bug and should be reported. – user32459 Nov 8 '11 at 22:15

I am on VAIO VPCS123FG S Series. Googled the same issue and found a solution for my machine.

Enter the following command in the terminal:

echo 1 | sudo tee /sys/devices/platform/sony-laptop/kbd_backlight

Thanks to TechArena Community.

share|improve this answer
Excellent, thanks for sharing with us. – Gigili Feb 6 '12 at 11:52

These log() and pow() are math functions, and you need to make a tiny change to the compile file in order to make it work.

Specifically, open the compile file and replace

CFLAGS="-Wall -W -O2 -march=native -pipe"


CFLAGS="-Wall -W -O2 -lm -march=native -pipe"

The change will enable the math library 'libm' and the program will compile just fine!

share|improve this answer
Thanks. I just did it but unfortunately it didn't fix the problem. – user32459 Nov 5 '11 at 19:40

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.