"undefined references" when using package
Jan Christiansen
jac at informatik.uni-kiel.de
Sun Apr 18 21:11:39 EDT 2004
On Saturday 17 April 2004 12:48, Sven Panne wrote:
>
> This sounds like missing dependencies in your package configuration file.
> Most package mention e.g. at least the "base" package:
>
> package_deps = [ "base" ]
>
> Looking at the undefined references will probably help to figure out what
> should be mentioned in your case. You don't have to do this transitively,
> BTW, GHC(i) is cunning enough to do this itself, e.g. the "base" package
> depends on the "rts" package, but you don't have to specify this in your
> configuration file.
In fact I hadn't defined the dependencies. The package needs the TclHaskell
package and this one needs lang which needs base. The conf file for my
package now is as follows:
Package
{name = "CHD",
auto = False,
import_dirs = ["/usr/local/lib/ghc-6.2.1/hslibs-imports"],
source_dirs = [],
library_dirs = ["/usr/local/lib/ghc-6.2.1"],
hs_libraries = ["HSCHD"],
extra_libraries = [],
include_dirs = [],
c_includes = [],
package_deps = ["TclHaskell"],
extra_ghc_opts = [],
extra_cc_opts = [],
extra_ld_opts = [],
framework_dirs = [],
extra_frameworks = []
}
Sadly defining the dependencies didn't solve the problem. I get this error
message:
Preprocess/PhilsLine.o(.text+0x13e): In function `s2We_entry':
: undefined reference to `CHDziBaseTypes_CodePosition_con_info'
Preprocess/PhilsLine.o(.text+0x25e): In function `s2W6_entry':
: undefined reference to `CHDziBaseTypes_CodePosition_con_info'
Preprocess/PhilsLine.o(.text+0x382): In function `s2VY_entry':
: undefined reference to `CHDziBaseTypes_CodePosition_con_info'
Preprocess/PhilsLine.o(.text+0x49e): In function `s2VP_entry':
: undefined reference to `CHDziBaseTypes_CodePosition_con_info'
Preprocess/PhilsLine.o(.text+0x6a1): In function `s2Yz_entry':
: undefined reference to `CHDziBaseTypes_CodePosition_con_info'
Preprocess/PhilsLine.o(.text+0x809): more undefined references to
`CHDziBaseTypes_CodePosition_con_info' follow
/usr/local/lib/ghc-6.2.1/libHSCHD.a(Concurrent.o)(.text+0x22): In function
`__stginit_CHDziControlziConcurrent_':
: undefined reference to `__stginit_CHDziBaseTypes_'
/usr/local/lib/ghc-6.2.1/libHSCHD.a(Concurrent.o)(.text+0x36): In function
`__stginit_CHDziControlziConcurrent_':
: undefined reference to `__stginit_CHDziGuiMsgChan_'
/usr/local/lib/ghc-6.2.1/libHSCHD.a(Concurrent.o)(.text+0x40): In function
`__stginit_CHDziControlziConcurrent_':
: undefined reference to `__stginit_CHDziGuiMain_'
/usr/local/lib/ghc-6.2.1/libHSCHD.a(Concurrent.o)(.text+0x4a): In function
`__stginit_CHDziControlziConcurrent_':
: undefined reference to `__stginit_CHDziDebugMain_'
/usr/local/lib/ghc-6.2.1/libHSCHD.a(Concurrent.o)(.text+0x54): In function
`__stginit_CHDziControlziConcurrent_':
: undefined reference to `__stginit_CHDziDebugMsgChan_'
/usr/local/lib/ghc-6.2.1/libHSCHD.a(Concurrent.o)(.text+0x5e): In function
`__stginit_CHDziControlziConcurrent_':
: undefined reference to `__stginit_CHDziDebugInterface_'
/usr/local/lib/ghc-6.2.1/libHSCHD.a(Concurrent.o)(.text+0xb8): In function
`__stginit_CHDziControlziConcurrent_':
: undefined reference to `CHDziDebugInterface_sendDebugMsg_closure'
/usr/local/lib/ghc-6.2.1/libHSCHD.a(Concurrent.o)(.text+0x1c1): In function
`s1jRH_entry':
: undefined reference to `CHDziBaseTypes_CHD_con_info'
/usr/local/lib/ghc-6.2.1/libHSCHD.a(Concurrent.o)(.text+0x1ce): In function
`s1jRH_entry':
: undefined reference to `CHDziBaseTypes_Identity_con_info'
/usr/local/lib/ghc-6.2.1/libHSCHD.a(Concurrent.o)(.text+0x1db): In function
`s1jRH_entry':
: undefined reference to `CHDziDebugMsgChan_ThreadFork_con_info'
/usr/local/lib/ghc-6.2.1/libHSCHD.a(Concurrent.o)(.text+0x1f7): In function
`s1jRH_entry':
: undefined reference to `CHDziDebugInterface_sendDebugMsg_closure'
/usr/local/lib/ghc-6.2.1/libHSCHD.a(Concurrent.o)(.text+0x369): In function
`s1jRv_entry':
: undefined reference to `CHDziBaseTypes_Identity_con_info'
/usr/local/lib/ghc-6.2.1/libHSCHD.a(Concurrent.o)(.text+0x376): In function
`s1jRv_entry':
: undefined reference to `CHDziDebugMsgChan_ThreadForkSuspend_con_info'
/usr/local/lib/ghc-6.2.1/libHSCHD.a(Concurrent.o)(.text+0x38c): In function
`s1jRv_entry':
: undefined reference to `CHDziDebugInterface_sendDebugMsg_closure'
/usr/local/lib/ghc-6.2.1/libHSCHD.a(Concurrent.o)(.text+0x472): In function
`s1jR5_entry':
...
[many more of these]
...
collect2: ld returned 1 exit status
More information about the Glasgow-haskell-users
mailing list