Ticket #11883 (closed defect: fixed)
fix boehm-gc so it builds on OS X Lion
| Reported by: | jhpalmieri | Owned by: | tbd |
|---|---|---|---|
| Priority: | major | Milestone: | sage-4.8 |
| Component: | packages: standard | Keywords: | boehm-gc lion |
| Cc: | leif | Work issues: | |
| Report Upstream: | N/A | Reviewers: | William Stein |
| Authors: | John Palmieri | Merged in: | sage-4.8.alpha0 |
| Dependencies: | Stopgaps: |
Description (last modified by jdemeyer) (diff)
As the summary says. A new spkg is available here:
This also upgrades to version 7.2.alpha6. According to the boehm-gc website, the current stable version (7.1, which is what is included in Sage) "is old enough that you are almost certainly better off going with the much more recent and only somewhat experimental version", namely 7.2.alpha6.
The home base for this ticket is the Lion ticket #11881.
See #12126 for a follow-up.
Attachments
Change History
Changed 20 months ago by jhpalmieri
-
attachment
trac_11883-boehm-gc.patch
added
comment:1 Changed 20 months ago by jhpalmieri
- Status changed from new to needs_review
- Description modified (diff)
comment:4 Changed 19 months ago by Snark
That spkg also compiles on my ARM box (bug #10285) ; which isn't the case of the one in 4.7.2-alpha4.
comment:5 Changed 19 months ago by was
This builds fine on OS X 10.7 for me. It also still builds on Linux, and works. The changes to the spkg look fine to me too. Thus... positive review.
comment:7 Changed 19 months ago by jhpalmieri
For what it's worth, I've also built this successfully on all of the skynet machines that I have access to: cicero, cleo, eno, iras, flavius, mark, silius, and taurus. It also builds on David Kirkby's OpenSolaris machine hawk.
comment:10 Changed 19 months ago by jdemeyer
- Status changed from positive_review to closed
- Resolution set to fixed
- Merged in set to sage-4.7.3.alpha0
comment:11 Changed 19 months ago by jdemeyer
- Milestone sage-4.7.3 deleted
Milestone sage-4.7.3 deleted
comment:12 Changed 19 months ago by jdemeyer
- Merged in changed from sage-4.7.3.alpha0 to sage-4.8.alpha0
- Milestone set to sage-4.8
comment:13 Changed 18 months ago by jdemeyer
Under some circumstances, this fails to install on older versions of Sage, which is a problem for upgrading. I will investigate, but it is possible that this spkg will need to be unmerged. It happens for example on sage-4.5.3 using gcc 4.5.1 on sage.math:
/bin/bash ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I./include -I./include -I./libatomic_ops/src -I./libatomic_ops/src - fexceptions -g -O2 -MT mach_dep.lo -MD -MP -MF .deps/mach_dep.Tpo -c -o mach_dep.lo mach_dep.c rm: cannot remove `mach_dep.o': No such file or directory rm: cannot remove `.libs/mach_dep.o': No such file or directory rm: cannot remove `mach_dep.lo': No such file or directory rm: cannot remove `mach_dep.loT': No such file or directory libtool: compile: gcc -DHAVE_CONFIG_H -I./include -I./include -I./libatomic_ops/src -I./libatomic_ops/src -fexceptions -g -O2 -MT mach_de p.lo -MD -MP -MF .deps/mach_dep.Tpo -c mach_dep.c -fPIC -DPIC -o .libs/mach_dep.o libtool: compile: gcc -DHAVE_CONFIG_H -I./include -I./include -I./libatomic_ops/src -I./libatomic_ops/src -fexceptions -g -O2 -MT mach_de p.lo -MD -MP -MF .deps/mach_dep.Tpo -c mach_dep.c -o mach_dep.o >/dev/null 2>&1 mv -f .deps/mach_dep.Tpo .deps/mach_dep.Plo /bin/bash ./libtool --tag=CC --mode=link gcc -fexceptions -g -O2 -version-info 1:3:0 -no-undefined -o libgc.la -rpath /mnt/usb1/scratc h/jdemeyer/sage-4.5.3/local/lib allchblk.lo alloc.lo blacklst.lo checksums.lo dbg_mlc.lo dyn_load.lo finalize.lo gc_dlopen.lo gcj_mlc.lo h eaders.lo malloc.lo mallocx.lo mark.lo mark_rts.lo misc.lo new_hblk.lo obj_map.lo os_dep.lo pcr_interface.lo ptr_chck.lo real_malloc.lo re claim.lo specific.lo stubborn.lo typd_mlc.lo backgraph.lo thread_local_alloc.lo pthread_start.lo pthread_support.lo pthread_stop_world.lo atomic_ops.lo mach_dep.lo -lpthread -ldl libtool: link: gcc -shared -fPIC -DPIC .libs/allchblk.o .libs/alloc.o .libs/blacklst.o .libs/checksums.o .libs/dbg_mlc.o .libs/dyn_load. o .libs/finalize.o .libs/gc_dlopen.o .libs/gcj_mlc.o .libs/headers.o .libs/malloc.o .libs/mallocx.o .libs/mark.o .libs/mark_rts.o .libs/mi sc.o .libs/new_hblk.o .libs/obj_map.o .libs/os_dep.o .libs/pcr_interface.o .libs/ptr_chck.o .libs/real_malloc.o .libs/reclaim.o .libs/spec ific.o .libs/stubborn.o .libs/typd_mlc.o .libs/backgraph.o .libs/thread_local_alloc.o .libs/pthread_start.o .libs/pthread_support.o .libs/ pthread_stop_world.o .libs/atomic_ops.o .libs/mach_dep.o -lpthread -ldl -O2 -Wl,-soname -Wl,libgc.so.1 -o .libs/libgc.so.1.0.3 libtool: link: (cd ".libs" && rm "libgc.so.1" && ln -s "libgc.so.1.0.3" "libgc.so.1") rm: cannot remove `libgc.so.1': No such file or directory make[1]: *** [libgc.la] Error 1 make[1]: Leaving directory `/mnt/usb1/scratch/jdemeyer/sage-4.5.3/spkg/build/boehm_gc-7.2.alpha6.p0/src' make: *** [all-recursive] Error 1 Error building BoehmGC.
comment:14 Changed 18 months ago by jhpalmieri
- Description modified (diff)
Okay, I think I know how to fix this: add these lines to spkg-install:
-
spkg-install
diff --git a/spkg-install b/spkg-install
a b if [ $? -ne 0 ]; then 39 39 exit 1 40 40 fi 41 41 42 if [ "$RM" = 'rm' ]; then 43 unset RM 44 fi 45 42 46 make 43 47 if [ $? -ne 0 ]; then 44 48 echo "Error building BoehmGC."
In Sage 4.5.3's version of sage-env, we used to have
if [ "$RM" = "" ]; then
RM="rm" && export RM
fi
We no longer have these lines, and their presence in 4.5.3 is why the upgrade fails. So forcibly unsetting $RM if it's set to 'rm' fixes the problem, at least for me.
I've posted a new spkg, listed in the ticket description, and a corresponding patch, for review. (It's simple enough that maybe we don't need a new ticket.)
comment:15 Changed 18 months ago by jdemeyer
Could you add a comment like
# In order to allow upgrades from versions < 4.7.1 of Sage, # we should not set $RM to "rm". See # http://trac.sagemath.org/sage_trac/ticket/3537 # http://trac.sagemath.org/sage_trac/ticket/11883#comment:13 if [ "$RM" = 'rm' ]; then unset RM fi
comment:16 Changed 18 months ago by jhpalmieri
Okay, I've posted a new version with a comment like that.
Changed 18 months ago by jhpalmieri
-
attachment
trac_11883-rm.patch
added
patch for boehm-gc p1 spkg, for review only

patch for boehm-gc spkg, for review only