[BusyBox] errors compiling mke2fs.c in Busybox 0.60.

Doug Edwards dedwards at synergymicro.com
Wed Jun 26 17:26:04 UTC 2002


>Doug,
>
>>  I'm trying to compile mke2fs.c into BusyBox 0.60.3 with uClibc
>>  (snapshot dated June 6) on ppc running the 2.4.12 kernel. When I run
>>  "make" I get a whole bunch of errors.  If I take the applet out, it
>>  compiles fine.  There are too many errors to list them all (about 5
>  > pages of printout), but here's the first few:
>The simple way of integration consists of the following points:
>
>HOWTO:
>
>1) Get e2fsprogs-last-version source.
>2) Configure and compile.

If I compile with glibc, I get errors trying to then compile busybox 
using uClibc (it compiles the applets ok, but then fails during the 
busybox compile).  I get errors like this:

mke2fs_.o: In function 'parse_raid_opts':
/usr/include/sdlib.h:309: undefined reference to'_strtol_internal'
/usr/include/sdlib.h:309: relocation truncated to fit: 
R_PPC_REL24_strtol_internal'
etc.

If I try to compile the e2fsprogs with uClibc then it fails early in 
the compile with this error:

=1 -DHAVE_STRDUP=1 -DHAVE_STRCASECMP=1 -DHAVE_SRANDOM=1 
-DHAVE_FCHOWN=1 -DHAVE_M
ALLINFO=1 -DHAVE_FDATASYNC=1 -DHAVE_EXT2_IOCTLS=1   -g -O2  -I../lib 
-I../../lib
  -I../../include   ../../util/subst.c -o subst.o
cc  -o subst subst.o
/usr/powerpc-linux-uclibc/lib: file not recognized: Is a directory
collect2: ld returned 1 exit status
make[1]: *** [subst] Error 1
make[1]: Leaving directory `/usr/src/rpm/SOURCES/e2fsprogs-1.23/build/util'
make: *** [util/subst] Error 2
[root at test build]#

Is this a solvable problem, or is it impossible to compile the mke2fs 
with glibc and busybox with uClibc?

>3) Find functions main() in e2fsprogs sources and replace to applet_main
>(example: mke2fs_main for mke2fs applet)
>4) Run make again. This exited with error:
>
>$ make
>cc  -o mke2fs mke2fs.o ../lib/libext2fs.a ../lib/libcom_err.a ../lib/libuuid.a
>/usr/lib/crt1.o(.text+0x18): undefined reference to `main'
>make: *** [mke2fs] Error 1


I get this in my error:

cc  -o mke2fs mke2fs.o util.o ../lib/libext2fs.a ../lib/libcom_err.a 
../lib/lib
e2p.a ../lib/libuuid.a
/usr/lib/crt1.o(.rodata+0x4): undefined reference to `main'
collect2: ld returned 1 exit status
make[2]: *** [mke2fs] Error 1

do I need to copy over my util.o file as well?

Help!
Thanks,

Doug




More information about the busybox mailing list