Opened 13 years ago

Closed 13 years ago

#7138 closed defect (fixed)

freetype always builds 32-bit libraries on Solaris, even when SAGE64="yes"

Reported by: David Kirkby Owned by: tbd
Priority: major Milestone: sage-4.3.1
Component: porting: Solaris Keywords:
Cc: Merged in: sage-4.3.1.alpha0
Authors: David Kirkby Reviewers: Jaap Spies
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by David Kirkby)

Using

  • A Sun Blade 2000 running Solaris 10 update 7
  • Sage 4.1.2.rc0
  • gcc 4.4.1
  • SAGE64 exported to "yes"

Looking at the directory $SAGE_HOME/local/lib, we can see the freetype libraries are 32-bit, even though SAGE64 was set to "yes"

drkirkby@swan:[~/sage/gcc64-sage-4.1.2.rc0/local/lib] $ file libfreetype*
libfreetype.a:  current ar archive, not a dynamic executable or shared object
libfreetype.la: commands text
libfreetype.so: ELF 32-bit MSB dynamic lib SPARC32PLUS Version 1, V8+ Required, dynamically linked, not stripped
libfreetype.so.6:       ELF 32-bit MSB dynamic lib SPARC32PLUS Version 1, V8+ Required, dynamically linked, not stripped
libfreetype.so.6.3.16:  ELF 32-bit MSB dynamic lib SPARC32PLUS Version 1, V8+ Required, dynamically linked, not stripped

This is far from the only package building 32-bit when SAGE64 is set to "yes" on Solaris. All of the following do, and I suspect there are many others too.

mpir currently mixes 32 and 64-bit objects, so does not build at all #7132.

I will sort this package out after creating a new sage-env, which exports all the variables properly, including the flag for building 64-bit code, which is not always -m64.

Although there is no support for AIX or HP-UX in Sage yet, we could potentially add it - I personally own machines running AIX and HP-UX.

IBM's compiler on AIX uses -q64, and HP's on HP-UX uses +DD64.

The sensible way to resolve this is to add the correct flag on every platform. This is not a very difficult task really. Whilst any changes to the source that might be necessary for a port would take a lot of time, finding the right flags to build with should be quite easy.

Change History (8)

comment:1 Changed 13 years ago by David Kirkby

Description: modified (diff)

comment:2 Changed 13 years ago by David Kirkby

Description: modified (diff)

comment:3 Changed 13 years ago by David Kirkby

Report Upstream: N/A
Status: newneeds_review

I decided to make only the minimum changes necessary to get this to build 64-bit with gcc. As such, the only change is to spkg-install, so instead of -m64 being added only on Darwin, it is now added whenever SAGE64 is set to yes.

I'll leave a better fix until a later date. See

http://boxen.math.washington.edu/home/kirkby/portability/freetype-2.3.5.p2/

comment:4 Changed 13 years ago by David Kirkby

Authors: David Kirkby

comment:5 Changed 13 years ago by Jaap Spies

Reviewers: Jaap Spies
Status: needs_reviewpositive_review

Looks ok for me. Tested on Open Solaris 0906 64 bit and Fedora 12.

I think SPKG.txt needs work, that can be done later by the official maintainer :)

Positive review.

Jaap

comment:6 Changed 13 years ago by David Kirkby

I think you mean spkg-install needs further work, not SPKG.txt

But this will at least allow it to build with gcc on Open Solaris.

comment:7 in reply to:  6 Changed 13 years ago by Jaap Spies

Replying to drkirkby:

I think you mean spkg-install needs further work, not SPKG.txt

But this will at least allow it to build with gcc on Open Solaris.

I really mean SPKG.txt as it is not conform the rules!

William is the maintainer so he will make the changes sometime.

spkg-install is ok withe me.

Jaap

comment:8 Changed 13 years ago by Mike Hansen

Merged in: sage-4.3.1.alpha0
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.