[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 a

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 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: unable to load package `persistent-sqlite-1.0.0' > The immediate cause is that some C source f

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 wrote: > On Wed, Jul 11, 2012 at 10:25 AM, Michael Snoyman > 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: unable to load package `per

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 > #include > #include > > I'm confident that none of my code is making calls to stat/stat64 via > the FFI. In case it makes a diff

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 wrote: > 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 > > #include > > #include > > > > I'm confident that none of my

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 wrote: > > > On Wed, Jul 11, 2012 at 9:55 PM, Bardur Arantsson wrote: > >> 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: >> > >> > #incl

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 > #include > #include > #include > > typedef int stat_func(const char*, struc

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

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 wrote: > 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 > > #include > > #in

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" 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 the com

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" 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 ad

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 wrote: > On Thu, Jul 12, 2012 at 07:20:39PM +0300, Michael Snoyman wrote: > > On Jul 12, 2012 7:13 PM, "Tristan Ravitch" wrote: > > > > > > On Thu, Jul 12, 2012 at 11:07:05AM -0500, Tristan Ravitch wrote: > > > > Are you trying this on a 32 bit sys