Bug 172168 - Static compilation doesn't work
Static compilation doesn't work
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: cryptsetup (Show other bugs)
x86_64 Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Depends On:
  Show dependency treegraph
Reported: 2005-10-31 21:18 EST by Patrice Guay
Modified: 2014-03-16 22:56 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-11-01 11:23:56 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Updated patch (912 bytes, patch)
2005-11-01 11:21 EST, Bill Nottingham
no flags Details | Diff

  None (edit)
Description Patrice Guay 2005-10-31 21:18:53 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.7.12) Gecko/20050926 Red Hat/1.0.7-1.4.1.TL1 Firefox/1.0.7

Description of problem:
Compilation of cryptsetup-0.1-4 on x86_64 doesn't work. It exits with an error message:
gcc -O2 -g -pipe -m64 -o cryptsetup cryptsetup.o setup.o utils.o backends.o libdevmapper.o gcrypt.o -static  /usr/lib64/libgcrypt.a /usr/lib64/libgpg-error.a -ldevmapper /usr/lib64/libpopt.a
/lib/../lib64/libdevmapper.a(libdm-common.o)(.text+0x52c): In function `set_selinux_context':
/usr/src/redhat/BUILD/device-mapper.1.01.04/lib/libdm-common.c:207: undefined reference to `is_selinux_enabled'
/lib/../lib64/libdevmapper.a(libdm-common.o)(.text+0x544):/usr/src/redhat/BUILD/device-mapper.1.01.04/lib/libdm-common.c:210: undefined reference to `matchpathcon'
/lib/../lib64/libdevmapper.a(libdm-common.o)(.text+0x581):/usr/src/redhat/BUILD/device-mapper.1.01.04/lib/libdm-common.c:218: undefined reference to `lsetfilecon'
/lib/../lib64/libdevmapper.a(libdm-common.o)(.text+0x58f):/usr/src/redhat/BUILD/device-mapper.1.01.04/lib/libdm-common.c:224: undefined reference to `freecon'
/lib/../lib64/libdevmapper.a(libdm-common.o)(.text+0x620):/usr/src/redhat/BUILD/device-mapper.1.01.04/lib/libdm-common.c:220: undefined reference to `freecon'
collect2: ld returned 1 exit status

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. rpmbuild --rebuild cryptsetup-0.1-4.src.rpm

Actual Results:  Compilation fails with an error message (see above).

Expected Results:  Compilation should work without any error.

Additional info:

Modifying the cryptsetup.spec file to compile in a dynamic manner instead of static allows the compilation to work.

This package contains cryptsetup, a utility for setting up
encrypted filesystems using Device Mapper and the dm-crypt target.

%setup -q


%makeinstall bindir=$RPM_BUILD_ROOT/sbin

%find_lang %{name}

Comment 1 Bill Nottingham 2005-11-01 00:24:21 EST
You need a -lselinux for a static build.
Comment 2 Patrice Guay 2005-11-01 07:36:50 EST
What do you mean? Where should the "-lselinux" thing be placed? Currently, a
simple recompilation of cryptsetup source rpm fails on RHEL U2.
Comment 3 Bill Nottingham 2005-11-01 11:21:48 EST
Created attachment 120608 [details]
Updated patch

Here's an updated cryptsetup-0.1-static patch that should fix this -
device-mapper grew a dependency.
Comment 4 Bill Nottingham 2005-11-01 11:23:56 EST
I've fixed this in CVS for this package. However, I don't think we'll push an
update *just* for this issue; it will probably wait until we have other fixes
that warrant an update. Hence, closing it as fixed in the NEXTRELEASE.

This problem is resolved in the next release of Red Hat Enterprise Linux. Red
Hat does not currently plan to provide a resolution for this in a Red Hat
Enterprise Linux update for currently deployed systems.

With the goal of minimizing risk of change for deployed systems, and in response
to customer and partner requirements, Red Hat takes a conservative approach when
evaluating changes for inclusion in maintenance updates for currently deployed
products. The primary objectives of update releases are to enable new hardware
platform support and to resolve critical defects. 

Note You need to log in before you can comment on or make changes to this bug.