LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   radeonhd-1.3.0 compile problem (https://www.linuxquestions.org/questions/linux-software-2/radeonhd-1-3-0-compile-problem-771254/)

business_kid 11-24-2009 11:19 AM

radeonhd-1.3.0 compile problem
 
The new version isn't going in for me. It says this:
bash-3.1$ make
Making all in src
git_version.sh: Output is new file, creating git_version.h

Which I'm suspicious of, then later
CC rhd_video.o
CC rhd_acpi.o
rhd_acpi.c: In function ‘rhdDoBacklight’:
rhd_acpi.c:66: warning: assignment from incompatible pointer type
rhd_acpi.c:70: error: dereferencing pointer to incomplete type
rhd_acpi.c:81: error: dereferencing pointer to incomplete type
make[3]: *** [radeonhd_drv_la-rhd_acpi.lo] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2


My compile line was
./configure --prefix=/usr --libdir=/usr/lib64 --sysconfdir=/etc

but make clean && ./configure && make hits the same error. The system is slamd64-12.2 (slackware-like) on kernel 2.6.30.5. Here's the code, with line 66 underlined
if (!dir)
return -1;

while ((dirent = readdir(dir)) != NULL) {
char path[PATH_MAX];
int fd_max;

10110111 11-26-2009 05:26 PM

Errors are in lines 70 & 81, not 66.

business_kid 11-27-2009 08:36 AM

Thanks. Here's a bigger snip from the code, with lines 66, 70, & 81 in bold. They might be folded in the post. I went looking for the variables to see what they were defined as (about the limits of my C). Grep said the following
bash-3.1$ grep PATH_MAX src/*
src/rhd_acpi.c:67: char path[PATH_MAX];
bash-3.1$ grep -n ACPI_PATH src/*
src/rhd_acpi.c:50:#define ACPI_PATH "/sys/class/backlight"
src/rhd_acpi.c:58: DIR *dir = opendir(ACPI_PATH);


From src/rhd_acpi.c
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

while ((dirent = readdir(dir)) != NULL) {
char path[PATH_MAX];
int fd_max;

snprintf(path,PATH_MAX,"%s/%s/max_brightness",ACPI_PATH,dirent->d_name);
if ((fd_max = open(path, O_RDONLY)) > 0) {
int max_val;

while ((read(fd_max,buf,9) == -1)
&& (errno == EINTR || errno == EAGAIN)) {};
close (fd_max);

if (sscanf(buf,"%i\n",&max_val) == 1) {
int fd;

snprintf(path,PATH_MAX,"%s/%s/%s",ACPI_PATH,dirent->d_name,
do_write ? "brightness" : "actual_brightness");
if ((fd = open(path, do_write ? O_WRONLY : O_RDONLY)) > 0) {

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

10110111 11-28-2009 10:29 AM

Seems something is wrong with struct dirent in your header files... or, maybe "dirent" pointer name conflicts with "struct dirent" type. Try renaming "dirent" pointer to some other name in rhdDoBacklight().

business_kid 11-29-2009 03:17 AM

Quote:

Originally Posted by 10110111 (Post 3772490)
Seems something is wrong with struct dirent in your header files... or, maybe "dirent" pointer name conflicts with "struct dirent" type. Try renaming "dirent" pointer to some other name in rhdDoBacklight().

Thanks. That's where I'll look. I don't really need this, I can wait for pained reactions to force a bugfix release. If they don't, I'll have to go st the box. Slamd64 is very bare bones, and may be missing some essential.

I am just irritated that there's 2 OSS drivers for my card (ATI RS690) and they are both poor performers. Ati is dividing time equally between them offering bits here and there. They have stopped development on proprietary drivers for that card. So there isn't one decent driver for it out of three.


All times are GMT -5. The time now is 04:33 PM.