Bug 846497 - Broken ntl devel due to problems in multilib support
Summary: Broken ntl devel due to problems in multilib support
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: ntl
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Rex Dieter
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 842407
TreeView+ depends on / blocked
 
Reported: 2012-08-08 00:28 UTC by Paulo Andrade
Modified: 2012-08-08 23:54 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-08-08 23:54:03 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Paulo Andrade 2012-08-08 00:28:36 UTC
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>

#else

// old header files

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

#endif
...

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.
 *
 * DO NOT INCLUDE THE NEW FILE DIRECTLY -- ALWAYS INCLUDE THIS ONE INSTEAD. */

#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"
#else
#error "unexpected value for __WORDSIZE macro"
#endif

#endif
-%<-

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-08 00:35:41 UTC
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"
#else
#error "unexpected value for __WORDSIZE macro"
#endif
...

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-08 00:37:21 UTC
Same of making NTL/gmp_aux.h include NTL/gmp_aux-64.h

Comment 3 Rex Dieter 2012-08-08 12:41:22 UTC
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 23:54:03 UTC
%changelog
* Wed Aug 08 2012 Rex Dieter <rdieter> 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.