[uClinux-dev] Compiling problems

Greg Ungerer gerg at snapgear.com
Tue May 1 02:10:28 EDT 2007


Hi Ron,

Ron Jobmann wrote:
> (Posted again because I forgot subject line last time - sorry)
> I'm using Snapgear 3.4.0, building with the linux-2.6.x tree.  Using the 
> arm-linux-tools-20061213.tar.gz
> toolset, ixp420 processor, big endian.
> 
> The kernel seemed to build OK.  I haven't run it yet.  Here's an example 
> of an error message I'm getting now:
> 
> arm-linux-ar rcu liblua.a lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o 
> lgc.o llex.o lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o 
> ltable.o ltm.o lundump.o lvm.o lzio.o lauxlib.o lbaselib.o ldblib.o 
> liolib.o lmathlib.o loslib.o ltablib.o lstrlib.o loadlib.o linit.o
> arm-linux-ranlib liblua.a
> ucfront-gcc arm-linux-gcc -mbig-endian -O1 -pipe -fno-common 
> -fno-builtin -Wall -Dlinux -D__linux__ -Dunix -DEMBED -c -o lua.o lua.c
> ucfront-gcc arm-linux-gcc -mbig-endian -o lua lua.o liblua.a -lm
> ucfront-gcc arm-linux-gcc -mbig-endian -O1 -pipe -fno-common 
> -fno-builtin -Wall -Dlinux -D__linux__ -Dunix -DEMBED -c -o luac.o luac.c
> ucfront-gcc arm-linux-gcc -mbig-endian -O1 -pipe -fno-common 
> -fno-builtin -Wall -Dlinux -D__linux__ -Dunix -DEMBED -c -o print.o print.c
> ucfront-gcc arm-linux-gcc -mbig-endian -o luac luac.o print.o liblua.a -lm
> make[6]: Leaving directory `/opt/0427/user/lua/src'
> make[5]: Leaving directory `/opt/0427/user/lua/src'
> make[4]: Leaving directory `/opt/0427/user/lua'
> [ ! -d "mtd-utils" ] || ( touch mtd-utils/.sgbuilt_user && make -j1 -C 
> mtd-utils ) || exit $?
> make[4]: Entering directory `/opt/0427/user/mtd-utils'
> [ -d build ] || mkdir build
> ucfront-gcc arm-linux-gcc -mbig-endian -O1 -pipe -fno-common 
> -fno-builtin -Wall -Dlinux -D__linux__ -Dunix -DEMBED -D__USE_BSD -I. -g 
> -fno-common -fno-builtin erase.c -o erase
> ucfront-gcc arm-linux-gcc -mbig-endian -O1 -pipe -fno-common 
> -fno-builtin -Wall -Dlinux -D__linux__ -Dunix -DEMBED -D__USE_BSD -I. -g 
> -fno-common -fno-builtin eraseall.c -o eraseall
> ucfront-gcc arm-linux-gcc -mbig-endian -O1 -pipe -fno-common 
> -fno-builtin -Wall -Dlinux -D__linux__ -Dunix -DEMBED -D__USE_BSD -I. -g 
> -fno-common -fno-builtin nandtest.c -o nandtest
> nandtest.c: In function `main':
> nandtest.c:120: warning: implicit declaration of function `memset'
> nandtest.c:266: warning: implicit declaration of function `memcpy'
> gcc -I/usr/include -I. -c -o build/crc32.o crc32.c
> gcc -I/usr/include -I. -c -o build/mkfs.jffs2.o mkfs.jffs2.c
> gcc -I/usr/include -I. -Dprintk=printf -DKERN_NOTICE= -DKERN_WARNING= -c 
> -o build/compr_zlib.o compr_zlib.c
> compr_zlib.c:38:18: error: zlib.h: No such file or directory
> compr_zlib.c: In function ‘zlib_compress’:
> compr_zlib.c:81: error: ‘z_stream’ undeclared (first use in this function)
> compr_zlib.c:81: error: (Each undeclared identifier is reported only once
> compr_zlib.c:81: error: for each function it appears in.)
> compr_zlib.c:81: error: expected ‘;’ before ‘strm’
> compr_zlib.c:91: error: ‘strm’ undeclared (first use in this function)
> compr_zlib.c:95: error: ‘Z_OK’ undeclared (first use in this function)
> compr_zlib.c:110: error: ‘Z_PARTIAL_FLUSH’ undeclared (first use in this 
> function)
> compr_zlib.c:121: error: ‘Z_FINISH’ undeclared (first use in this function)
> compr_zlib.c:122: error: ‘Z_STREAM_END’ undeclared (first use in this 
> function)
> compr_zlib.c: In function ‘zlib_decompress’:
> compr_zlib.c:143: error: ‘z_stream’ undeclared (first use in this function)
> compr_zlib.c:143: error: expected ‘;’ before ‘strm’
> compr_zlib.c:150: error: ‘strm’ undeclared (first use in this function)
> compr_zlib.c:154: error: ‘Z_OK’ undeclared (first use in this function)
> compr_zlib.c:166: error: ‘Z_FINISH’ undeclared (first use in this function)
> compr_zlib.c:168: error: ‘Z_STREAM_END’ undeclared (first use in this 
> function)
> make[4]: *** [build/compr_zlib.o] Error 1
> make[4]: Leaving directory `/opt/0427/user/mtd-utils'
> make[3]: *** [mtd-utils] Error 2
> make[3]: Leaving directory `/opt/0427/user'
> make[2]: *** [all] Error 2
> make[2]: Leaving directory `/opt/0427/user'
> make[1]: *** [subdirs] Error 1
> make[1]: Leaving directory `/opt/0427'
> make: *** [btr] Error 2
> 
> This all used to work.
> I'll try your suggestion and see what happens.  I suspect it is hidden 
> dependencies within the Makefiles that get all out of whack

Have a look in the top level lib directory.
Are there any broken links to lib*.a files?
Remove them if there is, this should force a rebuild if
required of the appropriate libs.

Otehrwise have you tried to enabled explicit building of
zlib in the "make config" lib configuration?

Regards
Greg



> when things try to build in parallel.  One thing I've done so far is to 
> hardcode HOST_NCPU=1 but that hasn't fixed much.
> 
>  >>Jivin Ron Jobmann lays it down ...
>  >>/ I just moved all my build tools over to a new machine, E6400 Core2 
> Duo /
>  >>/ processor. It's coming up with all sorts of compilation /
>  >>/errors which I assume is because the makefiles are splitting up the /
>  >>/work? The same tools and same source tree build fine on a /
>  >>/single processor system. /
>  >>//
>  >>/Is there something special I need to setup in my build environment 
> on my /
>  >>/new PC? /
>  >Which dist are you using ? What mods have you made ? In a dist that 
> supports parallel builds you can try:
>  >make NON_SMP_BUILD=1
>  >to build in a single thread of execution to find problems. Otherwise 
> post some of the errors you are seeing if you can find them ;-)
> 
>  >Cheers,
>  >Davidm
> 
> 
> *______________________________________*
> 
> *Ron Jobmann*
> 
> Porting/Integration/Build Engineer
> 
> *Omnitronix, Inc.*
> 
> 1200 N. 96TH ST
> 
> Seattle, WA 98103-3310
> 
> _http://www.omnitronix.com_
> 
> (206) 624-4985 ex: 120 / Fax: (206) 624-5610
> 
> 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> uClinux-dev mailing list
> uClinux-dev at uclinux.org
> http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
> This message was resent by uclinux-dev at uclinux.org
> To unsubscribe see:
> http://mailman.uclinux.org/mailman/options/uclinux-dev

-- 
------------------------------------------------------------------------
Greg Ungerer  --  Chief Software Dude       EMAIL:     gerg at snapgear.com
Secure Computing Corporation                PHONE:       +61 7 3435 2888
825 Stanley St,                             FAX:         +61 7 3891 3630
Woolloongabba, QLD, 4102, Australia         WEB: http://www.SnapGear.com


More information about the uClinux-dev mailing list