Opened 2 years ago

Last modified 19 months ago

#5608 new bug

Fix T3807 for Mac OS X 10.5

Reported by: thorkilnaur Owned by:
Priority: low Milestone: 7.6.2
Component: Test Suite Version: 7.3
Keywords: Cc:
Operating System: MacOS X Architecture: x86
Type of failure: Other Difficulty:
Test Case: Blocked By:
Blocking: Related Tickets:

Description

Attached patch fixes (http://darcs.haskell.org/ghcBuilder/builders/tn23/479/11.html):

=====> T3807(normal) 591 of 3083 [0, 0, 1]
cd ./dynlibs && $MAKE --no-print-directory -s T3807 </dev/null >T3807.run.stdout 2>T3807.run.stderr
Wrong exit code (expected 0 , actual 2 )
Stdout:
Failed to open shared library: dlopen(./T3807test.so, 10): Symbol not found: ___gmp_set_memory_functions
Referenced from: /Users/thorkilnaur/tn/builders/GHCBuilder/tn23/builder/tempbuild/build/bindisttest/install dir/lib/ghc-7.3.20111106/integer-gmp-0.3.0.0/libHSinteger-gmp-0.3.0.0-ghc7.3.20111106.dylib
Expected in: dynamic lookup
Stderr:
make[3]: *** [T3807] Error 1
*** unexpected failure for T3807(normal)

Validates on

$ uname -a
Darwin thorkil-naurs-intel-mac-mini.local 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386 i386
$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 6.12.3
$ 

and

$ uname -a
Linux tn24 2.6.32-34-generic #77-Ubuntu SMP Tue Sep 13 19:40:53 UTC 2011 i686 GNU/Linux
$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 6.12.3
$ 

Best regards
Thorkil

Attachments (1)

0001-Fix-T3807-for-Mac-OS-X-10.5.patch (926 bytes) - added by thorkilnaur 2 years ago.
Fix T3807 for Mac OS X 10.5

Download all attachments as: .zip

Change History (8)

Changed 2 years ago by thorkilnaur

Fix T3807 for Mac OS X 10.5

comment:1 Changed 2 years ago by thorkilnaur

  • Status changed from new to patch

comment:2 Changed 2 years ago by igloo

  • Status changed from patch to new

I'm not sure that this patch is the right way to solve the problem.

What does otool -L T3807test.so say after running the test?

comment:3 Changed 2 years ago by thorkilnaur

It says:

$ otool -L T3807test.so
T3807test.so:
	/Users/thorkilnaur/tn/GHCGitRepository/ghc-working/testsuite/tests/dynlibs/T3807test.so (compatibility version 0.0.0, current version 0.0.0)
	/Users/thorkilnaur/tn/GHCGitRepository/ghc-working/inst/lib/ghc-7.3.20111106/libHSrts-ghc7.3.20111106.dylib (compatibility version 0.0.0, current version 0.0.0)
	/Users/thorkilnaur/tn/GHCGitRepository/ghc-working/inst/lib/ghc-7.3.20111106/base-4.4.0.0/libHSbase-4.4.0.0-ghc7.3.20111106.dylib (compatibility version 0.0.0, current version 0.0.0)
	/opt/local/lib/libiconv.2.dylib (compatibility version 8.0.0, current version 8.1.0)
	/opt/local/lib/libcharset.1.dylib (compatibility version 2.0.0, current version 2.0.0)
	/Users/thorkilnaur/tn/GHCGitRepository/ghc-working/inst/lib/ghc-7.3.20111106/integer-gmp-0.3.0.0/libHSinteger-gmp-0.3.0.0-ghc7.3.20111106.dylib (compatibility version 0.0.0, current version 0.0.0)
	/Users/thorkilnaur/tn/GHCGitRepository/ghc-working/inst/lib/ghc-7.3.20111106/ghc-prim-0.2.0.0/libHSghc-prim-0.2.0.0-ghc7.3.20111106.dylib (compatibility version 0.0.0, current version 0.0.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.7)
$ 

With

$ git diff
diff --git a/tests/dynlibs/Makefile b/tests/dynlibs/Makefile
index ff4f395..f8ec755 100644
--- a/tests/dynlibs/Makefile
+++ b/tests/dynlibs/Makefile
@@ -10,7 +10,8 @@ T3807:
        $(RM) T3807test.so
        $(RM) T3807-load
        '$(TEST_HC)' $(TEST_HC_OPTS) -v0 --make -dynamic -fPIC -shared T3807Export.hs T3807-export.c -o T3807test.so -lHSrts-
-       '$(TEST_HC)' $(TEST_HC_OPTS) -no-auto-link-packages -no-hs-main T3807-load.c -o T3807-load -ldl -lgmp
+       '$(TEST_HC)' $(TEST_HC_OPTS) -no-auto-link-packages -no-hs-main T3807-load.c -o T3807-load -ldl
+       set | grep DYLD
        ./T3807-load
 
 .PHONY: T4464
$ 

where I print DYLD-related environment variables and also without -lgmp (libgmp is expected to be found in /opt/local/lib), I tried:

$ DYLD_FALLBACK_LIBRARY_PATH="$HOME/lib:/opt/local/lib:/usr/local/lib:/lib:/usr/lib" make TEST=T3807
python ../../driver/runtests.py  -e ghc_with_native_codegen=1 -e ghc_with_profiling=0 -e ghc_with_threaded_rts=1 -e ghc_with_dynamic_rts=1 -e ghc_with_interpreter=1 -e ghc_unregisterised=0 -e ghc_with_smp=1 -e ghc_with_llvm=1 -e windows=False -e darwin=True -e in_tree_compiler=True -e clean_only=False --rootdir=. --config=../../config/ghc -e 'config.confdir="../../config"' -e 'config.compiler="/Users/thorkilnaur/tn/GHCGitRepository/ghc-working/inplace/bin/ghc-stage2"' -e 'config.compiler_always_flags.append("")' -e 'config.ghc_pkg="/Users/thorkilnaur/tn/GHCGitRepository/ghc-working/inplace/bin/ghc-pkg"' -e 'config.hp2ps="/Users/thorkilnaur/tn/GHCGitRepository/ghc-working/inplace/bin/hp2ps"' -e 'config.hpc="/Users/thorkilnaur/tn/GHCGitRepository/ghc-working/inplace/bin/hpc"' -e 'config.gs="gs"' -e 'config.platform="i386-apple-darwin"' -e 'config.os="darwin"' -e 'config.arch="i386"' -e 'config.wordsize="32"' -e 'default_testopts.cleanup=""' -e 'config.timeout=int() or config.timeout' -e 'config.timeout_prog="../../timeout/install-inplace/bin/timeout"' -e 'config.exeext=""' -e 'config.top="/Users/thorkilnaur/tn/GHCGitRepository/ghc-working/testsuite"'  \
		 --only=T3807 \
		 \
		 \
		 \
		 \
		
setting LC_ALL to af_ZA.UTF-8
Timeout is 300
Found 1 .T files...
Beginning test run at Mon Nov  7 16:54:31 CET 2011
====> Scanning ./all.T
=====> T3807(normal) 1 of 3 [0, 0, 0]
cd . && $MAKE --no-print-directory -s T3807    </dev/null >T3807.run.stdout 2>T3807.run.stderr
Wrong exit code (expected 0 , actual 2 )
Stdout:
BASH_EXECUTION_STRING='set | grep DYLD'
DYLD_FALLBACK_LIBRARY_PATH=/Users/thorkilnaur/lib:/opt/local/lib:/usr/local/lib:/lib:/usr/lib
DYLD_LIBRARY_PATH=/Users/thorkilnaur/tn/GHCGitRepository/ghc-working/rts/dist/build:/Users/thorkilnaur/tn/GHCGitRepository/ghc-working/libraries/ghc-prim/dist-install/build:/Users/thorkilnaur/tn/GHCGitRepository/ghc-working/libraries/integer-gmp/dist-install/build:/Users/thorkilnaur/tn/GHCGitRepository/ghc-working/libraries/base/dist-install/build:/Users/thorkilnaur/tn/GHCGitRepository/ghc-working/libraries/filepath/dist-install/build:/Users/thorkilnaur/tn/GHCGitRepository/ghc-working/libraries/array/dist-install/build:/Users/thorkilnaur/tn/GHCGitRepository/ghc-working/libraries/bytestring/dist-install/build:/Users/thorkilnaur/tn/GHCGitRepository/ghc-working/libraries/deepseq/dist-install/build:/Users/thorkilnaur/tn/GHCGitRepository/ghc-working/libraries/containers/dist-install/build:/Users/thorkilnaur/tn/GHCGitRepository/ghc-working/libraries/unix/dist-install/build:/Users/thorkilnaur/tn/GHCGitRepository/ghc-working/libraries/old-locale/dist-install/build:/Users/thorkilnaur/tn/GHCGitRepository/ghc-working/libraries/old-time/dist-install/build:/Users/thorkilnaur/tn/GHCGitRepository/ghc-working/libraries/time/dist-install/build:/Users/thorkilnaur/tn/GHCGitRepository/ghc-working/libraries/directory/dist-install/build:/Users/thorkilnaur/tn/GHCGitRepository/ghc-working/libraries/process/dist-install/build:/Users/thorkilnaur/tn/GHCGitRepository/ghc-working/libraries/extensible-exceptions/dist-install/build:/Users/thorkilnaur/tn/GHCGitRepository/ghc-working/libraries/hpc/dist-install/build:/Users/thorkilnaur/tn/GHCGitRepository/ghc-working/libraries/pretty/dist-install/build:/Users/thorkilnaur/tn/GHCGitRepository/ghc-working/libraries/template-haskell/dist-install/build:/Users/thorkilnaur/tn/GHCGitRepository/ghc-working/libraries/Cabal/Cabal/dist-install/build:/Users/thorkilnaur/tn/GHCGitRepository/ghc-working/libraries/binary/dist-install/build:/Users/thorkilnaur/tn/GHCGitRepository/ghc-working/libraries/bin-package-db/dist-install/build:/Users/thorkilnaur/tn/GHCGitRepository/ghc-working/libraries/hoopl/dist-install/build:/Users/thorkilnaur/tn/GHCGitRepository/ghc-working/libraries/mtl/dist-install/build:/Users/thorkilnaur/tn/GHCGitRepository/ghc-working/libraries/utf8-string/dist-install/build:/Users/thorkilnaur/tn/GHCGitRepository/ghc-working/libraries/xhtml/dist-install/build:/Users/thorkilnaur/tn/GHCGitRepository/ghc-working/libraries/terminfo/dist-install/build:/Users/thorkilnaur/tn/GHCGitRepository/ghc-working/libraries/haskeline/dist-install/build:/Users/thorkilnaur/tn/GHCGitRepository/ghc-working/compiler/stage2/build:/Users/thorkilnaur/tn/GHCGitRepository/ghc-working/libraries/haskell98/dist-install/build:/Users/thorkilnaur/tn/GHCGitRepository/ghc-working/libraries/haskell2010/dist-install/build:/Users/thorkilnaur/tn/GHCGitRepository/ghc-working/libraries/random/dist-install/build:/Users/thorkilnaur/tn/GHCGitRepository/ghc-working/libraries/primitive/dist-install/build:/Users/thorkilnaur/tn/GHCGitRepository/ghc-working/libraries/vector/dist-install/build:/Users/thorkilnaur/tn/GHCGitRepository/ghc-working/libraries/dph/dph-base/dist-install/build:/Users/thorkilnaur/tn/GHCGitRepository/ghc-working/libraries/dph/dph-prim-interface/dist-install/build:/Users/thorkilnaur/tn/GHCGitRepository/ghc-working/libraries/dph/dph-prim-seq/dist-install/build:/Users/thorkilnaur/tn/GHCGitRepository/ghc-working/libraries/dph/dph-prim-par/dist-install/build:/Users/thorkilnaur/tn/GHCGitRepository/ghc-working/libraries/dph/dph-seq/dist-install/build:/Users/thorkilnaur/tn/GHCGitRepository/ghc-working/libraries/dph/dph-par/dist-install/build:
Failed to open shared library: dlopen(./T3807test.so, 10): Symbol not found: ___gmp_set_memory_functions
  Referenced from: /Users/thorkilnaur/tn/GHCGitRepository/ghc-working/libraries/integer-gmp/dist-install/build/libHSinteger-gmp-0.3.0.0-ghc7.3.20111106.dylib
  Expected in: dynamic lookup


Stderr:
make[1]: *** [T3807] Error 1

*** unexpected failure for T3807(normal)

OVERALL SUMMARY for test run started at Mon Nov  7 16:54:31 CET 2011
       3 total tests, which gave rise to
       3 test cases, of which
       0 caused framework failures
       2 were skipped

       0 expected passes
       0 expected failures
       0 unexpected passes
       1 unexpected failures

Unexpected failures:
   .  T3807 [bad exit code] (normal)

$ 

But that failed as well, although providing what may be useful information to understand the problem.

Best regards
Thorkil

comment:4 Changed 2 years ago by igloo

  • Milestone set to 7.4.1

Hmm. Does ghc-pkg think that integer-gmp has gmp as an extra-library?:

$ ghc-pkg field integer-gmp extra-libraries
extra-libraries: gmp

comment:5 Changed 2 years ago by thorkilnaur

The answer seems to be "No":

$ inplace/bin/ghc-pkg field integer-gmp extra-libraries
extra-libraries:

On the other hand:

$ inplace/bin/ghc-pkg field integer-gmp frameworks
frameworks: GMP

That may be part of the explanation. What the solution is, however, I don't know.

Best regards Thorkil

comment:6 Changed 2 years ago by igloo

  • Milestone changed from 7.4.1 to 7.6.1
  • Priority changed from normal to low

comment:7 Changed 19 months ago by igloo

  • Milestone changed from 7.6.1 to 7.6.2
Note: See TracTickets for help on using tickets.