Bug 658858 - libevent-devel x86_64 and i686 cannot coexist on the same machine
Summary: libevent-devel x86_64 and i686 cannot coexist on the same machine
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: libevent
Version: 13
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: ---
Assignee: Steve Dickson
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-12-01 14:17 UTC by Mr-4
Modified: 2011-06-28 10:15 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-06-28 10:15:33 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
modified libevent .spec file based on 2.0.10-stable (fc15 rawhide) (7.32 KB, application/octet-stream)
2011-04-30 02:30 UTC, Mr-4
no flags Details
event-config.h placeholder (used by libevent.spec) (705 bytes, application/octet-stream)
2011-04-30 02:33 UTC, Mr-4
no flags Details

Description Mr-4 2010-12-01 14:17:19 UTC
Description of problem:
Installing both versions of the above packages (for the purpose of cross-compiling) is not possible as the event-config.h file is overwritten with the version of that file for the last arch installed.


Version-Release number of selected component (if applicable):
FC13, libevent(-devel) 1.x

How reproducible:
Always

Steps to Reproduce:
Assuming x86_64 host arch

1. Install libevent-devel (x86_64)
2. Take a note of the value of _EVENT_SIZEOF_LONG in /usr/include/event-config.h, which should be 8 for x86_64 arch
3. Install libevent-devel (i686)
4. Take a note of the same value - it is now overwritten and it has _EVENT_SIZEOF_LONG 4
  
Actual results:
_EVENT_SIZEOF_LONG 4 for using/compiling in 32bit environments
_EVENT_SIZEOF_LONG 4 for using/compiling in 64bit environments

Expected results:
_EVENT_SIZEOF_LONG 4 for using/compiling in 32bit environments
_EVENT_SIZEOF_LONG 8 for using/compiling in 64bit environments


Additional info:

The above bug can be rectified by implementing the following changes:

/usr/include/event-config.h
~~~~~~~~~~~~~~~~~~~~~~~~~~~

/* This file is generated by Fedora and is here to prevent a file conflict 
 * on multiarch systems.  A conflict will frequently occur because 
 * arch-specific build-time configuration options are stored (and used, 
 * so they can't just be stripped out) in event-config.h.  
 * The original event-config.h has been renamed.
 * DO NOT INCLUDE THE NEW FILE DIRECTLY -- ALWAYS INCLUDE THIS ONE INSTEAD. */

#ifdef event_eventconfig_multilib_redirection_h
#error "Do not define event_eventconfig_multilib_redirection_h!"
#endif
#define event_eventconfig_multilib_redirection_h

#if defined(__x86_64__)
#include "<event-config-64.h>"
#else
#include "<event-config-32.h>"
#endif

#undef event_eventconfig_multilib_redirection_h

/usr/include/event-config-64.h
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

/* Prepended by Fedora at libevent package build-time.  Don't include this file directly,
 * use <event-config.h> instead. */

#ifndef event_eventconfig_multilib_redirection_h
#error "Don't include this file directly, use <event-config.h> instead!"
#endif 

/usr/include/event-config-32.h
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

/* Prepended by Fedora at libevent package build-time.  Don't include this file directly,
 * use <event-config.h> instead. */

#ifndef event_eventconfig_multilib_redirection_h
#error "Don't include this file directly, use <event-config.h> instead!"
#endif 



========Testing - hello.c================
#include <stdio.h>
#include <event-config.h>
 
int main(void)
{
    printf("Size of long is %u\n",_EVENT_SIZEOF_LONG);
    return 0;
}


[zeek@test1 t]$ gcc -o hello hello.c
[zeek@test1 t]$ ./hello 
Size of long is 8
[zeek@test1 t]$ gcc -o hello -m32 hello.c
[zeek@test1 t]$ ./hello 
Size of long is 4
[zeek@test1 t]$ 
=======================================

Comment 1 Nick Mathewson 2010-12-01 20:37:55 UTC
Hi.  I'm the upstream project lead developer, and I endorse this idea.  As it stands, without a fix here, installing both of the libevent-devel packages will mean that you will build incorrect binaries for at least one architecture.

It seems that the openssl packages already take a similar approach with /usr/include/openssl/opensslconf.h

Comment 2 Mr-4 2011-01-15 11:32:36 UTC
This was submitted more than 6 weeks ago and as I already proposed a solution (which has been approved by the upstream lead developer of this project) what is the reason for this not to be included in the libevent rpm - is there a problem?

Comment 3 Mr-4 2011-04-30 02:30:21 UTC
Created attachment 495901 [details]
modified libevent .spec file based on 2.0.10-stable (fc15 rawhide)

Modified libevent .spec file:
1. Resolving the multilib issue once and for all
2. Allowing cross-compilation (as well as linking) to be done by specifying --target
3. Adding additional option (--with/without devel) for whether the development subpackage to be build

Comment 4 Mr-4 2011-04-30 02:33:18 UTC
Created attachment 495902 [details]
event-config.h placeholder (used by libevent.spec)

Used by libevent.spec and serves as a placeholder for the final version of event.config.h

Comment 5 Mr-4 2011-04-30 02:38:50 UTC
I have just added two attachments - libevent.spec and event2-config-multilib-placeholder.h which, when used, resolves, at least for the time being, the above multilib issue. 

The spec file uses 2.0.10-stable as a template, but works very well with 2.0.11 - I have tested it on both x86_64 and i686 environments (with both -devel packages installed on the same host). For a larger set of arches this could easily be modified.

Comment 6 Bug Zapper 2011-05-30 13:13:50 UTC
This message is a reminder that Fedora 13 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 13.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '13'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 13's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 13 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 7 Bug Zapper 2011-06-28 10:15:33 UTC
Fedora 13 changed to end-of-life (EOL) status on 2011-06-25. Fedora 13 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.


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