Find the answer to your Linux question:
Results 1 to 9 of 9
how to compile mke2fs as static from e2fsprogs-1.42.7..I tried many tutorials,but nothing giving expected result. pls help me .....
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2012
    Posts
    18

    compile mke2fs as static from e2fsprogs-1.42.7


    how to compile mke2fs as static from e2fsprogs-1.42.7..I tried many tutorials,but nothing giving expected result.

    pls help me ..

  2. #2
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    Hi,

    Did you read the INSTALL file in the source tarball? Try this:

    Code:
    wget https://www.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs/v1.42.7/e2fsprogs-1.42.7.tar.gz
    tar zxf e2fsprogs-1.42.7.tar.gz 
    cd e2fsprogs-1.42.7
    mkdir build
    cd build
    ../configure
    make
    make install
    if you've tried all that and are experiencing a specific error with one of the steps, please provide the exact command run and your exact errors you are getting.

  3. #3
    Just Joined!
    Join Date
    May 2012
    Posts
    18
    Thanks for quick reply.
    I tried this method and it was successfully compiled.But i got dynamic executable.

    I need static executable for my installer.

  4. #4
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    ah, missed that. i assume you tried this, to no avail?

    Code:
    ../configure --disable-elf-shlibs
    similarly, you could export LDFLAGS=-static before running compile.

    unfortunately, it does not compile on my Fedora 17 box though. still trying to work out why...

  5. #5
    Just Joined!
    Join Date
    May 2012
    Posts
    18
    Quote Originally Posted by atreyu View Post
    similarly, you could export LDFLAGS=-static before running compile.
    I tried with this option,but no use.Mine ubuntu 10.04

    how to use below patch to make mke2fs.static
    PHP Code:
    diff --git a/misc/Makefile.in b/misc/Makefile.in
    index a23adcd
    ..d7c4a5e 100644
    --- a/misc/Makefile.in
    +++ b/misc/Makefile.in
    @@ -230,+230,@@  mke2fs.static: $(MKE2FS_OBJS) $(STATIC_DEPLIBS) $(STATIC_LIBE2P) $(DEPSTATIC_LIB
             
    $(DEPSTATIC_LIBQUOTA) $(DEPSTATIC_LIBBLKID)
         $(
    E"    LD $@"
         
    $(Q) $(CC) $(ALL_LDFLAGS) -static -o mke2fs.static $(MKE2FS_OBJS) \
    -        $(
    STATIC_LIBS) $(STATIC_LIBE2P) $(STATIC_LIBBLKID) \
    -        $(
    STATIC_LIBUUID) $(STATIC_LIBQUOTA) $(LIBINTL)
    +        $(
    STATIC_LIBQUOTA) $(STATIC_LIBS) $(STATIC_LIBE2P) \
    +        $(
    STATIC_LIBBLKID) $(STATIC_LIBUUID) $(LIBINTL)
     
     
    mke2fs.profiled: $(PROFILED_MKE2FS_OBJS) $(PROFILED_DEPLIBS) \
         $(
    PROFILED_LIBE2P) $(PROFILED_DEPLIBBLKID) $(PROFILED_DEPLIBUUID) \ 

  6. #6
    Just Joined!
    Join Date
    May 2012
    Posts
    18
    problem solved.Thank u so much atreyu..

  7. #7
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    Quote Originally Posted by new2linus View Post
    problem solved.
    was it the patch that did it? would you mind sharing, so that future visitors to this thread will not be left in the lurch?

  8. #8
    Just Joined!
    Join Date
    May 2012
    Posts
    18
    not resolved by patch..ur idea " LDFLAGS=-static " worked for me..

  9. #9
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    Quote Originally Posted by new2linus View Post
    not ny patch..ur idea " LDFLAGS=-static "..This worked for me..
    buggah, didn't work for me. anyway, i'll mark this as Solved (for you!). thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •