Opened 9 years ago

Closed 9 years ago

#3020 closed bug (invalid)

process does not compile

Reported by: Philonous Owned by:
Priority: normal Milestone:
Component: libraries/process Version: 6.8.3
Keywords: Cc:
Operating System: FreeBSD Architecture: x86_64 (amd64)
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


Compiling haskell source using the process library version via cabal-install gives compile errors.

process.hs :

import System.Process
main = runCommand "ls"

ghc process.hs :

process.o(.text+0xea): In function `Main_main_info':
: undefined reference to `processzm1zi0zi1zi1_SystemziProcess_runCommand_closure'
process.o(.text+0x1c3): In function `__stginit_Main_':
: undefined reference to `__stginit_processzm1zi0zi1zi1_SystemziProcess_'
process.o(.data+0x28): In function `Main_main_srt':
: undefined reference to `processzm1zi0zi1zi1_SystemziProcess_runCommand_closure'

just importing the library and not using anything it exports still yields the first of the three errors.

ghci crashes upon compilation of process-

GHCi, version 6.8.3:  :? for help
Loading package base ... linking ... done.
Prelude> :module +System.Process  
Prelude System.Process> runCommand "ls"
Loading package old-locale- ... linking ... done.
Loading package old-time- ... linking ... done.
Loading package filepath- ... linking ... done.
Loading package directory- ... linking ... done.
Loading package unix- ... linking ... done.
Loading package process- ... linking ... <interactive>: internal error: R_X86_64_PC32 relocation out of range: (noname) = 0x7c18012a8
    (GHC version 6.8.3 for x86_64_unknown_freebsd)
    Please report this as a GHC bug:
Abort (core dumped)

ghc --version :

The Glorious Glasgow Haskell Compilation System, version 6.8.3

uname -v

FreeBSD 7.1-RELEASE-p1 #0: Tue Jan 13 00:58:07 UTC 2009     root@:/usr/obj/usr/src/sys/GENERIC 

ghc-pkg -list

    Cabal-, HUnit-, QuickCheck-, array-,
    base-, bytestring-, cgi-3001.1.6.0,
    containers-, directory-, fgl-,
    filepath-, (ghc-6.8.3), haskell-src-,
    haskell98-, hpc-, html-, mtl-,
    network-, old-locale-, old-time-,
    packedstring-, parallel-, parsec-,
    pretty-, process-, random-, readline-,
    regex-base-, regex-compat-, regex-posix-,
    rts-1.0, stm-, template-haskell-, time-,
    unix-, xhtml-3000.2.0.0
    Cabal-, HTTP-3001.1.3, X11-1.4.5, X11-xft-0.3,
    process-, utf8-string-0.3.4, xmonad-0.8.1,
    xmonad-contrib-0.8.1, zlib-

process works just fine.

Change History (2)

comment:1 Changed 9 years ago by Philonous

Summary: process compileprocess does not compile

comment:2 Changed 9 years ago by simonmar

difficulty: Unknown
Resolution: invalid
Status: newclosed

You need to add -package process, or use the --make flag. The reason it worked before is that you were lucky: the older version of process was a dependency of the haskell98 package, which is linked in automatically.

Note: See TracTickets for help on using tickets.