Skip to contentSkip to conversation

Failure to Compile AIC7xxx Driver

DISCUSSION leroyljr 5 participants 7 messages Aug 17, 2001 – Aug 21, 2001

lore
Share & tools
lore

leroyljr

author
#0 lore raw

If nobody has brought this up yet, I want to report this issue.

Here is what happened when I tried to build the aic7xxx driver for 2.4.9:

aicasm/aicasm_scan.l: In function `yylex':
aicasm/aicasm_scan.l:115: `T_VERSION' undeclared (first use in this function) aicasm/aicasm_scan.l:115: (Each undeclared identifier is reported only once aicasm/aicasm_scan.l:115: for each function it appears in.) aicasm/aicasm_scan.l:132: `T_STRING' undeclared (first use in this function)

This is for the new driver, BTW.

If this has already been brought up, sorry for being redudant. Send flames and letter bombs to my address.

#1 lore raw
Quoted 11 lines

If nobody has brought this up yet, I want to report this issue.

Here is what happened when I tried to build the aic7xxx driver for 2.4.9:

aicasm/aicasm_scan.l: In function `yylex':
aicasm/aicasm_scan.l:115: `T_VERSION' undeclared (first use in this function) aicasm/aicasm_scan.l:115: (Each undeclared identifier is reported only once aicasm/aicasm_scan.l:115: for each function it appears in.) aicasm/aicasm_scan.l:132: `T_STRING' undeclared (first use in this function)

This is for the new driver, BTW.

I tried to reproduce this locally, but was never able to do so. My best guess is that the default rules for building lex/yacc grammers don't include proper dependencies for the generated y.tab.h file. Of course, it shouldn't be necessary. Both aicasm_gram.y and aicasm_scan.l should have newer dates than the y.tab.h file from a previous build (both are updated for 2.4.9) and aicasm_gram.c is listed first in the dependency line, so yacc should have already been run prior to the compilation of aicasm_scan.c.

Perhaps a make guru can lend some insight?

If you manually go into drivers/scsi/aic7xxx/aicasm and do a make clean, the error should go away.

Of course, you could just disable the build of the firmware in your kernel config...

--
Justin

#2 lore raw
Quoted 12 lines · Justin T. Gibbs
Quoted 3 lines

aicasm/aicasm_scan.l: In function `yylex':
aicasm/aicasm_scan.l:115: `T_VERSION' undeclared (first use in this function) aicasm/aicasm_scan.l:115: (Each undeclared identifier is reported only once

I tried to reproduce this locally, but was never able to do so. My best guess is that the default rules for building lex/yacc grammers don't include proper dependencies for the generated y.tab.h file. Of course, it shouldn't be necessary. Both aicasm_gram.y and aicasm_scan.l should have newer dates than the y.tab.h file from a previous build (both are updated for 2.4.9) and aicasm_gram.c is listed first in the dependency line, so yacc should have already been run prior to the compilation of aicasm_scan.c.

Quoted 1 line

Perhaps a make guru can lend some insight?

I have repeatedly offered to fix the aic7xxx and aicasm makefiles but you have refused to let me. See the thread that ended in
http://marc.theaimsgroup.com/?l=linux-kernel&m=99353014629653&w=2

You have hit the precise problem that I raised in that thread, you cannot rely on timestamps for files that are both generated and shipped. aic7xxx is not the only system that has this problems but other maintainers accept that I know the kbuild system better than they do. I have fixed the problem in kbuild 2.5 for all generated files _except_ for aic7xxx. Until you accept that your makefiles are incorrect and do not fit the Linux kernel build model, I have no intention of doing any more work on aic7xxx.

Keith Owens, Linux kernel build maintainer.

#3 lore raw
Quoted 3 lines

You have hit the precise problem that I raised in that thread, you cannot rely on timestamps for files that are both generated and shipped.

This is a completely different problem having to do with the build for the aicasm utility missing an explicit dependency regarding the generated, but certainly not shipped, y.tab.h file. The grammer recently changed (a new token was added), so those with stale y.tab.h files were bitten. Its on my list of things to fix.

--
Justin

#4 lore raw
In reply to leroyljr
Quoted 2 lines · Justin T. Gibbs

If you manually go into drivers/scsi/aic7xxx/aicasm and do a make clean, the error should go away.

I concur. I did exactly this and everything (well, WRT the aic7xxx driver) was fine.

pete

#5 lore raw
In reply to leroyljr
Quoted 10 lines · leroyljr

If nobody has brought this up yet, I want to report this issue.

Here is what happened when I tried to build the aic7xxx driver for 2.4.9:

aicasm/aicasm_scan.l: In function `yylex':
aicasm/aicasm_scan.l:115: `T_VERSION' undeclared (first use in this function) aicasm/aicasm_scan.l:115: (Each undeclared identifier is reported only once aicasm/aicasm_scan.l:115: for each function it appears in.) aicasm/aicasm_scan.l:132: `T_STRING' undeclared (first use in this function)

If I remember correctly I got this one when I used bison -y instead of yacc -
although they are supposed to do the same.

It's just a guess - correct me if I'm telling crap

Tobias

#6 lore raw
Quoted 13 lines
Quoted 7 lines · leroyljr

If nobody has brought this up yet, I want to report this issue.

Here is what happened when I tried to build the aic7xxx driver for 2.4.9:

aicasm/aicasm_scan.l: In function `yylex':
aicasm/aicasm_scan.l:115: `T_VERSION' undeclared (first use in this function

)

Quoted 3 lines

aicasm/aicasm_scan.l:115: (Each undeclared identifier is reported only once aicasm/aicasm_scan.l:115: for each function it appears in.) aicasm/aicasm_scan.l:132: `T_STRING' undeclared (first use in this function)

Quoted 5 lines

If I remember correctly I got this one when I used bison -y instead of yacc -
although they are supposed to do the same.

It's just a guess - correct me if I'm telling crap

There's a missing dependency somewhere, so the y.tab.h file is stale. If you go into drivers/scsi/aic7xxx/aicasm and do a make clean, the build will work for you.

I'm still trying to figure out exactly what I need to put in the Makefile to force make to run yacc/bison prior to compiling the scan file.

--
Justin