Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

link-editor thinks ECL library contains non-pic code on *all* Solaris/OpenSolaris releases - causes problems on 64-bit #9840

Closed
sagetrac-drkirkby mannequin opened this issue Aug 30, 2010 · 7 comments

Comments

@sagetrac-drkirkby
Copy link
Mannequin

sagetrac-drkirkby mannequin commented Aug 30, 2010

As noted at #9099, Maxima fails to build properly on OpenSolaris x64. The ticket then went onto discuss specific doctest failures on 32-bit Solaris n x86.

However, the reason Maxima was not working on OpenSolaris is totally unrelated and much wider. It has nothing to do with Maxima, but is almost certainly an issue with ECL.

Hence it seemed wise to open a ticket specific for this.

The problem is that the link-editor thinks the ecl shared library contains text relocations, which is why there was an error like

ld.so.1: ecl: fatal: relocation error: R_AMD64_PC32: file /export/home/drkirkby/sage-4.4.2/local/lib//libecl.so: symbol main: value 0x22800097de04 does not fit

There's a command given on this Sun blog

http://blogs.sun.com/rie/entry/my_relocations_don_t_fit

which will show libraries with this problem.

== OpenSolaris on x64 ==

I built the latest ECL snapshot outside of Sage, and run the suggested command on the ECL library. Note, this a different version of ECL built at a later date.

drkirkby@hawk:/tmp/ecl$ ./configure 
drkirkby@hawk:/tmp/ecl$ make

then the all important:

drkirkby@hawk:/tmp/ecl$ elfdump -d ./build/libecl.so |  fgrep TEXTREL
      [23]  TEXTREL           0
      [31]  FLAGS             0x4                 [ TEXTREL ]

which indicates a problem - there should be no output from that.

It's also suggested to compile with some debugging information:

$ export LD_OPTIONS=-Dreloc,detail 
$ unset MAKE
$ make

A full log is attached of that.

Upstream: Fixed upstream, in a later stable release.

Component: porting: Solaris

Reviewer: David Kirkby

Issue created by migration from https://trac.sagemath.org/ticket/9840

@sagetrac-drkirkby sagetrac-drkirkby mannequin added this to the sage-4.7 milestone Aug 30, 2010
@sagetrac-drkirkby sagetrac-drkirkby mannequin self-assigned this Aug 30, 2010
@sagetrac-drkirkby

This comment has been minimized.

@sagetrac-drkirkby
Copy link
Mannequin Author

sagetrac-drkirkby mannequin commented Aug 30, 2010

Attachment: complete-log-of-OpenSolaris-86-built.txt.gz

Build log on OpenSolaris, when using debugging options to show text relocations.

@sagetrac-drkirkby
Copy link
Mannequin Author

sagetrac-drkirkby mannequin commented Sep 16, 2010

comment:2

It should be noted this problem exists on every combination of Solaris/OpenSolaris system tested

  • 32-bit Solaris 10 on SPARC
  • 64-bit Solaris 10 on SPARC
  • 32-bit Solaris 10 on x86
  • 64-bit Solaris 10 on x86
  • 32-bit OpenSolaris on x86
  • 64-bit OpenSolaris on x86

However, on 32-bit builds, the text relocation issues are not actually causing any problems, so we can live with that. On 64-bit builds, it completely screws things up.

Similar issues with text relocation has been observed with:

So it's only R and ECL which have this problem outstanding.

Dave

@sagetrac-drkirkby sagetrac-drkirkby mannequin changed the title link-editor thinks ECL library contains non-pic code on *all* 64-bit Solaris/OpenSolaris releases link-editor thinks ECL library contains non-pic code on *all* Solaris/OpenSolaris releases - causes problems on 64-bit Sep 16, 2010
@sagetrac-drkirkby
Copy link
Mannequin Author

sagetrac-drkirkby mannequin commented Nov 9, 2010

comment:3

This has ben fixed upstream, and is the result of using a GCC extension (computed gotos), which don't seem to work properly on Solaris. As yet, I am unaware what the fix is, though I've been told its been fixed.

Dave

@sagetrac-drkirkby
Copy link
Mannequin Author

sagetrac-drkirkby mannequin commented Apr 2, 2011

comment:4

This problem was fixed by #10766, so can be closed as fixed in sage-4.7.alpha1

@sagetrac-drkirkby
Copy link
Mannequin Author

sagetrac-drkirkby mannequin commented Apr 2, 2011

Upstream: Fixed upstream, in a later stable release.

@jdemeyer
Copy link
Contributor

jdemeyer commented Apr 5, 2011

Reviewer: David Kirkby

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant