#7132: mpir-1.2.p7 fails to build as CXXFLAGS has no 64-bit option on Solaris
----------------------+-----------------------------------------------------
 Reporter:  drkirkby  |       Owner:  tbd       
     Type:  defect    |      Status:  new       
 Priority:  major     |   Milestone:  sage-4.1.3
Component:  solaris   |    Keywords:            
 Reviewer:            |      Author:            
   Merged:            |  
----------------------+-----------------------------------------------------
 I'm using the following hardware and software now.
     * A Sun Blade 2000 running Solaris 10 update 7
     * Sage 4.1.2.rc0
     * gcc 4.4.1
     * SAGE64 exported to "yes"

 mpir-1.2.p7 consists of both C and C++ code, but although the spkg-install
 is adding -m64 to CFLAGS, it is not doing this to CXXFLAGS on Solaris.
 Hence it attempts to build with a mix of 32 and 64-bit binaries, which
 gives the usual error:

 ld: fatal: file .libs/dummy.o: wrong ELF class: ELFCLASS32
 quired

 A look at the object files, clearly shows some are built 32-bit, whilst
 others are 64-bit.


 {{{
 ./cxx/.libs/ismpf.o:    ELF 32-bit MSB relocatable SPARC32PLUS Version 1,
 V8+ Required
 ./cxx/.libs/ismpq.o:    ELF 32-bit MSB relocatable SPARC32PLUS Version 1,
 V8+ Required
 ./cxx/.libs/osfuns.o:   ELF 32-bit MSB relocatable SPARC32PLUS Version 1,
 V8+ Required
 ./cxx/.libs/ismpz.o:    ELF 32-bit MSB relocatable SPARC32PLUS Version 1,
 V8+ Required
 }}}

 though others (not shown) are 64-bit as they are supposed to be.

 There are a number of packages in Sage building as 32-bit on Solaris,
 despite SAGE64 being set to "yes" This include, but are almost certainly
 not limited to:

  * zlib #7128
  * libgpg_error #7129
  * libpng #7130
  * libcliquer #7131

 mpir fails to build at all, since it is trying to mix 32 and 64-bit
 objects.

 The fix to this will be quite easy, but I will wait until I've written a
 better sage-env, which will mean the correct flags for 64-bit will be
 generated on all platforms and compilers we can possibly envisage. Whilst
 -m64 works with Sun and GNU compilers, it will not work with native
 compilers on AIX or HP-UX.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/7132>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to