LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 01-09-2007, 08:08 PM   #1
nonis
Member
 
Registered: Jan 2007
Posts: 95

Rep: Reputation: 15
alsa 1.0.14rc compile error


Code:
In file included from /home/nonis/sources/alsa/alsa-driver-1.0.14rc1/acore/memal
loc.inc:13,
                 from /home/nonis/sources/alsa/alsa-driver-1.0.14rc1/acore/memal
loc.c:1:
/home/nonis/sources/alsa/alsa-driver-1.0.14rc1/include/adriver.h:776: error: red
efinition of 'jiffies_to_msecs'
include/linux/jiffies.h:268: error: previous definition of 'jiffies_to_msecs' wa
s here
/home/nonis/sources/alsa/alsa-driver-1.0.14rc1/include/adriver.h:795: error: red
efinition of 'msecs_to_jiffies'
include/linux/jiffies.h:290: error: previous definition of 'msecs_to_jiffies' wa
s here
/home/nonis/sources/alsa/alsa-driver-1.0.14rc1/include/adriver.h: In function `s
nd_pci_orig_save_state':
/home/nonis/sources/alsa/alsa-driver-1.0.14rc1/include/adriver.h:1134: error: to
o many arguments to function `pci_save_state'
/home/nonis/sources/alsa/alsa-driver-1.0.14rc1/include/adriver.h: In function `s
nd_pci_orig_restore_state':
/home/nonis/sources/alsa/alsa-driver-1.0.14rc1/include/adriver.h:1138: error: to
o many arguments to function `pci_restore_state'
make[4]: *** [/home/nonis/sources/alsa/alsa-driver-1.0.14rc1/acore/memalloc.o] E
rror 1
make[3]: *** [/home/nonis/sources/alsa/alsa-driver-1.0.14rc1/acore] Error 2
make[2]: *** [_module_/home/nonis/sources/alsa/alsa-driver-1.0.14rc1] Error 2
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.19.1'
make: *** [compile] Error 2
I've seen this problem in a few posts, even a similar one on this site. I have yet to see a fix, though. Supposedly rc1 fixed this, but it doesn't look that way.

Anyone know how to fix this?
 
Old 01-10-2007, 04:10 PM   #2
nonis
Member
 
Registered: Jan 2007
Posts: 95

Original Poster
Rep: Reputation: 15
Just to add... I also tried getting the HG version of this, and got the same error.

Does anybody know a solution to this? Should I go back and rebuild the kernel with the alsa driver instead, and just not have the absolute newest version? Does anyone know where I can find out what version of alsa the 2.6.19.1 kernel includes?
 
Old 01-11-2007, 01:51 PM   #3
nonis
Member
 
Registered: Jan 2007
Posts: 95

Original Poster
Rep: Reputation: 15
Nobody has any ideas about this? I tried the kernel included alsa driver, but I don't know what version of alsa-utils to use.
 
Old 01-11-2007, 09:51 PM   #4
studioj
Member
 
Registered: Oct 2006
Posts: 460

Rep: Reputation: 31
OK i think i kind of recognize this.
there is a problem with the configure script making a bad Makefile
the only thing i can think of is to try newer cvs version to see if its fixed
 
Old 01-12-2007, 01:38 PM   #5
nonis
Member
 
Registered: Jan 2007
Posts: 95

Original Poster
Rep: Reputation: 15
I tried the latest Hg version. Alsa uses Hg, not CVS, right?

Thanks for trying to help, though. I'm really stumped on this.

Last edited by nonis; 01-12-2007 at 01:39 PM.
 
Old 01-12-2007, 07:28 PM   #6
studioj
Member
 
Registered: Oct 2006
Posts: 460

Rep: Reputation: 31
it has to do with the configure not finding the kernel capabilities.
somehow you need what would be for me
-I/usr/src/linux-2.6.18/include/asm-i386/mach-generic
in the makefile

i think but am not sure
that might keep jiffies.h from getting drawn into it all
might be more complicated than that
wish i could help more no way here to duplicate problem
 
Old 01-12-2007, 10:18 PM   #7
nonis
Member
 
Registered: Jan 2007
Posts: 95

Original Poster
Rep: Reputation: 15
Again thanks for the attempt, but I still got the same error. I already had a line like that, but including mach-default instead. I tried adding one for generic and that did not work
 
Old 01-14-2007, 09:57 PM   #8
nonis
Member
 
Registered: Jan 2007
Posts: 95

Original Poster
Rep: Reputation: 15
Still open to suggestions, although I have posted a bug report on alsa's site.
 
Old 01-14-2007, 10:51 PM   #9
studioj
Member
 
Registered: Oct 2006
Posts: 460

Rep: Reputation: 31
ok the ultimate dirty hack
see if you can just let the driver use its own version of these functions
go into kernel source (make sure you back up the file jiffies.h so you can put it back the way it was)
for me
/usr/src/linux-2.6.18/include/linux/jiffies.h
comment out at the bottom with // the two lines to look like this
Code:
//extern unsigned int jiffies_to_msecs(const unsigned long j);
//extern unsigned long msecs_to_jiffies(const unsigned int m);
 
Old 01-15-2007, 02:33 PM   #10
nonis
Member
 
Registered: Jan 2007
Posts: 95

Original Poster
Rep: Reputation: 15
I think that perhaps this has to do with the problem. It seems that from 2.6.18 to 2.6.19 this function has moved. There no longer is a jiffies.h.

Maybe this is the problem, but I was told that alsa's 1.0.14rc1 was supposed to fix problems related to 2.6.19.1.
 
Old 01-15-2007, 10:01 PM   #11
studioj
Member
 
Registered: Oct 2006
Posts: 460

Rep: Reputation: 31
yea the solution is way above my pay grade
so i'm just wasting your time here but
your compiler output shows a reference to the file
Quote:
include/linux/jiffies.h:290: error: previous definition of 'msecs_to_jiffies' wa
s here
could be you are pointed to the wrong kernel source code ?
perhaps this is why kernel capabilities are not being detected properly.
 
Old 01-16-2007, 02:53 PM   #12
nonis
Member
 
Registered: Jan 2007
Posts: 95

Original Poster
Rep: Reputation: 15
Eh. Embarrassing, but I was looking in the wrong directory. I forgot to go into linux/. Anyway, I found the file.

Mine is not extern, though. It's static. Used to be in a different file and now it's here or something? I'll still try commenting it out, but I wonder if that has anything to do with the problem.

Edit: Tried commenting it, but I end up getting some other errors still. I see that I originally got them, too. snd_pci_orig_save_state and others have problems with number of arguments. I think I will wait until I get a response on the alsa bug list, instead of hacking it up myself, because I don't know too much about this.

Last edited by nonis; 01-16-2007 at 03:04 PM.
 
Old 02-03-2007, 06:17 PM   #13
nonis
Member
 
Registered: Jan 2007
Posts: 95

Original Poster
Rep: Reputation: 15
alsa 1.0.14rc2 compile error (New Questions...)

Well, I'm still trying to figure this out. I've posted a bug report on alsa, but in the past month haven't received help with it (I'm pretty sure the person mine was assigned to is gone.)

But, here's what I've just figured out myself. Configure writes these:

checking for kernel linux/jiffies.h... yes

checking for msecs_to_jiffies... no

I'm using rc2 now, by the way.

Code:
So, it finds jiffies.h, but not msecs_to_jiffies, which I know exists in jiffies.h.
Is this possibly a check to see whether alsa should include it's jiffies code, based on whether or not you have msecs_to_jiffies?

I'm including the significant part of config.h which says why it can't find msecs_to_jiffies, if anyone wants to take a look:

configure:9410: checking for msecs_to_jiffies
configure:9446: gcc -c -Wall -fno-strict-aliasing -I/usr/include -I/lib/modules/2.6.19.1/build/include -I/lib/modules/2.6.
In file included from /lib/modules/2.6.19.1/build/include/linux/jiffies.h:4,
                 from conftest.c:28:
/lib/modules/2.6.19.1/build/include/linux/calc64.h: In function `div_long_long_rem_signed':
/lib/modules/2.6.19.1/build/include/linux/calc64.h:40: warning: implicit declaration of function `unlikely'
In file included from conftest.c:28:
/lib/modules/2.6.19.1/build/include/linux/jiffies.h:271:47: division by zero in #if
In file included from conftest.c:28:
/lib/modules/2.6.19.1/build/include/linux/jiffies.h: In function `jiffies_to_msecs':
/lib/modules/2.6.19.1/build/include/linux/jiffies.h:274: error: `MSEC_PER_SEC' undeclared (first use in this function)
/lib/modules/2.6.19.1/build/include/linux/jiffies.h:274: error: (Each undeclared identifier is reported only once
/lib/modules/2.6.19.1/build/include/linux/jiffies.h:274: error: for each function it appears in.)
/lib/modules/2.6.19.1/build/include/linux/jiffies.h:282:47: division by zero in #if 
/lib/modules/2.6.19.1/build/include/linux/jiffies.h: In function `jiffies_to_usecs':
/lib/modules/2.6.19.1/build/include/linux/jiffies.h:285: error: `USEC_PER_SEC' undeclared (first use in this function)
/lib/modules/2.6.19.1/build/include/linux/jiffies.h:295:47: division by zero in #if 
/lib/modules/2.6.19.1/build/include/linux/jiffies.h: In function `msecs_to_jiffies':
/lib/modules/2.6.19.1/build/include/linux/jiffies.h:298: error: `MSEC_PER_SEC' undeclared (first use in this function)
/lib/modules/2.6.19.1/build/include/linux/jiffies.h:308:47: division by zero in #if 
/lib/modules/2.6.19.1/build/include/linux/jiffies.h: In function `usecs_to_jiffies':
/lib/modules/2.6.19.1/build/include/linux/jiffies.h:311: error: `USEC_PER_SEC' undeclared (first use in this function)
/lib/modules/2.6.19.1/build/include/linux/jiffies.h: At top level:
/lib/modules/2.6.19.1/build/include/linux/jiffies.h:328: error: conflicting types for 'timespec_to_jiffies'
/usr/include/linux/time.h:33: error: previous definition of 'timespec_to_jiffies' was here
/lib/modules/2.6.19.1/build/include/linux/jiffies.h: In function `timespec_to_jiffies':
/lib/modules/2.6.19.1/build/include/linux/jiffies.h:332: error: `NSEC_PER_SEC' undeclared (first use in this function)
/lib/modules/2.6.19.1/build/include/linux/jiffies.h: At top level:
/lib/modules/2.6.19.1/build/include/linux/jiffies.h:344: error: redefinition of 'jiffies_to_timespec'
/usr/include/linux/time.h:46: error: previous definition of 'jiffies_to_timespec' was here
/lib/modules/2.6.19.1/build/include/linux/jiffies.h: In function `jiffies_to_timespec':
/lib/modules/2.6.19.1/build/include/linux/jiffies.h:350: error: `NSEC_PER_SEC' undeclared (first use in this function)
/lib/modules/2.6.19.1/build/include/linux/jiffies.h: In function `timeval_to_jiffies':
/lib/modules/2.6.19.1/build/include/linux/jiffies.h:371: error: `NSEC_PER_SEC' undeclared (first use in this function) 
/lib/modules/2.6.19.1/build/include/linux/jiffies.h:376: error: `NSEC_PER_USEC' undeclared (first use in this function)
/lib/modules/2.6.19.1/build/include/linux/jiffies.h: In function `jiffies_to_timeval':
/lib/modules/2.6.19.1/build/include/linux/jiffies.h:390: error: `NSEC_PER_SEC' undeclared (first use in this function) 
/lib/modules/2.6.19.1/build/include/linux/jiffies.h:391: error: `NSEC_PER_USEC' undeclared (first use in this function)
/lib/modules/2.6.19.1/build/include/linux/jiffies.h:400:41: division by zero in #if   
/lib/modules/2.6.19.1/build/include/linux/jiffies.h:400:42: division by zero in #if
/lib/modules/2.6.19.1/build/include/linux/jiffies.h: In function `jiffies_to_clock_t':
/lib/modules/2.6.19.1/build/include/linux/jiffies.h:404: error: `NSEC_PER_SEC' undeclared (first use in this function)
/lib/modules/2.6.19.1/build/include/linux/jiffies.h:404: error: `USER_HZ' undeclared (first use in this function)
/lib/modules/2.6.19.1/build/include/linux/jiffies.h:411:18: division by zero in #if
/lib/modules/2.6.19.1/build/include/linux/jiffies.h: In function `clock_t_to_jiffies':
/lib/modules/2.6.19.1/build/include/linux/jiffies.h:419: error: `USER_HZ' undeclared (first use in this function)
/lib/modules/2.6.19.1/build/include/linux/jiffies.h:431:41: division by zero in #if
/lib/modules/2.6.19.1/build/include/linux/jiffies.h:431:42: division by zero in #if
/lib/modules/2.6.19.1/build/include/linux/jiffies.h: In function `jiffies_64_to_clock_t':
/lib/modules/2.6.19.1/build/include/linux/jiffies.h:440: error: `NSEC_PER_SEC' undeclared (first use in this function)
/lib/modules/2.6.19.1/build/include/linux/jiffies.h:440: error: `USER_HZ' undeclared (first use in this function)
/lib/modules/2.6.19.1/build/include/linux/jiffies.h:447:28: division by zero in #if
/lib/modules/2.6.19.1/build/include/linux/jiffies.h: In function `nsec_to_clock_t':
/lib/modules/2.6.19.1/build/include/linux/jiffies.h:448: error: `NSEC_PER_SEC' undeclared (first use in this function)
/lib/modules/2.6.19.1/build/include/linux/jiffies.h:448: error: `USER_HZ' undeclared (first use in this function)
conftest.c: In function `main':
conftest.c:36: warning: assignment from incompatible pointer type
configure:9452: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING "" 
| #define PACKAGE_BUGREPORT ""
| #define STDC_HEADERS 1
| #define TIME_WITH_SYS_TIME 1
| #define CONFIG_SND_KERNELDIR "/lib/modules/2.6.19.1/source"
| #define CONFIG_HAVE_DUMP_STACK 1
| #define CONFIG_SND_VERBOSE_PROCFS 1
| #define CONFIG_SND_VERBOSE_PRINTK 1
| #define CONFIG_SND_DEBUG 1
| #define CONFIG_SND_DEBUG_MEMORY 1
| #define CONFIG_ISAPNP_KERNEL 1   
| #define CONFIG_PNP_KERNEL 1      
| #define CONFIG_HAVE_SNPRINTF 1   
| #define CONFIG_HAVE_VSNPRINTF 1  
| #define CONFIG_HAVE_SSCANF 1     
| #define CONFIG_HAVE_VMALLOC_TO_PAGE 1
| #define CONFIG_HAVE_OLD_REQUEST_MODULE 1
| #define CONFIG_HAVE_PDE 1
| #define CONFIG_HAVE_MSLEEP 1
| /* end confdefs.h.  */
| 
| #define __KERNEL__
| #include <linux/config.h>
| #include <linux/jiffies.h>
| #include <linux/time.h>   
| 
| int
| main ()
| {
|  
|   unsigned int (*func)(const unsigned long);
|   func = msecs_to_jiffies;
| 
|   ;
|   return 0;
| }
configure:9480: result: no
 
Old 02-05-2007, 05:20 PM   #14
nonis
Member
 
Registered: Jan 2007
Posts: 95

Original Poster
Rep: Reputation: 15
Any ideas? If it is a problem with my configure script or somehting, I have no idea how to hack that up. If it's something else, I could use input on that.
 
Old 02-05-2007, 07:45 PM   #15
studioj
Member
 
Registered: Oct 2006
Posts: 460

Rep: Reputation: 31
the errors you posted above are classic errors when using the wrong commands to compile internal kernel junk.

did you try (forgive if yes)
export HEADERS=/lib/modules/2.6.19.1/build
./configure --with-kernel=$HEADERS --with-build=$HEADERS
 
  


Reply

Tags
alsa



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
Alsa util compile error: alsactl.h not found vasanthraghavan Red Hat 4 01-13-2006 09:28 PM
Can't compile Alsa starionwolf Slackware 23 02-18-2005 12:11 PM
Can't compile Alsa under Slack 10.0 ProtoformX Slackware 8 11-28-2004 04:30 AM
Cannot compile alsa driver? It gives an error :( sys7em Slackware 24 10-11-2004 02:50 AM
Alsa compile error, and a WINE error scheidel21 Linux - Software 1 12-08-2003 08:16 PM

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

All times are GMT -5. The time now is 03:50 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