Bug 68716 - beecrypt sources see different config.h
Summary: beecrypt sources see different config.h
Alias: None
Product: Red Hat Raw Hide
Classification: Retired
Component: rpm (Show other bugs)
(Show other bugs)
Version: 1.0
Hardware: i386 Linux
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2002-07-12 19:14 UTC by Enrico Scholz
Modified: 2008-05-01 15:38 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2002-07-12 19:15:02 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Enrico Scholz 2002-07-12 19:14:57 UTC
While compiling rpm, the beecrypt headers are compiled with settings from
different config.h. 

E.g. when placing

| #ifndef HAVE_LONG_LONG
| #  error Wrong branch
| #else
| #  warning Good branch
| #endif

before the first function in beecrypt/endianess.h, the compilation of beecrypt
itself succeeds (with the expected warning) but fails while compiling within the
lib/ or rpmio/ directory:

| $ make -C beecrypt
| ...
| gcc -DHAVE_CONFIG_H -I. -I. -I. -DOPTIMIZE_I686 -O3 -g -march=i386 -mcpu=i686
| -fomit-frame-pointer -c aes.c  -fPIC -DPIC -o .libs/aes.lo
| In file included from aes.c:31:
| endianness.h:36:4: warning: #warning Good branch
| $ make -C lib
| gcc -DHAVE_CONFIG_H ... -c cpio.c -MT cpio.lo -MD -MP -MF .deps/cpio.TPlo 
-fPIC -DPIC -o .libs/cpio.lo
| In file included from ../rpmio/rpmpgp.h:16,
|                  from ../rpmio/rpmio_internal.h:11,
|                  from cpio.c:12:
| ../beecrypt/endianness.h:34:4: #error Wrong branch

Compiling same sources with different views of the system does not look like a
good idea and the top-level ./configure should do similar checks like the
beecrypt one to define HAVE_LONG_LONG.

Comment 1 Jeff Johnson 2002-07-12 19:58:29 UTC
Hmmm, if you're saying that beecrypt (and db and
zlib and libelf) are not well integrated with
rpm, you're correct. This is by design, since
I'm not sure that any or all of these libraries
are gonna remain in the rpm source tree forever.

The quick fix is to factor the HAVE_LONG_LONG
test into rpm's configure.in. The better fix
IMHO is to try to improve beecrypt's autoconfigure
mechanism, and remove the #ifdef from endianness.h
entirely. In general, beecrypt's include files
are a bit complicated for a system library API ATM.

So far I've failed to convince the beecrypt maintainer
of using (my) <beecrypt/types.h> generated #ifdef free
mechanism. He prefers having configure artifacts like
HAVE_LONG_LONG #ifdef's directly in beecrypt include files.

I'm patiently waiting for a resolution, gonna mark this
bug deferred until then.

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