Opened 21 months ago

Last modified 3 weeks ago

#8228 new bug

GHC built under Windows does not generate dyn_hi files

Reported by: ezyang Owned by: thoughtpolice
Priority: high Milestone: 7.12.1
Component: Compiler Version: 7.7
Keywords: Cc:
Operating System: Windows Architecture: Unknown/Multiple
Type of failure: GHC doesn't work at all Test Case: cabal01
Blocked By: Blocking: #6107
Related Tickets: #7134 Differential Revisions:

Description

I found cabal01 failing with:

=====> cabal01(normal) 1 of 1 [0, 0, 0]                                                        
cd . && $MAKE -s --no-print-directory cabal01 VANILLA=--enable-library-vanilla PROF=--disable-l
ibrary-profiling DYN=--enable-shared     </dev/null >cabal01.run.stdout 2>cabal01.run.stderr   
Wrong exit code (expected 0 , actual 2 )                                                       
Stdout:                                                                                        
                                                                                               
Stderr:                                                                                        
Creating library file: dist\build\libHStest-1.0-ghc7.7.20130904.dll.a                          
setup.exe: Error: Could not find module: A with any suffix: ["dyn_hi"] in the search path: ["dist\\build"]                                                                   
make[2]: *** [cabal01] Error 1                                                                 
                                    

but I bet some of the other failures are due to this. Indeed, in dist/build, there are no dyn_hi files

When I look more closely at the commands being run, I see:

bash.exe-3.1$ c:/Users/ezyang/Dev/ghc-validate/inplace/bin/ghc-stage2.exe --make -fbuilding-ca bal-package -O -static -dynamic-too -dynosuf dyn_o -dynhisuf dyn_hi -outputdir dist/build -odi r dist/build -hidir dist/build -stubdir dist/build -i -idist/build -i. -idist/build/autogen -I dist/build/autogen -Idist/build -optP-include -optPdist/build/autogen/cabal_macros.h -package- name test-1.0 -hide-all-packages -no-user-package-db -package-db local.db -package-db dist/pac kage.conf.inplace -package-id base-4.7.0.0-inplace -XHaskell98 -XForeignFunctionInterface A B. A -fforce-recomp -dcore-lint -dcmm-lint -dno-debug-output -no-user-package-db                  
[1 of 2] Compiling B.A              ( B\A.hs, dist\build\B\A.o )                               
[2 of 2] Compiling A                ( A.hs, dist\build\A.o )  

which should result in dyn_hi files but does not. I haven't traced it any further yet.

Change History (15)

comment:1 Changed 21 months ago by awson

In short, in compiler/main/DynFlags.hs "YES" in ("Support dynamic-too", "YES") should be changed to "NO" for Windows. See the discussion here: http://ghc.haskell.org/trac/ghc/ticket/7134#comment:23.

Version 1, edited 21 months ago by awson (previous) (next) (diff)

comment:2 Changed 21 months ago by shelarcy

comment:3 Changed 20 months ago by thoughtpolice

  • Owner set to thoughtpolice

comment:4 Changed 19 months ago by thoughtpolice

  • Priority changed from high to highest

comment:5 Changed 17 months ago by thoughtpolice

The most bizarre aspect of this ticket now that I'm looking at it more deeply is that if you don't use --make, i.e. you're using one-shot mode, then GHC does indeed seem to generate dynamic interface files successfully. I have no idea why --make mode would be any different (yet)

comment:6 Changed 17 months ago by Austin Seipp <austin@…>

In 4af1e76c701a7698ebd9b5ca3fb1394dd8b56c8d/ghc:

Add Windows to NoSharedLibsPlatformList

We're punting on full -dynamic and -dynamic-too support for Windows
right now, since it's still unstable. Also, ensure "Support dynamic-too"
in `ghc --info` is set to "NO" for Cabal.

See issues #7134, #8228, and #5987

Signed-off-by: Austin Seipp <[email protected]>

comment:7 Changed 16 months ago by thoughtpolice

  • Milestone changed from 7.8.1 to 7.8.2

comment:8 Changed 14 months ago by gidyn

  • Cc gideon@… added

comment:9 Changed 14 months ago by thoughtpolice

  • Milestone changed from 7.8.2 to 7.8.3

comment:10 Changed 13 months ago by thoughtpolice

  • Priority changed from highest to high

comment:11 Changed 12 months ago by thoughtpolice

  • Milestone changed from 7.8.3 to 7.8.4

Moving to 7.8.4.

comment:12 Changed 7 months ago by thoughtpolice

  • Milestone changed from 7.8.4 to 7.10.1

Moving (in bulk) to 7.10.4

comment:13 Changed 6 months ago by thomie

  • Blocking 6107 added

comment:14 Changed 4 months ago by thoughtpolice

  • Milestone changed from 7.10.1 to 7.12.1

Moving to 7.12.1

comment:15 Changed 3 weeks ago by gidyn

  • Cc gideon@… removed
Note: See TracTickets for help on using tickets.