Ticket #8 (new defect)

Opened 4 years ago

Last modified 4 years ago

haskelldb-hdbc-odbc-2.0 (Executable DBDirect-hdbc-odbc) fails to build on Mac 10.6 with GHC 6.12.13

Reported by: BrianSniffen Owned by: justinb
Priority: major Milestone:
Component: library Version:
Keywords: Cc:

Description (last modified by justinb) (diff)

This looks similar to <http://www.mail-archive.com/haskell-cafe@haskell.org/msg80969.html>

Building haskelldb-hdbc-odbc-2.0...
[1 of 1] Compiling Database.HaskellDB.HDBC.ODBC ( Database/HaskellDB/HDBC/ODBC.hs, dist/build/Database/HaskellDB/HDBC/ODBC.o )
Registering haskelldb-hdbc-odbc-2.0...
[1 of 2] Compiling Database.HaskellDB.HDBC.ODBC ( Database/HaskellDB/HDBC/ODBC.hs, dist/build/DBDirect-hdbc-odbc/DBDirect-hdbc-odbc-tmp/Database/HaskellDB/HDBC/ODBC.o )
[2 of 2] Compiling Main             ( DBDirect.hs, dist/build/DBDirect-hdbc-odbc/DBDirect-hdbc-odbc-tmp/Main.o )
Linking dist/build/DBDirect-hdbc-odbc/DBDirect-hdbc-odbc ...
Undefined symbols:
  "_CFBundleCopyResourceURL", referenced from:
      _SQLDriverConnect_Internal in libodbc.a(connect.o)
  "___CFConstantStringClassReference", referenced from:
      cfstring=org.iodbc.core in libodbc.a(connect.o)
      cfstring=iODBCadm.bundle in libodbc.a(connect.o)
  "_CFURLCopyFileSystemPath", referenced from:
      _SQLDriverConnect_Internal in libodbc.a(connect.o)
  "_CFRelease", referenced from:
      _SQLDriverConnect_Internal in libodbc.a(connect.o)
      _SQLDriverConnect_Internal in libodbc.a(connect.o)
  "_CFStringGetCString", referenced from:
      _SQLDriverConnect_Internal in libodbc.a(connect.o)
  "_CFBundleGetBundleWithIdentifier", referenced from:
      _SQLDriverConnect_Internal in libodbc.a(connect.o)
ld: symbol(s) not found
collect2: ld returned 1 exit status
cabal: Error: some packages failed to install:
haskelldb-hdbc-odbc-2.0 failed during the building phase. The exception was:
ExitFailure 1

The library builds, but neither DBDirect-hdbc-odbc nor anything else can link against it. The command line resulting in that error is

/usr/local/bin/ghc --make -o dist/build/DBDirect-hdbc-odbc/DBDirect-hdbc-odbc -hide-all-packages -fbuilding-cabal-package -package-conf dist/package.conf.inplace -i -idist/build/DBDirect-hdbc-odbc/DBDirect-hdbc-odbc-tmp -i. -idist/build/autogen -Idist/build/autogen -Idist/build/DBDirect-hdbc-odbc/DBDirect-hdbc-odbc-tmp -optP-include -optPdist/build/autogen/cabal_macros.h -odir dist/build/DBDirect-hdbc-odbc/DBDirect-hdbc-odbc-tmp -hidir dist/build/DBDirect-hdbc-odbc/DBDirect-hdbc-odbc-tmp -stubdir dist/build/DBDirect-hdbc-odbc/DBDirect-hdbc-odbc-tmp -package-id HDBC-2.2.6.1-0f9baa5d6647e2b281cadb00f5b61c6a -package-id HDBC-odbc-2.2.3.0-60c925f705ef63a902240379c7571abe -package-id base-4.2.0.2-99442781c4fd10a8c30c35c9ce5fac5c -package-id haskelldb-2.0-29cc84bbf92847a33ad342b6a7094c17 -package-id haskelldb-hdbc-2.0-878ea7cd26cf0e7798e149f8077cc59b -package-id mtl-1.1.0.2-336254fecf8a77054f76cb33671a5177 -O ./DBDirect.hs

Change History

Changed 4 years ago by justinb

  • owner changed from somebody to justinb
  • description modified (diff)

Try adding additional library paths (--extra-lib-dirs)? It's clearly a linking problem and I don't see any "-L" options on the command line.

Can you build anything else against the same libodbc library? Can you build a vanilla HDBC ODBC program (w/o involving HaskellDB)?

Note: See TracTickets for help on using tickets.