Re: [Haskell-cafe] ghci and TH cannot: unknown symbol `stat64`

2012-07-13 Thread Michael Snoyman
On Thu, Jul 12, 2012 at 7:30 PM, Tristan Ravitch travi...@cs.wisc.eduwrote: On Thu, Jul 12, 2012 at 07:20:39PM +0300, Michael Snoyman wrote: On Jul 12, 2012 7:13 PM, Tristan Ravitch travi...@cs.wisc.edu wrote: On Thu, Jul 12, 2012 at 11:07:05AM -0500, Tristan Ravitch wrote: Are you

Re: [Haskell-cafe] ghci and TH cannot: unknown symbol `stat64`

2012-07-12 Thread Michael Snoyman
On Wed, Jul 11, 2012 at 9:55 PM, Bardur Arantsson s...@scientician.netwrote: On 07/11/2012 05:12 PM, Michael Snoyman wrote: Thanks for the feedback. However, looking at sqlite3.c, I see the necessary #include statements: #include sys/types.h #include sys/stat.h #include unistd.h

Re: [Haskell-cafe] ghci and TH cannot: unknown symbol `stat64`

2012-07-12 Thread Michael Snoyman
On Thu, Jul 12, 2012 at 6:29 PM, Michael Snoyman mich...@snoyman.comwrote: On Wed, Jul 11, 2012 at 9:55 PM, Bardur Arantsson s...@scientician.netwrote: On 07/11/2012 05:12 PM, Michael Snoyman wrote: Thanks for the feedback. However, looking at sqlite3.c, I see the necessary #include

Re: [Haskell-cafe] ghci and TH cannot: unknown symbol `stat64`

2012-07-12 Thread Tristan Ravitch
On Thu, Jul 12, 2012 at 06:29:41PM +0300, Michael Snoyman wrote: I've come up with a minimal example that demonstrates this problem. The crux of the matter is the following C code: #include sys/types.h #include sys/stat.h #include unistd.h #include stdio.h typedef int

Re: [Haskell-cafe] ghci and TH cannot: unknown symbol `stat64`

2012-07-12 Thread Tristan Ravitch
On Thu, Jul 12, 2012 at 11:07:05AM -0500, Tristan Ravitch wrote: Are you trying this on a 32 bit system? And when you compiled that C program, did you try to add -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE to the compile command? When I define those the resulting object file from your

Re: [Haskell-cafe] ghci and TH cannot: unknown symbol `stat64`

2012-07-12 Thread Michael Snoyman
On Thu, Jul 12, 2012 at 7:07 PM, Tristan Ravitch travi...@cs.wisc.eduwrote: On Thu, Jul 12, 2012 at 06:29:41PM +0300, Michael Snoyman wrote: I've come up with a minimal example that demonstrates this problem. The crux of the matter is the following C code: #include sys/types.h

Re: [Haskell-cafe] ghci and TH cannot: unknown symbol `stat64`

2012-07-12 Thread Michael Snoyman
On Jul 12, 2012 7:13 PM, Tristan Ravitch travi...@cs.wisc.edu wrote: On Thu, Jul 12, 2012 at 11:07:05AM -0500, Tristan Ravitch wrote: Are you trying this on a 32 bit system? And when you compiled that C program, did you try to add -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE to

Re: [Haskell-cafe] ghci and TH cannot: unknown symbol `stat64`

2012-07-12 Thread Tristan Ravitch
On Thu, Jul 12, 2012 at 07:20:39PM +0300, Michael Snoyman wrote: On Jul 12, 2012 7:13 PM, Tristan Ravitch travi...@cs.wisc.edu wrote: On Thu, Jul 12, 2012 at 11:07:05AM -0500, Tristan Ravitch wrote: Are you trying this on a 32 bit system? And when you compiled that C program, did you

[Haskell-cafe] ghci and TH cannot: unknown symbol `stat64`

2012-07-11 Thread Michael Snoyman
Hi all, A quick search indicates that this problem has come up in the past, but I haven't seen any solutions yet. I'm working on the next Persistent release, and one of the changes is that the included sqlite3 C library has been updated (I believe that's the trigger here). I can compile programs

Re: [Haskell-cafe] ghci and TH cannot: unknown symbol `stat64`

2012-07-11 Thread Brandon Allbery
On Wed, Jul 11, 2012 at 10:25 AM, Michael Snoyman mich...@snoyman.comwrote: test.hs: /home/ubuntu/.cabal/lib/persistent-sqlite-1.0.0/ghc-7.4.1/HSpersistent-sqlite-1.0.0.o: unknown symbol `stat64' test.hs: test.hs: unable to load package `persistent-sqlite-1.0.0' The immediate cause is that

Re: [Haskell-cafe] ghci and TH cannot: unknown symbol `stat64`

2012-07-11 Thread Michael Snoyman
On Wed, Jul 11, 2012 at 5:47 PM, Brandon Allbery allber...@gmail.com wrote: On Wed, Jul 11, 2012 at 10:25 AM, Michael Snoyman mich...@snoyman.com wrote: test.hs: /home/ubuntu/.cabal/lib/persistent-sqlite-1.0.0/ghc-7.4.1/HSpersistent-sqlite-1.0.0.o: unknown symbol `stat64' test.hs: test.hs:

Re: [Haskell-cafe] ghci and TH cannot: unknown symbol `stat64`

2012-07-11 Thread Bardur Arantsson
On 07/11/2012 05:12 PM, Michael Snoyman wrote: Thanks for the feedback. However, looking at sqlite3.c, I see the necessary #include statements: #include sys/types.h #include sys/stat.h #include unistd.h I'm confident that none of my code is making calls to stat/stat64 via the FFI. In