Bug 846497 - Broken ntl devel due to problems in multilib support
Broken ntl devel due to problems in multilib support
Product: Fedora
Classification: Fedora
Component: ntl (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Rex Dieter
Fedora Extras Quality Assurance
Depends On:
Blocks: 842407
  Show dependency treegraph
Reported: 2012-08-07 20:28 EDT by Paulo Andrade
Modified: 2012-08-08 19:54 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-08-08 19:54:03 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Paulo Andrade 2012-08-07 20:28:36 EDT
While working on cleanups to avoid the need of a BuildConflicts hack
in #842407 (and after updating to latest rawhide), Singular no longer
builds due to what appears to be a bug in ntl-devel, that errors as:

g++ -c cf_binom.cc -Wall -fno-implicit-templates -I. -I.. -I. -I/usr -I/usr/include/factory -DHAVE_CONFIG_H -I/usr/include/factory  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4  -m64 -mtune=generic -fPIC  -o cf_binom.o
In file included from /usr/include/NTL/ZZ.h:19:0,
                 from /usr/include/NTL/vec_ZZ.h:5,
                 from /usr/include/NTL/ZZX.h:5,
                 from /usr/include/NTL/ZZXFactoring.h:5,
                 from NTLconvert.h:22,
                 from algext.cc:29:
/usr/include/NTL/tools.h:21:22: fatal error: iostream.h: No such file or directory
compilation terminated.

This is caused because of NTL/tools.h:

#if (defined(NTL_STD_CXX) || defined(NTL_PSTD_NHF))

// new header files

#include <cstdlib>
#include <cmath>
#include <iostream>


// old header files

#include <stdlib.h>
#include <math.h>
#include <iostream.h>


but the file defining NTL_STD_CXX is never included because NTL/config.h
consists of:

/* This file is here to prevent a file conflict on multiarch systems.  A
 * conflict will occur because NTL/config.h has arch-specific definitions.

#ifndef NTL_config_MULTILIB_H
#define NTL_config_MULTILIB_H
#include <bits/wordsize.h>

#if __WORDSIZE == 32
#include "NTL/config.h"
#elif __WORDSIZE == 64
#include "NTL/config.h"
#error "unexpected value for __WORDSIZE macro"


while the proper definition is in NTL/config-64.h.

For the sake of continuing my work on Singular, I will hack NTL/config.h
to include NTL/config-64.h.
Comment 1 Paulo Andrade 2012-08-07 20:35:41 EDT
Continuing... the same happens for NTL/mach_desc.h

#if __WORDSIZE == 32
#include "NTL/mach_desc.h"
#elif __WORDSIZE == 64
#include "NTL/mach_desc.h"
#error "unexpected value for __WORDSIZE macro"

that I will change/hack locally to include NTL/mach_desc-64.h
to avoid:

g++ -c cf_cyclo.cc -Wall -fno-implicit-templates -I. -I.. -I. -I/usr -I/usr/include/factory -DHAVE_CONFIG_H -I/usr/include/factory  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4  -m64 -mtune=generic -fPIC  -o cf_cyclo.o
In file included from /usr/include/NTL/ZZ.h:19:0,
                 from cf_cyclo.cc:25:
/usr/include/NTL/tools.h: In function 'void NTL::conv(int&, long int)':
/usr/include/NTL/tools.h:173:62: error: 'NTL_BITS_PER_INT' was not declared in this scope
In file included from /usr/include/NTL/ZZ.h:19:0,
                 from cf_cyclo.cc:25:
[50ish more lines of undefined identifiers follow]
Comment 2 Paulo Andrade 2012-08-07 20:37:21 EDT
Same of making NTL/gmp_aux.h include NTL/gmp_aux-64.h
Comment 3 Rex Dieter 2012-08-08 08:41:22 EDT
OK, I  thought I'd tested  this, but apparently not.   I'll get to work to fix this asap.
Comment 4 Rex Dieter 2012-08-08 19:54:03 EDT
* Wed Aug 08 2012 Rex Dieter <rdieter@fedoraproject.org> 5.5.2-7
- Broken ntl-devel due to problems in multilib support (#846497)

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