e2fsprogs statisch kompilieren

Software besorgen und anwenden
Post Reply
Message
Author
dimevit
Posts: 11
Joined: 04. Feb 2006 12:21

e2fsprogs statisch kompilieren

#1 Post by dimevit »

Hallo zusammen,

ich bin dabei eine Linux InstallationsCD zu machen, bin aber dabei geblieben das Programm e2fsprogs (für Formatierung von ext2 filesystem ) zu kompilieren. Ich brauche das Programm statisch mit seiner Libraries kompiliert.
Kann mir jemand ein Tipp geben, wie ich das machen kann oder ein Link, wo ich das Programm schon vorkompiliert finde.

Vielen Dank

klopskuchen
prolinux-forum-admin
Posts: 1444
Joined: 26. Jun 2004 21:18
Contact:

#2 Post by klopskuchen »

Hat sich was geändert? Bei mir (Version 1.35) sieht es so aus:

Code: Select all

user@host:/tmp/e2fsprogs-1.35/build$  ls -lh  e2fsck/
-rwxr-xr-x  1 user users 1.8M 2006-02-04 13:53 e2fsck*
-rwxr-xr-x  1 user users 1.4M 2006-02-04 13:53 e2fsck.shared*
-rwxr-xr-x  1 user users 1.8M 2006-02-04 13:53 e2fsck.static*
MfG, Klopskuchen
When all else fails, read the instructions .

dimevit
Posts: 11
Joined: 04. Feb 2006 12:21

#3 Post by dimevit »

Hi,

das ist aber e2fsck ist ext2 filesyste checker, das hat nicht mit mke2fs zu tun. Ich brauche mke2fs statisch kompiliert.

Gruss,
Dime

klopskuchen
prolinux-forum-admin
Posts: 1444
Joined: 26. Jun 2004 21:18
Contact:

#4 Post by klopskuchen »

configure CFLAGS="-static" läuft einwandfrei durch. Das generierte Makefile unter build/misc/ enthält:
CFLAGS = -static
[...]
mke2fs: $(MKE2FS_OBJS) $(DEPLIBS) $(LIBE2P) $(DEPLIBUUID) $(DEPLIBS_BLKID)
@echo " LD $@"
@$(CC) $(ALL_LDFLAGS) -o mke2fs $(MKE2FS_OBJS) $(LIBS) $(LIBS_BLKID) \
$(LIBE2P) $(LIBUUID) $(LIBINTL)

mke2fs.static: $(MKE2FS_OBJS) $(STATIC_DEPLIBS) $(STATIC_LIBE2P) $(DEPSTATIC_LIB
UUID) $(DEPSTATIC_LIBBLKID)
@echo " LD $@"
@$(CC) $(ALL_LDFLAGS) -static -o mke2fs.static $(MKE2FS_OBJS) \
$(STATIC_LIBS) $(STATIC_LIBE2P) $(STATIC_LIBBLKID) \
$(STATIC_LIBUUID) $(LIBINTL)
Es sollte also ein mke2fs.static (neben einem dynamisch zu linkenden) herauskommen. Leider Fehlanzeige. Eine heiße Spur sind die benötigten Bibliotheken die ebenfalls im Makefile stehen. Für mke2fs sind das:
STATIC_LIBSS = $(LIB)/libss.a
STATIC_LIBE2P = $(LIB)/libe2p.a
STATIC_LIBBLKID = $(LIB)/libblkid.a
DEPSTATIC_LIBUUID = $(LIB)/libuuid.a
LIBINTL =
Ein "locate" auf diese Bibliotheken war erfolgreich, bis auf vermutlich libintl.a ($LIBINTL aus dem Makefile). Eine solche statische Bibliothek libintl.a ist laut google in zB. gettext und clisp enthalten. Bei mir sind zwar beide Pakete installiert (Slackware), doch weit und breit keine *.a, nur eine *.so zum dynamischen linken. Bevor ich mir aber einen Wolf suche und weiter bastel, wie sieht es bei dir aus?


MfG, Klopskuchen
When all else fails, read the instructions .

Post Reply