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

[ARM] Singular 3-1-3-3.p1 doesn't compile as-is #12110

Closed
SnarkBoojum mannequin opened this issue Dec 3, 2011 · 16 comments
Closed

[ARM] Singular 3-1-3-3.p1 doesn't compile as-is #12110

SnarkBoojum mannequin opened this issue Dec 3, 2011 · 16 comments

Comments

@SnarkBoojum
Copy link
Mannequin

SnarkBoojum mannequin commented Dec 3, 2011

The singular package in 4.8.alpha doesn't compile because it lacks a simple switch in a compilation line.

The reason is that 3-1-3-3 still uses an organisation where you either have a known platform and hence get nice switches, or you're not -- and you get crap.

In fact, sage's spkg already adds forcefully a few "-fPIC" here and there that make things better.

The attached patch adds a "-shared" switch to LIBSINGULAR_FLAGS -- but it does so before that variable is overwritten by the good flags if the platform is known. That means it unbreaks my platform but doesn't break the others.

I have an upstream ticket about singular on ARM here : http://www.singular.uni-kl.de:8002/trac/ticket/299

release manager: the working spkg (just a copy of Snark's, at a more convenient place) can be found here: spkg@boxen

Upstream: Fixed upstream, in a later stable release.

Component: build

Author: Julien Puydt

Reviewer: Dmitrii Pasechnik

Merged: sage-4.8.rc0

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

@SnarkBoojum SnarkBoojum mannequin added this to the sage-4.8 milestone Dec 3, 2011
@SnarkBoojum SnarkBoojum mannequin added c: build labels Dec 3, 2011
@dimpase
Copy link
Member

dimpase commented Jan 1, 2012

Replying to @SnarkBoojum:

You have patched Singular.Makefile.in.debug.patch, but don't you also need to patch the non-debug Makefile?

Then, this needs to be rebased for 4.8, as the patch to spkg-install does not apply any more.

@SnarkBoojum
Copy link
Mannequin Author

SnarkBoojum mannequin commented Jan 2, 2012

comment:2

I didn't need to patch the non-debug Makefile, so I don't see the point of patching it : upstream has so much better in store for the future that there's little incentive to make more than what is necessary.

I'll provide a newer patch when I'll have seen the failure in 4.8alpha5.

@dimpase
Copy link
Member

dimpase commented Jan 2, 2012

comment:3

Replying to @SnarkBoojum:

I'll provide a newer patch when I'll have seen the failure in 4.8alpha5.

as I mentioned, your patch needs to be rebased, anyway, as Singular spkg has been updated in the meantime.
It might have become platform-specific, too.

@SnarkBoojum
Copy link
Mannequin Author

SnarkBoojum mannequin commented Jan 3, 2012

comment:4

Ok, here is a rebased patch, but it won't make singular compile : there are now unresolved symbols (omalloc symbols) everywhere... I'll investigate.

@SnarkBoojum
Copy link
Mannequin Author

SnarkBoojum mannequin commented Jan 3, 2012

comment:5

Hmmmm... it tries to use omalloc_ndebug, which doesn't have the right symbols:

jpuydt@hecke:~/sage-4.8.alpha5/local/lib$ nm libomalloc.a |grep omSetCustomOfTrackAddr
000006f8 T omSetCustomOfTrackAddr
jpuydt@hecke:~/sage-4.8.alpha5/local/lib$ nm libomalloc_ndebug.a |grep omSetCustomOfTrackAddr
jpuydt@hecke:~/sage-4.8.alpha5/local/lib$ 

and:

jpuydt@hecke:~/sage-4.8.alpha5/local/lib$ nm libomalloc.a |grep _omDebugAlloc
00000000 t __omDebugAlloc
000003cc T _omDebugAlloc
jpuydt@hecke:~/sage-4.8.alpha5/local/lib$ nm libomalloc_ndebug.a |grep _omDebugAlloc
jpuydt@hecke:~/sage-4.8.alpha5/local/lib$ 

Sigh. Here is how omDebug.c (where those are defined) is compiled for libomalloc.a:

gcc -O2 -g -fPIC -I. -I.. -I. -I/home/jpuydt/sage-4.8.alpha5/local -I.. -DHAVE_CONFIG_H -c omDebug.c

and here is how it is compiled for libomalloc_ndebug.a:

gcc -O2 -g -fPIC -I. -I.. -I. -I/home/jpuydt/sage-4.8.alpha5/local -I.. -DHAVE_CONFIG_H -DOM_NDEBUG -c omDebug.c -o omDebug.o_ndebug

and of course, almost all of omDebug.c is in a #ifndef OM_NDEBUG. That explains the break, but doesn't explain why it would compile on other platforms and not here!

@SnarkBoojum
Copy link
Mannequin Author

SnarkBoojum mannequin commented Jan 3, 2012

comment:6

Ok, I found the problem : now there is a kernel.Makefile.in.debug.patch, which shouldn't be applied unconditionally!

@SnarkBoojum
Copy link
Mannequin Author

SnarkBoojum mannequin commented Jan 3, 2012

Attachment: singular-add-shared-switch.patch.gz

Patch to add -shared as a switch by default on unknown platforms

@SnarkBoojum
Copy link
Mannequin Author

SnarkBoojum mannequin commented Jan 3, 2012

comment:7

The new patch adds a new Singular.Makefile.in.shared.patch file to patches/, and applies it unconditionally. [Aside: in my previous comment, s/kernel/Singular/]

It compiles on my ARM box.

@dimpase
Copy link
Member

dimpase commented Jan 5, 2012

comment:8

Replying to @SnarkBoojum:

The new patch adds a new Singular.Makefile.in.shared.patch file to patches/, and applies it unconditionally. [Aside: in my previous comment, s/kernel/Singular/]

It compiles on my ARM box.

Thanks! With this patch, and the new flint spkg on #10328 provided by William, the build completes. As the system does not have readline-dev installed, the Ubuntu 11.10-specific bug does not materialize. I'm running "make ptest" now.

So the next step would be to make proper spkgs for Singular and for Flint...

@SnarkBoojum
Copy link
Mannequin Author

SnarkBoojum mannequin commented Jan 6, 2012

comment:9

singular-3-1-3-3.p3.spkg on my provider's big file service.

@SnarkBoojum SnarkBoojum mannequin added s: needs review and removed s: needs info labels Jan 6, 2012
@SnarkBoojum
Copy link
Mannequin Author

SnarkBoojum mannequin commented Jan 7, 2012

comment:10

New version of the spkg, which should be in a reviewable state (things are checked in, I added informations to SPKG.txt...) here : singular-3-1-3-3.p3.spkg

@dimpase

This comment has been minimized.

@dimpase
Copy link
Member

dimpase commented Jan 8, 2012

Upstream: Fixed upstream, in a later stable release.

@jdemeyer
Copy link

jdemeyer commented Jan 9, 2012

Author: Julien Puydt

@jdemeyer
Copy link

jdemeyer commented Jan 9, 2012

Reviewer: Dmitrii Pasechnik

@jdemeyer
Copy link

Merged: sage-4.8.rc0

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

2 participants