Friday, May 10, 2024
 Popular · Latest · Hot · Upcoming
5
rated 0 times [  5] [ 0]  / answers: 1 / hits: 2471  / 3 Years ago, tue, august 17, 2021, 3:22:29

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?


More From » 11.10

 Answers
4

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



Line 16 reads:



$CC $CFLAGS $LDFLAGS $DEFINES -o $OUTPUT $SRC_DIR/*.c


Change it to:



$CC $CFLAGS $DEFINES -o $OUTPUT $SRC_DIR/*.c $LDFLAGS





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



echo -e "16c16
< $CC $CFLAGS $LDFLAGS $DEFINES -o $OUTPUT $SRC_DIR/*.c
---
> $CC $CFLAGS $DEFINES -o $OUTPUT $SRC_DIR/*.c $LDFLAGS" >compile.patch
patch compile compile.patch

[#42273] Wednesday, August 18, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
suitman

Total Points: 487
Total Questions: 105
Total Answers: 98

Location: India
Member since Wed, Aug 4, 2021
3 Years ago
;