Changes between Initial Version and Version 3 of Ticket #2129


Ignore:
Timestamp:
04/27/10 04:15:06 (14 years ago)
Author:
slyfox
Comment:

Replying to and:

Hi slyfox, with --enable-static you build a static mc library (lib/.libs/libmc.a). That is not what you want. You want a static binary. please try:

# make clean && make LDFLAGS=-all-static

compile result should be:

# ldd src/mc
        not a dynamic executable

I tried this one, but I (quite narurally) use ./configure --enable-maintainer-mode, which is smart enough to rerun configure when I pass LDFLAGS to make. It results in reconfigure breakage.

AFAIU LDFLAGS=-all-static ./configure --enable-maintainer-mode ${other_opts} should work, I'll change bug description.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #2129

    • Property Blocking changed from to 2148
  • Ticket #2129 – Description

    initial v3  
    1 Static build seems to be broken: 
     1Static builds seems to be broken: 
    22{{{ 
    33$ _mc-bin/bin/mc --version 
     
    55}}} 
    66{{{ 
    7 $ ./configure --prefix=$(pwd)/_mc-bin \ 
     7$ LDFLAGS=-all-static ./configure --prefix=$(pwd)/_mc-bin \ 
    88                --with-samba \ 
    99                --with-mcfs \ 
     
    1212                --enable-maintainer-mode \ 
    1313                --with-glib-static \ 
    14                 --enable-static \ 
    1514                --enable-mcserver 
    1615}}} 
    1716{{{ 
    18 $ ldd _mc-bin/bin/mc 
    19         linux-vdso.so.1 =>  (0x00007fffbd152000) 
    20         libgpm.so.1 => /lib/libgpm.so.1 (0x00007f5d4b5a8000) 
    21         libslang.so.2 => /usr/lib/libslang.so.2 (0x00007f5d4b242000) 
    22         libc.so.6 => /lib/libc.so.6 (0x00007f5d4aeec000) 
    23         libdl.so.2 => /lib/libdl.so.2 (0x00007f5d4ace8000) 
    24         libncurses.so.5 => /lib/libncurses.so.5 (0x00007f5d4aa97000) 
    25         libm.so.6 => /lib/libm.so.6 (0x00007f5d4a815000) 
    26         /lib64/ld-linux-x86-64.so.2 (0x00007f5d4b7ae000) 
     17checking for a BSD-compatible install... /usr/bin/install -c 
     18checking whether build environment is sane... yes 
     19checking for a thread-safe mkdir -p... /bin/mkdir -p 
     20checking for gawk... gawk 
     21checking whether make sets $(MAKE)... yes 
     22checking whether to enable maintainer-specific portions of Makefiles... yes 
     23checking build system type... x86_64-unknown-linux-gnu 
     24checking host system type... x86_64-unknown-linux-gnu 
     25checking for style of include used by make... GNU 
     26checking for gcc... gcc 
     27checking for C compiler default output file name...  
     28configure: error: in `/home/slyfox/dev/git/mc-build.all-static': 
     29configure: error: C compiler cannot create executables 
     30See `config.log' for more details. 
    2731}}} 
     32'''LDFLAGS=-static''' does not have any effect, Libtool seems to skip it on executable binaries. 
     33 
     34It can easily be my misunderstanding on how to use it.