Opened 12 years ago

Closed 12 years ago

#6437 closed defect (duplicate)

polybori assumes the linker is the GNU one, so breaks if Sun linker is used.

Reported by: drkirkby Owned by: drkirkby
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: porting: Solaris Keywords: solaris GNUism sun linker
Cc: Merged in:
Authors: David Kirkby Reviewers:
Report Upstream: Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

polybori-0.5rc.p7/patches/

DefaultBuild? = Default if distribute or rpm_generation or deb_generation:

def DefaultBuild?(arg):

return arg

defaultenv = Environment()

def sonameprefix(env):

if envPLATFORM?=="darwin":

return "-Wl,-dylib_install_name -Wl,"

else:

return '-Wl,-soname,'

It needs modifying if the OS is Solaris and the linker is not GNU, but I don't know how to do it.

Change History (10)

comment:1 follow-up: Changed 12 years ago by drkirkby

  • Component changed from algebra to solaris
  • Keywords solaris GNUism sun linker added
  • Milestone set to sage-4.1
  • Owner changed from tbd to drkirkby
  • Status changed from new to assigned
  • Summary changed from polybori assumes the linker is the GNU one, so breaks if Sun linker is used. to [with patch, needs review] polybori assumes the linker is the GNU one, so breaks if Sun linker is used.

I've now got this fixed, thanks in no small part to the help of Arnaud Bergeron, as my python skills are next to useless.

The patch is here.

http://sage.math.washington.edu/home/kirkby/Solaris-fixes/polybori/

Since the SConstruct file has been patched many times, I also created a diff from the last version (p7).

http://sage.math.washington.edu/home/kirkby/Solaris-fixes/polybori/SConstruct-diff-from-p7.patch

since a patch from the original source is very large.

I will have gcc 4.4.0 using the Sun linker and assembler on t2 very soon. so perhaps someone can review it.

comment:2 Changed 12 years ago by drkirkby

FWIW, the actual code which decided on what flags to use is below.

def sonameprefix(env):
    print ("Checking for the operating system and linker, to find appropiate flags for the linker.")
    if env['PLATFORM']=="darwin":
        return "-Wl,-dylib_install_name -Wl,"
    elif env['PLATFORM']=="sunos":
        # if GNU in os.system('ld --version 2>&1 /dev/null '):
        if os.system('ld --version > /dev/null 2>&1 ') == 0  :
           print ("You are using the GNU linker on Solaris. Linker flag set to -soname")
           print ("Genererally, the Sun linker is recked to be better on Solaris")
           print ("but Sage has been built using the GNU linker")
           return '-Wl,-soname'  # GNU linker on Solaris
        else:
           print ("You are using the Sun linker on Solaris. Linker flag set to -h")
           return '-Wl,-h'       # Sun linker on Solaris
    else:
        return '-Wl,-soname,'    # Everything else, including linux

comment:3 Changed 12 years ago by drkirkby

  • Authors set to David Kirkby

comment:4 Changed 12 years ago by mvngu

Ticket #2999 is related to this.

comment:5 Changed 12 years ago by PolyBoRi

Thanks to mvngu for pointing us here. The patch will be included in the next release of PolyBoRi?. Best regards,

Alexander

comment:6 in reply to: ↑ 1 Changed 12 years ago by mvngu

Replying to drkirkby:

I've now got this fixed, thanks in no small part to the help of Arnaud Bergeron, as my python skills are next to useless.

The patch is here.

http://sage.math.washington.edu/home/kirkby/Solaris-fixes/polybori/

Since the SConstruct file has been patched many times, I also created a diff from the last version (p7).

http://sage.math.washington.edu/home/kirkby/Solaris-fixes/polybori/SConstruct-diff-from-p7.patch

since a patch from the original source is very large.

After uncompressing polybori-0.5rc.p9.spkg, I see a junk file:

[mvngu@sage polybori-0.5rc.p9]$ hg st
M SPKG.txt
M patches/SConstruct
M patches/custom.py
? patches/SConstruct.p7

namely patches/SConstruct.p7. If you've patched the relevant scripts/build files, can you please remove the junk files? Afterwards, if you're not comfortable with checking in changes using Mercurial, I can deal with that.

comment:7 Changed 12 years ago by mvngu

Updated spkg at

http://sage.math.washington.edu/home/mvngu/patch/polybori-0.5rc.p9.spkg

I've removed the junk file and checked in all changes in the name of David Kirkby. I've also fixed a minor typo. I have restarted building Sage 4.1 from scratch on t2 with the following updated spkg's:

  1. pari-2.3.3.p1.spkg #6445
  2. ntl-5.4.2.p9.spkg #6380
  3. zn_poly-0.9.p1.spkg #6443
  4. polybori-0.5rc.p9.spkg this ticket

comment:8 Changed 12 years ago by mvngu

  • Summary changed from [with patch, needs review] polybori assumes the linker is the GNU one, so breaks if Sun linker is used. to [with spkg, needs review] polybori assumes the linker is the GNU one, so breaks if Sun linker is used.

comment:9 Changed 12 years ago by mvngu

David: I'm not sure how to deal with this one, since ticket #6528 contains the latest updated PolyBori? SPKG. If the SPKG at #6528 also contains the fixes mentioned on this ticket, then this ticket can be closed as a duplicate of #6528. If not, then we shouldn't have two PolyBori? SPKG's with the same name but patched differently.

comment:10 Changed 12 years ago by mvngu

  • Milestone changed from sage-4.1.1 to sage-duplicate/invalid/wontfix
  • Resolution set to duplicate
  • Status changed from assigned to closed
  • Summary changed from [with spkg, needs review] polybori assumes the linker is the GNU one, so breaks if Sun linker is used. to polybori assumes the linker is the GNU one, so breaks if Sun linker is used.

OK, I see that the SPKG at #6528 also fixes the linker issue reported on this ticket. So I'm closing this ticket as a duplicate of #6528. Please correct me if I'm wrong.

Note: See TracTickets for help on using tickets.