Bug 819333 - flint defines ulong as a macro, conflicting with system definition
Summary: flint defines ulong as a macro, conflicting with system definition
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: flint
Version: rawhide
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Conrad Meyer
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-05-06 17:20 UTC by Paulo Andrade
Modified: 2012-05-26 07:11 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2012-05-26 07:11:36 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
flint-1.6-ulong.patch (363 bytes, patch)
2012-05-06 17:20 UTC, Paulo Andrade
no flags Details | Diff

Description Paulo Andrade 2012-05-06 17:20:10 UTC
Created attachment 582476 [details]
flint-1.6-ulong.patch

In my current work on porting sagemath to Fedora, the build failure is:

gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/home/pcpa/rpmbuild/BUILDROOT/sagemath-5.0.rc0-1.x86_64/usr/share/sagemath/local/include/FLINT/ -Isage/libs/flint/ -I/home/pcpa/rpmbuild/BUILDROOT/sagemath-5.0.rc0-1.x86_64/usr/share/sagemath/local/include -Ic_lib/include -I/home/pcpa/rpmbuild/BUILDROOT/sagemath-5.0.rc0-1.x86_64/usr/share/sagemath/devel/sage/sage/ext -I/usr/include/python2.7 -c sage/libs/flint/fmpq_poly.c -o build/temp.linux-x86_64-2.7/sage/libs/flint/fmpq_poly.o -std=c99 -D_XPG6 -w
In file included from /usr/include/stdlib.h:320:0,
                 from /usr/include/zn_poly/zn_poly.h:31,
                 from /home/pcpa/rpmbuild/BUILDROOT/sagemath-5.0.rc0-1.x86_64/usr/share/sagemath/local/include/FLINT/fmpz.h:39,
                 from sage/libs/flint/fmpq_poly.h:21,
                 from sage/libs/flint/fmpq_poly.c:15:
/usr/include/sys/types.h:151:27: error: duplicate 'unsigned'
error: command 'gcc' failed with exit status 1

  I am currently using fedora 16, but the problem will happen in any
current fedora.

  This pseudo patch to flint.h corrects it:

-#define ulong unsigned long
+typedef unsigned long ulong;

as gcc will then not cause an error in sys/types.h for the redefined
but identical typedef; code in sys/type.h looks like:

#ifdef __USE_MISC
/* Old compatibility names for C types.  */
typedef unsigned long int ulong;
typedef unsigned short int ushort;
typedef unsigned int uint;
#endif

  I rebuilt flint with the attached patch, to continue my work on
sagemath port to fedora.

Comment 1 Fedora Update System 2012-05-07 19:28:54 UTC
flint-1.6-3.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/flint-1.6-3.fc17

Comment 2 Fedora Update System 2012-05-07 22:26:32 UTC
Package flint-1.6-3.fc17:
* should fix your issue,
* was pushed to the Fedora 17 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing flint-1.6-3.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-7462/flint-1.6-3.fc17
then log in and leave karma (feedback).

Comment 3 Fedora Update System 2012-05-26 07:11:36 UTC
flint-1.6-3.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.


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