Opened 8 years ago

Closed 3 years ago

#15 closed defect (fixed)

make test fails under OS X 10.5

Reported by: flip Owned by:
Priority: minor Milestone:
Component: GAMMA Version:
Keywords: Cc:

Description

Under OS X 10.5 (and probably earlier versions of OS X) but not 10.6, the Makefile's make test fails. Specifically, the test runs hstat which tries to load libgamma.4.dylib which isn't built by make test. Here's some sample output courtesy of Karl --

....
running command: ../../mac-darwin/hstat 2spin_HH.sys  20000 0 0 0  0 8000 0 0 0 0  0 8000 0 0 0 0 12 2048 5e-6 test_stat > test_stat.log
dyld: Library not loaded: ../../mac-darwin/libgamma.4.dylib
 Referenced from: /Users/karlyoung/Projects/vespa/gamma_guest/src/Tests/../../mac-darwin/hstat
 Reason: image not found
/bin/sh: line 1: 14876 Trace/BPT trap          ../../mac-darwin/hstat 2spin_HH.sys 20000 0 0 0 0 8000 0 0 0 0 0 8000 0 0 0 0 12 2048 5e-6 test_stat > test_stat.log
'../../mac-darwin/hstat 2spin_HH.sys  20000 0 0 0  0 8000 0 0 0 0  0 8000 0 0 0 0 12 2048 5e-6 test_stat > test_stat.log' took 0.008 seconds
Comparing: test_stat.log golden/test_stat.log
test_stat.log: ''
golden/test_stat.log: 'Simulation of isotropic chemical shift by dipolar coupling'
*** TEST FAILED ***

Workaround

There's a simple workaround which is to make so before make test. The former command builds libgamma.4.dylib.

OS X 10.6

The problem doesn't happen under OS X 10.6 which uses gcc 4.2.1 and some different default config than OS X 10.5 which uses gcc 4.0.1. There's a noticeable difference in the hstat as built on 10.5 versus 10.6 as shown by otool and file. Under 10.5 --

$ otool -L hstat

hstat:
   ../../mac-darwin/libgamma.4.dylib (compatibility version 4.2.0, current version 4.2.0)
   /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.4.0)
   /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
   /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.1.6)
$ file hstat
hstat: Mach-O executable i386

Under 10.6 --

$ otool -L hstat
hstat:
	/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.10)
$ file hstat 
hstat: Mach-O 64-bit executable x86_64

The fact that hstat is 64 bit under 10.6 is interesting but I don't think relevant. The otool output tells us what we sort of already knew, which is that under 10.5 hstat wants to find ../../mac-darwin/libgamma.4.dylib and under 10.6 it doesn't care about it. This is certainly coming from the -lgamma in this part of the Makefile --

$(BINDIR)/hstat : $(BINDIR)/homo_stat.too
	$(CXX) -o $@ $(LD_TESTFLAGS) $(BINDIR)/homo_stat.too -L${BINDIR}/ -lgamma $(LAB_LIBS)

But why -lgamma produces one thing under 10.5 and another under 10.6 is a mystery to us.

Projected Fix

Given that this happens only on a platform with a finite lifespan and the fact that there's an easy workaround, we're probably not going to find time to fix this.

Change History (1)

comment:1 Changed 3 years ago by flip

  • Resolution set to fixed
  • Status changed from new to closed

We don't support OS X 10.5 anymore.

Note: See TracTickets for help on using tickets.