LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-24-2009, 11:19 AM   #1
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,373

Rep: Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336
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;
 
Old 11-26-2009, 05:26 PM   #2
10110111
Member
 
Registered: Jun 2008
Location: St.-Petersburg, Russia
Distribution: (B)LFS, Ubuntu, SliTaz
Posts: 403

Rep: Reputation: 51
Errors are in lines 70 & 81, not 66.
 
Old 11-27-2009, 08:36 AM   #3
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,373

Original Poster
Rep: Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336
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) {

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
Old 11-28-2009, 10:29 AM   #4
10110111
Member
 
Registered: Jun 2008
Location: St.-Petersburg, Russia
Distribution: (B)LFS, Ubuntu, SliTaz
Posts: 403

Rep: Reputation: 51
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().

Last edited by 10110111; 11-28-2009 at 10:32 AM.
 
Old 11-29-2009, 03:17 AM   #5
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,373

Original Poster
Rep: Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336
Quote:
Originally Posted by 10110111 View Post
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Radeonhd and Acceleration. Compile problem business_kid Linux - Software 1 08-26-2009 02:28 PM
vlc and ati radeonhd V4Nelle Linux - Software 1 07-06-2009 07:50 PM
Xinerama Support with radeonhd? Darkstar5798 Linux - Hardware 1 11-15-2008 09:48 AM
radeonhd STARHARVEST Slackware 9 08-29-2008 12:36 AM
radeonhd driver STARHARVEST SUSE / openSUSE 0 08-24-2008 11:22 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:29 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration