Re: Compiling losetup statically?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Karel Zak <kzak@xxxxxxxxxx> wrote:

> > FWIW, I cannot get util-linux-ng 1.4.1 to compile losetup
> > statically, even with "./configure
> > --enable-static-programs=losetup"
> 
>  Please, more details -- for example make output or so...

On both a clean Slackware 12.2 and an upgraded system (gcc 4.2.4,
glibc 2.7):


there are no errors with just "./configure
 --enable-static-programs=losetup"

make just does its job and a dynamically linked binary is produced
just like w/o that configure option:

ldd mount/losetup
        linux-gate.so.1 =>  (0xffffe000)
        libc.so.6 => /lib/libc.so.6 (0xb7ed6000)
        /lib/ld-linux.so.2 (0xb8047000)


LDFLAGS="-static -s" ./configure --enable-static-programs=losetup
make

gcc -std=gnu99  -fsigned-char -g -O2   -static -s -o mount
mount-mount.o mount-fstab.o mount-mount_mntent.o mount-getusername.o
mount-lomount.o mount-sundries.o mount-xmalloc.o mount-realpath.o
mount-fsprobe.o mount-fsprobe_blkid.o   mount-env.o
mount-linux_version.o mount-blkdev.o  mount-setproctitle.o -lblkid
mount-mount.o: In function `parse_opt':
/tmp/util-linux-ng-2.14.1/mount/mount.c:400: warning: Using
'getgrnam' in statically linked applications requires at runtime the
/shared libraries from the glibc version used for linking
/tmp/util-linux-ng-2.14.1/mount/mount.c:391: warning: Using
/'getpwnam' in statically linked applications requires at runtime the
/shared libraries from the glibc version used for linking
mount-getusername.o: In function `getusername':
/tmp/util-linux-ng-2.14.1/mount/getusername.c:9: warning: Using
'getpwuid' in statically linked applications requires at runtime the
/shared libraries from the glibc version used for linking
/usr/lib/gcc/i486-slackware-linux/4.2.4/../../../libblkid.a(probe.o):
/In function `set_uuid':
probe.c:(.text+0x43a): undefined reference to `uuid_is_null'
probe.c:(.text+0x45b): undefined reference to `uuid_unparse'
/usr/lib/gcc/i486-slackware-linux/4.2.4/../../../libblkid.a(probe.o):
In function `get_ext2_info':
probe.c:(.text+0x77f): undefined reference to `uuid_is_null'
collect2: ld returned 1 exit status
make[2]: *** [mount] Error 1
make[2]: Leaving directory `/tmp/util-linux-ng-2.14.1/mount'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/util-linux-ng-2.14.1'
make: *** [all] Error 2

What I haven't tried is BLKID_LIBS_STATIC - what's the deal with
that? How to apply?

-- 
left blank, right bald
loop-AES FAQ: http://mareichelt.de/pub/texts.loop-aes.php#faq

Attachment: pgpoh0FrHb0EN.pgp
Description: PGP signature


[Index of Archives]     [Kernel]     [Linux Crypto]     [Gnu Crypto]     [Gnu Classpath]     [Netfilter]     [Bugtraq]
  Powered by Linux