Skip to contentSkip to conversation

Latest U-Boot MD5 compile error??

U-Boot-Users Russell McGuire 2 participants 8 messages May 28, 2008 – Jul 5, 2008 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): mailman.342673.1211998379.5026.u-boot-users@lists.sourceforge.net

#1 lore raw

All,

Just pulled the latest GIT down today <1.3.3+>, merged with my current code.

<Note, last I pulled was [email protected]>.

Anyway, all is well until the newish MD5 code attempts to compile then I get two different types of errors. <See Log Below>

Is this an artificat of an uncomplete merge perhaps? Dependencies on a certain level of kernel that needs to be sitting in the ppc_6xx/usr/src/ directory? Or perhaps is FC5 to old to now correctly compile the latest U-boot?
To old of an ELDK? <I am using ELDK 4.1>

----Log----

In file included from md5.c:32:
/usr/include/linux/types.h:19: error: conflicting types for '__kernel_dev_t' /usr/include/asm/posix_types.h:10: error: previous declaration of '__kernel_dev_t' was here
/usr/include/linux/types.h:31: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'timer_t'
/usr/include/linux/types.h:32: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'clockid_t'
md5.c: In function 'MD5Update':
md5.c:95: warning: implicit declaration of function 'memmove' md5.c:95: warning: incompatible implicit declaration of built-in function 'memmove'
md5.c:98: warning: incompatible implicit declaration of built-in function 'memmove'
md5.c:107: warning: incompatible implicit declaration of built-in function 'memmove'
md5.c:116: warning: incompatible implicit declaration of built-in function 'memmove'
md5.c: In function 'MD5Final':
md5.c:143: warning: implicit declaration of function 'memset' md5.c:143: warning: incompatible implicit declaration of built-in function 'memset'
md5.c:151: warning: incompatible implicit declaration of built-in function 'memset'
md5.c:161: warning: incompatible implicit declaration of built-in function 'memmove'
md5.c:162: warning: incompatible implicit declaration of built-in function 'memset'
make[1]: *** [md5.o] Error 1
make[1]: Leaving directory `/usr/local/eldk/ppc_6xx/usr/src/u-boot/tools'
make: *** [tools] Error 2

--End Log---

#2 lore raw
Quoted 9 lines · In message <F9448BAF273D479DB7935923C812A0BB@absolutdaddy> you wrote:

Just pulled the latest GIT down today <1.3.3+>, merged with my current code.

<Note, last I pulled was [email protected]>.

Anyway, all is well until the newish MD5 code attempts to compile then I get two different types of errors. <See Log Below>

Is this an artificat of an uncomplete merge perhaps?

Probably. Try building for some other boards...

Quoted 4 lines

Dependencies on a certain level of kernel that needs to be sitting in the ppc_6xx/usr/src/ directory? Or perhaps is FC5 to old to now correctly compile the latest U-boot?
To old of an ELDK? <I am using ELDK 4.1>

Just tried to build a few boards on a FC5 host. A few warnings about including /usr/include/asm/byteorder.h, but it builds fine.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
       There is enough for the need of everyone in this world,
       but not for the greed of everyone.     - Mahatma Gandhi
#3 lore raw

So I have downloaded a 'fresh and clean' copy of the latest git and configured for several existing Freescale based MPC boards.

Example:
make ARCH=ppc CROSS_COMPILE='ppc_6xx-' MPC8360ERDK_config make ARCH=ppc CROSS_COMPILE='ppc_6xx-' all

I still get the same errors, i.e. __kernel_dev_t_ being defined twice, etc.. And then lots of md5.c complaints about implicit declarations of functions that shouldn't have issues, as they are declared in #included in <string.h>

Is there a chance the include path statements are mis-configured on my system? How does one check that?

-Russ

-----Original Message-----
From: [email protected] [mailto:wd at denx.de]
Sent: Wednesday, May 28, 2008 2:56 PM
To: rmcguire at videopresence.com
Cc: u-boot-users at lists.sourceforge.net
Subject: Re: [U-Boot-Users] Latest U-Boot MD5 compile error??

Quoted 2 lines · In message <F9448BAF273D479DB7935923C812A0BB@absolutdaddy> you wrote:

Just pulled the latest GIT down today <1.3.3+>, merged with my current

code.

Quoted 4 lines

<Note, last I pulled was [email protected]>.

Anyway, all is well until the newish MD5 code attempts to compile then I

get

Quoted 3 lines

two different types of errors. <See Log Below>

Is this an artificat of an uncomplete merge perhaps?

Probably. Try building for some other boards...

Quoted 4 lines

Dependencies on a certain level of kernel that needs to be sitting in the ppc_6xx/usr/src/ directory? Or perhaps is FC5 to old to now correctly compile the latest U-boot?
To old of an ELDK? <I am using ELDK 4.1>

Just tried to build a few boards on a FC5 host. A few warnings about including /usr/include/asm/byteorder.h, but it builds fine.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
       There is enough for the need of everyone in this world,
       but not for the greed of everyone.     - Mahatma Gandhi
#4 lore raw
In reply to Wolfgang Denk

Not sure where exactly yet, but I have tracked this down to someplace between Release v1.3.2 and Tag v1.3.3-rc1 is where it breaks on my FC5 machine.

Using 'git checkout -f v.1.3.xx', full clean, reconfigure, etc..

I am checking out intermediate versions now to see exactly what commit is causing this.

I'll post the SHA number when I find where in the tree, or better yet if I find the offending code / incompatibility with my FC5 machine.

-----Original Message-----
From: [email protected] [mailto:wd at denx.de]
Sent: Wednesday, May 28, 2008 2:56 PM
To: rmcguire at videopresence.com
Cc: u-boot-users at lists.sourceforge.net
Subject: Re: [U-Boot-Users] Latest U-Boot MD5 compile error??

Quoted 2 lines · In message <F9448BAF273D479DB7935923C812A0BB@absolutdaddy> you wrote:

Just pulled the latest GIT down today <1.3.3+>, merged with my current

code.

Quoted 4 lines

<Note, last I pulled was [email protected]>.

Anyway, all is well until the newish MD5 code attempts to compile then I

get

Quoted 3 lines

two different types of errors. <See Log Below>

Is this an artificat of an uncomplete merge perhaps?

Probably. Try building for some other boards...

Quoted 4 lines

Dependencies on a certain level of kernel that needs to be sitting in the ppc_6xx/usr/src/ directory? Or perhaps is FC5 to old to now correctly compile the latest U-boot?
To old of an ELDK? <I am using ELDK 4.1>

Just tried to build a few boards on a FC5 host. A few warnings about including /usr/include/asm/byteorder.h, but it builds fine.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
       There is enough for the need of everyone in this world,
       but not for the greed of everyone.     - Mahatma Gandhi
#5 lore raw
In reply to Wolfgang Denk

All,

I have tracked my compilation issues back to several patches. Wondering if anyone has found a work around for this, obviously a lot of us are not seeing this issue.

Patch dated 2/29/2008, Add libfdt support to mkimage.
Then following any patches related to sha1 and md5 cause more errors related to double declarations of __kernel_dev_t.

Anything commit prior to the "Patch dated 2/29/2008, Add libfdt support to mkimage", compiles and works fine.

Any ideas?

-Russ

-----Original Message-----
From: [email protected] [mailto:wd at denx.de]
Sent: Wednesday, May 28, 2008 2:56 PM
To: rmcguire at videopresence.com
Cc: u-boot-users at lists.sourceforge.net
Subject: Re: [U-Boot-Users] Latest U-Boot MD5 compile error??

Quoted 2 lines · In message <F9448BAF273D479DB7935923C812A0BB@absolutdaddy> you wrote:

Just pulled the latest GIT down today <1.3.3+>, merged with my current

code.

Quoted 4 lines

<Note, last I pulled was [email protected]>.

Anyway, all is well until the newish MD5 code attempts to compile then I

get

Quoted 3 lines

two different types of errors. <See Log Below>

Is this an artificat of an uncomplete merge perhaps?

Probably. Try building for some other boards...

Quoted 4 lines

Dependencies on a certain level of kernel that needs to be sitting in the ppc_6xx/usr/src/ directory? Or perhaps is FC5 to old to now correctly compile the latest U-boot?
To old of an ELDK? <I am using ELDK 4.1>

Just tried to build a few boards on a FC5 host. A few warnings about including /usr/include/asm/byteorder.h, but it builds fine.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
       There is enough for the need of everyone in this world,
       but not for the greed of everyone.     - Mahatma Gandhi
#6 lore raw
In reply to Wolfgang Denk

All,

Okay, I have tracked this farther into the compilation problem. I have no reason to believe that 'my system' is any different that any standard stock FC5 box, other than its been original since FC5 was released, pending updates.

Looking through the code, though I haven't nailed it, it would seem that between:

#include <linux/types.h>
	typedef __kernel_dev_t		dev_t;
#include <asm/posix_types.h>
	typedef unsigned int	__kernel_dev_t;

There are discrepancies in how '__kernel_dev_t' is defined. Now, I haven't found yet where 'dev_t' is defined.

Can somebody possibly think of a reason this is being thrown? Again, I have downloaded the latest U-boot git tree, like 5 times to ensure that I am not using 'corrupted' code. Also have ensure that this problem doesn't exist prior to commit SHA - 8cf30809a82902a471866d2f07725ce3b8a22291.

-Russ

-----Original Message-----
From: [email protected] [mailto:wd at denx.de]
Sent: Wednesday, May 28, 2008 2:56 PM
To: rmcguire at videopresence.com
Cc: u-boot-users at lists.sourceforge.net
Subject: Re: [U-Boot-Users] Latest U-Boot MD5 compile error??

Quoted 2 lines · In message <F9448BAF273D479DB7935923C812A0BB@absolutdaddy> you wrote:

Just pulled the latest GIT down today <1.3.3+>, merged with my current

code.

Quoted 4 lines

<Note, last I pulled was [email protected]>.

Anyway, all is well until the newish MD5 code attempts to compile then I

get

Quoted 3 lines

two different types of errors. <See Log Below>

Is this an artificat of an uncomplete merge perhaps?

Probably. Try building for some other boards...

Quoted 4 lines

Dependencies on a certain level of kernel that needs to be sitting in the ppc_6xx/usr/src/ directory? Or perhaps is FC5 to old to now correctly compile the latest U-boot?
To old of an ELDK? <I am using ELDK 4.1>

Just tried to build a few boards on a FC5 host. A few warnings about including /usr/include/asm/byteorder.h, but it builds fine.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
       There is enough for the need of everyone in this world,
       but not for the greed of everyone.     - Mahatma Gandhi
#7 lore raw
In reply to Wolfgang Denk

All,

Possible fix, since I am a newbie at messing with somebody elses code can the owner of the MD5 code verify this problem / fix??

I found that if I did the following with changing some include files, this will now compile on my older FC5 system. <Oddly I tried the newer ELDK42, etc.. not sure why this is broke on my box, but it was not the ELDK install or the source code being corrupted>.

MD5 Compile Fix:

1) In file 'include/u-boot/md5.h' change the

	#include <linux/types.h> --> #include <asm/types.h>

2) In file 'tools/md5.c' remove the reference to

	#include <linux/types.h>

This corrects the problems on my system and removes all compile / errors and warning about implicit declarations for the string.h functions as well as the double declarations for __kernel_dev_t

-Russ

-----Original Message-----
From: [email protected] [mailto:wd at denx.de]
Sent: Wednesday, May 28, 2008 2:56 PM
To: rmcguire at videopresence.com
Cc: u-boot-users at lists.sourceforge.net
Subject: Re: [U-Boot-Users] Latest U-Boot MD5 compile error??

Quoted 2 lines · In message <F9448BAF273D479DB7935923C812A0BB@absolutdaddy> you wrote:

Just pulled the latest GIT down today <1.3.3+>, merged with my current

code.

Quoted 4 lines

<Note, last I pulled was [email protected]>.

Anyway, all is well until the newish MD5 code attempts to compile then I

get

Quoted 3 lines

two different types of errors. <See Log Below>

Is this an artificat of an uncomplete merge perhaps?

Probably. Try building for some other boards...

Quoted 4 lines

Dependencies on a certain level of kernel that needs to be sitting in the ppc_6xx/usr/src/ directory? Or perhaps is FC5 to old to now correctly compile the latest U-boot?
To old of an ELDK? <I am using ELDK 4.1>

Just tried to build a few boards on a FC5 host. A few warnings about including /usr/include/asm/byteorder.h, but it builds fine.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
       There is enough for the need of everyone in this world,
       but not for the greed of everyone.     - Mahatma Gandhi
#8 lore raw
Quoted 3 lines · In message <891063DCE541468EBCC00AC53E36B9F9@absolutdaddy> you wrote:

Possible fix, since I am a newbie at messing with somebody elses code can the owner of the MD5 code verify this problem / fix??

As I wrote before, I tried building on FC5 and on other systems (including FC4, FC6, F7, F8 and F9) without seing the problem you describe.

Quoted 6 lines

I found that if I did the following with changing some include files, this will now compile on my older FC5 system. <Oddly I tried the newer ELDK42, etc.. not sure why this is broke on my box, but it was not the ELDK install or the source code being corrupted>.

Quoted 7 lines

MD5 Compile Fix:

1) In file 'include/u-boot/md5.h' change the

	#include <linux/types.h> --> #include <asm/types.h>

2) In file 'tools/md5.c' remove the reference to

	#include <linux/types.h>

Can you please provide a proper patch instead? See
http://www.denx.de/wiki/UBoot/Patches for guidelines how to prepare one.

Best regards,

Wolfgang Denk

Signature · 6 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
As far as the laws of mathematics refer  to  reality,  they  are  not
certain;  and  as  far  as  they  are  certain,  they do not refer to
reality.                                           -- Albert Einstein